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

NFA/DFA disagreement with EndText #265

Closed
SeanRBurton opened this issue Jul 11, 2016 · 1 comment
Closed

NFA/DFA disagreement with EndText #265

SeanRBurton opened this issue Jul 11, 2016 · 1 comment

Comments

@SeanRBurton
Copy link
Contributor

Matching Alternate([EndText, LiteralBytes { bytes: [118], casei: true }]) against "v" gives the match Some((4, 4)) with the DFA, but Some((1, 1)) with the NFA.

Same methodology as #241.

@BurntSushi
Copy link
Member

I can't reproduce this. This program terminates successfully:

extern crate regex;

use regex::internal::ExecBuilder;

fn main() {
    let res = r"$|(?i:v)";
    let re0 = regex::Regex::new(&res).unwrap();
    let re1 = ExecBuilder::new(&res).nfa().build().unwrap().into_regex();
    let s = "v";
    assert_eq!(
        re0.find_iter(s).collect::<Vec<_>>(),
        re1.find_iter(s).collect::<Vec<_>>());
}

When reporting bugs, could you please include code?

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

No branches or pull requests

2 participants