if we reached the end of input, test with at_eof, to see if we should
return the whole input slice or not.
This will potentially break some existing parsers that rely on many0
trying to consume everything, but this behaviour is more correct and
aligned with the rest of nom
- the combinators that do not expect a terminator (take_while, take_till) will return the whole input if input.at_eof() is true
- the combinators with the 1 suffix will return an error instead of an empty slice, even if we found the terminating tag
- combinators that expect a terminating tag but do not find it will return an error if input.at_eof() is true, incomplete if it is false
this will make it easier to be compatible with other crates like
error_chain, and we can reuse a lot of code coming for free with
Result. Incomplete is merged into the error side. I still do not
consider it to be an error,but this side will also contain unrecoverable
errors at some point (errors that cause alt and others to return
instead of testing the next branch), so it will be easier to put it in
this enum.
compilation features are additive, so a 'core' that removes some
functionality makes no sense. To use nom in no_std environment,
the code should nom import nom and deactivate 'std'