[antlr-interest] Problems with AST parsers in Antlrworks 1.0.1
Robin Davies
rerdavies at rogers.com
Sat Jun 2 18:46:03 PDT 2007
Probably a very beginner antlr question, but maybe not.
I'm trying to debug the CMinus.g AST parser sample from the manual:
http://media.pragprog.com/titles/tpantlr/code/trees/CMinus/CMinus.g
When I start the AnltrWorks debugger, and step through a couple of steps, in AntlrWorks 1.01, I get the following exception:
Exception in thread "main" java.lang.NullPointerException
at org.antlr.runtime.debug.DebugTreeAdaptor.nil(DebugTreeAdaptor.java:45)
at CMinusParser.aexpr(CMinusParser.java:1731)
at __Test__.main(__Test__.java:22)
(And the same with pretty much anything that has options {output=AST;} // build trees, I think.
I'm coming to this with a C# background and not a whole lot of Java experience. There's a very real risk that I have my classpath set up properly. I have a classpath to the source distribution, but no classpath to the Antlworks jar. Is that wrong?
My classpath:
.;C:\Program Files\Java\jre1.5.0_10\lib\ext\QTJava.zip;C:\usr\src\antlr-3.0\lib\
antlr-2.7.7.jar;C:\usr\src\antlr-3.0\lib\antlr-2.7.7.jar;C:\usr\src\antlr-3.0\li
b\antlr-3.0.jar;C:\usr\src\antlr-3.0\lib\antlr-runtime-3.0.jar;C:\usr\src\antlr-
3.0\lib\stringtemplate-3.0.jar
Environment: Vista, JRE 1.5.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070602/2ef4acfc/attachment.html
More information about the antlr-interest
mailing list