run-captures ( start end string table registers -- registers/f )


Vocabulary
regexp.captures.private

Inputs
startan object
endan object
stringan object
tablean object
registersan object


Outputs
registers/fan object


Definition


:: run-captures
( start end string table registers -- registers/f )
table start-state>> registers capture-thread boa
1vector :> seeds! start :> position! f :> result!
[ position end <= seeds empty? not and ] [
seeds position string table capture-closure
:> ready position end = [
ready [ pc>> not ] find nip
[ registers>> result! ] when* V{ } clone seeds!
] [ ready position string nth advance-captures seeds! ]
if position 1 + position!
] while result ;