Want to Write a Compiler? Two Papers are Recommended | James Hague

James Hague; Want to Write a Compiler? Just Read These Two Papers; In His Blog; 2008-06-29.

Jack Crenshaw; Let’s Build a Compiler; In archives of comp.compilers; a series; 1988→1995; 391 pages (typewritten); landing.

Table of Contents

Culture: Pascal, P-Code

Dipanwita Sarkar, Oscar Waddell, R. Kent Dybvig; A Nanopass Framework for Compiler Education; In Proceedings of the 2004 International Conference on Functional Programming; 2004; 15 pages.


A compiler structured as a small number of monolithic passes is difficult to understand and difficult to maintain. The steep learning curve is daunting, and even experienced developers find that modifying existing passes is difficult and often introduces subtle and tenacious bugs. These problems are especially frustrating when the developer is a student in a compiler class. An attractive alternative is to structure a compiler as a collection of many fine-grained passes, each of which performs a single task. This structure aligns the implementation of a compiler with its logical organization, simplifying development, testing, and debugging. This paper describes the methodology and tools comprising a framework for constructing such compilers.

Culture: Scheme