Re: Generating Source Code.

"Christian Stapfer" <>
21 Oct 1999 00:44:30 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: Generating Source Code. (Craig Smith) (1999-10-11)
Re: Generating Source Code. (Christopher W. Milner) (1999-10-11)
Re: Generating Source Code. (1999-10-13)
Re: Generating Source Code. (Scott Stanchfield) (1999-10-13)
Re: Generating Source Code. (H. Ellenberger) (1999-10-14)
Re: Generating Source Code. (Vadim Maslov) (1999-10-16)
Re: Generating Source Code. (Christian Stapfer) (1999-10-21)
| List of all articles for this month |

From: "Christian Stapfer" <>
Newsgroups: comp.compilers
Date: 21 Oct 1999 00:44:30 -0400
Organization: Swisscom AG, the blue window
References: 99-10-036
Keywords: translator

<> 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:, 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.

Christian Stapfer

Post a followup to this message

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