fix regexp2
parent
0f8c6bfd83
commit
6d62a34ba0
|
@ -29,7 +29,7 @@ IN: regexp2
|
||||||
|
|
||||||
: matches? ( string regexp -- ? )
|
: matches? ( string regexp -- ? )
|
||||||
dupd match
|
dupd match
|
||||||
[ [ length ] [ range-length 1- ] bi* = ] [ drop f ] if* ;
|
[ [ length ] [ length>> 1- ] bi* = ] [ drop f ] if* ;
|
||||||
|
|
||||||
: match-head ( string regexp -- end ) match length>> 1- ;
|
: match-head ( string regexp -- end ) match length>> 1- ;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ TUPLE: dfa-traverser
|
||||||
matches ;
|
matches ;
|
||||||
|
|
||||||
: <dfa-traverser> ( text regexp -- match )
|
: <dfa-traverser> ( text regexp -- match )
|
||||||
[ dfa-table>> ] [ traversal-flags>> ] bi
|
[ dfa-table>> ] [ dfa-traversal-flags>> ] bi
|
||||||
dfa-traverser new
|
dfa-traverser new
|
||||||
swap >>traversal-flags
|
swap >>traversal-flags
|
||||||
swap [ start-state>> >>current-state ] keep
|
swap [ start-state>> >>current-state ] keep
|
||||||
|
|
Loading…
Reference in New Issue