[antlr-interest] parser stuck in some loop in the astFactory.make function call

Monty Zukowski monty at codetransform.com
Wed Jul 13 10:35:22 PDT 2005


Tarun Khanna wrote:
> Hi All,
> 
> I have a parser that gets stuck in the astFactory.make(ASTArray)
> function call. Any guesses why that would happen.
> 
> The ASTArray has 3 elements. Now my understanding is that, the first
> becomes the root and the other become its children.
> 
> The make function has a for each loop that loops over all the elements
> of the ASTArray. I can see that the size of ASTArray is 3 so that should
> not be a problem.
> 
> Did anyone else ever face such a problem?

Make sure you aren't using the same nodes in another tree or twice in
the same tree.  It's easy to create loops.

Monty


More information about the antlr-interest mailing list