|
From: | Hans Aberg |
Subject: | Re: A language-to-C (or C++) translator |
Date: | Fri, 16 Jun 2006 12:03:44 +0200 |
I am trying to make a translator from a language (infix notationcalculator, for example) to C (or C++).
It really depends how big you input language is. If it is small, you can just write out in the .y grammar action grammar, perhaps using some macro language, like M4 as an intermediate.
For bigger input languages, you may want to consult the Usenet newsgroup comp.compilers and its FAQ, published there, monthly, for better replies.
Some compilers, such as the GHC and some C++ compilers, have in the past used the method to write C code as output.
There is also a specialized tool: http://codeworker.free.fr/ Hans Aberg
[Prev in Thread] | Current Thread | [Next in Thread] |