Commit Graph

32 Commits (9fbb99f86c74d6d83f6925fd57b9e4f55472d7cc)

Author SHA1 Message Date
Aadhavan Srinivasan 9e12f9dcb3 Added field to Reg, denoting if we prefer longest match (POSIX style) or not (perl style) 4 weeks ago
Aadhavan Srinivasan 47f88c817f Fixed typo 4 weeks ago
Aadhavan Srinivasan c577064977 Added string field to Reg, that contains the expression string; wrote method to return the string 4 weeks ago
Aadhavan Srinivasan 99230b49de Use new function signature for zeroLengthMatchState() 1 month ago
Aadhavan Srinivasan 052de55826 question() now returns 2 values 1 month ago
Aadhavan Srinivasan 8534174ea1 Use pointers instead of values 1 month ago
Aadhavan Srinivasan cca8c7cda2 Got rid of transitions parameter, changed how kleene state is processed
I replaced the transition parameter for nfaState, replacing it with a
single nfaState pointer. This is because any non-alternation state will
only have one next state, so the map was just added complexity.

I changed alternation processing - instead of having their own dedicated
fields, they just use the new 'next' parameter, and another one called
'splitState'.

I also changed the kleene state processing to remove the unecessary
empty state in the right-side alternation (it actually messed up my
matching).
1 month ago
Aadhavan Srinivasan 5563a70568 Reverse the order in which I pop states for alternation, because this messes with the left branch-right branch thing 1 month ago
Aadhavan Srinivasan f94e3f2e71 Added comments 1 month ago
Aadhavan Srinivasan 6a96c98d04 Fixed bug where the regex '(()|.)(b)' wouldn't compile 1 month ago
Aadhavan Srinivasan 206fea34cd Added function to return the number of subexpressions in the group 1 month ago
Aadhavan Srinivasan f629a0f08f Added 'mustCompile' which panicks if there is an error compiling 1 month ago
Aadhavan Srinivasan 7431b1a7b2 Changed \Z to \z to fit with Go's naming 1 month ago
Aadhavan Srinivasan ee51e39d59 Added support for start-of-input (\A) and end-of-input (\Z) assertions 1 month ago
Aadhavan Srinivasan c3059fe899 Return a new error instead of rethrowing a non-existent error 1 month ago
Aadhavan Srinivasan 00c39857eb Rethrow errors instead of rewriting them 1 month ago
Aadhavan Srinivasan 57eb935bd1 Updated comment 1 month ago
Aadhavan Srinivasan cbd679949f Updated more referencs to constants 1 month ago
Aadhavan Srinivasan a63426d965 Updated references to constants 1 month ago
Aadhavan Srinivasan 2e3450285c Renamed one more variable to avoid exporting 1 month ago
Aadhavan Srinivasan 7e792f1248 Renamed more constants to avoid exporting 1 month ago
Aadhavan Srinivasan be60f2fb51 Updated references to 'epsilon' 1 month ago
Aadhavan Srinivasan e01ef48cbc Updated CONCAT to be a metacharacter instead of just a tilde, and renamed it to avoid exporting 1 month ago
Aadhavan Srinivasan 93474c5159 Renamed 'state' to 'nfaState' because 'state' by itself means nothing 1 month ago
Aadhavan Srinivasan 198a2c12a7 Renamed variable to avoid conflicting with type name 1 month ago
Aadhavan Srinivasan 7e88b8a4b0 Renamed variable to avoid conflicting with type name 1 month ago
Aadhavan Srinivasan 289bba35e2 Updated assertion constants so that they aren't exported 1 month ago
Aadhavan Srinivasan 7e6377a4c4 Updated more constants, so that they aren't exported 1 month ago
Aadhavan Srinivasan 73c6a442ce Updated nodeType constants so that they aren't exported 1 month ago
Aadhavan Srinivasan ca8f8e1030 Renamed function 1 month ago
Aadhavan Srinivasan 24a5045ebe Updated map and reduce function names so that they aren't exported 1 month ago
Aadhavan Srinivasan aef8152fc1 Renamed package 'greg' to 'regex' 1 month ago