[antlr-interest] Getting started with ANTLR 3, IDEs and Maven

Jim Idle jimi at temporal-wave.com
Wed Oct 28 15:14:47 PDT 2009



Prompted by a request earlier this week for a sample of how to use Antlr grammars within IDEs and builds, I thought I would create a Maven Archetype that can create a sample Antlr project seemingly out of thin air. If you are willing to use Maven, or already do so, then this saves you a lot of work trying to configure the project from scratch.


There is now a Wiki page on getting started with Maven builds at:




and this shows you how to create a template Maven project  that you can then open with Netbeans, Eclipse or any other IDE that supports maven projects. The template project is a real lexer, parser (with imports) and tree parser, with a driver program that scans directories for files it can parse. It will also produce a dot specification for the AST it produces and turn that spec into a .png file assuming you have loaded the Graphviz application. Basically it is designed to answer a lot of the FAQ type stuff that happens with the Maven plugin and ANTLR/Java in general.


Please note that the Archetype was only deployed to the repository about an hour ago and so it may not be available in Maven central repo just yet. If you try the instructions on the Wiki page and receive "Artifact antlr3-maven-archetype does not exist", then just try again a bit later. It can take up to 4 hours for Maven central to sync up with the Antlr repository.


If experienced Maven users would be kind enough to test this and provide feedback, I would be grateful. Source is deployed with the artifact if you want to play with it.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091028/d52a48e5/attachment.html 

More information about the antlr-interest mailing list