Commit Graph

81 Commits

Author SHA1 Message Date
9812de0c58 Initial working version 2021-10-01 14:19:21 -07:00
a61efe2cf0 Hardening utils (added *end param to avoid going past the end of
unterminated strings)
2021-09-28 16:59:01 -07:00
b882e30bf7 Performance optimization for patterns like (^"foo") or (|"foo"|) 2021-09-27 21:33:30 -07:00
840d62a60a Cache cleanup cleanup-- making sure matches don't get recycled when
they're stil being used.
2021-09-27 20:53:45 -07:00
911827fac3 Removed definitions as a separate type and instead encode that value in
the patterns themselves. This simplifies memory management a lot and
speeds up performance.
2021-09-27 20:36:10 -07:00
77d9007a88 Refactor of pat_t memory management to use doubly linked lists, and
moving the recursive freeing code from Lua/lbp.c into pattern.c
2021-09-26 13:12:02 -07:00
ee0174001b Minor cleanups 2021-09-26 12:57:04 -07:00
667f86e404 Some optimization, some cleanup 2021-09-25 23:11:13 -07:00
787784c77e Abbreviation 2021-09-24 23:16:06 -07:00
849257dde0 Removed weak optimization for ignorecase skipping 2021-09-24 23:14:38 -07:00
3a2492d584 WIP: working line breaks, formatting, etc. All seems functional, but a
bit messy
2021-09-23 20:51:04 -07:00
fddba4c54f Merge branch 'master' into fileless_matches 2021-09-23 17:53:17 -07:00
6ab22ad6a9 Bugfix 2021-09-23 17:50:16 -07:00
1727d9b75c Use strncasecmp and memmem instead of custom logic. 2021-09-23 17:46:46 -07:00
04eb92153f WIP 2021-09-23 17:31:21 -07:00
fac3fd9772 Moving pattern lifetime tracking off of files and onto its own list of
allocated pats.
2021-09-23 15:24:08 -07:00
8e1e6572fe Moved type defs into their own files instead of types.h 2021-09-23 15:15:48 -07:00
d20afd10b6 API update: made new_pat() internal and added public bp_backref() to
cover that use case
2021-09-23 14:55:30 -07:00
744a927562 Deprecated (!)-errors 2021-09-23 13:42:23 -07:00
97b7befdc8 Moved capture retrieval logic into match.c and out of print.c 2021-09-22 20:44:01 -07:00
90c3c13a02 Moving cache logic into match, cleaner next_match() API, and slightly
less tightly coupled UTF8 API
2021-09-21 18:45:43 -07:00
ae7f21b531 Moved capture retrieval logic into print.c 2021-09-19 17:48:00 -07:00
3c51755050 Fixing memory leak 2021-09-04 14:02:43 -07:00
f8860c385e Style change: added cino=:0 (i.e. case statements on same indentation as
switch). Also fixed issue where $$ would fail to match with trailing
newline on file
2021-08-28 16:05:30 -07:00
d7e18968bb Bugfix for | not working at start of file 2021-08-25 13:13:47 -07:00
3d0c07a0b8 Fix memory leak 2021-08-02 12:55:14 -07:00
80a087e454 Minor cleanup 2021-08-01 19:01:19 -07:00
0b2de4721f Moved caching code onto the file, which fixed an issue with file slicing
having stale cache values.
2021-08-01 15:36:53 -07:00
994c9c973e Changed how definitions work 2021-08-01 12:40:27 -07:00
ba6ee18ded Added strict mode for upto operator: ..=Abc 2021-07-30 19:24:35 -07:00
18e8a131f5 xfree() -> delete() 2021-07-30 15:06:04 -07:00
3445982b16 Ergonomic improvement: xcalloc -> new(), xrealloc -> grow() 2021-07-30 14:44:00 -07:00
ad640caac6 Removing DEBUG_HEAP, just do a full cleanup all the time 2021-07-30 13:38:39 -07:00
f3954ac151 Linked list management cleanup 2021-07-30 13:36:29 -07:00
253bb1dbe1 Temporary fix for memory bug 2021-07-29 13:59:50 -07:00
bc813df3d7 Tweaks and optimizations 2021-07-29 12:45:37 -07:00
db969f34a9 Micro optimization (probably not necessary) 2021-07-27 00:16:15 -07:00
a5a456fab3 Caching micro-optimizations 2021-07-27 00:09:04 -07:00
f86f75d782 More caching performance tuning 2021-07-26 23:56:04 -07:00
afc07fb735 Performance improvements for caching 2021-07-26 23:29:51 -07:00
f23b9bc637 Introduced cache to greatly speed up many use cases 2021-07-26 20:59:45 -07:00
711fe47a7f Overhaul of word boundaries/edges. Now they use \b, which is implemented
in C, and the C code understands UTF8 id chars.
2021-07-19 19:40:43 -07:00
62e7d654bd Disable optimization when skip is non-null 2021-07-19 13:33:51 -07:00
debd5d886c Simplification 2021-07-17 16:47:05 -07:00
9f2d9d86de Improved optimization for finding next match 2021-07-17 16:01:18 -07:00
f2e47bb95f Bugfix for backrefs 2021-07-17 15:31:18 -07:00
85f6cb8e76 Performance optimization for common case where pattern starts with
string
2021-07-17 15:25:24 -07:00
378e94090f Factored debug visualization into its own file 2021-07-17 14:05:10 -07:00
0f05961578 Simplified backrefs by only doing direct substring matching instead of
accounting for replacement strings.
2021-07-17 13:54:26 -07:00
a67a257044 Fix compiler warning nits 2021-05-31 12:56:49 -07:00