Product DescriptionANTLR 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.
Customer Reviews
Average Rating:
Rating: - Readable
I have just finished reading the ANTLR ref book and I thought it was helpful, yes I also agree that it was a bit too much Java being more of a C++/C# person but I am not that picky. The one thing that I didn't like with the book was the structure. The four last chapters contain the actual theory, and one chapter in the middle was the reference. I didn't like this, it didn't feel natural. I would have liked to have the theory first and then gotten on with the details, building upon examples with increasing ... Read More
Rating: - An excellent book for developing language translators, especially for Java programmers
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.
Rating: - For Sun fans only
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.
Read More
Rating: - Must read for anyone planning to do anything with parsers
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.
Rating: - A Perfectly Pragmatic Guide!
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 ... Read More