1db61108e4Allow pipes that have a missing operand - if an operand is missing, it is replaced with a zeroLengthMatchState(), which always has a zero-length matchAadhavan Srinivasan2025-01-25 22:36:58 -0500
1520edad55Enforce the rule that character classes must have at least one character; interpret literal closing brackets as regular charactersAadhavan Srinivasan2025-01-24 15:50:36 -0500
6fb266e0d2Refactored isNormalChar(), wrote function to get special characters that have metachar replacementsAadhavan Srinivasan2025-01-24 15:49:33 -0500
649485f01dRemoved character range creation from the first part of shuntingYard() (the part that adds concatenation operators), because octal and hex values haven't yet been deciphered at this point in the codeAadhavan Srinivasan2025-01-22 16:51:00 -0500
25cb79f01bChanged the value of EPSILON, so that we can use the NUL character (which it used to be) in a regex; Also added code to detect escaped backslashesAadhavan Srinivasan2025-01-21 22:10:07 -0500
0fb78abf7fAdded function to replace an element in a slice given its valueAadhavan Srinivasan2025-01-21 22:09:41 -0500
a14ab81697Updated function names, addeed new function 'FindString' that returns the _text_ of the matchAadhavan Srinivasan2025-01-19 21:44:15 -0600
7056026e10Added a new class 'CHARCLASS', which represents a character class with some other postfixNodes in it. The 'except' field now contains a list of postfixNodes rather than runesAadhavan Srinivasan2025-01-19 21:43:21 -0600
b81a2f8452Added functions to find if a character is a valid hex value and a valid octal valueAadhavan Srinivasan2025-01-19 21:31:18 -0600
3f0360b9beFixed bug where I used the 'lookaroundNumCaptureGroups' member of the wrong State structAadhavan Srinivasan2025-01-09 10:39:04 -0600
0956dddd81Fixed bug where I checked if flag was enabled before calling flag.Parse()Aadhavan Srinivasan2025-01-09 10:38:35 -0600
0b84806fc4Added 'flags' to the Compile function, instead of maintaining global state to check whether certain features were enabledAadhavan Srinivasan2025-01-09 10:33:56 -0600
24fa365be1Moved some auxiliary functions into compile.go; use new API for compiling and finding matchesAadhavan Srinivasan2025-01-06 20:14:57 -0600
1da3f7f0e0Changed API for match-finding functions - take in a Reg instead of start state and numGroups separatelyAadhavan Srinivasan2025-01-06 20:14:19 -0600
8d6e1a41a5Fixed bug where a repeated capturing group eg. (a){3} wouldn't capture only the last iteration, like it shouldAadhavan Srinivasan2024-12-16 22:58:39 -0500
332c2fe5a2Made lookarounds a little more efficient by only matching from (or to, in the case of lookbehind) the current indexAadhavan Srinivasan2024-12-11 00:31:08 -0500
437ca2ee57Improved submatch tracking by storing all group indices as a part of the state, which is viewed as a 'thread'Aadhavan Srinivasan2024-12-11 00:16:24 -0500
00902944f6Added code to match capturing groups and store into a Group (used to be MatchIndex)Aadhavan Srinivasan2024-12-09 01:28:18 -0500
11f7f1d746Added fields to state, to determine capturing group information. 0th group refers to entire matchAadhavan Srinivasan2024-12-09 01:05:01 -0500
745fab9639Clone lookaroundNFA when cloning a state; use compiled regex for lookarounds instead of compiling a new oneAadhavan Srinivasan2024-11-27 12:15:21 -0500
34e9aedbd6Compile lookaround regex to avoid compiling each time we want to use itAadhavan Srinivasan2024-11-27 12:15:01 -0500
6208f32710Added support for numeric ranges: <5-38> will match all numbers between 5 and 38, inclusive on both ends. Also print line number on which matches occur, if we are in printing (and single line) modeAadhavan Srinivasan2024-11-27 11:48:04 -0500
cbd6ea136bIf the NFA starts with an assertion, make sure it's true before doing anything else. Also, check for last-state _lookaround_ rather than just last state, before breaking (instead of aborting) when the assertion failsAadhavan Srinivasan2024-11-27 11:46:38 -0500
eb6a044ecfAdded angle brackets to list of special characters (which need to be escaped to be used literallyAadhavan Srinivasan2024-11-27 11:45:27 -0500
393769f152Accounted for last character being a newline when checking for EOS (we can be at the second-last character if the last one is a newlineAadhavan Srinivasan2024-11-27 11:44:39 -0500
e36310b32dAdded function (and helper functions) to generate a regex that matches all numbers in a rangeAadhavan Srinivasan2024-11-27 11:43:57 -0500
0de3a94ce3Fixed bug with lookaheads: f(?=f) would not match anything in 'ffa', because of the 'a' at the end of the string. Fixed by checking if there are other last states when an assertion fails, rather than immediately abortingAadhavan Srinivasan2024-11-24 15:04:51 -0500
fe1136c54cFixed bug with parentheses in lookaround regex; fixed bug with reading last line of test string (if it doesn't end in a newline)Aadhavan Srinivasan2024-11-24 15:02:58 -0500