[antlr-interest] Minor suggestion re. Java output

J Chapman Flack jflack at math.purdue.edu
Tue Feb 5 07:34:42 PST 2008


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.

Such a project might also reveal what additional information the
model needs to expose, if any, in order to support a view that
could make use of, for example, covariant return typing. It would
complicate the project, of course, if any such changes were needed
in the model, but they would probably be useful for other future
backends as well.

-Chap


More information about the antlr-interest mailing list