Skip to main content Accessibility help
×
Hostname: page-component-cd9895bd7-dzt6s Total loading time: 0 Render date: 2024-12-25T15:36:51.949Z Has data issue: false hasContentIssue false

Preface

Published online by Cambridge University Press:  05 June 2012

Andrew W. Appel
Affiliation:
Princeton University, New Jersey
Jens Palsberg
Affiliation:
Purdue University, Indiana
Get access

Summary

This book is intended as a textbook for a one- or two-semester course in compilers. Students will see the theory behind different components of a compiler, the programming techniques used to put the theory into practice, and the interfaces used to modularize the compiler. To make the interfaces and programming examples clear and concrete, we have written them in Java. Another edition of this book is available that uses the ML language.

Implementation project. The “student project compiler” that we have outlined is reasonably simple, but is organized to demonstrate some important techniques that are now in common use: abstract syntax trees to avoid tangling syntax and semantics, separation of instruction selection from register allocation, copy propagation to give flexibility to earlier phases of the compiler, and containment of target-machine dependencies. Unlike many “student compilers” found in other textbooks, this one has a simple but sophisticated back end, allowing good register allocation to be done after instruction selection.

This second edition of the book has a redesigned project compiler: It uses a subset of Java, called MiniJava, as the source language for the compiler project, it explains the use of the parser generators JavaCC and SableCC, and it promotes programming with the Visitor pattern. Students using this edition can implement a compiler for a language they're familiar with, using standard tools, in a more object-oriented style.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2002

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Preface
  • Andrew W. Appel, Princeton University, New Jersey
  • With Jens Palsberg, Purdue University, Indiana
  • Book: Modern Compiler Implementation in Java
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511811432.001
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Preface
  • Andrew W. Appel, Princeton University, New Jersey
  • With Jens Palsberg, Purdue University, Indiana
  • Book: Modern Compiler Implementation in Java
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511811432.001
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Preface
  • Andrew W. Appel, Princeton University, New Jersey
  • With Jens Palsberg, Purdue University, Indiana
  • Book: Modern Compiler Implementation in Java
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511811432.001
Available formats
×