[antlr-interest] Lexer problem
Monty Zukowski
monty at codetransform.com
Mon May 24 15:14:42 PDT 2004
On May 24, 2004, at 3:05 PM, Tom Verbeure wrote:
> QUOTE: '\'' (
> {LA(2)=='(' && LA(3)=='\'' && LA(5)=='\''}? {$setType(QUOTE);}
> | {LA(3)=='\''}? . "'" {$setType(CHAR_LIT};}
> | {$setType(QUOTE);}
> ;
>
> However, when I look at the generated code, it will always test for
> CHAR_LIT first, before looking at the first QUOTE.
I'm not following you. Quote the generated code too. Also consider
using a parser filter for this nastiness.
http://www.codetransform.com/filterexample.html
Monty Zukowski
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
http://www.codetransform.com/gcc.html
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
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