From b24a1c352d6b1fd19aefeac07f1b14691b7f9a4e Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 6 Jun 2016 17:16:55 -0700 Subject: [PATCH] libs: fix syntax. --- libs/calendar/holidays/canada/canada.factor | 4 +-- libs/calendar/holidays/holidays.factor | 7 ++--- libs/calendar/holidays/us/us.factor | 26 +++++++++---------- libs/colors/constants/constants.factor | 3 +-- libs/colors/hex/hex.factor | 3 +-- libs/gml/macros/macros.factor | 2 +- libs/gml/runtime/runtime.factor | 10 +++---- .../html/templates/chloe/syntax/syntax.factor | 4 +-- libs/irc/messages/base/base.factor | 4 +-- libs/logging/logging.factor | 2 +- libs/math/blas/matrices/matrices.factor | 2 +- libs/math/blas/vectors/vectors.factor | 2 +- libs/math/complex/complex.factor | 2 +- libs/math/derivatives/syntax/syntax.factor | 2 +- libs/math/rectangles/rectangles.factor | 2 +- libs/math/vectors/simd/cords/cords.factor | 26 +++++++++---------- libs/math/vectors/simd/simd.factor | 2 +- libs/poker/poker.factor | 2 +- libs/qw/qw.factor | 2 +- libs/roles/roles.factor | 4 +-- libs/roman/roman-docs.factor | 6 ++--- libs/roman/roman-tests.factor | 2 +- libs/roman/roman.factor | 16 ++++++------ libs/slides/slides.factor | 2 +- libs/svg/svg.factor | 8 +++--- libs/unicode/categories/categories.factor | 4 +-- libs/urls/urls.factor | 2 +- libs/xkcd/xkcd.factor | 2 +- libs/xml/errors/errors.factor | 2 +- libs/xml/syntax/syntax-docs.factor | 6 ++--- libs/xml/syntax/syntax-tests.factor | 2 +- libs/xml/syntax/syntax.factor | 12 ++++----- libs/xmode/loader/syntax/syntax.factor | 2 +- modern-transition.factor | 8 +++++- 34 files changed, 95 insertions(+), 90 deletions(-) diff --git a/libs/calendar/holidays/canada/canada.factor b/libs/calendar/holidays/canada/canada.factor index c31bd296c3..c547734d82 100644 --- a/libs/calendar/holidays/canada/canada.factor +++ b/libs/calendar/holidays/canada/canada.factor @@ -6,6 +6,6 @@ in: calendar.holidays.canada SINGLETONS: canada canadian-federal ; HOLIDAY: canadian-thanksgiving-day october 2 monday-of-month ; -HOLIDAY-NAME: canadian-thanksgiving-day canadian-federal "Thanksgiving Day" +HOLIDAY-NAME: canadian-thanksgiving-day canadian-federal "Thanksgiving Day" ; -HOLIDAY-NAME: armistice-day commonwealth-of-nations "Remembrance Day" +HOLIDAY-NAME: armistice-day commonwealth-of-nations "Remembrance Day" ; diff --git a/libs/calendar/holidays/holidays.factor b/libs/calendar/holidays/holidays.factor index 8a3f9ab521..ba3732bf30 100644 --- a/libs/calendar/holidays/holidays.factor +++ b/libs/calendar/holidays/holidays.factor @@ -7,15 +7,16 @@ in: calendar.holidays SINGLETONS: all world commonwealth-of-nations ; << -SYNTAX: HOLIDAY: +SYNTAX: \ HOLIDAY: scan-new-word dup "holiday" word-prop [ dup H{ } clone "holiday" set-word-prop ] unless parse-definition ( timestamp/n -- timestamp ) define-declared ; -SYNTAX: HOLIDAY-NAME: +SYNTAX: \ HOLIDAY-NAME: let[ scan-word "holiday" word-prop :> holidays scan-word :> name scan-object :> value + ";" expect value name holidays set-at ] ; >> @@ -53,4 +54,4 @@ M: all holidays ] keep '[ _ swap "holiday" word-prop at ] map ; HOLIDAY: armistice-day november 11 >>day ; -HOLIDAY-NAME: armistice-day world "Armistice Day" +HOLIDAY-NAME: armistice-day world "Armistice Day" ; diff --git a/libs/calendar/holidays/us/us.factor b/libs/calendar/holidays/us/us.factor index cbe2956cc7..6c245833f0 100644 --- a/libs/calendar/holidays/us/us.factor +++ b/libs/calendar/holidays/us/us.factor @@ -27,38 +27,38 @@ M: us-federal holidays { [ sunday? not ] [ us-federal holiday? not ] } 1&& ; HOLIDAY: new-years-day january 1 >>day ; -HOLIDAY-NAME: new-years-day world "New Year's Day" -HOLIDAY-NAME: new-years-day us-federal "New Year's Day" +HOLIDAY-NAME: new-years-day world "New Year's Day" ; +HOLIDAY-NAME: new-years-day us-federal "New Year's Day" ; HOLIDAY: martin-luther-king-day january 3 monday-of-month ; -HOLIDAY-NAME: martin-luther-king-day us-federal "Martin Luther King Day" +HOLIDAY-NAME: martin-luther-king-day us-federal "Martin Luther King Day" ; HOLIDAY: inauguration-day january 20 >>day [ dup 4 neg rem + ] change-year ; -HOLIDAY-NAME: inauguration-day us "Inauguration Day" +HOLIDAY-NAME: inauguration-day us "Inauguration Day" ; HOLIDAY: washingtons-birthday february 3 monday-of-month ; -HOLIDAY-NAME: washingtons-birthday us-federal "Washington's Birthday" +HOLIDAY-NAME: washingtons-birthday us-federal "Washington's Birthday" ; HOLIDAY: memorial-day may last-monday-of-month ; -HOLIDAY-NAME: memorial-day us-federal "Memorial Day" +HOLIDAY-NAME: memorial-day us-federal "Memorial Day" ; HOLIDAY: independence-day july 4 >>day ; -HOLIDAY-NAME: independence-day us-federal "Independence Day" +HOLIDAY-NAME: independence-day us-federal "Independence Day" ; HOLIDAY: labor-day september 1 monday-of-month ; -HOLIDAY-NAME: labor-day us-federal "Labor Day" +HOLIDAY-NAME: labor-day us-federal "Labor Day" ; HOLIDAY: columbus-day october 2 monday-of-month ; -HOLIDAY-NAME: columbus-day us-federal "Columbus Day" +HOLIDAY-NAME: columbus-day us-federal "Columbus Day" ; -HOLIDAY-NAME: armistice-day us-federal "Veterans Day" +HOLIDAY-NAME: armistice-day us-federal "Veterans Day" ; HOLIDAY: thanksgiving-day november 4 thursday-of-month ; -HOLIDAY-NAME: thanksgiving-day us-federal "Thanksgiving Day" +HOLIDAY-NAME: thanksgiving-day us-federal "Thanksgiving Day" ; HOLIDAY: christmas-day december 25 >>day ; -HOLIDAY-NAME: christmas-day world "Christmas Day" -HOLIDAY-NAME: christmas-day us-federal "Christmas Day" +HOLIDAY-NAME: christmas-day world "Christmas Day" ; +HOLIDAY-NAME: christmas-day us-federal "Christmas Day" ; HOLIDAY: belly-laugh-day january 24 >>day ; diff --git a/libs/colors/constants/constants.factor b/libs/colors/constants/constants.factor index aa1c3889ba..7bb44e59d9 100644 --- a/libs/colors/constants/constants.factor +++ b/libs/colors/constants/constants.factor @@ -31,5 +31,4 @@ ERROR: no-such-color name ; : named-color ( name -- color ) dup colors at [ ] [ no-such-color ] ?if ; -SYNTAX: COLOR: scan-token named-color suffix! ; -SYNTAX: color: scan-token named-color suffix! ; +SYNTAX: \ color: scan-token named-color suffix! ; diff --git a/libs/colors/hex/hex.factor b/libs/colors/hex/hex.factor index 3a9d6d0774..6eeaf333e3 100644 --- a/libs/colors/hex/hex.factor +++ b/libs/colors/hex/hex.factor @@ -13,5 +13,4 @@ in: colors.hex [ red>> ] [ green>> ] [ blue>> ] tri [ 255 * >integer ] tri@ "%02X%02X%02X" sprintf ; -SYNTAX: HEXCOLOR: scan-token hex>rgba suffix! ; -SYNTAX: hexcolor: scan-token hex>rgba suffix! ; +SYNTAX: \ hexcolor: scan-token hex>rgba suffix! ; diff --git a/libs/gml/macros/macros.factor b/libs/gml/macros/macros.factor index e0584b297b..404cd1f54e 100644 --- a/libs/gml/macros/macros.factor +++ b/libs/gml/macros/macros.factor @@ -27,7 +27,7 @@ symbol: current-macro MACRO:: log-euler-op ( class def inputs -- quot ) class inputs def inputs '[ [ current-macro get [ _ boa save-euler-op ] [ _ ndrop ] if ] _ _ nbi ] ; -SYNTAX: LOG-GML: +SYNTAX: \ LOG-GML: let[ (GML:) :> ( word name effect def ) diff --git a/libs/gml/runtime/runtime.factor b/libs/gml/runtime/runtime.factor index 3f71093576..c6191a3cca 100644 --- a/libs/gml/runtime/runtime.factor +++ b/libs/gml/runtime/runtime.factor @@ -37,9 +37,9 @@ FROM: kernel.private => declare ; scan-word \ (exec) create-method-in swap call( -- quot ) [ is-gml ] prepend ; -SYNTAX: EXEC: [ parse-definition ] (EXEC:) define ; +SYNTAX: \ EXEC: [ parse-definition ] (EXEC:) define ; -SYNTAX: EXEC:: [ [ parse-definition ] parse-locals-definition drop ] (EXEC:) define ; +SYNTAX: \ EXEC:: [ [ parse-definition ] parse-locals-definition drop ] (EXEC:) define ; >> @@ -53,7 +53,7 @@ TUPLE: exec-name < identity-tuple name ; MEMO: exec-name ( string -- name ) name \ exec-name boa ; -SYNTAX: exec" lexer get skip-blank parse-string exec-name suffix! ; +SYNTAX: \ exec" lexer get skip-blank parse-string exec-name suffix! ; ERROR: unbound-name { name name } ; @@ -185,10 +185,10 @@ global-dictionary [ H{ } clone ] initialize : (GML:) ( -- word name effect def ) scan-gml-name scan-effect parse-definition ; -SYNTAX: GML: +SYNTAX: \ GML: (GML:) define-gml-primitive ; -SYNTAX: GML:: +SYNTAX: \ GML:: let[ scan-gml-name :> ( word name ) word [ parse-definition ] parse-locals-definition :> ( word def effect ) diff --git a/libs/html/templates/chloe/syntax/syntax.factor b/libs/html/templates/chloe/syntax/syntax.factor index 33476ab93b..d440554a6b 100644 --- a/libs/html/templates/chloe/syntax/syntax.factor +++ b/libs/html/templates/chloe/syntax/syntax.factor @@ -13,7 +13,7 @@ tags [ H{ } clone ] initialize : define-chloe-tag ( name quot -- ) swap tags get set-at ; -SYNTAX: CHLOE: +SYNTAX: \ CHLOE: scan-token parse-definition define-chloe-tag ; CONSTANT: chloe-ns "http://factorcode.org/chloe/1.0" ; @@ -21,7 +21,7 @@ CONSTANT: chloe-ns "http://factorcode.org/chloe/1.0" ; : chloe-name? ( name -- ? ) url>> chloe-ns = ; -XML-NS: chloe-name http://factorcode.org/chloe/1.0 +XML-NS: chloe-name http://factorcode.org/chloe/1.0 ; : required-attr ( tag name -- value ) [ nip ] [ chloe-name attr ] 2bi diff --git a/libs/irc/messages/base/base.factor b/libs/irc/messages/base/base.factor index de591c22c2..882f103b7f 100644 --- a/libs/irc/messages/base/base.factor +++ b/libs/irc/messages/base/base.factor @@ -81,7 +81,7 @@ M: irc-message set-irc-command [ prefix>> ] [ command>> ] [ parameters>> " " join ] - [ trailing>> dup [ char: : prefix ] when ] + [ trailing>> dup [ char: \ : prefix ] when ] } cleave 4array sift " " join ; ! SYNTAX: name string parameters ; ! IRC: type "COMMAND" slot1 ...; ! IRC: type "COMMAND" slot1 ... : trailing-slot; -SYNTAX: IRC: +SYNTAX: \ IRC: scan-new-class [ scan-object register-irc-message-type ] keep ";" parse-tokens diff --git a/libs/logging/logging.factor b/libs/logging/logging.factor index 66379dcc95..b9b82389d1 100644 --- a/libs/logging/logging.factor +++ b/libs/logging/logging.factor @@ -137,7 +137,7 @@ PRIVATE> [ [ input-logging-quot ] 2keep drop error-logging-quot ] (define-logging) ; -SYNTAX: LOG: +SYNTAX: \ LOG: ! Syntax: name level scan-new-word dup scan-word ";" expect '[ 1array stack>message _ _ log-message ] diff --git a/libs/math/blas/matrices/matrices.factor b/libs/math/blas/matrices/matrices.factor index 169cfb81ad..f5d583f542 100644 --- a/libs/math/blas/matrices/matrices.factor +++ b/libs/math/blas/matrices/matrices.factor @@ -291,7 +291,7 @@ M: MATRIX n*V(*)V+M! M: MATRIX n*V(*)Vconj+M! (prepare-ger) [ XGERC ] dip ; -SYNTAX: XMATRIX{ \ } [ >MATRIX ] parse-literal ; +SYNTAX: \ XMATRIX{ \ } [ >MATRIX ] parse-literal ; M: MATRIX pprint-delims drop \ XMATRIX{ \ } ; diff --git a/libs/math/blas/vectors/vectors.factor b/libs/math/blas/vectors/vectors.factor index ae9eed4c29..1264176b3d 100644 --- a/libs/math/blas/vectors/vectors.factor +++ b/libs/math/blas/vectors/vectors.factor @@ -179,7 +179,7 @@ M: VECTOR n*V+V! M: VECTOR n*V! (prepare-scal) [ XSCAL ] dip ; -SYNTAX: XVECTOR{ \ } [ >VECTOR ] parse-literal ; +SYNTAX: \ XVECTOR{ \ } [ >VECTOR ] parse-literal ; M: VECTOR pprint-delims drop \ XVECTOR{ \ } ; diff --git a/libs/math/complex/complex.factor b/libs/math/complex/complex.factor index c6924e7354..c658c3dd41 100644 --- a/libs/math/complex/complex.factor +++ b/libs/math/complex/complex.factor @@ -40,7 +40,7 @@ ERROR: malformed-complex obj ; : parse-complex ( seq -- complex ) dup length 2 = [ first2-unsafe rect> ] [ malformed-complex ] if ; -SYNTAX: C{ \ } [ parse-complex ] parse-literal ; +SYNTAX: \ C{ \ } [ parse-complex ] parse-literal ; use: prettyprint.custom diff --git a/libs/math/derivatives/syntax/syntax.factor b/libs/math/derivatives/syntax/syntax.factor index 5c9ff9c4a2..a723982fd0 100644 --- a/libs/math/derivatives/syntax/syntax.factor +++ b/libs/math/derivatives/syntax/syntax.factor @@ -4,6 +4,6 @@ USING: accessors effects kernel lexer math.ranges parser sequences words ; in: math.derivatives.syntax -SYNTAX: DERIVATIVE: scan-object dup stack-effect in>> length [1,b] +SYNTAX: \ DERIVATIVE: scan-object dup stack-effect in>> length [1,b] [ drop scan-object ] map ";" expect "derivative" set-word-prop ; diff --git a/libs/math/rectangles/rectangles.factor b/libs/math/rectangles/rectangles.factor index 37a867d465..5365ffa923 100644 --- a/libs/math/rectangles/rectangles.factor +++ b/libs/math/rectangles/rectangles.factor @@ -8,7 +8,7 @@ TUPLE: rect { loc initial: { 0 0 } } { dim initial: { 0 0 } } ; : ( loc dim -- rect ) rect boa ; inline -SYNTAX: RECT: scan-object scan-object suffix! ; +SYNTAX: \ RECT: scan-object scan-object suffix! ; : ( -- rect ) rect new ; inline diff --git a/libs/math/vectors/simd/cords/cords.factor b/libs/math/vectors/simd/cords/cords.factor index e9bdc39c22..4fd2dfb515 100644 --- a/libs/math/vectors/simd/cords/cords.factor +++ b/libs/math/vectors/simd/cords/cords.factor @@ -54,7 +54,7 @@ M: A >pprint-sequence ; M: A pprint* pprint-object ; M: A pprint-delims drop \ A{ \ } ; -SYNTAX: A{ \ } [ >A ] parse-literal ; +SYNTAX: \ A{ \ } [ >A ] parse-literal ; byte-array >>class @@ -78,20 +78,20 @@ FUNCTOR; [ define-specialized-cord ] [ create-word-in (define-simd-128-cord) ] 2bi ; -SYNTAX: SIMD-128-CORD: - scan-word scan-token define-simd-128-cord ; +SYNTAX: \ SIMD-128-CORD: + scan-word scan-token ";" expect define-simd-128-cord ; PRIVATE> >> -SIMD-128-CORD: char-16 char-32 -SIMD-128-CORD: uchar-16 uchar-32 -SIMD-128-CORD: short-8 short-16 -SIMD-128-CORD: ushort-8 ushort-16 -SIMD-128-CORD: int-4 int-8 -SIMD-128-CORD: uint-4 uint-8 -SIMD-128-CORD: longlong-2 longlong-4 -SIMD-128-CORD: ulonglong-2 ulonglong-4 -SIMD-128-CORD: float-4 float-8 -SIMD-128-CORD: double-2 double-4 +SIMD-128-CORD: char-16 char-32 ; +SIMD-128-CORD: uchar-16 uchar-32 ; +SIMD-128-CORD: short-8 short-16 ; +SIMD-128-CORD: ushort-8 ushort-16 ; +SIMD-128-CORD: int-4 int-8 ; +SIMD-128-CORD: uint-4 uint-8 ; +SIMD-128-CORD: longlong-2 longlong-4 ; +SIMD-128-CORD: ulonglong-2 ulonglong-4 ; +SIMD-128-CORD: float-4 float-8 ; +SIMD-128-CORD: double-2 double-4 ; diff --git a/libs/math/vectors/simd/simd.factor b/libs/math/vectors/simd/simd.factor index 09eb8bd3a6..0725a26fa3 100644 --- a/libs/math/vectors/simd/simd.factor +++ b/libs/math/vectors/simd/simd.factor @@ -312,7 +312,7 @@ M: A length drop N ; inline BOA-EFFECT define-inline M: A pprint-delims drop \ A{ \ } ; -SYNTAX: A{ \ } [ >A ] parse-literal ; +SYNTAX: \ A{ \ } [ >A ] parse-literal ; INSTANCE: A sequence ; diff --git a/libs/poker/poker.factor b/libs/poker/poker.factor index 18a2ca5fbc..634d93bb20 100644 --- a/libs/poker/poker.factor +++ b/libs/poker/poker.factor @@ -225,5 +225,5 @@ ERROR: bad-suit-symbol ch ; : string>hand-name ( string -- string' ) string>value value>hand-name ; -SYNTAX: HAND{ +SYNTAX: \ HAND{ "}" [ card> ] map-tokens suffix! ; diff --git a/libs/qw/qw.factor b/libs/qw/qw.factor index 6c9dc47f5a..5201a21718 100644 --- a/libs/qw/qw.factor +++ b/libs/qw/qw.factor @@ -2,4 +2,4 @@ USING: lexer sequences parser ; in: qw -SYNTAX: qw{ "}" parse-tokens suffix! ; +SYNTAX: \ qw{ "}" parse-tokens suffix! ; diff --git a/libs/roles/roles.factor b/libs/roles/roles.factor index f5fe795aec..a970796393 100644 --- a/libs/roles/roles.factor +++ b/libs/roles/roles.factor @@ -64,5 +64,5 @@ PREDICATE: role < mixin-class [ roles>slots define-tuple-class ] [ drop [ role? ] filter add-to-roles ] 3tri ; -SYNTAX: ROLE: parse-role-definition define-role ; -SYNTAX: ROLE-TUPLE: parse-role-definition define-tuple-class-with-roles ; +SYNTAX: \ ROLE: parse-role-definition define-role ; +SYNTAX: \ ROLE-TUPLE: parse-role-definition define-tuple-class-with-roles ; diff --git a/libs/roman/roman-docs.factor b/libs/roman/roman-docs.factor index ad0fadc9d8..b8cdba7adf 100644 --- a/libs/roman/roman-docs.factor +++ b/libs/roman/roman-docs.factor @@ -92,11 +92,11 @@ HELP: roman/mod { roman* roman/i roman/mod } related-words -HELP: ROMAN: +HELP: \ roman: { $description "A parsing word that reads the next token and converts it to an integer." } { $examples { $example "USING: prettyprint roman ;" - "ROMAN: v ." + "roman: v ." "5" } } ; @@ -104,7 +104,7 @@ HELP: ROMAN: ARTICLE: "roman" "Roman numerals" "The " { $vocab-link "roman" } " vocabulary can convert numbers to and from the Roman numeral system and can perform arithmetic given Roman numerals as input." $nl "A parsing word for literal Roman numerals:" -{ $subsections postpone\ ROMAN: } +{ $subsections \ roman: } "Converting to Roman numerals:" { $subsections >roman diff --git a/libs/roman/roman-tests.factor b/libs/roman/roman-tests.factor index b43f513a94..5ceb286557 100644 --- a/libs/roman/roman-tests.factor +++ b/libs/roman/roman-tests.factor @@ -37,7 +37,7 @@ USING: arrays kernel math roman roman.private sequences tools.test ; { "i" "ii" } [ "v" "iii" roman/mod ] unit-test [ "iii" "iii" roman- ] must-fail -{ 30 } [ ROMAN: xxx ] unit-test +{ 30 } [ roman: xxx ] unit-test [ roman+ ] must-infer [ roman- ] must-infer diff --git a/libs/roman/roman.factor b/libs/roman/roman.factor index e7a7572758..b1dfc3917d 100644 --- a/libs/roman/roman.factor +++ b/libs/roman/roman.factor @@ -56,17 +56,17 @@ PRIVATE> << -SYNTAX: ROMAN-OP: +SYNTAX: \ ROMAN-OP: scan-word [ name>> "roman" prepend create-word-in ] keep 1quotation '[ _ binary-roman-op ] - scan-effect define-declared ; + scan-effect ";" expect define-declared ; >> -ROMAN-OP: + ( x y -- z ) -ROMAN-OP: - ( x y -- z ) -ROMAN-OP: * ( x y -- z ) -ROMAN-OP: /i ( x y -- z ) -ROMAN-OP: /mod ( x y -- z w ) +ROMAN-OP: + ( x y -- z ) ; +ROMAN-OP: - ( x y -- z ) ; +ROMAN-OP: * ( x y -- z ) ; +ROMAN-OP: /i ( x y -- z ) ; +ROMAN-OP: /mod ( x y -- z w ) ; -SYNTAX: ROMAN: scan-token roman> suffix! ; +SYNTAX: \ roman: scan-token roman> suffix! ; diff --git a/libs/slides/slides.factor b/libs/slides/slides.factor index e7679170b6..33734bc032 100644 --- a/libs/slides/slides.factor +++ b/libs/slides/slides.factor @@ -113,7 +113,7 @@ TUPLE: slides < book ; : strip-tease ( data -- seq ) first3 2 over length [a,b] [ head 3array ] with with with map ; -SYNTAX: STRIP-TEASE: +SYNTAX: \ STRIP-TEASE: parse-definition strip-tease append! ; \ slides H{ diff --git a/libs/svg/svg.factor b/libs/svg/svg.factor index 374fbd966d..559a16e407 100644 --- a/libs/svg/svg.factor +++ b/libs/svg/svg.factor @@ -4,10 +4,10 @@ math.functions math.parser math.vectors memoize peg.ebnf sequences sequences.squ splitting strings xml.data xml.syntax ; in: svg -XML-NS: svg-name http://www.w3.org/2000/svg -XML-NS: xlink-name http://www.w3.org/1999/xlink -XML-NS: sodipodi-name http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd -XML-NS: inkscape-name http://www.inkscape.org/namespaces/inkscape +XML-NS: svg-name http://www.w3.org/2000/svg ; +XML-NS: xlink-name http://www.w3.org/1999/xlink ; +XML-NS: sodipodi-name http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd ; +XML-NS: inkscape-name http://www.inkscape.org/namespaces/inkscape ; : svg-string>number ( string -- number ) H{ { char: E char: e } } substitute "e" split1 diff --git a/libs/unicode/categories/categories.factor b/libs/unicode/categories/categories.factor index 5255fbd322..401c45af24 100644 --- a/libs/unicode/categories/categories.factor +++ b/libs/unicode/categories/categories.factor @@ -29,6 +29,6 @@ SYMBOLS: Cn Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po Sm Sc Sk So Zs PRIVATE> -SYNTAX: CATEGORY: parse-category define-category ; +SYNTAX: \ CATEGORY: parse-category define-category ; -SYNTAX: CATEGORY-NOT: parse-category define-not-category ; +SYNTAX: \ CATEGORY-NOT: parse-category define-not-category ; diff --git a/libs/urls/urls.factor b/libs/urls/urls.factor index a692231cb7..5be2d54feb 100644 --- a/libs/urls/urls.factor +++ b/libs/urls/urls.factor @@ -186,6 +186,6 @@ PRIVATE> clone dup protocol>> '[ _ protocol-port or ] change-port ; ! Literal syntax -SYNTAX: URL" lexer get skip-blank parse-string >url suffix! ; +SYNTAX: \ URL" lexer get skip-blank parse-string >url suffix! ; { "urls" "prettyprint" } "urls.prettyprint" require-when diff --git a/libs/xkcd/xkcd.factor b/libs/xkcd/xkcd.factor index 4d3dcba03d..adc81b3a5f 100644 --- a/libs/xkcd/xkcd.factor +++ b/libs/xkcd/xkcd.factor @@ -50,6 +50,6 @@ TUPLE: xkcd number image ; C: xkcd ; -SYNTAX: XKCD: scan-number dup xkcd-image suffix! ; +SYNTAX: \ XKCD: scan-number dup xkcd-image suffix! ; M: xkcd pprint* image>> add-section ; diff --git a/libs/xml/errors/errors.factor b/libs/xml/errors/errors.factor index 9979d8770d..72039a3466 100644 --- a/libs/xml/errors/errors.factor +++ b/libs/xml/errors/errors.factor @@ -25,7 +25,7 @@ PREDICATE: generated-xml-error < tuple class-of "xml-error-class" word-prop ; ] } 3cleave ; -SYNTAX: XML-ERROR: +SYNTAX: \ XML-ERROR: parse-tuple-definition pick save-location define-xml-error-class ; diff --git a/libs/xml/syntax/syntax-docs.factor b/libs/xml/syntax/syntax-docs.factor index 55299877c1..ab3c4d1618 100644 --- a/libs/xml/syntax/syntax-docs.factor +++ b/libs/xml/syntax/syntax-docs.factor @@ -10,7 +10,7 @@ ARTICLE: "xml.syntax" "Syntax extensions for XML" { $subsections { "xml.syntax" "tags" } { "xml.syntax" "literals" } - postpone\ XML-NS: + \ XML-NS: } ; ARTICLE: { "xml.syntax" "tags" } "Dispatch on XML tag names" @@ -104,6 +104,6 @@ let[ XML[[ pple XML]] dispatch write" "apple" } ; -HELP: XML-NS: -{ $syntax "XML-NS: name http://url" } +HELP: \ XML-NS: +{ $syntax "XML-NS: name http://url ;" } { $description "Defines a new word of the given name which constructs XML names in the namespace of the given URL. The names constructed are memoized." } ; diff --git a/libs/xml/syntax/syntax-tests.factor b/libs/xml/syntax/syntax-tests.factor index c4fbbe232d..40cb4249f9 100644 --- a/libs/xml/syntax/syntax-tests.factor +++ b/libs/xml/syntax/syntax-tests.factor @@ -34,7 +34,7 @@ TAG: neg calculate calc-arith ] unit-test -XML-NS: foo http://blah.com +XML-NS: foo http://blah.com ; { T{ name { main "bling" } { url "http://blah.com" } } } [ "bling" foo ] unit-test diff --git a/libs/xml/syntax/syntax.factor b/libs/xml/syntax/syntax.factor index 07bea447bb..940540755f 100644 --- a/libs/xml/syntax/syntax.factor +++ b/libs/xml/syntax/syntax.factor @@ -27,17 +27,17 @@ M: no-tag summary PRIVATE> -SYNTAX: TAGS: +SYNTAX: \ TAGS: scan-new-word scan-effect ";" expect [ drop H{ } clone "xtable" set-word-prop ] [ define-tags ] 2bi ; -SYNTAX: TAG: +SYNTAX: \ TAG: scan-token scan-word parse-definition define-tag ; -SYNTAX: XML-NS: - scan-new-word scan-token '[ f swap _ ] ( string -- name ) define-memoized ; +SYNTAX: \ XML-NS: + scan-new-word scan-token ";" expect '[ f swap _ ] ( string -- name ) define-memoized ; -SYNTAX: " [ string>doc ] parse-def ; -SYNTAX: XML[[ +SYNTAX: \ XML[[ "XML]]" [ string>chunk ] parse-def ; use: vocabs.loader diff --git a/libs/xmode/loader/syntax/syntax.factor b/libs/xmode/loader/syntax/syntax.factor index 8a677d9df4..27a336eee2 100644 --- a/libs/xmode/loader/syntax/syntax.factor +++ b/libs/xmode/loader/syntax/syntax.factor @@ -10,7 +10,7 @@ in: xmode.loader.syntax : (parse-rule-tag) ( rule-set tag specs class -- ) new swap init-from-tag swap add-rule ; inline -SYNTAX: RULE: +SYNTAX: \ RULE: scan-token scan-word scan-word [ [ parse-definition call( -- ) ] { } make swap [ (parse-rule-tag) ] 2curry diff --git a/modern-transition.factor b/modern-transition.factor index 999ee9bf34..5a7447a99c 100644 --- a/modern-transition.factor +++ b/modern-transition.factor @@ -17,10 +17,16 @@ [ dup . flush vocab>literals ] map-zip "resource:libs" vocabs-from -{ +{ "brainfuck" "metar" "svg" +"gml.parser" "infix.tokenizer" +"math.blas.matrices" "math.blas.vectors" +"math.vectors.simd" "math.vectors.simd.cords" +"peg.pl0" "peg.javascript.parser" "peg.javascript.tokenizer" +"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"