1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-12 19:18:24 +02:00
ripgrep/grep-regex/src
Andrew Gallant adb9332f52
regex: fix -F aho-corasick optimization
It turns out that when the -F flag was used, if any of the patterns
contained a regex meta character (such as `.`), then we winded up
escaping the pattern first before handing it off to Aho-Corasick, which
treats all patterns literally.

We continue to apply band-aides here and just avoid Aho-Corasick if
there is an escape in any of the literal patterns. This is unfortunate,
but making this work better requires more refactoring, and the right
solution is to get this optimization pushed down into the regex engine.

Fixes #1334
2019-08-01 16:58:12 -04:00
..
ast.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
config.rs regex: make multi-literal searcher faster 2019-04-07 19:11:03 -04:00
crlf.rs regex: make multi-literal searcher faster 2019-04-07 19:11:03 -04:00
error.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
lib.rs regex: make multi-literal searcher faster 2019-04-07 19:11:03 -04:00
literal.rs regex: fix a perf bug when using -w flag 2019-04-05 23:24:08 -04:00
matcher.rs regex: fix -F aho-corasick optimization 2019-08-01 16:58:12 -04:00
multi.rs regex: fix HIR analysis bug 2019-04-14 19:29:27 -04:00
non_matching.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
strip.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
util.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
word.rs regex: make multi-literal searcher faster 2019-04-07 19:11:03 -04:00