regexp-tree
regexp-tree copied to clipboard
[NFA/DFA] Implement transforms for syntactic sugar
NFA/DFA interpreter supports basic building blocks, such as Kleene-closure: a*. We should transform several constructs which are syntactic sugar to their basic representation, so the interpreter can handle them:
- ~
a+->aa*~ (done in https://github.com/DmitrySoshnikov/regexp-tree/commit/aa0e12cf3b8e7164c6ed6dd237d7871b81dba246) [a-z]->a|b|c|d ... |z, same for[A-Z], same for[0-9], and other char classes- support groups in the generator
- etc.
Transforms live in src/interpreter/finite-automaton/transforms.