Commit Graph

93 Commits

Author SHA1 Message Date
304d5c35a8 Left recursion correctness fixes 2021-10-02 11:33:40 -07:00
44f8608467 Fix for infinite loop in left recursive patterns 2021-10-01 20:40:36 -07:00
9648eb66d3 Cleanup on left recursion code 2021-10-01 20:04:12 -07:00
0ad64a1006 Bugfix for use-after-free, as well as an issue with the order
grammars were loaded
2021-10-01 19:29:31 -07:00
73bbf6872a Code cleanup 2021-10-01 19:06:17 -07:00
bc0b216125 Update caching code to make it explicitly for failures only. 2021-10-01 18:53:21 -07:00
007959ca0f Better comments 2021-10-01 18:21:02 -07:00
b67cb4643c Use chained scatter table 2021-10-01 18:18:22 -07:00
b064b7e6af Get rid of cache doubly linked list 2021-10-01 16:20:34 -07:00
1bdf8f4f40 Switch from chained buckets to just clobbering in the hash table 2021-10-01 15:49:43 -07:00
8988771158 Fix 2021-10-01 14:35:17 -07:00
5f0a7a876a Removing refcounting bookkeeping 2021-10-01 14:31:22 -07:00
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