[antlr-interest] adding enum token types output for java target
Jim Idle
jimi at temporal-wave.com
Mon May 26 10:08:00 PDT 2008
On Mon, 2008-05-26 at 09:52 -0700, Terence Parr wrote:
> 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?
Yeah - I think you should do that. I thought about using enum a bit more
int he generated C code, but for most C compilers there is as yet little
difference.
>
> Ter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080526/1147fd8b/attachment.html
More information about the antlr-interest
mailing list