Commit Graph

121 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
scier e7a84e9525 Fix speed results table formatting. 2018-10-02 22:08:08 +03:00
Hanzei f756513aec Update travis 2018-08-09 10:36:12 +03:00
Sergey Kamardin f00a7392b4 more tests 2018-04-02 17:15:43 +03:00
Sergey Kamardin 19c076cdf2 travis: update go versions 2018-02-09 00:18:42 +03:00
Sergey Kamardin 5ccd90ef52 syntax/ast: pretty printing 2018-02-09 00:06:56 +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
Sergey Kamardin 51eb1ee00b Merge pull request #17 from shawnps/master
gofmt -s
2017-02-12 23:01:51 +03:00
gobwas bea32b9cd2 fix typo 2016-12-07 10:55:55 +03:00
gobwas 0354991b92 bugfix with row length 2016-10-23 00:02:45 +03:00
Shawn Smith 75853f5901 gofmt -s 2016-08-15 13:02:39 +09:00
Sergey Kamardin ce6abff517 Merge pull request #16 from gobwas/newlexer_more
Newlexer more
2016-05-31 11:55:06 +03:00
Sergey Kamardin 0b50f259da Merge pull request #13 from gobwas/newlexer
reimplement lexer
2016-05-31 11:53:28 +03:00
gobwas 36eb5476d5 refactoring done 2016-05-31 11:28:02 +03:00
gobwas 510a1756cf refactoring 2016-05-30 19:35:53 +03:00
gobwas 2d733288bc refactoring 2016-05-27 20:47:19 +03:00
gobwas 70f1304bc3 check lexer inifinite loop 2016-05-27 19:35:34 +03:00
gobwas 3e14927781 reduce allocs for items 2016-05-16 01:08:55 +03:00
gobwas accfc6f397 remove bufio 2016-05-16 01:01:08 +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
Sergey Kamardin 1a9b5d0057 Merge pull request #12 from gobwas/bugfix-7
Bugfix
2016-05-14 22:15:31 +03:00
gobwas 994ba33cd9 enable tests, fix lexer 2016-05-14 22:08:32 +03:00
gobwas eabde343bd bugfix, cleaning up 2016-05-14 21:38:00 +03:00
gobwas 1550dd349c detection of the bug 2016-05-12 10:46:16 +03:00
gobwas 82e8d7da03 fix lexer with comma in text 2016-05-12 00:17:33 +03:00
Sergey Kamardin d877f63521 Merge pull request #8 from calmh/go13
use range constructs that build on Go 1.3
2016-04-13 22:37:43 +03:00
Jakob Borg 347f51cd34 use range constructs that build on Go 1.3 2016-04-03 11:41:14 +02:00
gobwas a3f5513f64 remove number of operations 2016-02-26 00:41:17 +03:00
gobwas dfccc6a326 remove number of operations 2016-02-26 00:40:45 +03:00
gobwas a67aeb6432 initial license 2016-02-26 00:35:03 +03:00
Sergey Kamardin f565080178 Merge pull request #5 from gobwas/feature/quote
Feature/quote
2016-02-25 00:43:22 +03:00
gobwas badfcd8171 update with QuoteMeta 2016-02-25 00:42:32 +03:00
gobwas 04523b0f59 to string tunage 2016-02-25 00:42:26 +03:00
gobwas b7874cc364 cleanup specials 2016-02-25 00:42:13 +03:00
gobwas 084e0669a3 todo 2016-02-25 00:41:52 +03:00
gobwas f031a1f239 bugfix 2016-02-25 00:31:37 +03:00
gobwas eccf734cd7 add quote meta func 2016-02-25 00:31:30 +03:00
gobwas f3d7e5e3d7 Merge branch 'master' into feature/quote 2016-02-24 23:54:05 +03:00
gobwas 1801ade38c quote meta func 2016-02-24 23:53:19 +03:00
Sergey Kamardin 3deac2392d Merge pull request #4 from gobwas/opti
Optimization with reusable slices
2016-02-24 23:37:39 +03:00
gobwas f910d4c1c7 merge conflict 2016-02-24 23:36:26 +03:00
gobwas 7a245c9846 update result of benchmarks 2016-02-24 23:33:18 +03:00
gobwas d8ec0fa85c tune script 2016-02-24 23:25:01 +03:00
gobwas 803c985a9a cleanup 2016-02-24 23:10:13 +03:00
gobwas 5abd72c544 fixes 2016-02-24 20:23:24 +03:00
gobwas 2cd1592c0b sleep before takes 2016-02-24 20:16:32 +03:00
gobwas 543f3e714c rename typo 2016-02-24 19:50:04 +03:00
gobwas ee3b8204de use sync.pool 2016-02-24 19:49:44 +03:00
gobwas 0964106bb3 try sync pool 2016-02-24 19:44:33 +03:00