From the comp.compilers FAQ:
"Programming a Personal Computer" by Per Brinch Hansen
Prentice-Hall 1982 ISBN 0-13-730283-5
This unfortunately-titled book
explains the design and creation of a single-user programming environment
for micros, using a Pascal-like language called Edison. The author presents
all source code and explanations for the step-by-step implementation of an
Edison compiler and simple supporting operating system, all written in
Edison itself (except for a small supporting kernel written in a symbolic
assembler for PDP 11/23; the complete source can also be ordered for the IBM
PC).
The most interesting things about this book are: 1) its ability to
demonstrate how to create a complete, self-contained, self-maintaining,
useful compiler and operating system, and 2) the interesting discussion of
language design and specification problems and trade-offs in Chapter 2.
"Brinch Hansen on Pascal Compilers" by Per Brinch Hansen
Prentice-Hall 1985 ISBN 0-13-083098-4
Another light-on-theory
heavy-on-pragmatics here's-how-to-code-it book. The author presents the
design, implementation, and complete source code for a compiler and p-code
interpreter for Pascal- (Pascal "minus"), a Pascal subset with boolean and
integer types (but no characters, reals, subranged or enumerated types),
constant and variable definitions and array and record types (but no packed,
variant, set, pointer, nameless, renamed, or file types), expressions,
assignment statements, nested procedure definitions with value and variable
parameters, if statements, while statements, and begin-end blocks (but no
function definitions, procedural parameters, goto statements and labels,
case statements, repeat statements, for statements, and with statements).
The compiler and interpreter are written in Pascal* (Pascal "star"), a
Pascal subset extended with some Edison-style features for creating
software development systems. A Pascal* compiler for the IBM PC is sold by
the author, but it's easy to port the book's Pascal- compiler to any
convenient Pascal platform.
This book makes the design and implementation of a compiler look easy. I
particularly like the way the author is concerned with quality,
reliability, and testing. The compiler and interpreter can easily be used
as the basis for a more involved language or compiler project, especially
if you're pressed to quickly get something up and running.