Commit Graph

254 Commits (bde153ce082d15f20d8cb48b957d23f1edf3f1cf)
 

Author SHA1 Message Date
Aadhavan Srinivasan bde153ce08 Changed '-t' flag to include the new RE_SINGLE_LINE flag as well
Aadhavan Srinivasan 4c3c7e21c5 Fixed inverted Perl classes inside character classes eg. '[\D]'; added new flag for 'single-line' mode, where dot metacharacter matches newlines
Aadhavan Srinivasan 61a128e27a Added more tests
Aadhavan Srinivasan c700b01e80 Remove duplicate lines from `re_tests.py`
Aadhavan Srinivasan 578959c9b3 Add Python's regex test suite
Aadhavan Srinivasan 3918682339 Added more tests
Aadhavan Srinivasan d890a93775 Store multiline mode as a global flag
Aadhavan Srinivasan d029a171c0 Changed behavior of SOS and EOS assertions depending on whether multiline mode is enabled or not
Aadhavan Srinivasan 74b37ff818 Removed unused function
Aadhavan Srinivasan 7cd24959bf Added case-insensitive tests (copied the normal tests, added the case-insensitive flag and swapped the case of all characters in the test string
Aadhavan Srinivasan 6e309be71c Moved case-insensitive stuff to thompson(); fixed case-insensitivity in character classes and ranges
Aadhavan Srinivasan c92b3d0e7c Removed case-insensitive functionality from shuntingYard(); should be put in thompson() instead
Aadhavan Srinivasan 94c8044eb7 Running all tests case-insensitive with the same match indices wasn't a good idea
Aadhavan Srinivasan 4a45d1c95e allCases() now takes a boolean parameter that indicates whether we are case-sensitive or not
Aadhavan Srinivasan 861eb6067e Apply case-insensitive flag inside character classes as well
Aadhavan Srinivasan 027dfb4d6b Run all tests twice - case-sensitive, then case-insensitive
Aadhavan Srinivasan 932a20f641 Added more tests
Aadhavan Srinivasan 4547ba74f0 Throw error if a quantifier is quantified eg. 'a**'; throw error if start of character range is greater than the end eg. '[b-a]'
Aadhavan Srinivasan 125590d334 Replaced literal brackets with LBRACKET and RBRACKET metacharacters
Aadhavan Srinivasan e3b8eaf5f8 Removed unused function
Aadhavan Srinivasan 20142e93c4 Removed some panics with error throwing; changed some comments; removed use of mustPop() in parsing Kleene star - I use pop() and then throw an error if pop() returns an error
Aadhavan Srinivasan 5e3801af7c Reformatted error messages according to Go guidelines
Aadhavan Srinivasan d44a25f412 Removed a type that I wasn't using
Aadhavan Srinivasan 3f5f8fad2c Removed unnecessary functions (using `staticcheck`)
Aadhavan Srinivasan e671137493 Changed error messages - removed capitalization and punctuation to find Go's error message guidelines
Aadhavan Srinivasan abc40bf770 Return an error if a POSIX charclass is specified outside of brackets
Aadhavan Srinivasan 3fb9bc1446 Added support for POSIX character classes
Aadhavan Srinivasan ae76e2e55e Added a function to generate a slice of all values (inclusive) in a range
Aadhavan Srinivasan dec6aaca93 Added POSIX charclass tests
Aadhavan Srinivasan 43d0cbf0a0 Use 'CONCAT' instead of literally specifiying the rune
Aadhavan Srinivasan 68a3581d93 Added note on PCRE backreferences
Aadhavan Srinivasan ff250338b4 Added more tests; added backreference comment
Aadhavan Srinivasan 0367c0d614 Added more tests
Aadhavan Srinivasan 304ef68d45 Added more tests
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
Aadhavan Srinivasan 8feaefeeb8 Added more tests
Aadhavan Srinivasan a259f0ceab Created a function to return a state that will always have a zero-length state
Aadhavan Srinivasan 08e01a1c81 Loosened restrictions for concatenation - It's okay if one of the
elements is missing
Aadhavan Srinivasan 5c2869ff81 Updated test case
Aadhavan Srinivasan 4dfc77900f Added new assertion that always evaluates to true
Aadhavan Srinivasan 93903fc557 Allowed creation of empty non-capturing groups
Aadhavan Srinivasan 036e625a15 Added more test cases
Aadhavan Srinivasan 4966a222f9 Added detection of empty parentheses, as zero-length matches
Aadhavan Srinivasan 263619c50c Added more test cases
Aadhavan Srinivasan d7c9c181e1 Fixed bug in character class implementation
Aadhavan Srinivasan 5a085907cf WIP - fixing character classes
Aadhavan Srinivasan 65e5b4e2af Added more test cases
Aadhavan Srinivasan 1520edad55 Enforce the rule that character classes must have at least one character; interpret literal closing brackets as regular characters
Aadhavan Srinivasan 6fb266e0d2 Refactored isNormalChar(), wrote function to get special characters that have metachar replacements
Aadhavan Srinivasan 423fcc9b54 Added more test cases (1 failing)