Commit Graph

31 Commits (9d3c228ace0e64b5eba509aecab82ee9a60344e0)

Author SHA1 Message Date
Aadhavan Srinivasan 25cb79f01b Changed 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
backslashes

Specifically, I replace an escaped backslash with a metacharacter, then
replace it back later on. This prevents problems, like detecting whether
the opening bracket is escaped in '\\[a]'.
2 months ago
Aadhavan Srinivasan 47ec95f7bb Created function that returns a 'default' state 2 months ago
Aadhavan Srinivasan 3f0360b9be Fixed bug where I used the 'lookaroundNumCaptureGroups' member of the wrong State struct 2 months ago
Aadhavan Srinivasan 644ed15af0 Use new API for findAllMatches 2 months ago
Aadhavan Srinivasan 61bced606e Added comments - certain members of State depend on the current match, should be reset 3 months ago
Aadhavan Srinivasan 332c2fe5a2 Made lookarounds a little more efficient by only matching from (or to, in the case of lookbehind) the current index 3 months ago
Aadhavan Srinivasan 437ca2ee57 Improved submatch tracking by storing all group indices as a part of the state, which is viewed as a 'thread' 3 months ago
Aadhavan Srinivasan 11f7f1d746 Added fields to state, to determine capturing group information. 0th group refers to entire match 3 months ago
Aadhavan Srinivasan 745fab9639 Clone lookaroundNFA when cloning a state; use compiled regex for
lookarounds instead of compiling a new one
3 months ago
Aadhavan Srinivasan 393769f152 Accounted for last character being a newline when checking for EOS (we can be at the second-last character if the last one is a newline 3 months ago
Aadhavan Srinivasan 25c333bea4 Added function to determine if a state is a lookaround 4 months ago
Aadhavan Srinivasan 77d19cd84e Added lookaround-related fields to State struct, added lookaround support to checkAssertion() 4 months ago
Aadhavan Srinivasan ea64ddc88a Removed unnecessary duplication of assertion checking 4 months ago
Aadhavan Srinivasan 708a9e1303 Added field to denote all characters which an 'allChars' node _shouldn't_ match (useful for invertinc character classes 4 months ago
Aadhavan Srinivasan c56d81a335 Added unicode support to dot metacharacter - it now matches _any_ unicode character (almost) 4 months ago
Aadhavan Srinivasan 8a1f1dc621 Added unicode support
Replaced strings with rune-slices, which capture unicode codepoints more
accurately.
4 months ago
Aadhavan Srinivasan 21142e6e13 Wrote function to clone the NFA starting at a given state, and a function to find question mark operator (a? == (a|)) 4 months ago
Aadhavan Srinivasan dca81c1796 Replaced rune-slice parameters with string parameters in functions; avoids unnecessary conversion from strings to rune-slices 4 months ago
Aadhavan Srinivasan fccd3a76f5 Wrote function to check if the assertion of a state is true 4 months ago
Aadhavan Srinivasan 0736e813c1 Fixed boneheaded mistake with checking assertion types 4 months ago
Aadhavan Srinivasan 1aff6e2fa4 Added a field to State, that tells me what kind of assertion (if any) it is making. Also added function to check if a state's contents contain a given value (checks assertions), and to find all matches that a state has for a character 4 months ago
Aadhavan Srinivasan 3778869567 Use stateContents type to allow a state to store multiple characters 4 months ago
Aadhavan Srinivasan aee24644e9 Use new unique_append function signature 4 months ago
Aadhavan Srinivasan ae219f763a Added alternate function, removed relevant code from main; also started working on escape characters 4 months ago
Aadhavan Srinivasan bf3060b672 Used 'unique append' to ensure that a transition can only contain a given state once 4 months ago
Aadhavan Srinivasan b327143fa2 Added function for concatenation and kleene star 4 months ago
Aadhavan Srinivasan 9d3bc2b804 Fixed kleene star behavior, which used to behave like a '+' 5 months ago
Aadhavan Srinivasan bc11777ad5 Fixed Kleene Star matching 5 months ago
Aadhavan Srinivasan 213da40c3b Allow one state to map to multiple states with the same transition eg. ab|aa 5 months ago
Aadhavan Srinivasan 8394e7867e Fixed bug with last state detection 5 months ago
Aadhavan Srinivasan 82b33f3c9a First commit 5 months ago