Compile a Regex and append the resulting nodes to the NFA. The nodes will transition to next
on match.
Equations
- One or more equations did not get rendered due to their size.
- nfa.pushRegex next Regex.Data.Expr.empty = nfa.pushNode Regex.NFA.Node.fail
- nfa.pushRegex next Regex.Data.Expr.epsilon = nfa.pushNode (Regex.NFA.Node.epsilon next)
- nfa.pushRegex next (Regex.Data.Expr.anchor a) = nfa.pushNode (Regex.NFA.Node.anchor a next)
- nfa.pushRegex next (Regex.Data.Expr.char c) = nfa.pushNode (Regex.NFA.Node.char c next)
- nfa.pushRegex next (Regex.Data.Expr.classes cs) = nfa.pushNode (Regex.NFA.Node.sparse cs next)
- nfa.pushRegex next (r₁.concat r₂) = (nfa.pushRegex next r₂).pushRegex (nfa.pushRegex next r₂).start r₁