ANTLR

Don’t confuse ANTLR with Ant, the name is merely coincidence and, in this instance, stands for ANother Tool for Language Recognition. This is a tool for building compilers and lexical analyzers. You describe your language using what is known as a grammar file, which describes the make up of the language you are attempting to support. This is described using a form of BNF (Backus Naur Form), which is a language for describing languages! You can find out more about ANTLR from its Web site http://www.antlr.org/.

The interface to the ANTLR task is relatively straightforward as shown in Table 5.2. One thing you’ll need to do before running this task is obtain the JAR file from the ANTLR Web site and place it into your Ant /lib/ directory. Beware ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.