The Definitive ANTLR Reference: Building Domain-Specific Languages

  Author:    Terence Parr
  ISBN:    0978739256
  Sales Rank:    70420
  Published:    2007-05-01
  Publisher:    Pragmatic Bookshelf
  # Pages:    200
  Binding:    Paperback
  Avg. Rating:    5.0 based on 10 reviews
  Used Offers:    7 from $20.68
  Amazon Price:    $22.17
  (Data above last updated:  2008-08-29 05:23:22 EST)
  
  
Sort customer reviews by:
  
Show All Reviews on Page      Hide All Reviews on Page
   
  
The Definitive ANTLR Reference: Building Domain-Specific Languages
  
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.

                  Reader Reviews 1 - 11 of 11                 
  
  
Review
Date
Review
Rating(5 High)
Review
Helpful
to:
Customer Review Reviewer
Info
Permanent
Link
Reader Reviews Below Sorted by Newest First
07-17-08 5 (NA)
(Hide Review...)  An excellent book for developing language translators, especially for Java programmers
Reviewer Permalink
The book of Terence Parr describes his ANTLR LL top-down parser generator
very clearly and with outstanding academic style of presentation.
The ANTLR tool is powerful, I like to use it, since it easier to use and
more well documented (with the Parr's book) than the alternative javacc tool
or the traditional lex/yacc/bison tools.
Shortly, I strongly recommend the Terence's book to both the
industrial programmers/developers and to the academic community.
(Review Data Last Updated: 2008-08-18 05:27:01 EST)
06-20-08 3 0\1
(Hide Review...)  For Sun fans only
Reviewer Permalink
This book very thoroughly documents the ANTLR parser generator, but it does so with a Java bias that is so strong it excludes all of the other languages ANTLR supports. This makes sense on some level since ANTLR is a Java tool written by a Java developer, but for those of us who have an equally strong bias AGAINST Java the example code can best be described as nap inducing.

If you want to use ANTLR with C or Python or any other language, stick to the free documentation on the web.

(Review Data Last Updated: 2008-07-17 16:43:59 EST)
06-19-07 5 1\2
(Hide Review...)  Must read for anyone planning to do anything with parsers
Reviewer Permalink
ANTLR is pretty much the de facto tool when it comes to writing parsers. In this book Terence Parr has given a really nice and detailed guide to ANTLR 3. Usually a reference book is pretty dry, but not this one. Terence has a nice, relaxed writing style which makes this a very easy read. Also it has lots of examples to guide you along the way.


A must read for anyone planning to work with ANTLR, write parsers or just wanting to get an insight into parsing theory.
(Review Data Last Updated: 2008-01-21 13:58:08 EST)
06-18-07 5 2\3
(Hide Review...)  Must read for anyone planning to do anything with parsers
Reviewer Permalink
ANTLR is pretty much the de facto tool when it comes to writing parsers. In this book Terence Parr has given a really nice and detailed guide to ANTLR 3. Usually a reference book is pretty dry, but not this one. Terence has a nice, relaxed writing style which makes this a very easy read. Also it has lots of examples to guide you along the way.


A must read for anyone planning to work with ANTLR, write parsers or just wanting to get an insight into parsing theory.
(Review Data Last Updated: 2008-06-21 04:42:23 EST)
06-12-07 5 1\1
(Hide Review...)  A Perfectly Pragmatic Guide!
Reviewer Permalink
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!
(Review Data Last Updated: 2007-07-09 20:08:19 EST)
06-07-07 5 5\5
(Hide Review...)  Another Gem From the Pragmatic Programmers
Reviewer Permalink
The always-excellent Pragmatic Programmers have done it again. "The Definitive ANTLR Reference" is an important book, and not just for language designers/implementers, but for anyone who is serious about getting better at computer science/programming. I am a graduate student and a working programmer, and I know I will be using what I learn from this book to become better at both. Thanks to Dr. Terence Parr, not only for developing ANTLR, a world-class parser generator, but for motivating and teaching us how to use it with a relaxed, gently humorous writing style that makes you forget that there is some pretty hardcore computer science behind all this stuff. And thanks to the Prags (Dave Thomas and Andy Hunt) for giving Dr. Parr this forum.
(Review Data Last Updated: 2007-07-09 20:08:19 EST)
06-07-07 4 1\2
(Hide Review...)  Can't do without this one
Reviewer Permalink
You may have decided to use the Parser Generator ANTLR because it can generate code in many different languages like CSharp, Python and of course Java.
In this case you have to get this book. The current online documentation is minimal. But beware that despite the title
there are some points that the author forgets to define (such as the EOF token, which can be important). However a more important quible is that
we are far from the quality of writing of the famous "Dragon Compiler Book".
If you are looking for pithy clear definitions like me you will be disappointed. You may waste a lot of time trying to understand error messages when they arise while generating code from a grammar.
The space devoted to Antlworks is very limited .
Hopefully this will be fixed up in future printings of this book.

(Review Data Last Updated: 2007-07-09 20:08:19 EST)
06-06-07 4 5\5
(Hide Review...)  Essential purchase for anyone starting with ANTLR
Reviewer Permalink
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).
(Review Data Last Updated: 2007-07-09 20:08:19 EST)
06-06-07 5 1\1
(Hide Review...)  Excellent book!
Reviewer Permalink
Before leaving for a business trip to Florida, I decided to do some research on ANTLR for work. The book is very well written and brings you into the world of writing your own Lex without having any prior experience. It makes no assumptions about knowing Yacc, Javacc, or any of the other tools out there. I highly recommend this book to anyone in need of creating a DSL (Domain Specific Language), parser, or if you're even attempting to a program to migrate from one language to another.

Very well written, very organized and provides excellent insight into parsers.

Best Regards,
Richard L. Burton III
(Review Data Last Updated: 2007-07-09 20:08:19 EST)
06-06-07 5 1\1
(Hide Review...)  A major comp-sci milestone
Reviewer Permalink
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.

(Review Data Last Updated: 2007-07-09 20:08:19 EST)
06-06-07 4 (NA)
(Hide Review...)  Essential purchase for anyone starting with ANTLR
Reviewer Permalink
If you're working with ANTLR then you need this book. It's title is The Definitive ANTLR Reference, but 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.

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).
(Review Data Last Updated: 2007-06-06 04:10:04 EST)
  
                  Reader Reviews 1 - 11 of 11                 
  
  
  
  
  
  

Because the data used to generate this site come from outside sources, VeryWellSaid.com cannot guarantee the completeness or accuracy of the data.
Search VeryWellSaid™
Google
Web VeryWellSaid™
New subjects are added every week.
View Subjects Below by:
* Top Selling
 (click category name, left)
* Top-Rated Top Sellers
 (click 'Top Rated', right)
In the news...  
Dubai\UAE Top Rated
Influenza\Bird Flu Top Rated
Iraq Top Rated
Supreme Court Top Rated
All Books Top Rated
Arts Top Rated
Photography Top Rated
Digital Photography Top Rated
Digital Cameras Top Rated
Biography Top Rated
Business Top Rated
Management Top Rated
Marketing Top Rated
Sales Top Rated
Stocks Top Rated
Bonds Top Rated
Real Estate Top Rated
Trading Top Rated
Commodities Trading Top Rated
Time Management Top Rated
Starting A Business Top Rated
Children's Top Rated
Comics Top Rated
Computers Top Rated
PC Top Rated
Mac Top Rated
Programming Top Rated
Design Patterns Top Rated
.Net Top Rated
C# Top Rated
Vb.Net Top Rated
Asp.Net Top Rated
Java Top Rated
Python Top Rated
PHP Top Rated
Perl Top Rated
Javascript Top Rated
Ajax Top Rated
CSS Top Rated
Open Source Top Rated
SQL Top Rated
Databases Top Rated
Oracle Top Rated
MySql Top Rated
Sql Server Top Rated
IIS Top Rated
Apache Top Rated
Linux Top Rated
Windows Server Top Rated
Project Management Top Rated
HTML Top Rated
UML Top Rated
IT Certifications Top Rated
Cisco Certifications Top Rated
MCSE Top Rated
MCSD Top Rated
Cooking Top Rated
Italian Cooking Top Rated
Vegetarian Cooking Top Rated
Wine Top Rated
Engineering Top Rated
Entertainment Top Rated
Health Top Rated
Nutrition Top Rated
Dieting Top Rated
Sex Top Rated
History Top Rated
Military History Top Rated
British History Top Rated
Middle East History Top Rated
Land Battles Top Rated
Naval Warfare Top Rated
Air Warfare Top Rated
9/11 Top Rated
Terrorism Top Rated
Home Top Rated
Mortgage\Home Equity Loan Top Rated
Cars Top Rated
Car Buying Top Rated
Sports Cars Top Rated
Cat Top Rated
Humor Top Rated
Horror Top Rated
Law Top Rated
IP Law Top Rated
Legal History Top Rated
Fiction Top Rated
Oprah's Book Club Top Rated
Medicine Top Rated
Cancer Top Rated
Stroke Top Rated
Heart Disease Top Rated
Fertility Top Rated
Diabetes Top Rated
Pharmacology Top Rated
Back Problems Top Rated
Menopause Top Rated
Thyroid Top Rated
Pain Top Rated
Organic Chemistry Top Rated
Immune System Top Rated
Mystery Top Rated
Nonfiction Top Rated
Outdoors Top Rated
Running Top Rated
Radio Control Models Top Rated
Guns Top Rated
Parenting Top Rated
Divorce Top Rated
Professional Top Rated
Reference Top Rated
Religion Top Rated
Romance Top Rated
Science Top Rated
Physics Top Rated
Chemistry Top Rated
Astronomy Top Rated
Psychology Top Rated
Science Fiction Top Rated
Sports Top Rated
Teens Top Rated
Travel Top Rated
USA Top Rated
Europe Top Rated
France Top Rated
Italy Top Rated
England Top Rated
China Top Rated
All Books Arts Biography Click Here For An A-Z Index Of All 213 Best-Seller Subjects Business Children's Comics
Computers Cooking Engineering Entertainment Health History Home Horror Humor Law Fiction Medicine Mystery
Nonfiction Outdoors Parenting Professional Reference Religion Romance Science Sci-Fi Sports Teens Travel
In Association with Amazon.com

Cache miss
(not cached)