[antlr-interest] ANTLR translation - e.g. Java->tree->Java

Tim Tyler tt2333 at yahoo.co.uk
Sun Jun 22 05:43:47 PDT 2003


I'm contemplating an ANTLR translation project.

To do this I need to reconstruct the Java file from its tree.

There seem to be several problems.

One is that unicode information seems to get blatted.

Another is that most of the Java parsers I can see
strip out comments and white space.  I'm likely to
be wanting to preserve these as much as possible -
and maybe have them in the parse tree.

About the only existing Java ANTLR translation project
I'm aware of is Jalopy: http://jalopy.sourceforge.net/

Jalopy suggests that something is at least possible - but
it is big and complex - and I'd like a bit of a less hairy
example.

Are there any other ANTLR translation projects out there?

I'm a bit suprised ANTLR isn't already a little more translation-
oriented.

After all, being able to reconstruct the original file is a good 
test for having parsed it correctly ;-)



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list