From 487193cb268d5a84afdb63abf3a359fe98c9e95d Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 5 Jun 2016 18:13:21 -0700 Subject: [PATCH] factor: fix more libs. --- libs/twitter/prettyprint/prettyprint.factor | 8 +-- libs/xml/autoencoding/autoencoding.factor | 2 +- libs/xml/dtd/dtd.factor | 2 +- libs/xml/elements/elements.factor | 6 +- libs/xml/entities/entities.factor | 4 +- libs/xml/name/name.factor | 4 +- libs/yaml/conversion/conversion.factor | 2 +- modern-transition.factor | 64 +++++++++++++-------- 8 files changed, 53 insertions(+), 39 deletions(-) diff --git a/libs/twitter/prettyprint/prettyprint.factor b/libs/twitter/prettyprint/prettyprint.factor index 27f80f00fd..aabdea1287 100644 --- a/libs/twitter/prettyprint/prettyprint.factor +++ b/libs/twitter/prettyprint/prettyprint.factor @@ -12,24 +12,24 @@ MEMO: load-http-image ( url -- image/f ) profile-image-url>> load-http-image ; CONSTANT: tweet-table-style - H{ { table-gap { 5 5 } } } + H{ { table-gap { 5 5 } } } ; CONSTANT: tweet-username-style H{ { font-style bold } - } + } ; CONSTANT: tweet-text-style H{ { font-name "sans-serif" } { font-size 16 } { wrap-margin 500 } - } + } ; CONSTANT: tweet-metadata-style H{ { font-size 10 } - } + } ; : profile. ( user -- ) tweet-table-style [ diff --git a/libs/xml/autoencoding/autoencoding.factor b/libs/xml/autoencoding/autoencoding.factor index 4bdb3baf23..b3f03cc98e 100644 --- a/libs/xml/autoencoding/autoencoding.factor +++ b/libs/xml/autoencoding/autoencoding.factor @@ -53,7 +53,7 @@ in: xml.autoencoding get-next { { 0 [ next next start-utf16le ] } { char: ? [ go-utf8 instruct dup instruct-encoding ] } - { char: ! [ go-utf8 direct ] } + { char: \! [ go-utf8 direct ] } [ check start } { "amp" char: & } { "apos" char: ' } - { "quot" char: " } + { "quot" char: \" } } ; : with-entities ( entities quot -- ) diff --git a/libs/xml/name/name.factor b/libs/xml/name/name.factor index 20d2da780b..c05bb20bac 100644 --- a/libs/xml/name/name.factor +++ b/libs/xml/name/name.factor @@ -65,8 +65,8 @@ symbol: ns-stack } 2&& [ f ] [ 2drop f ] if ; : prefixed-name ( str -- name/f ) - char: : over index [ - char: : 2over 1 + swap index-from + char: \: over index [ + char: \: 2over 1 + swap index-from [ 2drop f ] [ [ head ] [ 1 + tail ] 2bi maybe-name ] if diff --git a/libs/yaml/conversion/conversion.factor b/libs/yaml/conversion/conversion.factor index 27bf72a77a..5364f607bc 100644 --- a/libs/yaml/conversion/conversion.factor +++ b/libs/yaml/conversion/conversion.factor @@ -111,7 +111,7 @@ CONSTANT: YAML_SET_TAG "tag:yaml.org,2002:set" ; R/ -[0-9][^0-9]/ [ [ char: 0 1 ] dip insert-nth ] re-replace-with R/ [^0-9][0-9]:/ [ [ char: 0 1 ] dip insert-nth ] re-replace-with R/ [ \t]+/ " " re-replace - char: : over index cut char: space swap remove append ; + char: \: over index cut char: space swap remove append ; : construct-timestamp ( obj -- obj' ) dup R/ [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ matches? diff --git a/modern-transition.factor b/modern-transition.factor index a0d0235431..bf45a1c5ed 100644 --- a/modern-transition.factor +++ b/modern-transition.factor @@ -3,31 +3,6 @@ ! find . -type f -name '*.factor' -exec sed -i '' 's/\(^CALLBACK:.* (.*)\)/\1 ;/g' {} + ! lexable-core-paths [ dup . flush path>literals ] map-zip -"resource:ffi" vocabs-from -{ "x11.syntax" "windows.com.syntax" "python.syntax" "opengl.gl.extensions" - "opencl.syntax" "mongodb.tuple" "cuda.syntax" "core-foundation.strings" - "cocoa.subclassing" "cocoa" "cocoa.apple-script" "gobject-introspection" } diff -[ dup . flush vocab>literals ] map-zip - -"resource:tools" vocabs-from -{ "help.syntax" "help.tips" "tools.test" "tools.walker" -"vocabs.git" } diff -[ dup . flush vocab>literals ] map-zip - - -"resource:collections" vocabs-from -{ "bit-arrays" -"bit-vectors" "dlists" "linked-assocs" "nibble-arrays" -"specialized-arrays" "specialized-vectors" "suffix-arrays" -"trees" "vlists" "arrays.shaped" "byte-arrays.hex" -"hash-sets.identity" "hash-sets.numbers" "hash-sets.sequences" -"hashtables.numbers" "hashtables.sequences" "persistent.hashtables" -"memory.pools" "persistent.vectors" "trees.avl" "trees.splay" -} diff -[ dup . flush vocab>literals ] map-zip - - - "resource:language" vocabs-from { "constructors" "descriptive" "eval" "functors" "literals" "match" "method-chains" "multi-methods" "multiline" @@ -42,12 +17,51 @@ } diff [ dup . flush vocab>literals ] map-zip +"resource:collections" vocabs-from +{ "bit-arrays" +"bit-vectors" "dlists" "linked-assocs" "nibble-arrays" +"specialized-arrays" "specialized-vectors" "suffix-arrays" +"trees" "vlists" "arrays.shaped" "byte-arrays.hex" +"hash-sets.identity" "hash-sets.numbers" "hash-sets.sequences" +"hashtables.numbers" "hashtables.sequences" "persistent.hashtables" +"memory.pools" "persistent.vectors" "trees.avl" "trees.splay" +} diff +[ dup . flush vocab>literals ] map-zip + +"resource:ffi" vocabs-from +{ "x11.syntax" "windows.com.syntax" "python.syntax" "opengl.gl.extensions" + "opencl.syntax" "mongodb.tuple" "cuda.syntax" "core-foundation.strings" + "cocoa.subclassing" "cocoa" "cocoa.apple-script" "gobject-introspection" } diff +[ dup . flush vocab>literals ] map-zip + +"resource:libs" vocabs-from +{ "annotations" "brainfuck" "dice" "infix" "logging" +"metar" "money" "poker" "qw" "roles" "roman" "slides" +"svg" "urls" "xkcd" "calendar.holidays" +"calendar.holidays.canada" "calendar.holidays.us" +"colors.constants" "colors.hex" "gml.macros" +"gml.parser" "gml.runtime" "html.templates.chloe.syntax" +"infix.tokenizer" "irc.messages.base" +"math.complex" "math.rectangles" "math.blas.matrices" +"math.blas.vectors" "math.derivatives.syntax" +"math.vectors.simd" "math.vectors.simd.cords" "peg.pl0" +"peg.javascript.parser" "peg.javascript.tokenizer" +"unicode.categories" "units.reduction" "xml.errors" +"xml.syntax" "xmode.loader.syntax" "yaml.conversion" +} diff +[ dup . flush vocab>literals ] map-zip + "resource:frameworks" vocabs-from { "ui.theme.switching" "ui.backend.cocoa.views" "ui.backend.cocoa.tools" "ui.backend.gtk" "ui.backend.cocoa" "gpu.demos.raytrace" "gpu.demos.bunny" "gpu.shaders" "gpu.render" "game.worlds" "ui" "db.postgresql.errors" } diff [ dup . flush vocab>literals ] map-zip +"resource:tools" vocabs-from +{ "help.syntax" "help.tips" "tools.test" "tools.walker" +"vocabs.git" } diff +[ dup . flush vocab>literals ] map-zip + "resource:demos" vocabs-from { "talks.vpri-talk" "talks.tc-lisp-talk" "talks.minneapolis-talk" "talks.google-tech-talk" "talks.galois-talk" "talks.otug-talk" "smalltalk.selectors" "smalltalk.parser"