You are on page 1of 3

Home

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:

See information on ANTLR releases.


All Updates

Sam Harwell (Mar 19, 2014)

Java IDE Integration

How do I replace escape characters in string tokens?

Terence Parr [Administrator] (Mar 11, 2014)


How do I test if an optional rule was matched?

Terence Parr [Administrator] (Mar 10, 2014)


FAQ - Actions and semantic predicates

Terence Parr [Administrator] (Mar 10, 2014)


When do I use listener/visitor vs XPath vs Tree pattern matching?

Terence Parr [Administrator] (Feb 20, 2014)


Why are there no whitespace tokens in the token stream?

Terence Parr [Administrator] (Feb 19, 2014)


Lexer Rules

Terence Parr [Administrator] (Feb 19, 2014)

Why are my keywords treated as identifiers?

Terence Parr [Administrator] (Feb 19, 2014)


How to I install and run a simple grammar?

Terence Parr [Administrator] (Feb 19, 2014)


What is the difference between ANTLR 3 and 4?

Terence Parr [Administrator] (Feb 19, 2014)


What if I need ASTs not parse trees for a compiler, for example?

Terence Parr [Administrator] (Feb 19, 2014)


Getting Started with ANTLR v4

Terence Parr [Administrator] (Feb 10, 2014)

FAQ - Error handling

Terence Parr [Administrator] (Feb 07, 2014)

How do I perform semantic checking with ANTLR?

Terence Parr [Administrator] (Feb 07, 2014)


Java IDE Integration

Terence Parr [Administrator] (Feb 05, 2014)

FAQ - Translation

Terence Parr [Administrator] (Feb 03, 2014)

FAQ - Parse Trees

Terence Parr [Administrator] (Feb 03, 2014)

FAQ - Lexical analysis

Terence Parr [Administrator] (Feb 03, 2014)

FAQ - Grammar syntax

Terence Parr [Administrator] (Feb 03, 2014)

FAQ - General

Terence Parr [Administrator] (Feb 03, 2014)

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

Dec 08, 2012


Terence Parr

ANTLR and Shroedinger's Tokens create Terence Parr [Administrator]


d by
Terence Parr Jun 08, 2012
Hello github 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?

Terence Parr Jan 28, 2012

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?

Articles and Resources


ANTLRWorks 2
1. Overview
2. Grammar Editing Features
3. StringTemplate 4 Editing Features
4. Lexer Debugging
5. Parser Debugging

You might also like