]> gitweb.factorcode.org Git - factor.git/commitdiff
simple-flat-file: rename flat-file>biassoc to load-codetable-file.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Feb 2017 19:47:28 +0000 (11:47 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Feb 2017 19:47:28 +0000 (11:47 -0800)
basis/io/encodings/8-bit/8-bit.factor
basis/io/encodings/euc/euc.factor
basis/io/encodings/iso2022/iso2022.factor
basis/io/encodings/shift-jis/shift-jis.factor
basis/simple-flat-file/simple-flat-file-docs.factor
basis/simple-flat-file/simple-flat-file-tests.factor
basis/simple-flat-file/simple-flat-file.factor

index 8aec5cb496d372504c85b31b30942d26fb178fe1..8aeb292efe60ccf5006c58fc07754c705707c065 100644 (file)
@@ -49,7 +49,7 @@ M: 8-bit-encoding <decoder>
 : load-encoding ( name iana-name file-name -- )
     [ create-encoding dup ]
     [ register-encoding ]
-    [ encoding-file flat-file>biassoc 8-bit boa ] tri*
+    [ encoding-file load-codetable-file 8-bit boa ] tri*
     swap 8-bit-encodings get-global set-at ;
 
 PRIVATE>
index 63a2c69cffcaf2c6975f29ba75e24d9eee44b32f..261c8acca4d7ea390b5bf77bfd8cb93a2bc91781 100644 (file)
@@ -44,7 +44,7 @@ SYMBOL: euc-table
 
 : setup-euc ( word file-name -- singleton-class biassoc )
     [ dup define-singleton-class ]
-    [ flat-file>biassoc ] bi* ;
+    [ load-codetable-file ] bi* ;
 
 :: define-recursive-methods ( class data words -- )
     words [| word |
index 83e34c569e86cd9fe93ab064ea699a671624a015..1d96475841a569159dfae5ee2c078c66f8c4326f 100644 (file)
@@ -13,9 +13,9 @@ SYMBOL: jis201
 SYMBOL: jis208
 SYMBOL: jis212
 
-"vocab:io/encodings/iso2022/201.txt" flat-file>biassoc jis201 set-global
-"vocab:io/encodings/iso2022/208.txt" flat-file>biassoc jis208 set-global
-"vocab:io/encodings/iso2022/212.txt" flat-file>biassoc jis212 set-global
+"vocab:io/encodings/iso2022/201.txt" load-codetable-file jis201 set-global
+"vocab:io/encodings/iso2022/208.txt" load-codetable-file jis208 set-global
+"vocab:io/encodings/iso2022/212.txt" load-codetable-file jis212 set-global
 
 SYMBOL: ascii
 128 iota dup zip >biassoc ascii set-global
index cd848cd6f833028d449921fbd42ed44e67f9485e..5e9307d8e7a02d6db1ff62feb06c8c9f84807086 100644 (file)
@@ -33,7 +33,7 @@ TUPLE: jis assoc ;
 : jis>ch ( jis tuple -- string ) assoc>> at replacement-char or ;
 
 : make-jis ( filename -- jis )
-    flat-file>biassoc sift-values jis boa ;
+    load-codetable-file sift-values jis boa ;
 
 "vocab:io/encodings/shift-jis/CP932.txt"
 make-jis windows-31j-table set-global
index 2e31cd3b5e5690f70e5e5e6b128fd52931890450..c87c4c2e7c937933c31a1ab3c3f476b83219b662 100644 (file)
@@ -9,7 +9,7 @@ ABOUT: "simple-flat-file"
 ARTICLE: "simple-flat-file" "Parsing simple flat files"
 "The " { $vocab-link "simple-flat-file" } " vocabulary provides words for loading and parsing simple flat files in a particular format which is common for encoding and Unicode tasks."
 { $subsections
-    flat-file>biassoc
+    load-codetable-file
     load-interval-file
     load-data-file
 } ;
@@ -22,6 +22,6 @@ HELP: load-data-file
 { $values { "filename" string } { "data" array } }
 { $description "This loads a file that's delineated by semicolons and lines, returning an array of lines, where each line is an array split by the semicolons, with whitespace trimmed off." } ;
 
-HELP: flat-file>biassoc
+HELP: load-codetable-file
 { $values { "filename" string } { "biassoc" biassoc } }
 { $description "This loads a flat file, in the form that many encoding resource files are in, with two columns of numeric data in hex, and returns a biassoc associating them." } ;
index 6d8fcc4ef393cf184f454b72fb4d855d0cce6b76..127ccbf94a4a5197dffca5c318ffff2c7000558d 100644 (file)
@@ -5,7 +5,7 @@ IN: simple-flat-file.tests
 
 
 MEMO: <test1> ( -- code-table )
-    "vocab:simple-flat-file/test1.txt" flat-file>biassoc ;
+    "vocab:simple-flat-file/test1.txt" load-codetable-file ;
 
 { 0 } [ 0 <test1> at ] unit-test
 { 0 } [ 0 <test1> value-at ] unit-test
index ebcb9580ca66c87a21a3e8a1950ce445f8657abf..4fb68e2cf90a9365f624232527a674c35673d085 100644 (file)
@@ -26,7 +26,7 @@ IN: simple-flat-file
 : process-codetable-lines ( lines -- assoc )
     drop-comments [ parse-line ] map! ;
 
-: flat-file>biassoc ( filename -- biassoc )
+: load-codetable-file ( filename -- biassoc )
     utf8 file-lines process-codetable-lines >biassoc ;
 
 : split-; ( line -- array )