Commit Graph

453 Commits

Author SHA1 Message Date
5f9bab528a Don't quit if a file is not found, continue with any other files that are found 2025-03-18 11:45:50 -04:00
530564b920 Print error if input file is a directory; print program name before error string 2025-03-16 19:48:49 -04:00
02b3b469c4 Added support for line num flag 2025-03-16 19:23:23 -04:00
e489dc4c27 Started working on line number flag 2025-03-15 16:24:50 -04:00
34149980a4 Started working on multiple filename arguments; prefix each line with filename containing the line; mostly indentation changes 2025-03-13 12:11:54 -04:00
e79c19a929 Updated TODO 2025-03-12 16:46:57 -04:00
d2bce37935 Updated argument count validation 2025-03-12 16:46:05 -04:00
bb3b866b77 Started working on file arguments - stdin is used if arg is "-" 2025-03-12 16:44:40 -04:00
e07f27dc78 Merge branch 'master' of https://gitea.twomorecents.org/Rockingcool/kleingrep 2025-02-24 07:46:54 -05:00
65d2317f79 Added more backreference tests 2025-02-21 08:44:33 -05:00
a631fc289c Clone 'isBackreference' and 'referredGroup' NFA fields, because they aren't thread variables 2025-02-21 08:44:24 -05:00
d62a429cce Updated documentation 2025-02-20 19:58:07 -05:00
7b31031553 Change when a newline is printed; so that we don't print extraneous newlinesraneous newlines 2025-02-17 09:37:31 -05:00
38c842cb07 Added method to get length of unique array 2025-02-17 09:36:38 -05:00
9f9af36be8 Fixed bug where escaped parentheses in lookarounds were counted as regular parentheses instead of literals 2025-02-17 09:36:17 -05:00
8217b67122 Added test for escaped parentheses in lookarounds 2025-02-17 09:35:06 -05:00
1f06dcef64 Just declare the variable instead of initializing it as well 2025-02-16 15:51:53 -05:00
119475b41b Updated README 2025-02-14 12:13:01 -05:00
6151cc8cf6 Updated documentation v0.3.0 2025-02-14 12:07:43 -05:00
3eaf4eb19c Updated README 2025-02-14 12:00:33 -05:00
d453815831 Added README 2025-02-14 11:59:43 -05:00
3a2916baae Set 'isLazy' to true in the NFA, if the postfixNode has the flag set 2025-02-14 11:37:48 -05:00
9d6344719f Reverse order of trying branches if the quantifier is lazy 2025-02-14 11:37:28 -05:00
f5c868566b Added field to NFA, denoting if a node is lazy or not 2025-02-14 11:37:14 -05:00
1cd6da218f Added lazy quantifier tests 2025-02-14 11:36:56 -05:00
277cbc0fc5 Started working on lazy quantifier support 2025-02-13 20:50:30 -05:00
3924502b72 Added code to return lazy quantifier postfixNodes 2025-02-13 20:50:11 -05:00
36b009747b Added metacharacters for lazy quantifiers 2025-02-13 20:49:54 -05:00
6cd0a10a8f Added more documentation 2025-02-13 14:14:00 -05:00
69fb96c43d Merge pull request 'Implement Unicode character classes' (#4) from implementUnicodeCharClass into master
Reviewed-on: #4
2025-02-13 09:51:44 -06:00
46bc0c8529 Removed unicode character classes from 'features not supported' list 2025-02-13 10:48:23 -05:00
1a890a1e75 Refactoring - remove duplicate code 2025-02-13 09:10:40 -05:00
fde3784e5a Added unicode charclass support within character classes; Fixed bugs with hex classes and unicode classes 2025-02-13 08:58:02 -05:00
7045711860 Convert test_str into a rune slice for better unicode compatibility, it also fixed the bug where all unicode characters wouldn't be colored 2025-02-13 08:57:06 -05:00
d4d606d95b Added tests for unicode character classes; more tests for hex characters 2025-02-13 08:55:12 -05:00
9cd330e521 More work on unicode character class support - fix bug where all characters aren't being matched 2025-02-12 23:04:10 -05:00
44d6a2005c Started working on unicode character classes 2025-02-12 22:19:30 -05:00
f76cd6c3d9 Merge pull request 'Implement Backreferences' (#3) from implementBackreferences into master
Reviewed-on: #3
2025-02-12 21:17:32 -06:00
375baa1722 Wrote more backreference tests 2025-02-12 07:51:20 -05:00
2e47c631bb Updated documentation to include backreferences 2025-02-12 07:50:59 -05:00
81b8b1b11c Do not validate a backreference if the group that it refers to is not valid 2025-02-11 19:12:58 -05:00
2934e7a20f Wrote tests for backreferences 2025-02-11 19:12:40 -05:00
f466d4a8d5 More progress on backreference implementation 2025-02-11 17:06:39 -05:00
8327450dd2 Started implementing backreferences (octal values should now be prefaced with \0) 2025-02-11 16:14:54 -05:00
073f231b89 Added function and examples for ReplaceAllFunc() v0.2.0 2025-02-10 21:35:51 -05:00
3b7257c921 Wrote function and example for ReplaceAllLiteral() 2025-02-10 21:25:49 -05:00
668df8b70a Wrote MarshalText() and UnmarshalText() to implement TextMarshaler and TextUnmarshaler 2025-02-10 12:30:48 -05:00
214acf7e0f Wrote example for ReplaceAll(); fixed out-of-bounds bug in Expand() 2025-02-10 12:30:17 -05:00
50221ff4d9 Wrote ReplaceAll(), to replace all matches of the regex with a given string 2025-02-10 12:29:54 -05:00
5ab95f512a Updated docs 2025-02-10 09:36:00 -05:00