Much has changed since Crafting a Compiler, by Fischer and LeBlanc,
in 1988. While instructors may remember the
5.25-inch floppy disk of software
that accompanied that text, most students today
have neither seen nor held such a disk.
Many changes have occurred in the programming languages that
students experience in class and in the marketplace.
While much has changed, students and faculty alike continue to study and
teach the subject of compiler construction. Research in the area of
compilers and programing language translation continues at a brisk pace, as compilers
are tasked with accommodating an increasing diversity of architectures and
programming languages. Software development environments depend on compilers
interacting successfully with a variety of software toolchain components
such as syntax-informed editors, performance profilers, and debuggers.
All modern software efforts rely on their compilers to check vigorously for
errors and to translate programs faithfully.
reflects a substantive revision of the material from 1988 and 1991. While the focus
of this text remains on teaching the fundamentals of compiler construction,
the algorithms and approaches have been brought into modern practice:
Some texts undergo revision by the addition of more graduate-level material.
While such information may be useful in an advanced course, the focus of
Crafting a Compiler remains on the undergraduate-level study
of compiler construction. A graduate course could be offered using
Chapters 13 and 14,
with the earlier portions of the text
serving as reference material.
are presented in a pseudocode style that should be familiar
to students who have studied the fundamental algorithms of our discipline. Pseudocode
enables a concise formulation of an algorithm and a rational discussion of the
algorithm's purpose and construction.
The details of implementation in a particular
language have been relegated to this web site.
- Parsing theory and practice are organized to facilitate a variety of
Some may study the material at a high level to gain a broad
view of top-down and bottom-up parsing. Others may study a particular approach
in greater detail.
- The front- and back-end phases of a compiler are connected by
the Abstract Syntax Tree (AST), which is created as the primary artifact of parsing.
Most compilers build an AST, but relatively few texts articulate its
construction and use.
The visitor pattern is introduced for traversing the AST
during semantic analysis and code generation.
- Laboratory and studio exercises are available to instructors via this web site.
Instructors can assign some components as exercises for the students while
other components are supplied from our course-support Web site.