[antlr-interest] FW: nondeterminism in lexer rule
Xue Yong Zhi
zhixueyong at hotmail.com
Thu Mar 1 07:29:11 PST 2007
If 'if' is a keyword in your language, why not using ANTLR's builtin
support for keyword by doing "testLiterals = true"? You can use java.g
as an example.
> Can I put some logic wherein it will compare the whole token IFINIT
> with IF rather character by character.
>
> I have declared IF as literal with following option for the grammer and
> my label IFINIT/ENDSCRIPT forms part of token LITERAL which is defined
> as below:
>
--
Xue Yong Zhi
XRuby (Ruby to Java bytecode compiler):
http://xruby.blogspot.com
More information about the antlr-interest
mailing list