Diff for /gforth/regexp-test.fs between versions 1.12 and 1.14

version 1.12, 2010/09/05 19:09:55 version 1.14, 2010/09/05 22:18:54
Line 118  s" fofoofoofofooofoobarbar" ?foos1 Line 118  s" fofoofoofofooofoobarbar" ?foos1
 s" bla baz bar" ?foos1  s" bla baz bar" ?foos1
 s" foofoofoo" ?foos1  s" foofoofoo" ?foos1
   
   \ backtracking on decissions
   
   : ?aab ( addr u -- flag )
      (( {{ =" aa" || =" a" }} {{ =" ab" || =" a" }} )) ;
   s" aab" ?aab 0= [IF] .( aab failed!) cr [THEN]
   
 \ buffer overrun test (bug in =")  \ buffer overrun test (bug in =")
   
   ." --- buffer overrun test ---" cr
   
  : ?long-string   : ?long-string
     (( // \( =" abcdefghi" \) ))      (( // \( =" abcdefghi" \) ))
     IF  \1 type  cr THEN ;      IF  \1 type  cr THEN ;
Line 135  here 4096 allocate throw 4096 + 8 - cons Line 143  here 4096 allocate throw 4096 + 8 - cons
     
 ." --- simple replacement test ---" cr  ." --- simple replacement test ---" cr
   
 : delnum  ( addr u -- addr' u' )   s// \d ?end s" " //g ;  : delnum  ( addr u -- addr' u' )   s// \d >> s" " //g ;
 : test-delnum  ( addr u addr' u' -- )  : test-delnum  ( addr u addr' u' -- )
    2swap delnum 2over 2over str= 0= IF     2swap delnum 2over 2over str= 0= IF
       ." test-delnum: got '" type ." ', expected '" type ." '"        ." test-delnum: got '" type ." ', expected '" type ." '"
Line 170  s" bla 45296s fasel 117s blubber" str= [ Line 178  s" bla 45296s fasel 117s blubber" str= [
          >> \1 s>number drop 60 *           >> \1 s>number drop 60 *
             \2 s>number drop + 60 *              \2 s>number drop + 60 *
             \3 s>number drop + 0 <# 's' hold #s #> <<              \3 s>number drop + 0 <# 's' hold #s #> <<
          || ` ( {* -` ) *} ` ) \ >> <<" "           || ` ( // ` ) >> <<" "
       }} LEAVE //s ;        }} LEAVE //s ;
   
 \ doesn't work yet  \ doesn't work yet

Removed from v.1.12  
changed lines
  Added in v.1.14


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>