This compiler design and implementation site aims to provide book reviews and free ebook on compiler design handbook, advanced compiler design, modern compiler design, compiler design tools like lex, yaac, flex, Automata techniques and practical design using c++.

Compiler Design and Implementation

By Johan E. Thelin

I've begun designing my own compiler lately after reading 'Let's Build a Compiler' by Crenshaw (see links). This page will contain the compiler source code, a text concerning the implementation of each part (the compiler will be created gradually) and useful links concerning compilers, compiler design, and other close subjects (OS specifics, hardware specifics, etc.). I hope that you will enjoy reading this page.

This tutorial is written 'as I go'. It is strongly influenced by 'Let's Build a Compiler' but is also flavored by myself. The language defined is a pseudo-pascal with the following features:
The variable types word and byte.

  • No automatic type conversion, i.e. control.
  • The control structures if-else, while-wend and repeat-until.
  • Support of the following unary operators +,- and the following binary operators +,-,/,* and parenthesis.The language supports functions and procedures (even recursive ones).
  • Other thing that we find necessary later.
  1. Chapter I - How is the compiler supposed to work and how should the language look?
  2. Chapter II - Let's get Compiling
  3. Chapter III - Get the Compiler Counting
  4. Chapter IV - Our First Control Structure
  5. Chapter V - Variables, Procedures and Functions
  6. Chapter VI - More About Variables, Procedures and Functions

Click to Read More

Followers