[antlr-interest] How to translate this V2 Lexer rule to V3 Lexer rule?

chain one chainone at gmail.com
Tue Dec 2 22:48:23 PST 2008


The V2 Lexer rule is:
IDENT

: ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
{
 if (!parser.isFirst) $setType(globalSearchId($getText()));
}
;


I searched in the ANTLR V3 book but failed to find the way to get the Lexer
rule's Text and Type directly from its alternatives.

Anyone who knows , could you please drop me an email?
Thanks very much!
Best Regards,
Chainone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081203/982f85e0/attachment.html 


More information about the antlr-interest mailing list