Introduction to Compiler Design

  • Torben Ægidius Mogensen

Part of the Undergraduate Topics in Computer Science book series (UTICS)

Table of contents

  1. Front Matter
    Pages I-XXI
  2. Torben Ægidius Mogensen
    Pages 1-37
  3. Torben Ægidius Mogensen
    Pages 39-90
  4. Torben Ægidius Mogensen
    Pages 91-96
  5. Torben Ægidius Mogensen
    Pages 97-106
  6. Torben Ægidius Mogensen
    Pages 107-117
  7. Torben Ægidius Mogensen
    Pages 119-146
  8. Torben Ægidius Mogensen
    Pages 147-157
  9. Torben Ægidius Mogensen
    Pages 159-174
  10. Torben Ægidius Mogensen
    Pages 175-192
  11. Back Matter
    Pages 193-204

About this book


This textbook is intended for an introductory course on Compiler Design, suitable for use in an undergraduate programme in computer science or related fields.

Introduction to Compiler Design presents techniques for making realistic, though non-optimizing compilers for simple programming languages using methods that are close to those used in "real" compilers, albeit slightly simplified in places for presentation purposes.  All phases required for translating a high-level language to machine language is covered, including lexing, parsing, intermediate-code generation, machine-code generation and register allocation.  Interpretation is covered briefly.

Aiming to be neutral with respect to implementation languages, algorithms are presented in pseudo-code rather than in any specific programming language, and suggestions for implementation in several different language flavors are in many cases given.  The techniques are illustrated with examples and exercises.

The author has taught Compiler Design at the University of Copenhagen for over a decade, and the book is based on material used in the undergraduate Compiler Design course there.

Additional material for use with this book, including solutions to

selected exercises, is available at



Code generation Intermediate code Interpretation Syntax analysis Type check

Authors and affiliations

  • Torben Ægidius Mogensen
    • 1
  1. 1.Computer ScienceUniversity of CopenhagenCopenhagenDenmark

Bibliographic information