or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Sell Back Your Copy
For a $8.51 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Programming Language Processors in Java: Compilers and Interpreters
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Programming Language Processors in Java: Compilers and Interpreters [Hardcover]

David Watt (Author), Deryck Brown (Author)
4.2 out of 5 stars  See all reviews (8 customer reviews)

List Price: $106.00
Price: $80.29 & this item ships for FREE with Super Saver Shipping. Details
You Save: $25.71 (24%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Only 1 left in stock--order soon (more on the way).
Want it delivered Tuesday, January 31? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Hardcover $80.29  
Paperback --  
Sell Back Your Copy for $8.51
Whether you buy it used on Amazon for $27.06 or somewhere else, you can sell it back through our Book Trade-In Program at the current price of $8.51.
Used Price$27.06
Trade-in Price$8.51
Price after
Trade-in
$18.55

Book Description

0130257869 978-0130257864 February 14, 2000 1

This book provides a gently paced introduction to techniques for implementing programming languages by means of compilers and interpreters, using the object-oriented programming language Java. The book aims to exemplify good software engineering principles at the same time as explaining the specific techniques needed to build compilers and interpreters.


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Customers buy this book with Programming Language Pragmatics, Third Edition $55.21

Programming Language Processors in Java: Compilers and Interpreters + Programming Language Pragmatics, Third Edition
Price For Both: $135.50

Show availability and shipping details

  • This item: Programming Language Processors in Java: Compilers and Interpreters

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Programming Language Pragmatics, Third Edition

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

From the Back Cover



David A Watt and Deryck F Brown

Programming Language Processors in Java

Compilers and Interpreters





This book provides a gently paced introduction to techniques for implementing programming languages by means of compilers and interpreters, using the object-oriented programming language Java. The book aims to exemplify good software engineering principles at the same time as explaining the specific techniques needed to build compilers and interpreters.

Features

* The book shows clearly how a simple compiler can be decomposed into a syntactic analyzer, a contextual analyzer, and a code generator, communicating via an abstract syntax tree.

* The book is accompanied by a complete working compiler and interpreter, provided via the Internet, and free of charge for educational use.

* The book contains numerous exercises, together with sample answers to selected exercises. It also contains a number of suggested projects, involving extensions to the accompanying compiler.

* All examples in the book are expressed in Java, and the compiler and interpreter are structured using object-oriented design patterns.

David Watt teaches algorithms and data structures, programming languages, and software design. Deryck Brown teaches compilers, object-oriented programming, operating systems, and software engineering.




About the Author

DAVID WATT teaches algorithms and data structures, programming language, and software design. DERYCK BROWN teaches compilers, object-oriented programming, operating systems, and software engineering.


Product Details

  • Hardcover: 436 pages
  • Publisher: Prentice Hall; 1 edition (February 14, 2000)
  • Language: English
  • ISBN-10: 0130257869
  • ISBN-13: 978-0130257864
  • Product Dimensions: 9.5 x 7 x 1.1 inches
  • Shipping Weight: 2 pounds (View shipping rates and policies)
  • Average Customer Review: 4.2 out of 5 stars  See all reviews (8 customer reviews)
  • Amazon Best Sellers Rank: #208,386 in Books (See Top 100 in Books)

 

Customer Reviews

8 Reviews
5 star:
 (6)
4 star:    (0)
3 star:
 (1)
2 star:    (0)
1 star:
 (1)
 
 
 
 
 
Average Customer Review
4.2 out of 5 stars (8 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

49 of 50 people found the following review helpful:
5.0 out of 5 stars Clear and illustrative in telling you what you need to know, January 10, 2001
This review is from: Programming Language Processors in Java: Compilers and Interpreters (Hardcover)
My situation: I am writing this because I feel that I owe a lot to the authors. I am a University student and I developed an interest in compilation and interpretation. I had access to a wide range of texts at my University but I struggled to get a foothold in the field. I was having difficulty turning the theory presented in these academic texts into practice in my own attempts at compilers.

Ideal for me: I had given up on the field for the time being when I came across this book. I could not believe it. It was not what I was looking for because I had no idea it existed, but it quickly became apparent that it was ideal for my situation. My preferred language is Java and so this just helped to make the examples jump out of the page at me that little bit more.

Working through the book: I enjoyed working through the book and found it very readable and self-explanatory. The examples are excellent and reinforce every concept presented by the book. It stood out from everything I had read on the subject to this point (and since).

The case-study: The case study, which runs throughout the book, uses the programming language Triangle. It has obvious links to the previous incarnations of the book when the Pascal programming language was used. Triangle is a simpler version of Pascal but is still a reasonably realistic language to look at. I found it very useful to see how each aspect of the compiler would actually look in code for an example language. The language is compiled to an abstract machine called TAM. The details of this are included in the appendix and can be transferred to other machines with a bit of careful modification.

Structure of the book: The book starts off with the normal background and definitions in the first two chapters. I found the next five chapters to be the most interesting in the book. They are on Compilation, Syntactic Analysis, Contextual Analysis, Run-Time Organization and Code Generation. The last two chapters are on Interpretation and a Conclusion.

Correctness of programming techniques used in the book: This book is very correct in its programming techniques. I had been a bit worried when I read that it was by a Pascal programmer that it might be Pascal-style Java but it used proper Java techniques throughout. I was especially impressed with the appendix containing Class Diagrams for the Triangle Compiler.

Summary: I found that this book told me just what I wanted to know about the field when so many others were telling me everything but this.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


61 of 65 people found the following review helpful:
3.0 out of 5 stars Rushed to publication too quickly, July 12, 2004
By 
Stephen F. Yegge "stevey" (Seattle, WA United States) - See all my reviews
(REAL NAME)   
This review is from: Programming Language Processors in Java: Compilers and Interpreters (Hardcover)
It's a lot of work creating a textbook like this, and the authors did a great job along certain dimensions. The book is well-organized and much more accessible than many (in)famous compilers books. The copy editing is high-quality: there aren't many mistakes in the book. The book itself is beautifully bound and printed, making it a pleasure to read. There's lots of sample code. On the whole, it's not a bad effort.

There -are- some real problems with it, though. The most obvious and central problem is that it's not a book by (or for) Java programmers. It feels very much as if the book was hastily rewritten from "Language Processors in Pascal" to "Language Processors in Java" after Java exploded in popularity, a year or two before the book was published. The mini-Triangle language is clearly a Pascal derivative, and many of the "pseudo-code" examples are really Pascal. Pascal may be a teaching language, but it looks completely alien to Java developers.

My biggest concern, and it's what prompted me to write this review, is that the Java code is truly awful. Yes, it uses the Visitor pattern (as one reviewer pointed out) to traverse the AST during semantic analysis, which is a reasonable strategy. But the code is just plain bad, and you don't want students learning bad habits. The code is utterly non-polymorphic; it's filled with long cascaded if-statements that check whether an AST node is an instanceof this or an instanceof that. They pass and return parameters of type Object, and callers perform dangerous narrowing typecasts. They freely pass and return null values that have special semantics (i.e. "if this parameter is null, then it means we have this kind of situation; otherwise it's the other kind"). Types are represented as ints (no attempt to create typesafe enums), instance members are made public and accessed directly rather than through methods, and they use unconventional (and unexplained) 1-character variable names. I'm telling you: it's a complete disaster, and students will come away from the course writing the worst Java code you could imagine.

Another problem: the book is written in a stilted and awkwardly formal tone - a throwback to textbooks in the 70s and 80s. The art of writing textbooks has advanced to the point where, gosh, you're supposed to be able to READ them. They're written FOR real people, BY real people. But this book reads like an actuarial report. It never says "you" and never says "we" - it's written entirely in stilted 3rd-person legalese. Not good.

Oh, one more gripe: the authors decided mysteriously that they don't like the standard terminology that's been around for 3 decades, so they changed "semantic analysis" to "contextual analysis" and so on, and then acted as if the standard terminology is non-standard. They could have at least said up front that they preferred using their own terminology, but that it was nonstandard; instead they're trying to rewrite history. It's inexcusable, and will confuse students who head to other books after reading this one.

Compilers are hard to write and hard to learn, and this book actually is an improvement in clarity of exposition over most of its predecessors. But it's just begging to be replaced by something better. In the meantime, I'd skip it and go straight to Programming Language Pragmatics.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


29 of 29 people found the following review helpful:
5.0 out of 5 stars Simply the best Learing-by-Coding compiler book, February 20, 2005
By 
Jos van Roosmalen (The Netherlands, Europe) - See all my reviews
(REAL NAME)   
This review is from: Programming Language Processors in Java: Compilers and Interpreters (Hardcover)
This is really the greatest 'Compiler for Dummies' book as of today. I own and studied all books (total arround 80) about compiler constructions you can buy in the world today plus a lot of out of print titles, so I know what you can buy on the market...

If you're looking for a learning-by-coding compiler book don't look futher. This is a great introbook for a Bachelor of Science of a Professional Bachelor student! If you have the money to buy only one compiler book buy this one. If you have the money to buy 2 books and you also know a bit C++, buy this one and 'Writting compilers and Interpreters' from Ronald Mak which also offers a pratical approach which is also nice for newbies but not that nice as this book.

If you have finished this book and want to get more theoretical insight or you're a Computer Science M.Sc student (like me), read 'Programming Language Pragmatics' from Mr. Scott, which don't present the material on a dry manner. This book covers all aspects of compilation and language design in greater detail! Be sure you have read (or master) an intro text like 'programming language processors in java' before starting books like 'programming language pragmatics'.

If you're a M.Sc. student and you're looking for a learning-by-coding book i recommend the books of Andrew Appel (Modern Compiler Implementation in Java) which covers advanced topics (optimization, register selection,etc). But beware: if you're new to compiler design forget Andrew Appels book, and buy this one because Appels would be a bit too difficult for you.

Back tot the 'Programming language processors in Java' book.

This is what I like and what not:

PROS:

* It gives some nice written theoretical introduction of the whole compilation process (e.g. what's LL and LR-parsing, how is runtime organization organized (stack, parameter passing, stackframes etc). It doesn't dive too deep, but you will be familiar with the topics. E.g. it explains how LL and LR parsing works (with some nice examples how to parse LL/LR simple English sentences), but it doesn't tell you what the advantages/disadvantages of both methods are. This is beyond the scope of this book. For these topics read later something else (e.g. 'programming language pragmiatcs')

* Not all Java code is printed to fill 1000 pages. Every codesnippet is well commented, all repeatative code is left out: you can download all the Java code. So this book is not one big listing.

* It gives you insight how to build a really nice Virtual Machine. The author is talking about an interpreter, but the compiler generates modern intermediate code (STORE,LOAD,CALL,JMP) and the VM execute this in a big WHILE-loop.

* Some learning-by-coding compiler books (e.g. 'Building your own compiler with C++' by Jim Holmes (not recommended)) explain only a silly subset of pascal (e.g. only assignment and writeline), but this book teach you 'mini Triangle-language' which also offers arrays, functions/procedures, records (structs), and parameter passing by reference/value. It also explains you those more difficult topics like parameter by reference passing is handled by the codegenerator.

* It has a nice chapter about runtime organization. This is a nice chapter for people which are new to e.g. processorarchitecture. This chapter explains you how local variables are stores (stack), how parameter passing to functions is working and how return values are passed back. Because the Interpreter (VM) which is introduced in the book, has a modern stack machine VM (STORE,LOAD,JUMP) this is an excelent way to study those VMs and code generating for a stack machine.

CONS:

* I agree to the customer review of Mr. Yegge of July 12, 2004 that the Java Code is not always supernice. E.g. there is often java.lang.Object parameter passing which is later dangerous narrative casted. I do NOT agree with Mr. Yegge about his remarks on the Visitor pattern. The author explains why he is using the visitor pattern: to reduce coupling between the CodeGenerator or TypeChecker and the AST. On this point I like the design of the author. The idea of using the visitor pattern is nice, but it is somewhat bad implemented with those narrative casts.

Conclusion: I STRONGLY recommend this book for people who are new to compiler design.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews






Only search this product's reviews




Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums


Listmania!


So You'd Like to...



Look for Similar Items by Category


Look for Similar Items by Subject