[antlr-interest] Troubles getting started

Johannes Luber jaluber at gmx.de
Wed Jan 2 14:03:37 PST 2008


Shawn Poulson schrieb:
> Hello to all,
> 
> I'm looking for a good language parser for C# and came across ANTLR. 
> It looks pretty sharp from the web site, but I haven't been able to get
> it to run yet.  I know a little Java to get by, so please bear with me
> if there's anything I missed.
> 
> I'm going by the Getting started page on the Wiki
> "http://www.antlr.org/wiki/pages/viewpage.action?pageId=728", but that
> information seems too little to work.  It doesn't say what tar file to
> get, but my best guess is the one labeled "source distribution" on the
> download page.  But, the file structure is different in that one.

Ignore any differences from the description regarding the directory
structure. Things are probably a bit outdated.

> What I'm starting with is the examples-v3.  I installed nant 0.85, have
> the source distribution's lib folder in my CLASSPATH, and ran "nant
> build" from the csharp examples folder.  I get the error
> "java.lang.NoClassDefFoundError: org/antlr/Tool", but my
> antlr-3.0.1.jar is in the classpath.  I tried renaming to antlr.jar,
> but no change.

Actually, you have to put the jars into the "_SharedLibs" directory.
Unfortunately, the readme has a wrong naming scheme compared to what the
build file actually says. Note the 's' in "_SharedLibs" and the
different ANTLR-jar name. I'm using a depot version of the build file
where there may other changes compared to the 3.0-version, so you may
end up editing files yourself again, if I'd sent it to you.

> Also, the instructions in the examples README.txt seem to conflict.  It
> mentions I need a lot of various files, but doesn't really say where to
> get them.  I'm not sure if the source distribution includes everything
> I need.

The files should be in the source distro (except the nant stuff).

> Can anyone help me out?  Thanks!

I hope I was helpful enough. :)

Johannes


More information about the antlr-interest mailing list