Re: Source to Source Compiler?

Derek M Jones <derek@knosof.co.uk>
13 May 1996 14:17:29 -0400

          From comp.compilers

Related articles
Source to Source Compiler? Christoph.Niedermeier@zfe.siemens.de (1996-05-10)
Re: Source to Source Compiler? derek@knosof.co.uk (Derek M Jones) (1996-05-13)
Re: Source to Source Compiler? mac@coos.dartmouth.edu (1996-05-13)
Re: Source to Source Compiler? pdonovan@netcom.com (1996-05-14)
Re: Source to Source Compiler? kalle@poet.de (Dr. Karl Prott) (1996-05-14)
Re: Source to Source Compiler? ndc@icanect.net (Norman Culver) (1996-05-19)
Re: Source to Source Compiler? grosch@cocolab.sub.com (1996-05-19)
| List of all articles for this month |

From: Derek M Jones <derek@knosof.co.uk>
Newsgroups: comp.compilers
Date: 13 May 1996 14:17:29 -0400
Organization: Knowledge Software Ltd
References: 96-05-077
Keywords: C, optimize

Chris,


> We are intending to build a frontend compiler which translates ANSI C
> plus our own extensions to pure ANSI C. Our idea is to use the sources
> of the GNU C-Compiler and modify them such that C code is produced
> instead of assembler code.
>
> Is there anyone who has done such a job and can give advice? Maybe
> there is even some modified gcc frontend or other software serving
> this purpose ?


Things all depend on your reason for converting to C.


If you are using it as a mechanism to get your code compiled then I
would suggest lcc. Its main advantage over gcc is that there is some
documentation for this compiler (you will have to preprocess your code
first since they don't provide one).


If you are interested in hanging onto the generated C then all
compilers are a poor starting point. 10 years ago we produced a C ->
Pascal translator. It took a lot of effort to make sure the generated
code 'looked' like the original. Check out the page
www.knosof.co.uk/ctoa.html for more info (ok, so this page talks about
translating to Ada).


derek


--
Derek M Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd email: derek@knosof.co.uk
                                                                                                  http://www.knosof.co.uk
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.