1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-01-03 05:10:12 +02:00
ripgrep/grep-regex/src
Andrew Gallant ba503eb677 grep-regex: fix inner literal detection
It seems the inner literal detector fails spectacularly in cases of
concatenations that involve groups. The issue here is that if the prefix
of a group inside a concatenation can match the empty string, then any
literals generated to that point in the concatenation need to be cut
such that they are never extended. The detector isn't really built to
handle this case, so we just act conservative cut literals whenever we
see a sub-group. This may make some regexes slower, but the inner
literal detector already misses plenty of cases.

Literal detection (including in the regex engine) is a key component
that needs to be completely rethought at some point.

Fixes #1064
2018-09-25 16:56:04 -04:00
..
ast.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
config.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
crlf.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
error.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
lib.rs libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
literal.rs grep-regex: fix inner literal detection 2018-09-25 16:56:04 -04:00
matcher.rs doc: minor touchups to API docs 2018-09-07 12:06:05 -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 libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00