Commit Graph

40 Commits

Author SHA1 Message Date
Jakob Borg 1d823af501 Correctly handle non-ASCII runes in patterns (fixes #54)
When matching a row we calculate an index into the string, and this
index was in runes. However when slicing the string Go uses byte
indexes. This change tracks both, using the rune count to determine the
correct length and the byte index to slice the string.
2022-06-15 10:05:05 +02:00
Sergey Kamardin f00a7392b4 more tests 2018-04-02 17:15:43 +03:00
Sergey Kamardin 034ebb20be Avoid btree Index() call on pattern with separators.
To avoid hard Index()'ing of given text with btree matcher we implement
an prefix_any and suffix_any matchers that can work well in many cases.

BTree matcher Index() will be implemented in upcoming commits to prevent
same bugs.

Fixes #23
2018-02-09 00:02:47 +03:00
gobwas 0354991b92 bugfix with row length 2016-10-23 00:02:45 +03:00
gobwas 36eb5476d5 refactoring done 2016-05-31 11:28:02 +03:00
gobwas 70f1304bc3 check lexer inifinite loop 2016-05-27 19:35:34 +03:00
gobwas 131e5cbf2d reimplement lexer 2016-05-15 00:31:14 +03:00
gobwas 49571a1557 fix hanging on empty string 2016-05-14 22:26:18 +03:00
gobwas 994ba33cd9 enable tests, fix lexer 2016-05-14 22:08:32 +03:00
gobwas 1550dd349c detection of the bug 2016-05-12 10:46:16 +03:00
gobwas eccf734cd7 add quote meta func 2016-02-25 00:31:30 +03:00
gobwas 1801ade38c quote meta func 2016-02-24 23:53:19 +03:00
gobwas f910d4c1c7 merge conflict 2016-02-24 23:36:26 +03:00
gobwas ebd16e0441 ttt 2016-02-22 22:25:10 +03:00
gobwas ed108ad05a benchmarks 2016-02-05 15:15:36 +03:00
gobwas 6b71a60e74 debug info 2016-02-02 22:34:10 +03:00
gobwas 61a66d485f tune 2016-02-02 22:20:26 +03:00
gobwas 57a5246fac use pool of segments 2016-02-02 22:03:37 +03:00
gobwas 51a65fcc7d cleanup 2016-01-22 19:17:08 +03:00
s.kamardin efc9b31dc6 add mismtach benchs 2016-01-20 21:05:54 +03:00
s.kamardin f98a889826 regexp benchmarks begin/end of anchors 2016-01-20 17:41:22 +03:00
s.kamardin ec7fba7e40 test with regexp 2016-01-19 20:52:32 +03:00
s.kamardin 55776ffb29 Fixes, cleanup 2016-01-15 19:50:12 +03:00
s.kamardin d2a191e0f0 Tune, new feature test 2016-01-14 21:32:02 +03:00
s.kamardin b3ce5dedcb Optimize compilation 2016-01-13 20:13:11 +03:00
gobwas ed79d1d679 off 2016-01-13 01:27:13 +03:00
gobwas ce3a69147f Draw graphviz in tests 2016-01-13 01:26:48 +03:00
s.kamardin 0be4bc46d1 graphviz try 2016-01-12 20:49:12 +03:00
s.kamardin df67a5925f tests 2016-01-12 14:13:56 +03:00
s.kamardin f2255c18f5 Indexing all matchers 2016-01-12 14:06:59 +03:00
gobwas 787d8be671 Progress 2016-01-11 10:17:19 +03:00
gobwas 66fc4deeeb Fixes 2016-01-09 02:34:41 +03:00
gobwas 76b6c27015 Progress 2016-01-08 20:14:31 +03:00
s.kamardin e39827db7b fix 2015-12-24 19:00:41 +03:00
s.kamardin 5b4ed87b27 add range, refactor 2015-12-24 17:54:54 +03:00
s.kamardin 21665ef529 Perf optimizations 2015-12-01 17:22:17 +03:00
s.kamardin c664939ee7 🍻 2015-11-30 19:21:30 +03:00
s.kamardin b26a61f3bd Add escaping 2015-11-30 19:01:49 +03:00
s.kamardin 678ba81174 Update 2015-11-30 18:24:20 +03:00
s.kamardin d4d579d13e Initial 2015-11-30 17:58:20 +03:00