1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-25 14:22:54 +02:00
Commit Graph

16 Commits

Author SHA1 Message Date
6a8051b258 Don't union inner literals of repetitions.
If we do, this results in extracting `foofoofoo` from `(\wfoo){3}`,
which is wrong. This does prevent us from extracting `foofoofoo` from
`foo{3}`, which is unfortunate, but we miss plenty of other stuff too.
Literal extracting needs a good rethink (all the way down into the regex
engine).

Fixes #93
2016-09-25 20:10:28 -04:00
1595f0faf5 Add --smart-case.
It does what it says on the tin.

Closes #70.
2016-09-24 21:51:04 -04:00
2a2b1506d4 Fix a performance bug where using -w could result in very bad performance.
The specific issue is that -w causes the regex to be wrapped in Unicode
word boundaries. Regrettably, Unicode word boundaries are the one thing
our regex engine can't handle well in the presence of non-ASCII text. We
work around its slowness by stripping word boundaries in some
circumstances, and using the resulting expression as a way to produce match
candidates that are then verified by the full original regex.

This doesn't fix all cases, but it should fix all cases where -w is used.
2016-09-21 19:12:07 -04:00
d22a3ca3e5 Improve the "bad literal" error message.
Incidentally, this was done by using the Debug impl for `char` instead
of the Display impl. Cute.

Fixes #5.
2016-09-16 18:12:00 -04:00
98a48b44bc Fix off-by-one bug in searcher. 2016-09-10 01:35:30 -04:00
af3b56a623 Fix grep match iterator. 2016-09-06 21:45:41 -04:00
fd3e5069b6 Fix required literal handling and add debug prints.
In particular, if we had an inner literal and were doing a case insensitive
search, then the literals are dropped because we previously only allowed
a single inner literal to have an effect. Now we allow alternations of
inner literals, but still don't quite take full advantage.
2016-09-06 19:33:03 -04:00
0bf278e72f making search work (finally) 2016-09-03 21:48:23 -04:00
d011cea053 The search code is a mess, but...
... we now support inverted matches and line numbers!
2016-08-29 22:44:15 -04:00
1c8379f55a Implementing core functionality.
Initially experimenting with crossbeam to manage synchronization.
2016-08-28 01:37:12 -04:00
957f90c898 docs and small polish 2016-08-24 18:33:35 -04:00
61f49ba716 Remove the buffered reader.
We really need functionality like this when memory maps aren't suitable,
either because they're too slow or because they just aren't available (like
for reading stdin). However, this particular approach was completely bunk.
Namely, the interface was all wrong. The caller needs to maintain some kind
of control over the search buffers for special output features (like
contexts or inverted matching), but this interface as written doesn't
support that kind of pattern at all.

So... back to the drawing board.
2016-08-24 18:06:42 -04:00
e97d75c024 Refactor buffered test. 2016-08-08 19:17:25 -04:00
076eeff3ea update 2016-08-05 00:10:58 -04:00
a3f609222c progress 2016-06-22 21:19:02 -04:00
0163b39faa refactor progress 2016-06-20 16:55:13 -04:00