|Source to Source compilation - targeting C? email@example.com (Mark Txx) (2009-12-28)|
|Re: Source to Source compilation - targeting C? firstname.lastname@example.org (Ira Baxter) (2009-12-30)|
|Re: Source to Source compilation - targeting C? email@example.com (BGB / cr88192) (2009-12-30)|
|Re: Source to Source compilation - targeting C? Meyer-Eltz@t-online.de (Detlef Meyer-Eltz) (2009-12-31)|
|From:||Detlef Meyer-Eltz <Meyer-Eltz@t-online.de>|
|Date:||Thu, 31 Dec 2009 15:49:28 +0100|
|Posted-Date:||01 Jan 2010 11:43:28 EST|
>Anyone have suggestions for a way to take a fairly simple "custom"
>high level language (syntax and semantics) to target C as the output?
I suggest the parser generator IDE "TextTransformer":
By this program you can create a parser for your custom language as
well as the translator inside of a single visual user interface
(Windows). The Source to Source compilation can be done either with
TextTransformer itself as standalone application or by means of
C++-code, which can be generated from the TextTransformer project.
I am the author of TextTransformer and I just have made such a
converter from Delphi to C++
>The "tool" must be relatively easy to use assuming ...
>but not much in the way of code generation knowledge.
My method is to construct a tree in the form of the target language
just while the source code is parsed. This tree finally has to be
written top down with some pretty-printing manipulations at the end.
So the most important you have to know is how to combine tree nodes
and branches in the right order. The greatest difficulty is to manage
I'm still busy to improve Delphi2Cpp and you could profit from my
experiences if you like to use TextTransformer.
Return to the
Search the comp.compilers archives again.