[antlr-interest] Re: Translating PASCAL (or C) into JAVA
pietschoutteten at yahoo.com
Thu Feb 14 06:41:40 PST 2002
Thank you Robert.
I know that one can never translate some source for 100% and I am
aware of the problems you've mentioned, they are the problem. There
is always a part that have to be made by hand.
But my question is
how can I translate PASCAL into JAVA with ANTLR?
--- In antlr-interest at y..., "Robert" <renyedi at y...> wrote:
> It is possible to translate Pascal or C into Java, but not for the
> language. There is a 80-90% part of the language that should be
> relatively straightforward.
> However, when it comes about pointers and pointer related constructs
> problems arise (this is especially a problem in case of C). And
> forget about the source language's libraries for which you may not
> source code and you should make an emulation. This is the hard part.
> ----- Original Message -----
> From: "pietschoutteten" <pietschoutteten at y...>
> To: <antlr-interest at y...>
> Sent: Thursday, February 14, 2002 3:18 PM
> Subject: [antlr-interest] Translating PASCAL (or C) into JAVA
> > Hello all,
> > I'm new to the mailing list and I'm 'playing' with ANTLR since a
> > 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
> > 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
> > and the GNU C parser from the website.
> > ANTLR produces me the JAVA-files PascalLexer.java
> > and PascalTokenTypes.java
> > and I can build these together and test it with the example
> > I also tested it with the grammer from Sinan (message 2398 Re:
> > 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
> > 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
> > JAVA. And I searched in the ANTLR Reference Manual, which is
> > 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
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest