Buy New

or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Buy Used
Used - Good See details
$14.60 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Sell Back Your Copy
For a $2.96 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
The Definitive Antlr Reference: Building Domain-Specific Languages (Pragmatic Programmers)
 
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.

The Definitive Antlr Reference: Building Domain-Specific Languages (Pragmatic Programmers) [Paperback]

Terence Parr (Author)
3.9 out of 5 stars  See all reviews (20 customer reviews)

List Price: $36.95
Price: $22.54 & eligible for FREE Super Saver Shipping on orders over $25. Details
You Save: $14.41 (39%)
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 15 left in stock--order soon (more on the way).
Want it delivered Tuesday, February 14? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for students on millions of items. Learn more

Sell Back Your Copy for $2.96
Whether you buy it used on Amazon for $8.25 or somewhere else, you can sell it back through our Book Trade-In Program at the current price of $2.96.
Used Price$8.25
Trade-in Price$2.96
Price after
Trade-in
$5.29

Book Description

May 24, 2007 0978739256 978-0978739256 1

ANTLR v3 is the most powerful, easy-to-use parser generator built to date, and represents the culmination of more than 15 years of research by Terence Parr. This book is the essential reference guide to using this completely rebuilt version of ANTLR, with its amazing new LL() parsing technology, tree construction facilities, StringTemplate code generation template engine, and sophisticated ANTLRWorks GUI development environment. Learn to use ANTLR directly from the author!

ANTLR is a parser generator-a program that generates code to translate a specified input language into a nice, tidy data structure. You might think that parser generators are only used to build compilers. But in fact, programmers usually use parser generators to build translators and interpreters for domain-specific languages such as proprietary data formats, common network protocols, text processing languages, and domain-specific programming languages.

Domain-specific languages are important to software development because they represent a more natural, high fidelity, robust, and maintainable means of encoding a problem than simply writing software in a general-purpose language. For example, NASA uses domain-specific command languages for space missions to improve reliability, reduce risk, reduce cost, and increase the speed of development. Even the first Apollo guidance control computer from the 1960s used a domain-specific language that supported vector computations.

This book is the definitive guide to using the completely rebuilt ANTLR v3 and describes all features in detail, including the amazing new LL(

) parsing technology, tree construction facilities, StringTemplate code generation template engine, and sophisticated ANTLRWorks GUI development environment. You'll learn all about ANTLR grammar syntax, resolving grammar ambiguities, parser fault tolerance and error reporting, embedding actions to interpret or translate languages, building intermediate-form trees, extracting information from trees, generating source code, and how to use the ANTLR Java API.


Frequently Bought Together

The Definitive Antlr Reference: Building Domain-Specific Languages (Pragmatic Programmers) + Language Implementation Patterns: Create Your Own Domain-Specific and General Programming Languages (Pragmatic Programmers) + Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages (Pragmatic Programmers)
Price For All Three: $68.68

Show availability and shipping details

Buy the selected items together


Editorial Reviews

About the Author

Terence Parr is a professor of computer science and graduate program director at the University of San Francisco, where he continues to work on his ANTLR parser generator. Terence has consulted for and held various technical positions at companies such as IBM, Lockheed Missiles and Space, NeXT, and Renault Automation. Terence holds a Ph.D. in computer engineering from Purdue University and was a postdoctoral fellow at the Army High-Performance Computing Research Center at the University of Minnesota, where he built parallelizing FORTRAN source-to-source translators.

(edited by author)


Product Details

  • Paperback: 376 pages
  • Publisher: Pragmatic Bookshelf; 1 edition (May 24, 2007)
  • Language: English
  • ISBN-10: 0978739256
  • ISBN-13: 978-0978739256
  • Product Dimensions: 8.9 x 7.4 x 0.9 inches
  • Shipping Weight: 1.3 pounds (View shipping rates and policies)
  • Average Customer Review: 3.9 out of 5 stars  See all reviews (20 customer reviews)
  • Amazon Best Sellers Rank: #117,434 in Books (See Top 100 in Books)

More About the Author

Terence Parr is a professor of computer science and graduate program director at the University of San Francisco, where he continues to work on his ANTLR parser generator (http://www.antlr.org) and template engine (http://www.stringtemplate.org). Terence has consulted for and held various technical positions at companies such as IBM, Lockheed Missiles and Space, NeXT, and Renault Automation. Terence holds a Ph.D. in computer engineering from Purdue University and was a postdoctoral fellow at the Army High-Performance Computing Research Center at the University of Minnesota, where he built parallelizing FORTRAN source-to-source translators.

 

Customer Reviews

20 Reviews
5 star:
 (10)
4 star:
 (5)
3 star:
 (1)
2 star:
 (1)
1 star:
 (3)
 
 
 
 
 
Average Customer Review
3.9 out of 5 stars (20 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

21 of 21 people found the following review helpful:
5.0 out of 5 stars A Perfectly Pragmatic Guide!, June 11, 2007
This review is from: The Definitive Antlr Reference: Building Domain-Specific Languages (Pragmatic Programmers) (Paperback)
If you have any interest in compiler design, building translators, building intelligent editors, code generation, understanding what goes into building your own computer language, or just how to use ANTLR v3 then you may want to get a copy of this book.

This book is all about ANTLR. ANTLR is a tool you can use to build compilers and interpreters for computer languages, but don't let that scare you off. With the increasing interest in domain specific languages, bulding intelligent editors, code generation, and model driven development books like this are becoming ever more important. Terence Parr has made the topic far more approachable than any other book I have read (or attempted to read) on the topic.

In the first few chapters the author walks readers through the phases of parser construction using language that is approachable and easy to understand. He explains the needed principles and demonstrates their application with well chosen examples.

This is followed by a quick tour of how one might use ANTLR. I love the approach taken in this chapter as it takes a small example and shows two different ways to approach the problem using ANTLR. This is coupled with explanations describing when you want to use one approach over another.

The middle section of the book goes into depth on the various aspects of ANTLR. This is the reference section. Don't expect to be able to read these chapters one after another in quick succession. There's just too much to take in all at once!

The text is littered with references both forward and back to other sections and topics of interest. You can tell the author has spent a lot of time working with compiler construction by the breadth and depth of information presented. I really liked the motivating examples he gives for certain ANTLR features such as the need to emit imaginary tokens when lexing python (see page 94 in chapter 4).

The first chapter of part three of the book delves into the depths of the parsing algorithm used in ANTLR since you will need to understand it when you run into parsing errors and need to make sense of them.

The remaining chapters are devoted to ways to deal with the problems you may run into when trying to parse various language constructs.

This book has left a very lasting impression on me. I can visualize what goes into an editor like eclipse more fully. I no longer feel that the topic of abstract syntax trees is above my head and I feel I am better equipped to tackle the dragon book. I also understand why lisp programmers say that lisp has no syntax (take a look at the serialized form of the AST from chapter 3 on page 62, it looks like a bunch of s-expressions!).

One more note: ANTLR itself is a domain specific language (DSL) and serves as a prime example of how a DSL can greatly increase the clarity of the solution to a problem if the solution is described in terms native to the problem domain. (I think that's what the folks in the lisp camp have been saying for a long time.) ANTLR helps show the value of having DSLs and this book shows how easy it can be to write one!
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


21 of 21 people found the following review helpful:
4.0 out of 5 stars Essential purchase for anyone starting with ANTLR, June 6, 2007
This review is from: The Definitive Antlr Reference: Building Domain-Specific Languages (Pragmatic Programmers) (Paperback)
If you're working with ANTLR then you need "The Definitive ANTLR Reference". It's a reference work, but only in part; the vast majority of the book consists of explanations and examples rather than dry reference material. The reference material is in there, of course, but there's really not a lot of it because ANTLR itself has a very minimal design.

But despite the fact that ANTLR looks like a simple tool on the surface (the rules for building a grammar are few and simple) in reality it is fiendishly difficult to use until you get the knack for it. This book will help you through the difficult early stages of learning how to write ANTLR grammars; it really is the only resource out there that does this in a comprehensive way. Terence Parr somehow manages to take the incredibly dry subject matter of lexer and parser generation and turn it into a witty and entertaining conversation; you really feel as though Terence is speaking to you from across the table.

My only complaint about the book is that it is almost totally Java-centric (all the examples are in Java) despite the fact that ANTLR can target multiple languages (if the book had a little more information about other target languages then it would be a five-star title).
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


7 of 8 people found the following review helpful:
5.0 out of 5 stars A major comp-sci milestone, June 5, 2007
This review is from: The Definitive Antlr Reference: Building Domain-Specific Languages (Pragmatic Programmers) (Paperback)
The release of ANTLR version 3 represents a major milestone in compiler-compiler technology. LALR and LL(k) parsers, useful as they are, are difficult to master, and often require significant effort to overcome simple problems. Not only does ANTLR's LL(*) parser technology allows one to churn out problem-specific parsers with amazing speed, it also provides an arsenal of tools not found in other compiler-compiler tools: easy AST generation, tree parsers, rewrite rules, multiple language backends, templating. The scope and breadth of ANTLR puts it in a category all by itself.

I'm convinced that ANTLR will become an indispensible tool in any programmer's toolbox. And, by extension, the Definitive ANRL Reference will become an indispensible part of serious programmers' bookshelf.

Breathtaking.

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.
 
(11)
(2)

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
ToC and sample chapters 0 May 25, 2007
See all discussions...  
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
   
Related forums



So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject