<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi folks,<div><br></div><div>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</div><div>when I try to generate JUnit-Code for it I get an NPE:</div><div><br></div><div><div> java -cp ../../../target/classes/:$CLASSPATH org.antlr.gunit.Interp -o Optimizer.testsuite </div><div>Exception in thread "main" java.lang.NullPointerException</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.antlr.gunit.JUnitCodeGen.changeFirstCapital(JUnitCodeGen.java:322)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.antlr.gunit.JUnitCodeGen.genTestRuleMethods(JUnitCodeGen.java:193)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.antlr.gunit.JUnitCodeGen.compileToBuffer(JUnitCodeGen.java:121)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.antlr.gunit.JUnitCodeGen.compile(JUnitCodeGen.java:113)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>at org.antlr.gunit.Interp.main(Interp.java:55)</div><div><br></div><div>I am using antlr-3.1.3 and the respective version of antlr3-maven-plugin to do the grammar code-generation and compilation.</div><div>From what I found so far it seems to be that :</div><div><br></div><div>- gUnitTestSuite doesnt correctly set the treerule field </div><div>- JUnitCodeGen doesn't check for null in <span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; ">genTestRuleMethods</span></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div>I attached my grammars so you can reproduce the problem.</div><div><br></div><div>NB: If anybody has a neat solution to integrate gunit with maven pleeease answer my prior thread :)</div><div><br></div><div><br></div><div></div></div></body></html>