This repository was archived by the owner on Sep 13, 2019. It is now read-only.
This repository was archived by the owner on Sep 13, 2019. It is now read-only.
Add RegExp diff algorithm & RegExp to DFA converter #8
Open
Description
To determine if two RegExp understand the same regular language, they must be parsed into a DFA tree and traversed. RegExp can then be diffed based on the strings they are capable of understanding, rather than the specific expression string they are comprised of.
Need to add:
-
new DFA(regExpObject); // Converts a RegExp instance to a DFA
-
new DFA("regExp string"); // Converts a RegExp string to a DFA
-
dfaOverlapStrings(dfa1, dfa2); // Returns true if 2 DFA can derive the same strings
-
diffRegex(regExpObject, regExpObject); // Returns true if 2 RegExp can understand the same strings, no more and no less.
-
diffRegex("regExp string", "regExp string"); // Same as above