[antlr-interest] Found a BUG ! (maybe)
Terence Parr
parrt at cs.usfca.edu
Fri Mar 19 17:30:31 PST 2004
On Mar 19, 2004, at 4:54 PM, rigpa_man wrote:
> Hi all,
>
> I used ANTLR (PCCTS) a few years ago and loved it. I have a use for
> it again so I'm picking it up to play with one more time.
welcome back, rigpa_man!
> Here is my problem:
> (bug appears in both antlr-2.7.2 and antlr-2.7.3rc2)
>
> The following lex rule...
>
> SCOLN
> : ';' (~'\n')* '\n'
> ;
>
> ...gets converted to this... (parts removed for brevity)
>
> . . .
> match(';');
> {
> _loop6:
> do {
> if ((LA(1)==';')) {
> matchNot('\n');
> }
> else {
> break _loop6;
> }
> } while (true);
> }
> match('\n');
> . . .
>
> ...which does not work.
This indicates that you have not specified a charVocab='\003'..'\377'
option in your lexer to tell it was ~'\n' means. Give that a shot.
Ter
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!
Cofounder, http://www.peerscope.com pure link sharing
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list