]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/regexp/parser/parser.factor
stomp.cli: simplify
[factor.git] / basis / regexp / parser / parser.factor
index 605688b1c6c9b051251a2ffaf9da1fe55205c488..f70c123f67a53cef49987708cfcd6487a1e51a26 100644 (file)
@@ -1,5 +1,5 @@
 ! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
+! See https://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs combinators
 combinators.short-circuit interval-maps kernel math.parser
 multiline peg.ebnf regexp.ast regexp.classes sequences sets
@@ -42,7 +42,7 @@ MEMO: simple-category-table ( -- table )
             simple-category-table at <category-class>
         ] }
         { [ "script=" ?head ] [
-            dup simple-script-table at
+            [ simple-script-table at ]
             [ <script-class> ]
             [ "script=" prepend bad-class ] ?if
         ] }
@@ -50,7 +50,7 @@ MEMO: simple-category-table ( -- table )
     } cond ;
 
 : unicode-class ( name -- class )
-    dup parse-unicode-class [ ] [ bad-class ] ?if ;
+    [ parse-unicode-class ] [ bad-class ] ?unless ;
 
 : name>class ( name -- class )
     >string simple {
@@ -106,7 +106,7 @@ MEMO: simple-category-table ( -- table )
 ERROR: nonexistent-option name ;
 
 : ch>option ( ch -- singleton )
-    dup options-assoc at [ ] [ nonexistent-option ] ?if ;
+    [ options-assoc at ] [ nonexistent-option ] ?unless ;
 
 : option>ch ( option -- string )
     options-assoc value-at ;