Closed lovenunu closed 6 years ago
Hello :-),
Indeed, it is a LL parser, so the grammar must not be left-recursive. You should rewrite your grammar to avoid such recursions.
Thanks for the hint :-) Shouldn't the parser throw an exception when such recursive grammar is loaded, to let the user know he did something wrong ?
You should take a look at https://github.com/hoaproject/Compiler/issues/14.
Hello, It seems that when a rule is recursive or have a circular dependecy with other rules, the parser goes to an infinite loop. During the execution of
Hoa\Compiler\Llk\Parser::unfold
, instead of decreasing,Hoa\Compiler\Llk\Parser::_todo
keeps growing, so thewhile
loop never stops.I have this behavior with hoa/compiler 3.17.08.08 Example to reproduce: