Merge branch 'master' of git://factorcode.org/git/factor
commit
0507f99a36
|
@ -8,14 +8,14 @@ IN: blum-blum-shub.tests
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
|
||||||
[ 887708070 ] [
|
[ 70576473 ] [
|
||||||
T{ blum-blum-shub f 590695557939 811977232793 } clone [
|
T{ blum-blum-shub f 590695557939 811977232793 } clone [
|
||||||
32 random-bits
|
32 random-bits
|
||||||
little-endian? [ <uint> reverse *uint ] unless
|
little-endian? [ <uint> reverse *uint ] unless
|
||||||
] with-random
|
] with-random
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ 5726770047455156646 ] [
|
[ 5570804936418322777 ] [
|
||||||
T{ blum-blum-shub f 590695557939 811977232793 } clone [
|
T{ blum-blum-shub f 590695557939 811977232793 } clone [
|
||||||
64 random-bits
|
64 random-bits
|
||||||
little-endian? [ <ulonglong> 4 group [ reverse ] map concat *ulonglong ] unless
|
little-endian? [ <ulonglong> 4 group [ reverse ] map concat *ulonglong ] unless
|
||||||
|
|
|
@ -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