Re: Generating Source Code.

"Christian Stapfer" <chstapfer@bluewin.ch>
21 Oct 1999 00:44:30 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: Generating Source Code. smith@gandalf.uni-trier.de (Craig Smith) (1999-10-11)
Re: Generating Source Code. cmilner@virginia.edu (Christopher W. Milner) (1999-10-11)
Re: Generating Source Code. anton@mips.complang.tuwien.ac.at (1999-10-13)
Re: Generating Source Code. thetick@jguru.com (Scott Stanchfield) (1999-10-13)
Re: Generating Source Code. ele@freesurf.ch (H. Ellenberger) (1999-10-14)
Re: Generating Source Code. vadik@siber.com (Vadim Maslov) (1999-10-16)
Re: Generating Source Code. chstapfer@bluewin.ch (Christian Stapfer) (1999-10-21)
| List of all articles for this month |
From: "Christian Stapfer" <chstapfer@bluewin.ch>
Newsgroups: comp.compilers
Date: 21 Oct 1999 00:44:30 -0400
Organization: Swisscom AG, the blue window
References: 99-10-036
Keywords: translator

<dara_gallagher@my-deja.com> wrote in: 99-10-036@comp.compilers...
> I'd appreciate any pointers/references on the subject of generating
> human readable source from an AST. I've looked at some of the source
> code pretty printers which are floating around but all of them seem
> are relatively simple and are based on lexical analysis. I realize
> that "human readable" is a subjective term and that for any particular
> language people will have preferences regarding indentation, line
> splitting etc.


Have you seen Philip Wadler's recent paper "Prettier Printing?" (see:
http://www.bell-labs.com/~wadler/recent.html), and Vance Maverick's
dissertation "Presentation by Tree Transformation" (University of
California, Berkeley Report CSD-97-947, see:
http://sunsite.berkeley.edu/NCSTRL)?


True, Maverick's dissertation concerns a more general problem: that of
laying out and editing tree-structured (parsed) documents. But your
problem is a special case and his paper seems to me to contain some
interesting ideas (especially as regards "abstracting out layout
preferences") as well as useful pointers to other papers.


Christian Stapfer


Post a followup to this message

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