diff --git a/extra/modern/out/authors.txt b/extra/modern/out/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/extra/modern/out/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/extra/modern/out/out.factor b/extra/modern/out/out.factor new file mode 100644 index 0000000000..28fedc5a30 --- /dev/null +++ b/extra/modern/out/out.factor @@ -0,0 +1,30 @@ +! Copyright (C) 2017 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: arrays assocs io.encodings.utf8 io.files kernel modern +modern.paths modern.slices prettyprint sequences +sequences.extras splitting ; +IN: modern.out + +: strings-core-to-file ( -- ) + core-bootstrap-vocabs + [ ".private" ?tail drop modern-source-path utf8 file-contents ] map-zip + [ "[========[" dup matching-delimiter-string surround ] assoc-map + [ + first2 [ "VOCAB: " prepend ] dip " " glue + ] map + [ " " prepend ] map "\n\n" join + "" surround "resource:core-strings.factor" utf8 set-file-contents ; + +: parsed-core-to-file ( -- ) + core-bootstrap-vocabs + [ vocab>literals ] map-zip + [ + first2 [ "strings + ! [ 3 head ] [ 3 tail* ] bi [ >strings ] bi@ { "..." } glue + ";VOCAB>" 3array + ] map 1array + + { "" } surround "resource:core-parsed.factor" utf8 [ ... ] with-file-writer ; \ No newline at end of file