[antlr-interest] literals.

cesar octavio lopez nataren cesar at ciencias.unam.mx
Wed Dec 10 06:16:08 PST 2003


On Wed, 2003-12-10 at 04:41, Cristian Amitroaie wrote:
> Why not simply adding to the lexer:
> 
> tokens {
>    IN="in";
>    INSTANCE_OF="instanceof";
> };

Hello Cristian!

dude! this solution rocked! thanks a lot. I get the nondeterminism
warning with this, but it's picking the correct rule at each case. So
I'll ignore that warning ;-)

By the way, I tried Oliver suggestion about IN taking precedence over
IDENTIFIER, it did work, but after that I could not recognize
identifiers that were having in as prefix: inverse;
			                   ^^

Thanks a lot for the suggestions guys, you rock!

César

 

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




More information about the antlr-interest mailing list