Re: Code generation / markup language processing

Norman Ramsey <>
15 Jan 1999 01:11:33 -0500

          From comp.compilers

Related articles
Code generation / markup language processing (Scott Bissett) (1999-01-11)
Re: Code generation / markup language processing (Norman Ramsey) (1999-01-15)
Re: Code generation / markup language processing Martin.Ward@SMLtd.Com (1999-01-20)
| List of all articles for this month |

From: Norman Ramsey <>
Newsgroups: comp.compilers
Date: 15 Jan 1999 01:11:33 -0500
Organization: University of Virginia Computer Science
References: 99-01-038
Keywords: code

Scott Bissett <> wrote:
>I am using a
>tool at work that was developed in-house to generate C-code...
>the only problem is, the architecture of
>the generated C-code is *compiled into the tool*!!!
>So, my quest is to build a better code generation tool...

I had reasonable success with a very simple macro-oriented approach.
M4 wasn't quite what I wanted, so I whipped up a preprocessor in Icon
( to do the job. This worked fine
until the day we decided we didn't want just to emit C, we also wanted
to be able to emit Modula-3, or Java, or ML, or ... From that point
forward, code has gotten very klunky. The main problem seems to be
finding a reasonable internal representation of `program' that can be
mapped to any one of a number of programming languages. It's hard for
us to decide what features we want to exploit: objects? mutable state?
closures? memory management?

I'd love to hear from others who are successfully using multiple
high-level languages as target languages for a compiler or stub


Post a followup to this message

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