]> gitweb.factorcode.org Git - factor.git/commitdiff
remove >r r> from regexp
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 23 Nov 2008 05:01:24 +0000 (23:01 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 23 Nov 2008 05:01:24 +0000 (23:01 -0600)
basis/regexp/dfa/dfa.factor
basis/regexp/parser/parser.factor
basis/regexp/transition-tables/transition-tables.factor

index ef985258fd2cc66706d4a39402ebedc9a1c09c3f..0abd1c2edc5dc243c27c6634c686df9518495e7e 100644 (file)
@@ -43,7 +43,8 @@ IN: regexp.dfa
         dupd pop dup pick find-transitions rot
         [
             [ [ find-closure ] 2keep nip dupd add-todo-state ] 3keep
-            >r swapd transition make-transition r> dfa-table>> add-transition 
+            [ swapd transition make-transition ] dip
+            dfa-table>> add-transition 
         ] curry with each
         new-transitions
     ] if-empty ;
index 7f1d92a1ab91baace3f7dcb967c245d3898f544a..1feba62f68cf3da2e26bfe988464f6e953e00a60 100644 (file)
@@ -225,7 +225,7 @@ ERROR: invalid-range a b ;
 
 : handle-left-brace ( -- )
     parse-repetition
-    >r 2dup [ [ 0 < [ invalid-range ] when ] when* ] bi@ r>
+    [ 2dup [ [ 0 < [ invalid-range ] when ] when* ] bi@ ] dip
     [
         2dup and [ from-m-to-n ]
         [ [ nip at-most-n ] [ at-least-n ] if* ] if
index 1c9a3e3001ca359c848c1b985eb8a4de6834a7f3..3050be14fa63427e0b6dd65a7cef932b06f50f11 100644 (file)
@@ -40,7 +40,7 @@ TUPLE: transition-table transitions start-state final-states ;
     2dup [ to>> ] dip maybe-initialize-key
     [ [ to>> ] [ obj>> ] [ from>> ] tri ] dip
     2dup at* [ 2nip insert-at ]
-    [ drop >r >r H{ } clone [ insert-at ] keep r> r> set-at ] if ;
+    [ drop [ H{ } clone [ insert-at ] keep ] 2dip set-at ] if ;
 
 : add-transition ( transition transition-table -- )
     transitions>> set-transition ;