[antlr-interest] (Newbie) tree walker emits "GrammarSanity.traceStatesLookingForLeftRecursion "

Cameron Palmer cameron.palmer at gmail.com
Wed Aug 8 22:59:21 PDT 2007


It sounds like your Main program isn't correctly handing off the
output of the Lexer-Parser to the Walker. I would verify that is
correct. I think the error message you are seeing is just a
consequence of the Null Pointer Exception.

Cameron Palmer
University of North Texas

On 8/9/07, ali azimi <aliaazimi at yahoo.com> wrote:
> Hi,
>
> Thank you in advance for any advice.
>
> When I run my tree walker I receive some error messages which can be seen at
> the bottom of this page. The grammar is too long and can not be posted. I
> have tried to make sure that the grammar does not have any left recursion
> problem. The error messages do not give me adequate information as to where
> these errors are likely to be originated from. What would you suggest me to
> do?
>
> I appreciate any help a lot.
>
> Best regards,
>
> Al
>
> Errors:
>
> Check Grammar failed:
>
> (10): internal error: C:\Documents and
> Settings\ali\Desktop\antlr\FpCif12Walker.g:
> java.lang.NullPointerException
>
> Org.antlr.tool.GrammarSanity.traceStatesLookingForLeftRecursion
> (Unknown Source)
> Org.antlr.tool.GrammarSanity.checkAllRulesForLeftRecursion
> (Unknown Source)
>
> Org.antlr.tool.Grammar. checkAllRulesForLeftRecursion (Unknown Source)
>
> Org.antlr.codegen.CodeGenerator.genRecognizer (Unknown
> Source)
>
> Org.antlr.Tool.processGrammar (Unknown Source)
>
> Org.antlr.Tool. process (Unknown Source)
>
> Org.antlr.works.generate.CodeGenerate.generate
> (CodeGenerate.java:125)
>
> Org.antlr.works.generate.CodeGenerate.run
> (CodeGenerate.java:251)
>
> Java.lang.Thread.run (Unknown Source)
>
>
>  ________________________________
> Be a better Globetrotter. Get better travel answers from someone who knows.
> Yahoo! Answers - Check it out.
>
>


More information about the antlr-interest mailing list