[antlr-interest] Tree walk exception

Terence Parr parrt at cs.usfca.edu
Sat Nov 25 10:01:20 PST 2006


On Nov 25, 2006, at 4:50 AM, Eugene Seliverstov wrote:

> Hello!
>
> Sometimes during work of tree grammar parser NullPointerException  
> is thrown.
> Exception happens at  
> "org.antlr.runtime.tree.CommonTreeNodeStream.walkBackToMostRecentNodeW 
> ithUnvisitedChildren(CommonTreeNodeStream.java :483)"

That line number does not make sense in my 3.0b5 version. that line is:

	public boolean hasUniqueNavigationNodes() {

  can you check the line number again?
Ter
> and caused by accessing null element at top of stack indexStack.
> This can appear unexpectedly on different rules, on different input  
> texts. I think sometimes it's because small lookahead or  
> disambiguation of  grammar rules, but why it's no detected at code  
> generation time?..
>
> Of course, I can provide grammars if it can help (they are too  
> large to post here).
> Version of antlr - 3.0b5.
>
> Thank you for regards!
> -- 
> Best regards,
> Eugene Seliverstov



More information about the antlr-interest mailing list