Programs are often represented within a compiler by abstract trees.
The first step in translating a program is then to build the abstract tree
from the linear source text.
Standard techniques are available to specify this process.
Tools can implement the tree-building code directly from the
specifications, or routines can be written by hand in a programming
This paper presents two implementations of the tree constructor for a simple
straight-line programming language defined by Appel in his text
Modern Compiler Construction in Java.
The paper was generated from an
Both of the implementations can also be generated from that specification.