[antlr-interest] Pretty-printer for Java 5 grammar: Translating Java to C++
Henri Sivonen
hsivonen at iki.fi
Mon Jun 9 01:38:40 PDT 2008
I have two algorithm and primitive-tweaking-intensive Java classes
that I'd like to translate into C++ classes (and keep maintaining as
Java source). It seems to me that a sensible way to do this would be
hacking a Java 5 AST to Java 5 serializer until it outputs C++ instead
of Java 5 for the subset of Java that my two classes happen to use.
Is there an open-source pretty-printer/serializer for the Antlr Java 5
grammar? (So that I could use it as a starting point.)
(I don't need general Java class library emulation in C++ or smart
memory management code generation. However, I do need the ability to
annotate individual field/argument/local declarations with C++ target
types when non-obvious substitution is called for and I need the
ability to have magic comments for not including certain lines in C++
and adding manually written lines of C++ here and there.)
P.S. I did notice the thread from February 2007, but it didn't appear
to came to an easy conclusion.
http://www.antlr.org/pipermail/antlr-interest/2007-February/019243.html
--
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
More information about the antlr-interest
mailing list