[antlr-interest] Problem runnign ANTLR
Ed Keith
e_d_k at yahoo.com
Sat Feb 7 14:14:41 PST 2009
I am at a machine running Windows XP.
I downloaded antlrworks-1.2.2.jar and ran it.
Then I tried to work through the tutorial at http://www.antlr.org/works/help/tutorial/calculator.html.
I pasted the Expr grammar into the editor window, selected the interpreter tab, entered "2+3*4", selected "prog", clicked on the indicated button. . .
A message in red appeared at the bottom of the window. It Read "Errors reported in console", So I clicked on the console tab and found the following message:
[16:56:01] java.lang.NullPointerException
at org.antlr.xjlib.foundation.XJUtils.concatPath(Unknown Source)
at org.antlr.xjlib.foundation.XJUtils.concatPath(Unknown Source)
at org.antlr.works.components.editor.ComponentEditorGrammar.getOutputPath(Unknown Source)
at org.antlr.works.components.editor.ComponentEditorGrammar.getANTLRTool(Unknown Source)
at org.antlr.works.grammar.engine.GrammarEngineImpl.getANTLRTool(Unknown Source)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.createNewGrammar(Unknown Source)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.createParserGrammar(Unknown Source)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.createCombinedGrammar(Unknown Source)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.createGrammars(Unknown Source)
at org.antlr.works.grammar.antlr.ANTLRGrammarEngineImpl.analyze(Unknown Source)
at org.antlr.works.grammar.engine.GrammarEngineImpl.analyze(Unknown Source)
at org.antlr.works.interpreter.EditorInterpreter.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
A friend who is trying to convince to to give up C++ and move to Java tells me the main reason I should change is that you do not need to worry about NULL pointers in Java, looks like he is wrong.
Can anyone point me to a solution for this problem?
Thanks in advance,
-EdK
Ed Keith
e_d_k at yahoo.com
Blog: edkeith.blogspot.com
More information about the antlr-interest
mailing list