[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pretty printer



Bruno wrote:
> 
> Joachim Schrod <schrod@iti.informatik.th-darmstadt.de> says:
> 
> > CLtL2, Chapter 27, describes a prettyprinting facility.
> 
> CLtL2, Chapter 27, describes the XP "pretty" printer.

First, thanks to the anon ftp site pointer. (I should have checked the
Lisp FAQ by myself. :( )

> > It may not be plug&play, we're not afraid of some programming work.
> 
> But decide first what you want. I will try a comparison between CLISP's
> pretty printer and XP as specified in CLtL2 and implemented in xp.lisp.

I need a prettyprinting facility that is programmable. Actually, I
need them for output of datastructures, not for Lisp programs. In
particular, that has the consequence that I must be able to influence
the current indentation.

Facilities like the `logical block' concept, the specification of
indentation and conditional breakpoints, and the pprint dispatcher
are helpful in this problem context. That was the reason I started to
look for extensible prettyprinters.

Since chapter 27, (ie XP, as I learned in the meantime), is simply a
Lisp realization of the abstraction beneath the classic
prettyprinting papers (Oppen [TOPLAS 2(4)], Rose/Welsh [SP&E
11(11)]), and since these abstractions were quite useful in other
projects I did, I thought I might use them. Did anybody have bad
experiences in using XP for output of data structures? (The
application at hand is the output of nested objects, where a
top-level object will cover approx. 40 lines.)

	Joachim

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Joachim Schrod			Email: schrod@iti.informatik.th-darmstadt.de
Computer Science Department
Technical University of Darmstadt, Germany