[antlr-interest] infinite loop in ASTFactory

Anton Arhipov tonyfox24 at hot.ee
Thu Apr 21 17:16:59 PDT 2005


Hi!

I noticed a strange behaviour here.. perhaps i'm doing something wrong, 
but..

I have a rule like:

main: e:rule1 a:rule2;

.. and it works, but if i add some AST construction code:

main: e:rule1 a:rule2
{
     #main = #([MAIN,"main"], e, a);
}
;

.. then it hangs in infinite loop somewhere in ASTFactory

but then, if i do (without "a")

main: e:rule1 a:rule2
{
     #main = #([MAIN,"main"], e);
}
;

then it works again.

isn't it strange? any comments?


Ant.







More information about the antlr-interest mailing list