Commit Graph

30 Commits (c577064977b7921f0db200b17a144343ebf92162)

Author SHA1 Message Date
Aadhavan Srinivasan c577064977 Added string field to Reg, that contains the expression string; wrote method to return the string 2 months ago
Aadhavan Srinivasan 99230b49de Use new function signature for zeroLengthMatchState() 2 months ago
Aadhavan Srinivasan 052de55826 question() now returns 2 values 2 months ago
Aadhavan Srinivasan 8534174ea1 Use pointers instead of values 2 months 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).
2 months ago
Aadhavan Srinivasan 5563a70568 Reverse the order in which I pop states for alternation, because this messes with the left branch-right branch thing 2 months ago
Aadhavan Srinivasan f94e3f2e71 Added comments 3 months ago
Aadhavan Srinivasan 6a96c98d04 Fixed bug where the regex '(()|.)(b)' wouldn't compile 3 months ago
Aadhavan Srinivasan 206fea34cd Added function to return the number of subexpressions in the group 3 months ago
Aadhavan Srinivasan f629a0f08f Added 'mustCompile' which panicks if there is an error compiling 3 months ago
Aadhavan Srinivasan 7431b1a7b2 Changed \Z to \z to fit with Go's naming 3 months ago
Aadhavan Srinivasan ee51e39d59 Added support for start-of-input (\A) and end-of-input (\Z) assertions 3 months ago
Aadhavan Srinivasan c3059fe899 Return a new error instead of rethrowing a non-existent error 3 months ago
Aadhavan Srinivasan 00c39857eb Rethrow errors instead of rewriting them 3 months ago
Aadhavan Srinivasan 57eb935bd1 Updated comment 3 months ago
Aadhavan Srinivasan cbd679949f Updated more referencs to constants 3 months ago
Aadhavan Srinivasan a63426d965 Updated references to constants 3 months ago
Aadhavan Srinivasan 2e3450285c Renamed one more variable to avoid exporting 3 months ago
Aadhavan Srinivasan 7e792f1248 Renamed more constants to avoid exporting 3 months ago
Aadhavan Srinivasan be60f2fb51 Updated references to 'epsilon' 3 months ago
Aadhavan Srinivasan e01ef48cbc Updated CONCAT to be a metacharacter instead of just a tilde, and renamed it to avoid exporting 3 months ago
Aadhavan Srinivasan 93474c5159 Renamed 'state' to 'nfaState' because 'state' by itself means nothing 3 months ago
Aadhavan Srinivasan 198a2c12a7 Renamed variable to avoid conflicting with type name 3 months ago
Aadhavan Srinivasan 7e88b8a4b0 Renamed variable to avoid conflicting with type name 3 months ago
Aadhavan Srinivasan 289bba35e2 Updated assertion constants so that they aren't exported 3 months ago
Aadhavan Srinivasan 7e6377a4c4 Updated more constants, so that they aren't exported 3 months ago
Aadhavan Srinivasan 73c6a442ce Updated nodeType constants so that they aren't exported 3 months ago
Aadhavan Srinivasan ca8f8e1030 Renamed function 3 months ago
Aadhavan Srinivasan 24a5045ebe Updated map and reduce function names so that they aren't exported 3 months ago
Aadhavan Srinivasan aef8152fc1 Renamed package 'greg' to 'regex' 3 months ago