epsilon-loop ( state table nfa question -- )


Vocabulary
regexp.dfa

Inputs
statean object
tablean object
nfaan object
questionan object


Outputs
None

Definition


:: epsilon-loop ( state table nfa question -- )
state table at :> old-value old-value question 2array
<or-class> :> new-question new-question old-value = [
new-question state table set-at
state nfa transitions>> at
[ tagged-epsilon? ] filter-keys [| trans to |
to [
table nfa trans tag>> new-question 2array
<and-class> epsilon-loop
] each
] assoc-each
] unless ;