18 Commits (1db61108e453ff79fbfc3a87b14d04162021b236)

Author SHA1 Message Date
Aadhavan Srinivasan 1db61108e4 Allow pipes that have a missing operand - if an operand is missing, it is replaced with a zeroLengthMatchState(), which always has a zero-length match 1 week ago
Aadhavan Srinivasan 08e01a1c81 Loosened restrictions for concatenation - It's okay if one of the
elements is missing
1 week ago
Aadhavan Srinivasan 93903fc557 Allowed creation of empty non-capturing groups 1 week ago
Aadhavan Srinivasan 4966a222f9 Added detection of empty parentheses, as zero-length matches 1 week ago
Aadhavan Srinivasan d7c9c181e1 Fixed bug in character class implementation 1 week ago
Aadhavan Srinivasan 5a085907cf WIP - fixing character classes 1 week ago
Aadhavan Srinivasan 1520edad55 Enforce the rule that character classes must have at least one character; interpret literal closing brackets as regular characters 1 week ago
Aadhavan Srinivasan 9d3c228ace Fixed edge cases with character ranges and character classes 1 week ago
Aadhavan Srinivasan 2937f2d917 Removed old comment 2 weeks ago
Aadhavan Srinivasan efab70f9dc Implemented character range detection later in the code, using a metacharacter 2 weeks ago
Aadhavan Srinivasan 649485f01d Removed 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 code 2 weeks ago
Aadhavan Srinivasan ae09462bd4 Added important note 2 weeks ago
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 weeks ago
Aadhavan Srinivasan 099612ae7f Bug fixes, changed the way I parse octal values 2 weeks ago
Aadhavan Srinivasan 3a3333b38a New features, changed character class behavior
I added support for hex values (eg. \x0F), octal values (eg. \012) and
extended hex values (eg. \x{000F2A}). I also expanded the abilities of
character clsses, to include things like escaped characters (eg. [aefp\)])
and character ranges _inside_ inverted character classes (eg. [^\w] which is
functionally equivalent to [\W]).
2 weeks ago
Aadhavan Srinivasan 0b84806fc4 Added 'flags' to the Compile function, instead of maintaining global state to check whether certain features were enabled 3 weeks ago
Aadhavan Srinivasan c8613c1ba2 Major restructuring - added new type, changed return types for shuntingYard and thompson
I added a new function 'Compile' that calls shuntingYard and thompson. I also added
a new type 'Reg' that this function returns - it represents the starting state and contains
the number of capturing groups in the regex. I also rewrote shuntingYard and thompson
to return errors instead of panicking.
4 weeks ago
Aadhavan Srinivasan ddbcb309b0 Made shuntingYard return an error instead of panicking, moved it and thompson to compile.go 4 weeks ago