Closed m4rw3r closed 8 years ago
This will probably need a rework of the buffer
module to better fit the new Input
traits.
Would be interesting to investigate if the State::Incomplete
could be removed in favor of something like attoparsec's continuations (ie. ask the type implementing Input
for more data, fail or succeed if no more data could be provided depending on the parser).
See #44
[x] Investigate removal of
State::Incomplete
Simplifies all combinators which otherwise had to special-case the incomplete states. Does not seem to actually improve performance in any way despite decreasing the number of possible branches, guess that goes to show how good branch-prediction is in a modern CPU.
Conclusion: removed
State::Incomplete
.Input
for&str
[x]
ImplementInput
for anIterator
wrapperMoved to separate PR #49
Input
for TendrilState
type withResult
since it is just a success/fail state and makes for easier conversions and simpler code in general.Input
.input::InputBuf
tobuffer
module and replace the mode property with a boolean flag.[x] Update tests to accommodate for
Incomplete
removal and restructuring of theInput
.It is probably suitable to investigate if Quickcheck can be used here (#33)
[x] Rework
buffer
moduleMake sure lifetimes are removed (now part of
Input
implementation), simplify.skip_while
inInput