[antlr-interest] antrl installation hep plz...

Darien A Hager darien at technofovea.com
Sun Oct 11 01:53:55 PDT 2009


Siva B wrote:
> Hello friends,
> I am new to antlr .
> I want to write a translator.
> I am not getting how exactly to use antlr.
If you just want to experiment with what it can do, download the 
AntlrWorks program and run it.
http://antlr.org/works
You can use it to help write your grammar (.g) files, then preview how 
they work, and finally use it to generate the .java files that you can 
copy into your project.

There are two parts of ANTLR. The first part is the generator, and the 
second part is the runtime. The "generator" part is a Java application 
that takes .g files and generates .java files. That part is included in 
AntlrWorks, and you do not need the JAR for it anywhere, not after 
you've done the .g->.java step. The only time you need that JAR is if 
you want Maven to automatically take your .g files and make .java files 
for you as part of your compiling process, but when starting out just 
use AntlrWorks to do it manually.

The "runtime" JAR is what you need for your project. (There are also 
other versions of it for other programming languages.) You can download 
the runtime from this page, under "Runtime Libraries"
http://antlr.org/download.html

Maven is not required. ANT is not required. But you *could* use either 
one to automate certain steps, if you really want to.

--Darien




More information about the antlr-interest mailing list