Basics of Compiler Design

I have taught an undergraduate compilers course for over a decade. In the last many years, I have used my own textbook "Basics of Compiler Design", which I have decided to make available online.

Permission to copy and print for personal use is granted.

Differences between editions

Each new edition has fixed errors and rephrased some explanations. Additionally, the 2008 edition added a chapter about analysis and optimisation, the 2009 edition added a short chapter about interpretation and is typeset in a slightly heavier font. The 2010 edition represents the 10th anniversary of the book and has added a chapter about memory management and an appendix about set notation.

book cover

How to get Basics of Compiler Design

You can download the book directly from this page by clicking on the link below. The was previously also published through the print-on-demand site, but this has been taken down, as Springer Verlag has published a book based on chapters 1 - 10 of Basics of Compiler Design. The 2010-edition of Basics of Compiler Design will stay available on this page, but will not be updated any further. You can find out more about the Springer book "Introduction to Compiler Design" here.

The cover picture (shown left) is taken outside DIKU.

The 2010 edition uses 189 × 246 mm paper format (Quarto). Earlier editions used a sligtly smaller format.

Get the book contents (PDF)

Get the wrap-around cover (PDF)

Solutions to selected exercises

Known misprints

If you should find more misprints or other errors, please report these to me.

Torben Mogensen
DIKU, University of Copenhagen, Universitetsparken 1, DK-2100 København Ø
E-mail: Telephone: (+45) 35 32 14 04 Fax: (+45) 35 32 14 01