Review: Compiler Construction (Wirth)

Compiler Construction, by Niklaus Wirth. Addison-Wesley, 1996. ISBN 0201403536.
I hadn’t run across this before, but I can’t resist calling it out now. It’s a presentation by Niklaus Wirth of how to create a compiler. The source language is a subset of Oberon (a Pascal-like, somewhat object-oriented language); the target is a generic RISC machine. Each chapter focuses on one aspect, e.g., scanning, parsing, symbol tables, code generation, etc., in a very straightforward way. This is not a theory book; what theory there is is focused on the task at hand. My favorite little part: treating recursive descent parsing as a generalization of recognizing regular expressions. The price is ridiculous ($100+ for used copies), and the source language is obscure, but it’s worth finding an affordable copy to see a good end-to-end example of a compiler.

Note added 4-28-18: Keith Ray found that Wirth has made a version freely available: PDF