The Definitive ANTLR 4 Reference
Samenvatting
Build your own language with ANTLR! ANTLR v4 has been rewritten from scratch to make it easier than ever to build parsers and the language applications built on top. This completely rewritten new edition of the bestselling 'Definitive ANTLR Reference' shows you how to take advantage of these new features.
Terence Parr, the ANTLR creator and project lead, is your guide as you identify grammar patterns and then start building increasingly complex grammars. You'll create applications based upon those grammars by walking the automatically generated parse trees. Then you'll tackle some nasty language problems by parsing files containing more than one language. You'll also see how to take absolute control over parsing by embedding Java actions into the grammar.
Packed with real-world examples and tutorials, this book is your ticket to becoming a parsing guru!
Specificaties
Inhoudsopgave
Welcome Aboard!
Part 1: Introducing ANTLR and Computer Languages
1. Meet ANTLR
2. The big picture
3. A starter ANTLR project
4. A quick tour
Part 2: Developing language applications with ANTLR grammars
5. Designing grammars
6. Exploring some real grammars
7. Decoupling grammars from application-specific code
8. Building some real language applications
Part 3: Advanced topics
9. Error reporting and recovery
10. Attributes and actions
11. Altering the parse with semantic predicates
12. Wielding lexical black magic
Part 4: ANTLR reference
13. Exploring the Runtime API
14. Removing direct left recursion
15. Grammar reference
A1: Bibliography
Index