ANTLR : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

ANTLR

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.5 Last revised/verified: 2015-01-23 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 do do something with the various matches.

It is open source, available at GitHub using Git.

Here is an ANTLR sample, a piece of a Java parser written in ANTLR. You can see it is basically a type of BNF (Backus-Naur Form) crossed with regex.

Books

book cover recommend book⇒The Definitive ANTLR 4 Referenceto book home
by Terence Parr 978-1-934356-99-9 paperback
birth 1964-08-17 age:52
publisher Pragmatic Bookshelf
published 2013-01-22
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.
Australian flag abe books anz abe books.co.uk UK flag
German flag abe books.de amazon.co.uk UK flag
German flag amazon.de abe books.ca Canadian flag
Spanish flag amazon.es amazon.ca Canadian flag
Spanish flag iberlibro.com Chapters Indigo Canadian flag
French flag abe books.fr abe books.com American flag
French flag amazon.fr amazon.com American flag
Italian flag abe books.it Barnes & Noble American flag
Italian flag amazon.it Nook at Barnes & Noble American flag
India flag junglee.com Kobo American flag
UN flag other stores Google play American flag
O’Reilly Safari American flag
Powells American flag
Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder.
book cover recommend book⇒Language Implementation Patterns: Create Your Own Domain-Specific and General Programming Languagesto book home
by Terence Parr 978-1-934356-45-6 paperback
birth 1964-08-17 age:52 B00A376HGG kindle
publisher Pragmatic Bookshelf
published 2010-01-07
Design Patterns for creating parsers. Available in epub (for Kobo, iPhone/iPad android, eReaders) mobi (for Kindle), and PDF from the publisher.
Australian flag abe books anz abe books.co.uk UK flag
German flag abe books.de amazon.co.uk UK flag
German flag amazon.de abe books.ca Canadian flag
Spanish flag amazon.es amazon.ca Canadian flag
Spanish flag iberlibro.com Chapters Indigo Canadian flag
French flag abe books.fr abe books.com American flag
French flag amazon.fr amazon.com American flag
Italian flag abe books.it Barnes & Noble American flag
Italian flag amazon.it Nook at Barnes & Noble American flag
India flag junglee.com Kobo American flag
UN flag other stores Google play American flag
O’Reilly Safari American flag
Powells American flag
Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder.
Entertaining overview of Parsing click to watch

This page is posted
on the web at:

http://mindprod.com/jgloss/antlr.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\antlr.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[54.227.96.5]
You are visitor number