Re: Using the lisp pretty printer to format C, C# or C++ code
It shouldn't be that difficult... One of the original docs about the
pretty printer showed how to use the PP to print Pascal-like stuff
(see links below)
http://www.merl.com/reports/docs/TR93-17.pdf
http://dspace.mit.edu/handle/1721.1/6503
One thing I did once was to rewrite the CMUCL XP based pretty printer
in Java and use it to output neatly indented code (in Esterel, but
the concept is the same). It worked like a charm, and the code was
almost 1-to-1 Common Lisp.
Cheers
Marco
On Apr 25, 2007, at 2:28 PM, Joel Reymont wrote:
>
> Does anyone have an example of using the Lisp pretty printer to
> output C, C# or C++ code?
>
> In fact, an example for any language other than Lisp would do so
> long as the pretty printer indents braces, etc. properly.
>
> Thanks, Joel
>
> --
> http://wagerlabs.com/
>
>
>
>
>
--
Marco Antoniotti, Associate Professor
DISCo, Università Milano Bicocca
Via Bicocca degli Arcimboldi 8, U7, 4 piano
I-20126 Milan (MI) ITALY