Handbook
Glossary
epsilon-loop ( state table nfa question -- )
Vocabulary
regexp
.
dfa
Inputs
state
an
object
table
an
object
nfa
an
object
question
an
object
Outputs
None
Definition
USING:
accessors
arrays
assocs
kernel
regexp.ast
regexp.classes
sequences
;
IN:
regexp.dfa
::
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
;