[antlr-interest] Lexer problem

Monty Zukowski monty at codetransform.com
Mon May 24 15:16:46 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);}
>     ;

Also I think your k is off by one.  In your subrule you have already 
matched '\'', so, for instance, you want | {LA(2)=='\''}? . "'"         
              {$setType(CHAR_LIT};}

Monty



 
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