|Help and ideas with C-like to C transformation tool (long) Corey@Stup.net (2001-12-27)|
|Re: Help and ideas with C-like to C transformation tool (long) email@example.com (2001-12-29)|
|Re: Help and ideas with C-like to C transformation tool (long) firstname.lastname@example.org (Roberto Waltman) (2001-12-29)|
|Re: Help and ideas with C-like to C transformation tool (long) email@example.com (Ira D. Baxter) (2001-12-29)|
|Re: Help and ideas with C-like to C transformation tool (long) firstname.lastname@example.org (2001-12-29)|
|From:||Roberto Waltman <email@example.com>|
|Date:||29 Dec 2001 13:23:47 -0500|
|Posted-Date:||29 Dec 2001 13:23:47 EST|
My comments are 'shoots from the hip', please treat them accordingly.
a) At first glance it looks that, (if the language you are
translating is 'regular/consistent enough,) tools like m4
*could* be used for your needs.
For example, if in an assignment expression the 'store'
is always followed by an equal sign and a 'fetch' is always
preceded by an equal sign, that could give enough context
information to process it correctly.
Many macro processors or text manipulation oriented
languages like m4, gema, awk, perl, etc. could be used
for this purpose. (I mean 'real' macro processors, excluding
things like the C pre-processor)
b) The language grammar could be modified to do the same
processing it does today, while passing everything that is not a
language extension unchanged to the C compiler. (This is what
the Ratfor preprocessor for Fortran does)
c) Could you switch to C++ ? It may be possible to write a set of
classes, using C++ operator overloading functionality, giving you
a 'new language' with a syntax close enough to what you have
today to make the transition trivial. ( If there is no C++ compiler
for your target system, it may still be possible to use a C++ to C
compiler like Comeau's)
--------------- original message ---------------
On 27 Dec 2001 00:15:31 -0500, Corey@Stup.net (Corey Stup) wrote:
>We have a legacy language, which is very C-like, but with some added
>features such as type'd defines, library function overloading and some
>other features. ...
Return to the
Search the comp.compilers archives again.