]> gitweb.factorcode.org Git - factor.git/commitdiff
simple-flat-file: rename ``data`` to ``load-data-file``.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Feb 2017 00:21:06 +0000 (16:21 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Feb 2017 00:21:06 +0000 (16:21 -0800)
basis/simple-flat-file/simple-flat-file.factor
basis/unicode/collation/collation.factor
basis/unicode/data/data.factor
basis/unicode/normalize/normalize-tests.factor

index f39bce1288b2ff09616b278867aa8d605a0541d9..c8caaed651883084ac6777fef8afd72942022b08 100644 (file)
@@ -29,7 +29,7 @@ IN: simple-flat-file
 : split-; ( line -- array )
     ";" split [ [ blank? ] trim ] map! ;
 
-: data ( filename -- data )
+: load-data-file ( filename -- data )
     utf8 file-lines drop-comments [ split-; ] map! ;
 
 : expand-range ( range -- range' )
@@ -45,4 +45,4 @@ IN: simple-flat-file
     dup values members [ intern ] curry assoc-map ;
 
 : load-interval-file ( filename -- table )
-    data intern-values expand-ranges ;
+    load-data-file intern-values expand-ranges ;
index be82f697cdd9ac0204292f7514259c504dd06ae4..36ac433b6a31d5d89c2993e6f1222b48c45a2de3 100644 (file)
@@ -23,7 +23,8 @@ TUPLE: weight primary secondary tertiary ignorable? ;
     " " split [ hex> ] "" map-as ;
 
 : parse-ducet ( file -- ducet )
-    data [ [ parse-keys ] [ parse-weight ] bi* ] H{ } assoc-map-as ;
+    load-data-file
+    [ [ parse-keys ] [ parse-weight ] bi* ] H{ } assoc-map-as ;
 
 "vocab:unicode/collation/allkeys.txt" parse-ducet ducet set-global
 
index 978aa186062c2583ea79f806f5e6d789437aec5e..ed778423651661dc887a086e76d6d85df637fdc6 100644 (file)
@@ -77,7 +77,7 @@ PRIVATE>
 ! Loading data from UnicodeData.txt
 
 : load-data ( -- data )
-    "vocab:unicode/data/UnicodeData.txt" data ;
+    "vocab:unicode/data/UnicodeData.txt" load-data-file ;
 
 : (process-data) ( index data -- newdata )
     [ [ nth ] keep first swap ] with { } map>assoc
@@ -170,7 +170,7 @@ C: <code-point> code-point
 
 ! Extra properties {{[a,b],prop}}
 : parse-properties ( -- assoc )
-    "vocab:unicode/data/PropList.txt" data [
+    "vocab:unicode/data/PropList.txt" load-data-file [
         [
             ".." split1 [ dup ] unless*
             [ hex> ] bi@ 2array
@@ -187,7 +187,7 @@ C: <code-point> code-point
 
 ! Special casing data
 : load-special-casing ( -- special-casing )
-    "vocab:unicode/data/SpecialCasing.txt" data
+    "vocab:unicode/data/SpecialCasing.txt" load-data-file
     [ length 5 = ] filter
     [ [ set-code-point ] each ] H{ } make ;
 
index f71a7645f40071de1924d59c74375817cee6a517..51630d29326f8f54edc1dccac6bbf4eb97a22922 100644 (file)
@@ -28,7 +28,7 @@ IN: unicode.normalize.tests
     ] assoc-all? ;
 
 { 17768 { } } [
-    "vocab:unicode/normalize/NormalizationTest.txt" data
+    "vocab:unicode/normalize/NormalizationTest.txt" load-data-file
     [ 5 head [ " " split [ hex> ] "" map-as ] map ] map
     [ length ] keep [
         {