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

fix repeat of preferred empty match #137

Merged
merged 1 commit into from
May 28, 2021
Merged

Commits on May 27, 2021

  1. fix repeat of preferred empty match

    Ports fix of golang/go#46123 to RE2/J.
    
    Original go fix:
    
    golang/go@2a61b3c
    
    Change description from that commit:
    
    In Perl mode, (|a)* should match an empty string at the start of the
    input. Instead it matches as many a's as possible.
    Because (|a)+ is handled correctly, matching only an empty string,
    this leads to the paradox that e* can match more text than e+
    (for e = (|a)) and that e+ is sometimes different from ee*.
    
    The current code treats e* and e+ as the same structure, with
    different entry points. In the case of e* the preference list ends up
    not quite in the right order, in part because the "before e" and
    "after e" states are the same state. Splitting them apart fixes the
    preference list, and that can be done by compiling e* as if it were
    (e+)?.
    
    Fixes google#136.
    sjamesr committed May 27, 2021
    Configuration menu
    Copy the full SHA
    c9fe1c9 View commit details
    Browse the repository at this point in the history