Professional Documents
Culture Documents
Welcome
This ANTLR 4 wiki complements and supports the ANTLR website. Inside the wiki you
will find documentation, tutorials and a FAQ.
We hope that you find what you need to learn more about ANTLR 4 on this wiki. If this
is not the case, you may register and help.
To get started with ANTLR, jump to Getting Started with ANTLR v4. If you run into
trouble, ANTLR has a mailing list full of helpful ANTLR fans and check out Stack
overflow ANTLR4 tag. You should also consider reading the following books:
FAQ - Translation
FAQ - General
Blog Posts
Matching parse tree patterns, paths create Terence Parr [Administrator]
d by
Terence Parr Sep 01, 2013
The real story on null vs empty create Terence Parr [Administrator]
d by
Terence Parr Dec 27, 2012
Tree rewriting in ANTLR v4 create Terence Parr [Administrator]
d by
Wiki Contents
ANTLR 4 Documentation
Getting Started with ANTLR v4
Grammar Lexicon
Grammar Structure
Parser Rules
Left-recursive rules
Actions and Attributes
Lexer Rules
Wildcard Operator and Nongreedy Subrules
Parse Tree Listeners
Parse Tree Matching and XPath
Semantic Predicates
Options
ANTLR Tool Command Line Options
Runtime Libraries and Code Generation Targets
Parser and lexer interpreters
Integrating ANTLR into Development Systems
Java IDE Integration
C# IDE Integration
C++ IDE Integration
Building ANTLR 4 with Maven
ANTLR v4 FAQ
FAQ - Getting Started
How to I install and run a simple
grammar?
FAQ - Installation
Why can't I run the ANTLR tool?
Why doesn't my parser compile?
FAQ - General
Why do we need ANTLR v4?
What is the difference between ANTLR 3
and 4?
Why is my expression parser slow?
FAQ - Grammar syntax
FAQ - Lexical analysis
How do I replace escape characters in
string tokens?
Why are my keywords treated as
identifiers?
Why are there no whitespace tokens in
the token stream?
FAQ - Parse Trees
What if I need ASTs not parse trees for a
compiler, for example?
When do I use listener/visitor vs XPath
vs Tree pattern matching?
FAQ - Translation
ASTs vs parse trees
Decoupling input walking from output
generation
FAQ - Actions and semantic predicates
How do I test if an optional rule was
matched?
FAQ - Error handling
How do I perform semantic checking with
ANTLR?