[antlr-interest] Minor suggestion re. Java output

Jim Idle jimi at temporal-wave.com
Tue Feb 5 08:59:02 PST 2008



> -----Original Message-----
> From: J Chapman Flack [mailto:jflack at math.purdue.edu]
> Sent: Tuesday, February 05, 2008 7:35 AM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Minor suggestion re. Java output
> 
> 
> jimi> - Remember that the Java code target is 1.4;
> jimi> - The code is put together by the string template hence it
> jimi>   is a view and cannot know anything about the model;
> 
> guntiso> The question that is puzzling me is:
> guntiso>   if java code target was 1.5 or later
> guntiso>   would then it be possible for CommonTree to return
> guntiso>   CommonTree children?
> 
> What this thread makes me wonder (and it's not a rhetorical
> question, because I don't know the answer) is, would it be a
> feasible project for somebody who wanted Java output that takes
> advantage of more modern features to modify the Java 1.4 string
> templates into a 1.5 set?  Then we could have both.

Certainly, but you would probably need runtime changes. In the end I am 
not sure that you would really gain that much though to be honest. But, 
those that feel strongly about it do of course have the entire source to 
play with, so trying it and pointing out a 30% performance gain or 
something would go a long way to making the point :-)

Jim



More information about the antlr-interest mailing list