[antlr-interest] NullPointerException in antlr

Terence Parr parrt at jguru.com
Tue Feb 26 09:43:21 PST 2002


Hi Sagar,

Can you narrow down the input for me so that you can find a small 
grammar that causes the error?  That would allow me to fix it quickly. 
Thanks!

Ter
PS	your direct email bounced.

On Tuesday, February 26, 2002, at 05:03  AM, SAGAR BIYANI wrote:

> Hi ,
> 	I am writing an grammar file for SQL commands.
> I have extended the same grammar for some other
> purpose. Now during
> generating
> the code for derived lexer and parser classes it is
> throwing following
> error.
>
> #$%%*&@# internal error:
> java.lang.NullPointerException
> [complain to nearest government official
>  or send hate-mail to parrt at jguru.com;
>  please send stack trace with report.]
>
> java.lang.NullPointerException
>         at java.util.Hashtable.get(Hashtable.java:320)
>         at
> antlr.SimpleTokenManager.getTokenSymbol(SimpleTokenManager.java:84)
>         at
> antlr.SimpleTokenManager.getTokenSymbolAt(SimpleTokenManager.java:89)
>         at
> antlr.JavaCodeGenerator.getValueString(JavaCodeGenerator.java:3046)
>         at
> antlr.JavaCodeGenerator.getRangeExpression(JavaCodeGenerator.java:3032)
>         at
> antlr.JavaCodeGenerator.getLookaheadTestTerm(JavaCodeGenerator.java:2991)
>         at
> antlr.JavaCodeGenerator.getLookaheadTestExpression(JavaCodeGenerator.java:
> 29
> 47)
>         at
> antlr.JavaCodeGenerator.getLookaheadTestExpression(JavaCodeGenerator.java:
> 29
> 73)
>         at
> antlr.JavaCodeGenerator.genCommonBlock(JavaCodeGenerator.java:1644)
>         at
> antlr.JavaCodeGenerator.gen(JavaCodeGenerator.java:533)
>         at
> antlr.OneOrMoreBlock.generate(OneOrMoreBlock.java:21)
>         at
> antlr.JavaCodeGenerator.genAlt(JavaCodeGenerator.java:1190)
>         at
> antlr.JavaCodeGenerator.genRule(JavaCodeGenerator.java:2503)
>         at
> antlr.JavaCodeGenerator.gen(JavaCodeGenerator.java:693)
>         at
> antlr.ParserGrammar.generate(ParserGrammar.java:28)
>         at
> antlr.JavaCodeGenerator.gen(JavaCodeGenerator.java:111)
>         at antlr.Tool.doEverything(Tool.java:254)
>         at antlr.Tool.main(Tool.java:390)
>
> Is is a bug ? Any help on this will be greatly
> appreciated.
>
> Thanks,
> Sagar
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
--
Chief Scientist & Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list