Introduction to Compiler Construction in a Java World

Click for enlarged version 

Welcome to the companion website for the book Introduction to Compiler Construction in a Java World by Bill Campbell, Swami Iyer, and Bahar Akbal-Delibaş, published by CRC Press. On this website, current and prospective users of the book can find information about its contents, get an up-to-date list of known errors in the text, and gain access to the fully-documented Java code for the accompanying j-- compiler.

Description of the Book


  • Presents a hands-on introduction to compiler construction, Java technology, and software engineering principles

  • Teaches how to fit code into existing projects

  • Describes a JVM-to-MIPS code translator, along with optimization techniques

  • Discusses well-known compilers from Oracle, IBM, and Microsoft

  • Includes end-of-chapter exercises that encourage students to write tests, re-factor code, and create new code

  • Provides fully documented Java code for the accompanying j-- compiler


Immersing students in Java and the Java Virtual Machine (JVM), Introduction to Compiler Construction in a Java World enables a deep understanding of the Java programming language and its implementation. The text focuses on design, organization, and testing, helping students learn good software engineering skills and become better programmers.

The book covers all of the standard compiler topics, including lexical analysis, parsing, abstract syntax trees, semantic analysis, code generation, and register allocation. The authors also demonstrate how JVM code can be translated to a register machine, specifically the MIPS architecture. In addition, they discuss recent strategies, such as just-in-time compiling and hotspot compiling, and present an overview of leading commercial compilers. Each chapter includes a mix of written exercises and programming projects.

By working with and extending a real, functional compiler, students develop a hands-on appreciation of how compilers work, how to write compilers, and how the Java language behaves. They also get invaluable practice working with a non-trivial Java program of more than 30,000 lines of code.


  • “… a strong contribution to the … covers most standard compiler construction techniques well, and does a good job of exposing students to actual implementation environments. … Highly recommended. Upper-division undergraduates and above.” ~ C. Vickery, Queens College of CUNY in CHOICE Magazine

  • “In a random, unscientific sampling of syllabi for recent compiler courses at a dozen universities in the US, I determined that many still use the iconic "dragon book" [1], or older textbooks from as far back as 1995. Several of the syllabi mention the more recent compiler text by Cooper and Torczon [2], but the older books seem to prevail. However, this new book's fresh, readable, student-friendly text and supporting software make it a serious contender for both self-study and classroom adoption.” ~ R. Roos, ACM Computing Reviews, September 10, 2013. [Full text]