Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
The Definitive ANTLR 4 Reference
Table of Contents
Early Praise for The Definitive ANTLR 4 Reference
Acknowledgments
Welcome Aboard!
Who Is This Book For?
What’s So Cool About ANTLR V4?
What’s in This Book?
Learning More About ANTLR Online
Part 1: Introducing ANTLR and Computer Languages
Chapter 1: Meet ANTLR
1.1 Installing ANTLR
1.2 Executing ANTLR and Testing Recognizers
Chapter 2: The Big Picture
2.1 Let’s Get Meta!
2.2 Implementing Parsers
2.3 You Can’t Put Too Much Water into a Nuclear Reactor
2.4 Building Language Applications Using Parse Trees
2.5 Parse-Tree Listeners and Visitors
Chapter 3: A Starter ANTLR Project
3.1 The ANTLR Tool, Runtime, and Generated Code
3.2 Testing the Generated Parser
3.3 Integrating a Generated Parser into a Java Program
3.4 Building a Language Application
Chapter 4: A Quick Tour
4.1 Matching an Arithmetic Expression Language
4.2 Building a Calculator Using a Visitor
4.3 Building a Translator with a Listener
4.4 Making Things Happen During the Parse
4.5 Cool Lexical Features
Part 2: Developing Language Applications with ANTLR Grammars
Chapter 5: Designing Grammars
5.1 Deriving Grammars from Language Samples
5.2 Using Existing Grammars as a Guide
5.3 Recognizing Common Language Patterns with ANTLR Grammars
5.4 Dealing with Precedence, Left Recursion, and Associativity
5.5 Recognizing Common Lexical Structures
5.6 Drawing the Line Between Lexer and Parser
Chapter 6: Exploring Some Real Grammars
6.1 Parsing Comma-Separated Values
6.2 Parsing JSON
6.3 Parsing DOT
6.4 Parsing Cymbol
6.5 Parsing R
Chapter 7: Decoupling Grammars from Application-Specific Code
7.1 Evolving from Embedded Actions to Listeners
7.2 Implementing Applications with Parse-Tree Listeners
7.3 Implementing Applications with Visitors
7.4 Labeling Rule Alternatives for Precise Event Methods
7.5 Sharing Information Among Event Methods
Chapter 8: Building Some Real Language Applications
8.1 Loading CSV Data
8.2 Translating JSON to XML
8.3 Generating a Call Graph
8.4 Validating Program Symbol Usage
Part 3: Advanced Topics
Chapter 9: Error Reporting and Recovery
9.1 A Parade of Errors
9.2 Altering and Redirecting ANTLR Error Messages
9.3 Automatic Error Recovery Strategy
9.4 Error Alternatives
9.5 Altering ANTLR’s Error Handling Strategy
Chapter 10: Attributes and Actions
10.1 Building a Calculator with Grammar Actions
10.2 Accessing Token and Rule Attributes
10.3 Recognizing Languages Whose Keywords Aren’t Fixed
Chapter 11: Altering the Parse with Semantic Predicates
11.1 Recognizing Multiple Language Dialects
11.2 Deactivating Tokens
11.3 Recognizing Ambiguous Phrases
Chapter 12: Wielding Lexical Black Magic
12.1 Broadcasting Tokens on Different Channels
12.2 Context-Sensitive Lexical Problems
12.3 Islands in the Stream
12.4 Parsing and Lexing XML
Part 4: ANTLR Reference
Chapter 13: Exploring the Runtime API
13.1 Library Package Overview
13.2 Recognizers
13.3 Input Streams of Characters and Tokens
13.4 Tokens and Token Factories
13.5 Parse Trees
13.6 Error Listeners and Strategies
13.7 Maximizing Parser Speed
13.8 Unbuffered Character and Token Streams
13.9 Altering ANTLR’s Code Generation
Chapter 14: Removing Direct Left Recursion
14.1 Direct Left-Recursive Alternative Patterns
14.2 Left-Recursive Rule Transformations
Chapter 15: Grammar Reference
15.1 Grammar Lexicon
15.2 Grammar Structure
15.3 Parser Rules
15.4 Actions and Attributes
15.5 Lexer Rules
15.6 Wildcard Operator and Nongreedy Subrules
15.7 Semantic Predicates
15.8 Options
15.9 ANTLR Tool Command-Line Options
Appendix 1: Bibliography
You May Be Interested In…
← Prev
Back
Next →
← Prev
Back
Next →