Let’s Build a Compiler

This series of articles is a tutorial on the theory and practice of developing language parsers and compilers. Before we are finished, we will have covered every aspect of compiler construction, designed a new programming language, and built a working compiler.


This is a “learn-by-doing” series. In the course of the series I will be performing experiments on a computer. You will be expected to follow along, repeating the experiments that I do, and performing some on your own. I will be using Turbo Pascal 4.0 on a PC clone. I will periodically insert examples written in TP. These will be executable code, which you will be expected to copy into your own computer and run. If you don’t have a copy of Turbo, you will be severely limited in how well you will be able to follow what’s going on. If you don’t have a copy, I urge you to get one. After all, it’s an excellent product, good for many other uses!

Table of Contents

  • Introduction
  • Expression Parsing
  • More Expressions
  • Interpreters
  • Control Constructs
  • Boolean Expressions
  • Lexical Scanning
  • A Little Philosophy
  • A Top View
  • Introducing “Tiny”
  • Lexical Scan Revisited
  • Miscellany
  • Procedures
  • Types
  • Back To The Future
  • Unit Construction

Book Details

Author(s): Jack Crenshaw
Format(s): Text
Link: Download or read online.

Leave a Reply