Yes, this is a problem with ANTLRWorks 1.2.2. Version 1.2.3 will fix that. The workaround is to avoid a white space in the path of the grammar file.
Jean On Feb 7, 2009, at 2:32 PM, Terence Parr wrote: > Hi. Yeah, I remember something about spaces in filenames or pathnames > causing trouble. Judging from the location the code, it has some > particular problem. I would search in the list archives to see if you > can get a hit. > Ter > On Feb 7, 2009, at 2:30 PM, Ed Keith wrote: > >> I'm not sure what you mean. >> >> There are no spaces in the path the antlrworks-1.2.2.jar. >> >> My path environment variable has many spaces in it, as I suspect >> every XP systems does. Microsoft puts many necessary files in >> directories with spaces in the name (not a good idea IMHO, but they >> did not ask me). If I removed all spaces from the path I think >> Windows would crash. I know most of my applications would stop >> working. If this is what is preventing ANTL from working then I will >> need to use my Linux box, because ANTLR does not work on windows. >> >> -EdK >> >> Ed Keith >> [email protected] >> >> Blog: edkeith.blogspot.com >> >> --- On Sat, 2/7/09, Terence Parr <[email protected]> wrote: >> >> From: Terence Parr <[email protected]> >> Subject: Re: [antlr-interest] Problem runnign ANTLR >> To: "Ed Keith" <[email protected]> >> Cc: [email protected] >> Date: Saturday, February 7, 2009, 5:16 PM >> >> space in path? >> Ter >> On Feb 7, 2009, at 2:14 PM, Ed Keith wrote: >> >>> 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 >>> [email protected] >>> >>> Blog: edkeith.blogspot.com >>> >>> >>> >>> >>> List: http://www.antlr.org/mailman/listinfo/antlr-interest >>> Unsubscribe: >>> http://www.antlr.org/mailman/options/antlr-interest/your-email-address >> >> >> >> >> > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
