[antlr-interest] Non-reserved keyword as identifier question

Susan Jolly easjolly at ix.netcom.com
Fri Aug 31 20:25:20 PDT 2007


I have a related question which is whether you ever want to use a large
number of literal tokens in V3? 

The generated lexer seems very verbose as far as distinguishing literals
from identifiers.  Wouldn't it be better to roll your own method for
assigning token types to literals?  The only slight problem is that if the
literal starts with a lower case letter you can't use the exact text of
literal as the token identifier (or label).  You could resolve this with a
naming convention such as LC_int.




More information about the antlr-interest mailing list