theorem
Regex.NFA.pushNode_wf
{nfa : NFA}
{node : Node}
(wf : nfa.WellFormed)
(inBounds : node.inBounds (nfa.size + 1))
:
(nfa.pushNode node).WellFormed
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 (e₁.concat e₂) = (nfa.pushRegex next e₂).pushRegex (nfa.pushRegex next e₂).start e₁