[antlr-interest] Help!!!
ronald.petty at milliman.com
ronald.petty at milliman.com
Sun Apr 4 13:48:16 PDT 2004
Hi Tonie,
Not sure this will help, but I am attempting the same thing and haven't
finished it yet either. To compile I did
// cd to the antlr dir, I haven't figured out the right way in cygwin to
set my classpath
javac -cp ./antlr.jar *.java
That should fix the second issue.
Now what you can't find Main, I am not sure.
I do not have a Main.class, you have to create it I think (there may be
one). You list the generated files (ExprLexer.java, ExprParser.java,
ExprParserTokenTypes.java, ExprParserTokenTypes.txt), but nothing about
Main.java. Was there a Main.java generated? If not, create one and
inside main() do
ExprLexer el = new ExprLexer(...input stream...);
ExprParser ep = new ExprParser(el);
ep.startsymbol // not sure about after this...
Hope I didn't say something incorrect (as I am learning also).
Good luck.
Ron
"ronietang" <ronietang at yahoo.ca>
04/03/2004 03:19 PM
Please respond to
antlr-interest at yahoogroups.com
To
antlr-interest at yahoogroups.com
cc
Subject
[antlr-interest] Help!!!
Hello,
I am a newbie in antlr.
I believe I have configed the CLASSPATH correctly, because
I can use antlr.Tool expr.g to generate:
ExprLexer.java
ExprParser.java
ExprParserTokenTypes.java
ExprParserTokenTypes.txt
It seems work well.
Then I type javac *.java, nothing wrong.
But when I want to run the Main class: java Main,
I always got NoClassDefException :(
I 've tried many times and the results are same.
By the way, when I compiled the *.java files, if I compile
them individulely, I will got errors. Just like it cannot find
the antlr.* package.
If you can help me with this, it would be very nice.
Thank you!
Tonie
Yahoo! Groups Links
**************************************************************************************
This communication is intended solely for the addressee and is
confidential. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. Unless indicated
to the contrary: it does not constitute professional advice or
opinions upon which reliance may be made by the addressee or any
other party, and it should be considered to be a work in progress.
**************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20040404/1aa96bc7/attachment.html
More information about the antlr-interest
mailing list