Commit Graph

121 Commits

Author SHA1 Message Date
952b55fbdb Fix variable shadowing 2024-05-28 02:00:14 -04:00
59c5470ade Tweak default visibility settings 2024-05-28 01:56:13 -04:00
47a81dfb64 Use strcasestr() when ignoring case, which improves performance 2024-01-26 13:25:08 -05:00
3a728b28df Fix "-w" flag and fix optimization for skipping to match 2023-11-27 14:20:43 -05:00
6f5bb02b92 Use tagged union style for extra safety and concision 2023-05-06 13:43:32 -04:00
611cf8441a Fixing up more edge cases for retrieving captures 2022-10-30 17:01:17 -04:00
b306f72050 Another fix to numbered captures 2022-10-30 16:50:19 -04:00
3296ce42d9 Fix for numbered capture logic 2022-10-27 20:23:51 -04:00
07f335f367 Fix for getting @1 from a tagged capture 2022-10-27 13:38:19 -04:00
3fdd5211d9 Facilitate memory cleanup 2022-10-27 13:24:35 -04:00
e258645a52 Better error handling behavior 2022-10-27 13:17:23 -04:00
951a68f449 Pulling back bugfix 2022-10-27 12:50:32 -04:00
2bc0ca7390 Revert "Moving to each_match() API"
This reverts commit 9380a54d7c.
2022-10-27 12:49:31 -04:00
538706858e Bugfix 2022-10-27 00:05:30 -04:00
645081f64e Fixed lua to work with new API 2022-10-26 20:26:58 -04:00
9380a54d7c Moving to each_match() API 2022-10-26 20:12:18 -04:00
9e07e08a48 Microoptimizations 2022-10-26 13:38:38 -04:00
302bfa11e7 Bugfix 2022-10-23 00:34:20 -04:00
5db008dbd2 Better JSON printing and fixed issue with numbered captures 2022-10-23 00:15:49 -04:00
ca89d65513 Better error handling 2022-05-14 16:01:37 -04:00
2988080c32 Added :tag 2022-05-14 15:18:54 -04:00
56da250d69 Split backref/named captures into separate concepts for performance
reasons.
2022-05-12 12:11:28 -04:00
af668004e8 Updated Make rules so default is bp 2022-05-02 17:25:18 -04:00
e071ac7b12 Bugfix for left recursion 2022-05-02 17:23:02 -04:00
206e1fa68f Added tagged definitions: foo:: blah 2022-04-30 15:23:02 -04:00
24ed834317 Simplified things by passing a def argument to next_match instead of
chaining defs together. Also simplified `..` by just using a lookahead
instead of retconning it. Immutability invariants are now enforced
better.
2022-04-30 14:19:08 -04:00
326a0b960c Moving print logic out of match.c and renaming explain -> printmatch 2022-04-09 14:15:07 -04:00
486fe98a9c Fix for left recursion error due to wrong context 2021-10-02 12:38:42 -07:00
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