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

compiler: fix RegexSet bug #369

Merged
merged 1 commit into from
May 20, 2017
Merged

compiler: fix RegexSet bug #369

merged 1 commit into from
May 20, 2017

Commits on May 20, 2017

  1. compiler: fix RegexSet bug

    When compiling a RegexSet, it was possible for the jump locations to
    become incorrect if the last regex in the set had a starting location
    that didn't correspond to the beginning of its program. This can happen
    in simple cases like when your set consists of the regexes `a` and `β`.
    In particular, the program for `β` is:
    
        0: Bytes(\xB2) (goto 2)
        1: Bytes(\xCE) (goto 0)
        2: MATCH
    
    Where the entry point is `1` instead of `0`. To fix this, we compile a
    set of regexes similarly to how we compile `a|β`, where we handle the
    holes produced by sub-expressions correctly.
    
    Fixes #353
    BurntSushi committed May 20, 2017
    Configuration menu
    Copy the full SHA
    cd8f6eb View commit details
    Browse the repository at this point in the history