Tuesday, July 7th, 2020



ANTLR is a Java tool, which abbreviated as “Another Tool for Language Recognition” . ANTLR is a language tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages.

ANTLR provides excellent support for tree construction, tree walking, translation, error recovery, and error reporting. There are currently about 5,000 ANTLR source downloads a month. It is the name of a parser generator uses LL (*) parsing type. It supports programming language such as C, C++, Java, Python, C# and Objective-C. ANTLR 3 is available as a freely software and published under a 3-clause BSD License.

ANTLR’s popularity comes down to the fact that it satisfies the following fundamental requirements. Programmers want to use tools:

  • that employ mechanisms they understand,
  • that are sufficiently powerful to solve their problem,
  • that are flexible,
  • that automate tedious tasks, and
  • that generate output that is easily folded into their application.

ANTLR has a consistent syntax for specifying lexers, parsers, and tree parsers

ANTLR is a second-generation parser generator. The first generation was PCCTS (Purdue Compiler Construction Tool Set). Both parsers were designed and implemented by Terence Parr.

Recently the most attractive parser generator is ANTLR as:

  • ANTLR generates recursive decent parsers and has good error reporting “right out of the box”. It appears that with a little work even better error reporting is possible.
  • The parser generated by ANTLR is more or less readable. This helps in debugging.
  • ANTLR is free.
  • ANTLR is available as “open source”.ANTLR is not Linux, but there are a number of ANTLR users world wide, so there is a reasonable chance that bugs will be identified and corrected.
  • ANTLR will generate C++ parsers. Java may have some advantages as a compiler implementation language, but the performance of Java on compiler like applications is terrible. It is hard enough to make an optimization phase run with acceptable performance. If the compiler developer is saddled with Java’s interpretive overhead as well, the compiler may be very slow. Unless native compiled Java is used, C++ is the only choice available for production quality compiler implementation.
  • ANTLR has pretty flexible and decent error handling.
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • RSS
  • Technorati
  • Twitter

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

Secure Linux Web Hosting