nearley icon indicating copy to clipboard operation
nearley copied to clipboard

simple grammar gets nearley stuck in infinite loop

Open bandaloo opened this issue 4 years ago • 1 comments

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.

bandaloo avatar Nov 21 '20 23:11 bandaloo

I should mention I passed in parser.feed("foo");.

bandaloo avatar Nov 21 '20 23:11 bandaloo