Closed
Description
Is your change request related to a problem? Please describe.
many p
will get stuck in a loop if p possibly doesn't consume any input but still succeeds.
One could argue that the parser is bogus in that case. However, it would be nice to have some compile time safety guarantees for this, because a hanging application isn't fun to deal with, even if it occurs while developing.
Some solution directions that cross my mind
- Utilizing the typesystem in some way that makes it impossible to pass a parser that possibly consumes no input but still succeeds.
- Changing the semantics of
many
such that it stops (or fails?) whenever the position of the parser state hasn't moved after applyingp
.
Metadata
Metadata
Assignees
Labels
No labels