[antlr-interest] adding enum token types output for java target

向雅 fyaoxy at gmail.com
Mon May 26 13:57:23 PDT 2008


2008/5/27 Terence Parr <parrt at cs.usfca.edu>:

>
> On May 26, 2008, at 1:46 PM, Johannes Luber wrote:
>
>  On May 26, 2008, at 12:17 PM, Brent Yates wrote:
>>>
>>>  I would prefer the Token.MINUS form (even if it breaks existing
>>>> code) just to resolve name conflicts that often arise.
>>>>
>>>
>>> Yep, and other reason to add the enum.  Is enum 1.4?  if it requires
>>> 1.5, though, I think I will hold off because it is part of the
>>> runtime. I want to keep the run time 1.4 compatible for now.
>>>
>>> Ter
>>>
>>
>> enum is 1.5. It would be nice, if you could still add that to the
>> templates within comments, so targets with a support for enums can simply
>> change the output.
>>
>
> Actually, we could add an attribute to the output templates that indicates
> the language level. Useful for not only Java but C# as well, right? then we
> could do
>
> <if(1_5)>
> enum...
> <endif>
>
> Ter


If 1.4 needed, maybe 2 build versions needed. One for 1.4, One for 1.5.


-- 
致敬
向雅
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080527/1be7abd6/attachment.html 


More information about the antlr-interest mailing list