Commit Graph

48 Commits

Author SHA1 Message Date
9c05f880b0 Added | as alias for \b 2021-07-30 20:23:18 -07:00
ba6ee18ded Added strict mode for upto operator: ..=Abc 2021-07-30 19:24:35 -07:00
3445982b16 Ergonomic improvement: xcalloc -> new(), xrealloc -> grow() 2021-07-30 14:44:00 -07:00
ca08ebfc45 Fix for bug in char pattern start pos 2021-07-29 12:52:32 -07:00
bc813df3d7 Tweaks and optimizations 2021-07-29 12:45:37 -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
8c351922f4 Error reporting bugfix 2021-07-19 20:00:35 -07:00
cc84c3d791 Made escape sequence handling stricter: no longer supporting arbitrary
characters, only special escapes like \n, hex sequences like \x0a, octal
sequences like \012, and backslashes \\
2021-07-19 19:57:59 -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
ad85fb1da5 Added support for multiple escape sequences: \n,r,t 2021-07-17 14:19:55 -07:00
315aedc7cb Minor splint fixes 2021-05-22 22:02:22 -07:00
9c8baf4434 Fixes for replacements with or without patterns/replacement strings 2021-05-22 13:23:10 -07:00
cc6e25a06f Fix for broken escapes 2021-05-20 18:30:30 -07:00
78695e2aee Fixed backslash escape for single utf8 chars. 2021-05-20 17:39:27 -07:00
ec1a3e0835 Fixes for char sets/ranges and cleanups 2021-05-20 16:46:14 -07:00
0a1493dffa Cleanup/fix 2021-05-20 15:41:42 -07:00
9577e0dd8a Better codepoint functionality 2021-05-20 15:28:08 -07:00
655ed12128 Mostly working version 2021-05-20 15:27:24 -07:00
13e1b20f43 Removed escape sequences from string pats (use bp 'line\nl;line' or
`bp 'line\(nl)line'` or `bp 'line\\nline'` instead)
2021-05-20 13:00:52 -07:00
d9f0a92839 Added (!) syntax for errors with proper opcode support 2021-05-20 00:33:11 -07:00
355e06a58e Added ~ and !~ operators as replacements for == and != 2021-05-19 23:41:57 -07:00
f49f408e81 Be more permissive around closing quotes/parens 2021-05-16 13:25:59 -07:00
21260ec0f6 Bugfix for off-by-one error 2021-05-12 21:38:57 -07:00
1a1b3ecfee Renamed boundary->edge 2021-05-11 19:06:41 -07:00
a93220972f Overhaul of |-word boundaries (| is deprecated), performance
improvements for repeating matches, tweaks to the logic of word vs. id
2021-05-11 12:38:58 -07:00
3359a804c8 Converted ^/^^/$/$$ into pattern types instead of builtin definitions 2021-05-11 11:39:42 -07:00
b09bd4c746 Code cleanup: adding len parameter to new_pat() 2021-05-11 00:19:52 -07:00
17dbe5d9e8 Added {word} feature and cleaned up the code some. 2021-05-10 23:46:46 -07:00
16bb52a3b8 Fix to allow bp 'foo\..baz' 2021-02-07 10:54:02 -08:00
889fd70ec7 Cleaned up some error code 2021-01-26 17:58:46 -08:00
de0fec8fcb Removed check() and replaced with err()/errx() 2021-01-26 17:54:23 -08:00
c46a8227d0 Added --skip flag for skipping over patterns 2021-01-20 16:12:46 -08:00
b4c8a33a0c Tweaked .. syntax to make it more flexible (now: .. % skip pat) 2021-01-20 15:23:57 -08:00
16c401fbbb Simplified code by disallowing escapes in strings and splitting
stringpatterns into chunks (so unescaped versions don't need to be
created)
2021-01-19 21:35:34 -08:00
4b3579c968 More bools, because why not 2021-01-18 11:39:20 -08:00
e98574570e More static analysis cleanup 2021-01-18 11:15:53 -08:00
46f1747947 More static analyzer cleanup 2021-01-18 10:47:20 -08:00
7f0c3804dc Checking more return values (per static analyzer) 2021-01-18 09:52:35 -08:00
3bc3d824aa Cleanup 2021-01-18 09:34:52 -08:00
3ededef53d Static analysis part 1 2021-01-18 09:15:25 -08:00
c577769a89 Updated REF and CAPTURE types to store direct pointers to names (with a
len size_t) instead of allocating memory.
2021-01-17 23:28:19 -08:00
eb79c4a806 No longer allocatte memory for replacement string 2021-01-17 23:13:47 -08:00
ffdf32da2f Code cleanup on utils 2021-01-17 23:06:37 -08:00
3cc645f2d0 Improved argument parsing and added support for prompting user for a
pattern if none is provided
2021-01-17 13:33:10 -08:00
3f6e7c2beb Renamed VM_ to BP_ 2021-01-16 10:29:09 -08:00
3d3a73e18c Moved pattern code into the right file 2021-01-15 19:39:28 -08:00
44573fc224 Rename compiler -> pattern 2021-01-15 19:32:37 -08:00