[antlr-interest] compile-time error for the parser
Rajesh Menon
prm225 at gmail.com
Sat Dec 30 14:39:30 PST 2006
Hello all.
I'm using antlr-3.0b5 and the attached grammar file.
The initial step, of creating the .java files from test.g goes fine (and
I've also tested the grammar with some sample inputs in AntlrWorks
before going CLI.)
Once I get to compiling with javac, I get tons of errors (100 to be
exact) due to the Parser constructor not being found, some other symbols
not being found, etc..
Any idea why this might be so (I'm afraid it might just be some path
issues, but can't see where I'm making an error.)
What I'm doing:
$java -cp antlr-3.0b5.jar:stringtemplate-3.0.jar:antlr-2.7.7.jar:.
org.antlr.Tool test.g
(works alright, .java files created.)
$javac -cp antlr-3.0b5.jar:stringtemplate-3.0.jar:antlr-2.7.7.jar *.java
(fails with the errors.)
And on an aside, why would the parser fail on encountering a COMMENT (in
the lexer section)? I haven't been able to test it with code I've
written, but AntlrWorks comes back with a [NoViableAltException].
Thanks.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.g
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20061230/5c922a52/attachment.pl
More information about the antlr-interest
mailing list