New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input trait #45
Merged
Merged
Input trait #45
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will probably need a rework of the |
Would be interesting to investigate if the |
Closed
m4rw3r
force-pushed
the
feature/input_trait
branch
2 times, most recently
from
August 17, 2016 21:52
5d661bc
to
647a4d2
Compare
… the buffer-return does not need to be tied directly to the input itself
* State::Incomplete now also carries the input state, needed to be able to backtrack on incomplete
…d fixed overflow errors
m4rw3r
force-pushed
the
feature/input_trait
branch
from
August 31, 2016 22:51
607b4a3
to
f037f09
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #44
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
.Implement
Input
for&str
ImplementInput
for anIterator
wrapperMoved to separate PR Implementation of Input wrapper for Iterator types #49
Implement
Input
for TendrilReplace the inner
State
type withResult
since it is just a success/fail state and makes for easier conversions and simpler code in general.Implement a numbering wrapper for any
Input
.Move
input::InputBuf
tobuffer
module and replace the mode property with a boolean flag.Update tests to accommodate for
Incomplete
removal and restructuring of theInput
.It is probably suitable to investigate if Quickcheck can be used here (Maybe use quickcheck to simplify some tests #33)
Rework
buffer
moduleMake sure lifetimes are removed (now part of
Input
implementation), simplify.Update doctests
Support for optimized
skip_while
inInput