[antlr-interest] Help me please to improve lexer

alekseyandreev andreev at quorum.ru
Thu Dec 5 01:30:09 PST 2002


My lexer grammar looks like this:

START options { ignore WS; } 
   : "aaa"{do();} "bbb"{do();} "ccc"{do();}
   | "ddd"{do();} "eee"{do();}
   | "fff"{do();}  XXX {do();}
   |  YYY {do();}
   ;
XXX options { ignore WS; } 
   : "iii"{do();} "jjj"{do();}
   | "kkk"{do();}
   ;
YYY options { ignore WS; } 
   : "lll"{do();} "mmm"{do();}
   | "nnn"{do();}
   ;

Is there any opportunity to remove actions {do();}
after every element and have analogue behavior?

Aleksey


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list