|[3 earlier articles]|
|Re: Generating Source Code. email@example.com (Craig Smith) (1999-10-11)|
|Re: Generating Source Code. firstname.lastname@example.org (Christopher W. Milner) (1999-10-11)|
|Re: Generating Source Code. email@example.com (1999-10-13)|
|Re: Generating Source Code. firstname.lastname@example.org (Scott Stanchfield) (1999-10-13)|
|Re: Generating Source Code. email@example.com (H. Ellenberger) (1999-10-14)|
|Re: Generating Source Code. firstname.lastname@example.org (Vadim Maslov) (1999-10-16)|
|Re: Generating Source Code. email@example.com (Christian Stapfer) (1999-10-21)|
|From:||"Christian Stapfer" <firstname.lastname@example.org>|
|Date:||21 Oct 1999 00:44:30 -0400|
|Organization:||Swisscom AG, the blue window|
<email@example.com> wrote in: firstname.lastname@example.org...
> 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:
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.
Return to the
Search the comp.compilers archives again.