ANTLR : Java Glossary

ANTLR (Another Tool for Language Recognition)
is a parser, formerly known as PCCTS (Purdue Compiler Compiler Tool Set) that generates Java source code, alternatively
C++ or C#. iDoc and NetBeans use it. The current version is 4.7Last revised/verified:2017-03-30
Version numbers are very important in ANTLR. Code written for one version will not work on another without modification.
Version 4 was a complete redesign and rewrite. ANTLR is like JavaCC with jjTree built-in. There is strict separation of grammar and actions
so you can use the same grammar with several different languages and applications.
The official documentation I found quite daunting. I prodded Scott Stanchfield to
write a tutorial
based on the one he wrote for PCCTS. Unfortunately, it stops at recognition. It does
not cover how you hook in your code to do something with the resulting parse tree.
Generates LL(K) parsers. Same code base as JavaCC, but code is open. There are dozens
of parser generators, but ANTLR seems to be the one where the action is. It has
IntelliJ Idea support.

It keeps track of the exact offset in the original source where it found each token and each higher level syntactic match.
You write Vistors and Listeners to do something
with the various matches.

It teaches you how to use ANTLR to write parsers. video about the book. Available in epub (for Kobo, iPhone/iPad, Android, eReaders) mobi (for Kindle) and PDF from the publisher. Though he is an academic, Parr is funny, unpretentious and fond of homely analogies. He wants to make sure you understand the big picture, not just the details.