[antlr-interest] Translating PASCAL (or C) into JAVA
pietschoutteten
pietschoutteten at yahoo.com
Thu Feb 14 05:18:51 PST 2002
Hello all,
I'm new to the mailing list and I'm 'playing' with ANTLR since a few
days. The ideas behind ANTLR are magnificant and I find it a very
intelligent system, a real contribution to Computer Science.
Now I have a simple question.
I must find a system to translate Pascal files into JAVA. (can be C
into JAVA aswell)
Can that be done with ANTLR?
Is there a quick solution to do that (perhaps starting from the
Pascal example?)
I have testet the Pascal grammer (antlr-2.7.1\java\examples\pascal)
and the GNU C parser from the website.
ANTLR produces me the JAVA-files PascalLexer.java PascalParser.java
and PascalTokenTypes.java
and I can build these together and test it with the example P_0_1.pas
I also tested it with the grammer from Sinan (message 2398 Re: Ter,
Would you mind looking at ....) which builds me an AST.
My problem is that I want to translate this P_0_1.pas into JAVA code!
Is that possible?
I also searched in the FAQ and the Messages list and read a lot of
discussions, but none of them goes into translating source-code into
JAVA. And I searched in the ANTLR Reference Manual, which is detailed
AND interesting, but I first have to know if my PASCAL to JAVA
translation is possible and how.
If so, I'm sure I will become a dedicated ANTLR-user.
Thank you in advance to help this newcomer.
Piet Schoutteten
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list