Pretty printers

A pretty printer is made up of rules having the form:

pattern -> format

where pattern indicates which abstract syntax operators a rule recognizes, and format describes their layout in terms of a box language. Pretty printer rules are compiled into code executed by the Ppml formatting machine. In the format part of the rule, we may also assign resource names to tokens. The formatting machine pretty prints the tokens according to font and color resource values.



Tutorial