[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nullPointer Excpetion in org.sablecc.sablecc.Grammar.CLOSURE(Grammar.java:444)



Line 444 of Grammar.java is empty. I see the following possibilities:

1- Maybe your JVM is running out of memory.  Try:
     java -mx1024M -jar sablecc.jar ...
2- Maybe the bytecode is possibly erroneous.  Sometimes, the Jikes compiler
   produces incorrect bytecode.  Try recompiling SableCC using Sun's JDK.
3- Maybe it really is a SableCC problem, in which case I need a test case
   grammar that exhibits the problem, to investigate it.

Thanks for letting us know if this helps.

Etienne

Arman Anwar wrote:
While running SableCC on a simple grammar I got (I was using 2.18.1 so
I added a stacktrace):

any ideas ??

Arman.

java.lang.NullPointerException
java.lang.NullPointerException
        at org.sablecc.sablecc.Grammar.CLOSURE(Grammar.java:444)
        at org.sablecc.sablecc.Grammar.CLOSURE(Grammar.java:493)
        at org.sablecc.sablecc.Grammar.GOTO(Grammar.java:624)
        at
org.sablecc.sablecc.LR0Collection.<init>(LR0Collection.java:34)
        at
org.sablecc.sablecc.LR1Collection.<init>(LR1Collection.java:23)
        at org.sablecc.sablecc.Grammar.computeLALR(Grammar.java:92)
        at org.sablecc.sablecc.GenParser.caseStart(GenParser.java:110)
        at org.sablecc.sablecc.node.Start.apply(Start.java:32)
        at org.sablecc.sablecc.SableCC.processGrammar(SableCC.java:211)
        at org.sablecc.sablecc.SableCC.processGrammar(SableCC.java:141)
        at org.sablecc.sablecc.SableCC.main(SableCC.java:98)




--
Etienne M. Gagnon, Ph.D.             http://www.info.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/