Additional information on what everyone has done so far:
The ant-optional package in Ubuntu includes the task that comes with Ant 1.8.2, which is the task for ANTLR 2.7.2, so this will lead to an error with the error described in this post . The method described by Terence is the best way to use the ANTLR3 task.
If you do not have root access on a Linux machine, you can install the ant -antlr3.jar file in the Ant user directory: ~/.ant/lib . Use ant -diagnostics if ant -antlr3.jar is visible for Ant, as described in this other post .
If you use Eclipse, you will need to restart the IDE before it recognizes the new task, and you will also need to include antlr3.jar and stringtemplate.jar in your class path (but ant-antlr3.jar not required).
source share