Hi Tilman, Thanks for the bug report and the testing grammars. I'll check this issue later today.
Regards, Leon On Thursday, April 02, 2009, at 09:28AM, "Tilman Bender" <[email protected]> wrote: >Hi folks, > >Tried to setup a testsuite for my tree grammar. The testsuite can be >run (allthough all tests fail) via the normal org.antlr.gunit.Interp >command but >when I try to generate JUnit-Code for it I get an NPE: > > java -cp ../../../target/classes/:$CLASSPATH org.antlr.gunit.Interp - >o Optimizer.testsuite >Exception in thread "main" java.lang.NullPointerException > at org.antlr.gunit.JUnitCodeGen.changeFirstCapital(JUnitCodeGen.java: >322) > at org.antlr.gunit.JUnitCodeGen.genTestRuleMethods(JUnitCodeGen.java: >193) > at org.antlr.gunit.JUnitCodeGen.compileToBuffer(JUnitCodeGen.java:121) > at org.antlr.gunit.JUnitCodeGen.compile(JUnitCodeGen.java:113) > at org.antlr.gunit.Interp.main(Interp.java:55) > >I am using antlr-3.1.3 and the respective version of antlr3-maven- >plugin to do the grammar code-generation and compilation. > From what I found so far it seems to be that : > >- gUnitTestSuite doesnt correctly set the treerule field >- JUnitCodeGen doesn't check for null in genTestRuleMethods > >I attached my grammars so you can reproduce the problem. > >NB: If anybody has a neat solution to integrate gunit with maven >pleeease answer my prior thread :) > > > > >kind regards > >Tilman Bender >Student des Software Engineering >Hochschule Heilbronn >[email protected] > > > > 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 -~----------~----~----~----~------~----~------~--~---
