Subject: Re: best way to write a source code generator?
From: (Rob Warnock)
Date: Fri, 22 Sep 2006 00:39:51 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Frank Buss  <> wrote:
| If I want to create Java files and files in other languages like this:
| ..
| How do I write a generator for this in Lisp? I've started with this:
| ..
| But then it starts getting ugly: ...
| Lots of formats and difficult to read code, because of mixed target
| language code within format strings and Lisp code, which is difficult to
| maintain. How can I improve this?

Take a look at Aubrey Jaffer's "Schlep":

Yes, I know it's from Scheme to C, not CL to Java, and the weird
Hungarian typing is a turnoff [IMHO], though I once made the beginnings
of adding CL-style typing decorations, but he spent a lot of effort
trying to get the resulting generated C code be readable, properly
indented, etc. [And IMHO he did fairly well.]

You might find a useful idea or two in there [or not, YMMV]...


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607