Subject: S-expr form of C
From: rpw3@rpw3.org (Rob Warnock)
Date: Thu, 30 Oct 2008 21:43:58 -0500
Newsgroups: comp.lang.lisp
Message-ID: <XtOdnQhPqohz7ZfUnZ2dnUVZ_rDinZ2d@speakeasy.net>
[Significantly changing the topic...]

Duane Rettig <duane@franz.com> wrote:
+---------------
| To bring it back around to Lisp, how about the question of
| programming C in lisp?  In that case, it is not a literal
| issue, but an issue of style, where the programmer is being
| accused of not getting into the lisp style of programming,
| or of carrying old programming models with him from C-land.
+---------------

I'd like to ask the inverse of this, namely, is there any
generally-accepted "best style" in the Lisp community for
representing C source code in s-expr form? I know about
Aubrey Jaffer's "Schlep"[1], but it's really more a "translator"
from Scheme to C -- historical versions of it used a kind
of Hungarian mangling of function & variable names (based
on suffixes) to convey type information[2]. I'm more looking
for a more literal "representation" of C source in s-expr form,
with a view towards writing a sort of "LAP" which targets C,
with the ability to wrap CL macros around the "LAP". Anybody
got any pointers to prior art?


-Rob

[1] http://people.csail.mit.edu/jaffer/Docupage/schlep.html
    Schlep is a Scheme to C translator for a subset of Scheme.

[2] The latest version seems to have added additional embedded
    and lookaside type declaration syntax, but it's still based
    on matching prefixes/suffixes (e.g., still quasi-Hungarian).

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607