nearley
nearley copied to clipboard
simple grammar gets nearley stuck in infinite loop
From my understanding, nearley getting stuck in an infinite loop despite the grammar being malformed is considered a bug based on this previous issue: https://github.com/kach/nearley/issues/167
This is the grammar:
Main -> ___:* "foo" {% id %}
___ -> (" " | "\n"):*
I discovered this when moving the *
ebnf operator out from Main
and into the ___
rule but forgot to do it in both places.
I should mention I passed in parser.feed("foo");
.