m4rw3r/chomp

`or` fails with incomplete even though second parser could have succeeded on the input

m4rw3r opened this issue · 0 comments

combinators::or fails with Incomplete if the first parser reports incomplete, even if the second parser would have succeeded. This is not an issue when the input is not yet finite, since the first parser could be expecting a large piece of data and in that case asking for more input and then retrying is the correct action. But when the input is finite and parsing failed with incomplete on the first parser, the second parser should be attempted before giving up.

This will be a backwards incompatible change.