An abstract pretty printer
暂无分享,去创建一个
The author has distilled the basic operations of the pretty printer into an abstract pretty printer that uses procedural parameters to perform low-level printing actions. By encapsulating the algorithm in one place, all the pretty-printing utilities will use the same algorithm, and the algorithm itself can be changed easily. The author describes how the abstract pretty printer can be used for basic design, printing to files and screens, setting the cursor, identifying a node, formatting text, and lexical changes.<<ETX>>
[1] Robert D. Cameron,et al. Grammar-Based Definition of Metaprogramming Systems , 1984, TOPL.
[2] Richard C. Waters. User Format Control in a LISP Prettyprinter , 1983, TOPL.
[3] Lisa F. Rubin. Syntax-Directed Pretty Printing—A First Step Towards a Syntax-Directed Editor , 1983, IEEE Transactions on Software Engineering.