Modern Compiler Implementation in Java 2nd Edition
by
Andrew W. Appel
(Author),
Jens Palsberg
(Author)
| Andrew W. Appel (Author) Find all the books, read about the author, and more. See search results for this author |
| Jens Palsberg (Author) Find all the books, read about the author, and more. See search results for this author |
ISBN-13: 978-0521820608
ISBN-10: 052182060X
Why is ISBN important? ISBN
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Use the Amazon App to scan ISBNs and compare prices.
Add to book club
Loading your book clubs
There was a problem loading your book clubs. Please try again.
Not in a club? Learn more
Join or create book clubs
Choose books together
Track your books
Bring your club to Amazon Book Clubs, start a new book club and invite your friends to join, or find a club that’s right for you for free.
Only 5 left in stock (more on the way).
Ships from and sold by Amazon.com.
More Buying Choices
This textbook describes all phases of a compiler: lexical analysis, parsing, abstract syntax, semantic actions, intermediate representations, instruction selection via tree matching, dataflow analysis, graph-coloring register allocation, and runtime systems. It includes thorough coverage of current techniques in code generation and register allocation, and the compilation of functional and object-oriented languages. The most accepted and successful techniques are described and illustrated with actual Java^TM® classes. The first part is suitable for a one-semester first course in compiler design. The second part; which includes the compilation of object-oriented and functional languages, garbage collection, loop optimization, SSA form, instruction scheduling, and optimization for cache-memory hierarchies; can be used for a second-semester or graduate course. This new edition includes more discussion of Java and object-oriented programming concepts such as visitor patterns plus a new Mini-Java programming project. A unique feature is the newly redesigned compiler project in Java for a subset of Java itself. The project includes both front-end and back-end phases.
Frequently bought together

- +
- +
Total price:
To see our price, add these items to your cart.
Some of these items ship sooner than the others.
Choose items to buy together.
Customers who viewed this item also viewed
Page 1 of 1 Start overPage 1 of 1
Editorial Reviews
Review
"...fit[s] comfortably and usefully between cookbooks and encyclopedias on compilation...suitable for self-study." Computing Reviews
"A well-written book, which strictly adheres to a no-nonsense style." Computing Reviews
"A well-written book, which strictly adheres to a no-nonsense style." Computing Reviews
Book Description
The second edition features a redesigned compiler project in Java, for a subset of Java itself.
Start reading Modern Compiler Implementation in Java instantly on your Kindle Fire or on the free Kindle apps for iPad, Android tablet, PC or Mac. Don't have a free Kindle app? Get yours here
Explore together: Save with group virtual tours
Amazon Explore Browse now
Product details
- Publisher : Cambridge University Press; 2nd edition (October 21, 2002)
- Language : English
- Hardcover : 501 pages
- ISBN-10 : 052182060X
- ISBN-13 : 978-0521820608
- Item Weight : 2.32 pounds
- Dimensions : 8.2 x 1.3 x 10.1 inches
- Best Sellers Rank: #1,039,421 in Books (See Top 100 in Books)
- #77 in Compiler Design
- #176 in Software Programming Compilers
- #523 in Java Programming
- Customer Reviews:
About the authors
Follow authors to get new release updates, plus improved recommendations.

Discover more of the author’s books, see similar authors, read author blogs and more

Discover more of the author’s books, see similar authors, read author blogs and more
Customer reviews
4.6 out of 5 stars
4.6 out of 5
22 global ratings
How customer reviews and ratings work
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on Amazon
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
Reviewed in the United States on June 24, 2019
A great book !
Reviewed in the United States on July 9, 2013
this book does accomplish the task of introducing the complier concepts using java, but i still feel like the dragon book is a nice universal book that can be used for all compiler concepts
One person found this helpful
Report abuse
Reviewed in the United States on August 10, 2014
Great content but teeny tiny figures making harder to read than it needs to be.
One person found this helpful
Report abuse
Reviewed in the United States on June 4, 2016
Good introduction for theoretical understanding.
Reviewed in the United States on March 1, 2013
Pretty good book, also received it in good condition, would recommend the practice exercises because they are all pretty great!
One person found this helpful
Report abuse
Reviewed in the United States on July 24, 2006
For reasons of local tradition I am using this book in my Compiler Course in this semester. For students (and practioners) who already know the theory behind a compiler, this book is certainly a valuable help in actually implementing a compiler.
However, for readers who have little (or no) previous knowledge about compilers, this book seems rather hard to understand.
This is mainly because of its poor didactics. Definitions are not given precisely in Mathematical Notation - often "things are just somehow sloppily described" in a rather colloquial language which does not really help in understanding the concepts.
For example the important concept of FOLLOW-Set is only vaguely explained, and then "defined" only in terms of some cumbersome Algorithm to compute this set. Such a definition could have been presented much much clearer.
Moreover, there is no nice step-by-step concept: Again and again we find confusing side remarks and forward references to later chapters, which do not help in understanding the very chapter which I am just about to grasp.
For example, already in the first Introduction chapter, when the reader has not yet even learned the very basics of a compiler, one of the exercises is already: to fiddle around with some Java Code in order to make an Interpreter for an example of a little language!
Of course the book offers plenty of programming and code examples to play with, however I don't really appreciate this Learning-by-Trying approach promoted in this book.
Therefore I would recommend to study a more theoretical introductory textbook (like the famous "Dragon Book") first, and then, with the background knowledge from such other books, use the code examples from Appel's book to actually build a compiler.
With only this one book on compiler construction, the student would probably not be sufficiently well equipped.
However, for readers who have little (or no) previous knowledge about compilers, this book seems rather hard to understand.
This is mainly because of its poor didactics. Definitions are not given precisely in Mathematical Notation - often "things are just somehow sloppily described" in a rather colloquial language which does not really help in understanding the concepts.
For example the important concept of FOLLOW-Set is only vaguely explained, and then "defined" only in terms of some cumbersome Algorithm to compute this set. Such a definition could have been presented much much clearer.
Moreover, there is no nice step-by-step concept: Again and again we find confusing side remarks and forward references to later chapters, which do not help in understanding the very chapter which I am just about to grasp.
For example, already in the first Introduction chapter, when the reader has not yet even learned the very basics of a compiler, one of the exercises is already: to fiddle around with some Java Code in order to make an Interpreter for an example of a little language!
Of course the book offers plenty of programming and code examples to play with, however I don't really appreciate this Learning-by-Trying approach promoted in this book.
Therefore I would recommend to study a more theoretical introductory textbook (like the famous "Dragon Book") first, and then, with the background knowledge from such other books, use the code examples from Appel's book to actually build a compiler.
With only this one book on compiler construction, the student would probably not be sufficiently well equipped.
11 people found this helpful
Report abuse
Reviewed in the United States on May 9, 2006
It's been quite some time since I read this book, and my tastes in languages have changed quite a bit since then, so it's possible that if I read this book today, I would have a different impression. However, I am doubtful that that would be the case, and as it stands, my memories of this book leave a bitter taste in my mouth.
The joke goes that "some programmers can write C/Fortran code in any language," and that is exactly the problem with this book. The compiler implemented within may compile correctly under javac, but it isn't implemented in a modular, object oriented way like one might expect when using such a language. Rather, the author seems to often use classes as little more than C structs, and methods as merely convenient ways of grouping together functions. I see now that the author also has a book on C compilers, and it wouldn't surprise me if the code herein was a direct port to Java, with as little redesign as possible.
I am certainly not an expert on compilers, and as I said, it's been quite some time since I read this book. The general information on compiling in this book might be useful, and I'll leave it to other people to make comments on that. However, if you are looking for a book that gives advice on what patterns work well when developing compilers, or what advantages an object oriented language might bring to the table in that arena, this is not the book you're looking for. This might teach you how to write a compiler that is, syntactically, Java, but it won't give you any insight on why you'd want to use Java over any other language.
The joke goes that "some programmers can write C/Fortran code in any language," and that is exactly the problem with this book. The compiler implemented within may compile correctly under javac, but it isn't implemented in a modular, object oriented way like one might expect when using such a language. Rather, the author seems to often use classes as little more than C structs, and methods as merely convenient ways of grouping together functions. I see now that the author also has a book on C compilers, and it wouldn't surprise me if the code herein was a direct port to Java, with as little redesign as possible.
I am certainly not an expert on compilers, and as I said, it's been quite some time since I read this book. The general information on compiling in this book might be useful, and I'll leave it to other people to make comments on that. However, if you are looking for a book that gives advice on what patterns work well when developing compilers, or what advantages an object oriented language might bring to the table in that arena, this is not the book you're looking for. This might teach you how to write a compiler that is, syntactically, Java, but it won't give you any insight on why you'd want to use Java over any other language.
9 people found this helpful
Report abuse
Reviewed in the United States on July 26, 2015
Loved it. Killed CS352 at Purdue!
Top reviews from other countries
SONDEREGGER RODNEY
5.0 out of 5 stars
Very good compiler implementation book
Reviewed in Germany on April 22, 2014
Step by step compiler explenation, Lexer, parser,semantic analysis, AST (Abstract Syntax Trees), instruction selextion, optimisation all is excellently explained.
Project building a full compiler is very helpfull to understand the different steps for
a compiler.
Project building a full compiler is very helpfull to understand the different steps for
a compiler.
One person found this helpful
Report abuse
David Ho
5.0 out of 5 stars
Five Stars
Reviewed in Canada on June 7, 2015
Book in perfect condition








