[antlr-interest] ANTLR installation
Jim Idle
jimi at temporal-wave.com
Tue Feb 10 08:51:34 PST 2009
Raymond J. Schneider 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?
>
Ray,
The output is not standalone java - there is a runtime library that must
be available both at compile time and run time.
The various jars that you need at that point are all encapsulated in the
antlrworks jar, so if you refer the javac compiler to that jar via the
-cp option and when you run the code refer the java command to that jar
via CLASSPATH or -cp then everything will work as advertised.
You are getting those undefined errors because the compiler has not been
told where to find them.
You need:
javac -cp "c:\antlr\antlrworks.jar" x.java y.java
And the equivalent at runtime.
Jim
More information about the antlr-interest
mailing list