[antlr-interest] how to distinguish a keyword (e.g. "stale") from other string literal

Xue Yong Zhi zhixueyong at hotmail.com
Tue Sep 26 08:51:58 PDT 2006


Ning Ji wrote:
> hi my old code has this line
> 
> IDNET: ('a'..'z')*
> 
> now i want to add a keyword "stale",
> STALE: "stale"
> 

Please read the Reference Manual:

http://www.antlr.org/doc/lexer.html#Keywords_and_literals

-- 
Xue Yong Zhi
http://seclib.blogspot.com



More information about the antlr-interest mailing list