Skip to content
This repository has been archived by the owner on Sep 13, 2019. It is now read-only.

Add RegExp diff algorithm & RegExp to DFA converter #8

Open
Floofies opened this issue Aug 23, 2017 · 0 comments
Open

Add RegExp diff algorithm & RegExp to DFA converter #8

Floofies opened this issue Aug 23, 2017 · 0 comments

Comments

@Floofies
Copy link
Owner

Floofies commented Aug 23, 2017

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

@Floofies Floofies self-assigned this Aug 23, 2017
@Floofies Floofies changed the title Add RegExp to DFA conversion & diff algorithms Add RegExp diff algorithm & RegExp to DFA converter Aug 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant