[antlr-interest] adding enum token types output for java target
Terence Parr
parrt at cs.usfca.edu
Mon May 26 09:52:51 PDT 2008
Howdy folks,
The C target gets a .h file as output to define tokens etc... Brian
Goetz, Sun smarty pants, asked me about generating an enum from ANTLR
to make it easier for IDEs and other tools to use reflection to get
token types and other goodies. It took me 2 minutes and a few
template lines to make this happen (i.e., no code generator changes).
Should I add this for 3.1? Should it be added at all?
Note that we still need a textbased ID=34 type file for data
interchange with nonjava tools etc...
Given the late release stage, I could do for java and leave such a
change for other targets to 3.2, though it's trivial to add.
Votes?
Ter
More information about the antlr-interest
mailing list