Home | Download | ANTLRWorks | Wiki | About ANTLR | Contact | Support | Bugs | v2

Latest version is 3.5.2
Download now! »

» Home
» Download
» ANTLRWorks
» News
»Using ANTLR
» Documentation
» Articles
» Grammars
» File Sharing
» Runtime API
» Tech Support
» Bug Tracking
»About ANTLR
» What is ANTLR
» Why use ANTLR
» Showcase
» Testimonials
» Getting Started
» Software License
» ANTLR WebLogs
» ANTLR Workshops

Support StringTemplate, ANTLR Project by making a donation! Terence often pays for things like the antlr.org server, conference travel, and this site design (that alone cost US$1000). Buy him a beer and pizza remotely ;)


Why Use ANTLR?

[Here is a blog where people discuss the process of picking up ANTLR for the first time.]

I've been building parsers and translators since 1984. Naturally I built all my initial translators by hand with recursive-descent parsers. Eventually I wanted a tool that automated parser construction, but I hated yacc-like tools because they generated a table full of integers instead of human-readable code. Further, LR-based technology was much harder to understand than the intuitively obviously LL-based recursive-descent parsers. ANTLR grew out of my desire to automate exactly what I did by hand. Over the years, I've added features such as tree parsing that are also derived from actual experience building large translators.

ANTLR's popularity comes down to the fact that it satisfies the following fundamental requirements. Programmers want to use tools:
  1. that employ mechanisms they understand,
  2. that are sufficiently powerful to solve their problem,
  3. that are flexible,
  4. that automate tedious tasks, and
  5. that generate output that is easily folded into their application.
ANTLR has a consistent syntax for specifying lexers, parsers, and tree parsers.

Explaining why tree parsers are useful is difficult until you have some experience building translators, nonetheless, ANTLR is one of the few language tools that lets you apply grammatical structure to trees.

ANTLR generates powerful recognizers with it semantic and syntactic predicates. Plus PCCTS/ANTLR was the first widely-used parser generator to employ k>1 lookahead. My PhD dissertation provided an efficient means of computing the necessary lookahead (k>1 was previously thought to be only of theoretical interest due to its exponential cost). Be careful of other tools that allow you to use more than one symbol of lookahead; some tools can't tell you when there are problems with your grammar when k>1.

I actively support and improve ANTLR (for over a decade now) as does the large user community. By using ANTLR, you can be certain that you are not betting your project on a "dead" tool. Many academic and industry projects use ANTLR. Do a google search for ANTLR and you'll see a few hundred thousand hits. Do a google search for "parser generator" and you're likely to see ANTLR shown first. Also note that there are over 5000 downloads a month of the ANTLR package.

There are existing grammars available for many languages. If you don't see it on this site, ask the antlr-interest list and somebody may have what you need. ANTLR modes for emacs, Eclipse, and other IDEs are also available.

ANTLR currently generates Java, C#, C++, and Python (as of 2.7.5).

ANTLR has pretty flexible and decent error handling.

ANTLR comes with complete source code unlike many other systems and has absolutely no restrictions on its use. I have placed it totally in the public domain.

For an in depth look comparing ANTLR to other parser generators, see this page by Ian Kaplan.

I'm working like crazy on a completely new version and tirelessly help people out on the mailing list and directly via email.

Finally, you should use ANTLR because I'm an all around nice guy and I'm kind to old people. ;)