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

Add stringIn1 parser #110

Merged
merged 14 commits into from
Dec 22, 2020
Merged

Add stringIn1 parser #110

merged 14 commits into from
Dec 22, 2020

Commits on Dec 17, 2020

  1. Add stringIn1 parser

    This parser builds a radix tree from non empty string alternatives.
    Radix trees are interesting as they allow for efficient parsing of
    string alternatives (e.g. enum names) without backtracking and require
    only 1 character lookahead.
    
    String alternatives are first sorted and then grouped by common non
    empty prefix. Grouped string are then recursively grouped with the same
    process. In the resulting tree, each group of substrings start with a
    different character, which can be used to decide which alternative
    branch to take.
    
    This operator is inspired by fastparse `stringIn` one, and requires all
    alternatives to be non empty.
    satabin committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    8f289b8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a4db928 View commit details
    Browse the repository at this point in the history
  3. Add basic stringIn1 benchmark

    satabin committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    161a422 View commit details
    Browse the repository at this point in the history
  4. Fix longest match semantics

    satabin committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    230ef69 View commit details
    Browse the repository at this point in the history
  5. Avoid building tuples

    satabin committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    499810e View commit details
    Browse the repository at this point in the history
  6. Add longest match test

    satabin committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    82f80f1 View commit details
    Browse the repository at this point in the history
  7. Fix formatting

    satabin committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    3e77536 View commit details
    Browse the repository at this point in the history
  8. Benchmark more cases

    satabin committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    6353391 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f10a5a9 View commit details
    Browse the repository at this point in the history
  10. Add some StringIn1 laws

    satabin committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    cc084d0 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2020

  1. Configuration menu
    Copy the full SHA
    923763e View commit details
    Browse the repository at this point in the history
  2. Unify Str and OneOfStr errors

    satabin committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    54adec5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    409f367 View commit details
    Browse the repository at this point in the history
  4. Add more laws

    satabin committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    7d90c18 View commit details
    Browse the repository at this point in the history