Skip to content
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 63 commits into from Aug 31, 2016
Merged

Input trait #45

merged 63 commits into from Aug 31, 2016

Conversation

m4rw3r
Copy link
Owner

@m4rw3r m4rw3r commented Mar 18, 2016

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

  • Implement Input for an Iterator wrapper

    Moved to separate PR Implementation of Input wrapper for Iterator types #49

  • Implement Input for Tendril

  • Replace the inner State type with Result 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 to buffer module and replace the mode property with a boolean flag.

  • Update tests to accommodate for Incomplete removal and restructuring of the Input.

    It is probably suitable to investigate if Quickcheck can be used here (Maybe use quickcheck to simplify some tests #33)

  • Rework buffer module

    Make sure lifetimes are removed (now part of Input implementation), simplify.

  • Update doctests

  • Support for optimized skip_while in Input

@m4rw3r
Copy link
Owner Author

m4rw3r commented Mar 18, 2016

This will probably need a rework of the buffer module to better fit the new Input traits.

@m4rw3r
Copy link
Owner Author

m4rw3r commented Mar 19, 2016

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).

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 95.508% when pulling 359e909 on feature/input_trait into 456c5d4 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 95.686% when pulling 39f5838 on feature/input_trait into 456c5d4 on master.

@m4rw3r m4rw3r mentioned this pull request May 17, 2016
@m4rw3r m4rw3r force-pushed the feature/input_trait branch 2 times, most recently from 5d661bc to 647a4d2 Compare August 17, 2016 21:52
@m4rw3r m4rw3r merged commit c63b5b4 into master Aug 31, 2016
@m4rw3r m4rw3r deleted the feature/input_trait branch September 1, 2016 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants