[antlr-interest] ANTLR installation
Robert Soule
robert.soule at gmail.com
Tue Feb 10 08:49:46 PST 2009
It looks like you are not specifying your classpath when you invoke
the java compiler.
java -cp path\to\antlrworks-1.x.jar org.antlr.Tool Foo.g
to use the antlr took to create your parser....
javac -classpath .:path\to\antlrworks-1.x.jar Test.java ExprLexer.java
ExprParser.java
to get your class files....
java -classpath .:path\to\antlrworks-1.x.jar Test
to run your parser...
-Robert
On Tue, Feb 10, 2009 at 11:34 AM, Raymond J. Schneider
<rschneid at bridgewater.edu> wrote:
> Not entirely sure what you mean by "run it" Gavin. The problem we're having is not generating the lexer and parser code from ANTLRWorks but compiling it and running it.
> I tried something like:
> javac Test.java ExprLexer.java ExprParser.java
> and instead of getting compiled classes and a runable system I got 100 errors pretty much all of the "cannot find symbol" type which implies to me that I don't have the library set up
> and I'm not sure how to do that.
>
> Does that clarify my problem?
>
> Regards, Ray
> --
> Ray Schneider,PE, Ph.D
> Associate Professor
> Math and Computer Science
> Bridgewater College
> http://www.bridgewater.edu/~rschneid/
> http://theweedlessgarden.blogspot.com
> ________________________________________
> From: Gavin Lambert [antlr at mirality.co.nz]
> Sent: Tuesday, February 10, 2009 04:43
> To: Raymond J. Schneider; antlr-interest at antlr.org
> Subject: Re: [antlr-interest] ANTLR installation
>
> At 15:28 10/02/2009, Raymond J. Schneider wrote:
> >Is there a clear up to date installation document that walks
> >through the whole installation with some confirmatory checks at
> the
> >end?
> >The biggest issue seems to be setting the CLASSPATH correctly
> and
> >getting parsers to run outside of the ANTLRWorks environment.
>
> The easiest way to run it (given that you already have ANTLRWorks)
> is like this:
>
> java -cp path\to\antlrworks-1.x.jar org.antlr.Tool Foo.g
>
> (And yes, you need to name the .jar file in the classpath. It's
> not sufficient to name the folder where the .jar file sits.)
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
More information about the antlr-interest
mailing list