Aadhavan Srinivasan
3f5f8fad2c
Removed unnecessary functions (using `staticcheck`)
6 days ago
Aadhavan Srinivasan
e671137493
Changed error messages - removed capitalization and punctuation to find Go's error message guidelines
6 days ago
Aadhavan Srinivasan
abc40bf770
Return an error if a POSIX charclass is specified outside of brackets
6 days ago
Aadhavan Srinivasan
3fb9bc1446
Added support for POSIX character classes
6 days ago
Aadhavan Srinivasan
ae76e2e55e
Added a function to generate a slice of all values (inclusive) in a range
6 days ago
Aadhavan Srinivasan
dec6aaca93
Added POSIX charclass tests
6 days ago
Aadhavan Srinivasan
43d0cbf0a0
Use 'CONCAT' instead of literally specifiying the rune
6 days ago
Aadhavan Srinivasan
68a3581d93
Added note on PCRE backreferences
7 days ago
Aadhavan Srinivasan
ff250338b4
Added more tests; added backreference comment
7 days ago
Aadhavan Srinivasan
0367c0d614
Added more tests
1 week ago
Aadhavan Srinivasan
304ef68d45
Added more tests
1 week ago
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
8feaefeeb8
Added more tests
1 week ago
Aadhavan Srinivasan
a259f0ceab
Created a function to return a state that will always have a zero-length state
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
5c2869ff81
Updated test case
1 week ago
Aadhavan Srinivasan
4dfc77900f
Added new assertion that always evaluates to true
1 week ago
Aadhavan Srinivasan
93903fc557
Allowed creation of empty non-capturing groups
1 week ago
Aadhavan Srinivasan
036e625a15
Added more test cases
1 week ago
Aadhavan Srinivasan
4966a222f9
Added detection of empty parentheses, as zero-length matches
1 week ago
Aadhavan Srinivasan
263619c50c
Added more test cases
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
65e5b4e2af
Added more test cases
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
6fb266e0d2
Refactored isNormalChar(), wrote function to get special characters that have metachar replacements
1 week ago
Aadhavan Srinivasan
423fcc9b54
Added more test cases (1 failing)
1 week ago
Aadhavan Srinivasan
cf4d305b31
Allow hyphen to be escaped inside character class
1 week ago
Aadhavan Srinivasan
9d3c228ace
Fixed edge cases with character ranges and character classes
1 week ago
Aadhavan Srinivasan
5e12fe1c42
Added 'flags' field to test struct for all-group tests
1 week ago
Aadhavan Srinivasan
f87458ee99
Added 'flags' field to test struct for 0-group tests
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
cf964e41db
Modified genRange() so that it can work on ints and runes
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
d210a85253
Updated handling of '\b' when inside character class, made invalid
...
escapes an error.
The '\b' value refers to a word boundary normally, but refers to the
backspace ASCII value inside a character class. I updated
newEscapedNode() to deal with this. I also changed the behavior, so that
trying to escape any other value results in an error, instead of just
returning the character as-is.
2 weeks ago
Aadhavan Srinivasan
48cff259b2
Updated tests
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
0fb78abf7f
Added function to replace an element in a slice given its value
2 weeks ago
Aadhavan Srinivasan
9dc4fd4595
Started adding tests from Python's RE test suite
2 weeks ago
Aadhavan Srinivasan
099612ae7f
Bug fixes, changed the way I parse octal values
2 weeks ago
Aadhavan Srinivasan
9115858261
Changed assignment of the unicode values by 1, so that EPSILON can now be 0xF0000
2 weeks ago
Aadhavan Srinivasan
fb46ed62d9
Added tests for FindString
2 weeks ago
Aadhavan Srinivasan
47ec95f7bb
Created function that returns a 'default' state
2 weeks ago
Aadhavan Srinivasan
a14ab81697
Updated function names, addeed new function 'FindString' that returns the _text_ of the match
2 weeks ago
Aadhavan Srinivasan
7056026e10
Added 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 runes
2 weeks ago
Aadhavan Srinivasan
b81a2f8452
Added functions to find if a character is a valid hex value and a valid octal value
2 weeks ago
Aadhavan Srinivasan
fcdb4a8868
Added another test, changed function calls to match new names
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