[m-dev.] Re: For review: Term display helper

Waye-Ian CHIEW wchi at students.cs.mu.OZ.AU
Fri Mar 13 03:01:00 AEDT 1998


Hello!

   On Tue, 10 Mar 1998, Fergus Henderson wrote:

   > For Ian and anyone else interested in this topic,
   > see Philip Wadler's recent paper "A prettier printer".

   I like the algebraic approach, but this technology is based in the teletype
   age:  all fixed-height monospaced fonts.  In the day of bitmapped displays
   and cheap ink-jet printers, this doesn't seem the right model.

Actually, the idea behind the algebraic approach is more general than
that.  It's simply a mapping from one kind of tree (a data type) into another
(structured output).

Ideally, the data structure tree should be mapped to an intermediate tree of
some sort (which contains very general formatting hints like indentation and
relative text alignment).

Then drivers could be written to dump the intermediate tree to a low-level
output format (a formatted string going to a terminal, LaTeX source, or
a sequence of Tk calls).

                                      ---

   @Article{bra-eel-tosem-96,
     author =       "Mark Van Den Brand and Eelco Visser",
     title =        "Generation of Formatters for Context-free Languages",
     journal =      "ACM Trans. Software Eng. and Methodology",
     year =         1996,
     volume =       5,
     number =       1,
     pages =        "1--41",
   }

   for a very nice grammar-based approach to pretty printing.

Would you know where I could find a Postscript version of this paper?


-- Ian!!




More information about the developers mailing list