Books

Books : reviews

Terence Parr.
The Definitive ANTLR Reference: building domain-specific languages.
Pragmatic Bookshelf. 2007

This book is the essential reference guide to using the 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 of ANTLR.

ANTLR is a parser generator: a program that generates code to translate a specified input language into a nice, tidy data structure. You can use parser generators to build translators and interpreters for all kinds of domain-specific languages including proprietary data formats, common network protocols, text-processing languages, and domain-specific programming languages.

In this book, you’ll find details on:

• Creating ANTLR grammar syntax
• Resolving grammar ambiguities
• Parser fault tolerance and error reporting
• Embedding actions
• Building intermediate-form trees
• Extracting information from trees
• Generating source code
• Using the ANTLR Java API

Developers are increasingly using domain-specific languages (DSLs) as they develop more and more sophisticated applications. ANTLR is their tool of choice. And now, with this definitive guide, developers have an up-to-date reference for that tool.

Terence Parr.
Language Implementation patterns.
Pragmatic Bookshelf. 2010

Learn to build configuration file readers, data readers, model-driven code generators, source-to-source translators, source analyzers, and interpreters. You don’t need a background in computer science—ANTLR creator Terence Parr demystifies language implementation by breaking it down into the most common design patterns. Pattern by pattern, you’ll learn the key skills you need to implement your own computer languages.

The pattern implementations are shown using Java, but the patterns themselves are completely general and aren’t language-specific. Some of the implementations use the well-known ANTLR parser generator, so readers will find this book an excellent source of ANTLR examples as well.

Each chapter groups related design patterns. In each you’ll get hands-on experience by building a complete sample implementation. By the time you finish this book, you’ll know how to solve most common language implementation problems.