diff --git a/core/modern/modern-tests.factor b/core/modern/modern-tests.factor index a5c31672d3..acc8bc1183 100644 --- a/core/modern/modern-tests.factor +++ b/core/modern/modern-tests.factor @@ -126,4 +126,4 @@ in: modern.tests { t } [ "=>" string>literals first tag-literal? ] unit-test { t } [ ">>" string>literals first tag-literal? ] unit-test -{ t } [ "<<" string>literals first tag-literal? ] unit-test \ No newline at end of file +{ t } [ "<<" string>literals first tag-literal? ] unit-test diff --git a/core/modern/out/out-tests.factor b/core/modern/out/out-tests.factor index 889b1b140d..caff71860b 100644 --- a/core/modern/out/out-tests.factor +++ b/core/modern/out/out-tests.factor @@ -71,4 +71,4 @@ in: modern.out.tests { t } [ "lol[==[]==]" rewrite-same-string ] unit-test { t } [ "![==[]==]" rewrite-same-string ] unit-test { t } [ "lol[==[abc]==]" rewrite-same-string ] unit-test -{ t } [ "![==[abc]==]" rewrite-same-string ] unit-test \ No newline at end of file +{ t } [ "![==[abc]==]" rewrite-same-string ] unit-test diff --git a/ffi/windows/types/types.factor b/ffi/windows/types/types.factor index 385ec86d13..2dbe9b8bb4 100644 --- a/ffi/windows/types/types.factor +++ b/ffi/windows/types/types.factor @@ -366,17 +366,17 @@ TYPEDEF: ACCEL* LPACCEL ; TYPEDEF: DWORD COLORREF ; TYPEDEF: DWORD* LPCOLORREF ; -: RGB ( r g b -- COLORREF ) +: rgb ( r g b -- COLORREF ) { 16 8 0 } bitfield ; inline -: >RGB< ( COLORREF -- r g b ) +: >rgb< ( COLORREF -- r g b ) [ 0xff bitand ] [ -8 shift 0xff bitand ] [ -16 shift 0xff bitand ] tri ; -: color>RGB ( color -- COLORREF ) - >rgba-components drop [ 255 * >integer ] tri@ RGB ; -: RGB>color ( COLORREF -- color ) - >RGB< [ 1/255. * >float ] tri@ 1.0 ; +: color>rgb ( color -- COLORREF ) + >rgba-components drop [ 255 * >integer ] tri@ rgb ; +: rgb>color ( COLORREF -- color ) + >rgb< [ 1/255. * >float ] tri@ 1.0 ; STRUCT: TEXTMETRICW { tmHeight LONG } diff --git a/ffi/windows/uniscribe/uniscribe.factor b/ffi/windows/uniscribe/uniscribe.factor index 5c89b121c8..cc6a3f4c2b 100755 --- a/ffi/windows/uniscribe/uniscribe.factor +++ b/ffi/windows/uniscribe/uniscribe.factor @@ -48,8 +48,8 @@ CONSTANT: ssa-dwFlags flags{ SSA_GLYPHS SSA_FALLBACK SSA_TAB } ; [ check-ole32-error ] [ |ScriptStringFree void* deref ] bi* ; : set-dc-colors ( dc font -- ) - [ background>> color>RGB SetBkColor drop ] - [ foreground>> color>RGB SetTextColor drop ] 2bi ; + [ background>> color>rgb SetBkColor drop ] + [ foreground>> color>rgb SetTextColor drop ] 2bi ; : selection-start/end ( script-string -- iMinSel iMaxSel ) string>> dup selection? [ [ start>> ] [ end>> ] bi ] [ drop 0 0 ] if ; diff --git a/frameworks/furnace/chloe-tags/chloe-tags.factor b/frameworks/furnace/chloe-tags/chloe-tags.factor index 3b8f21d372..09dedd0edb 100644 --- a/frameworks/furnace/chloe-tags/chloe-tags.factor +++ b/frameworks/furnace/chloe-tags/chloe-tags.factor @@ -74,12 +74,12 @@ CHLOE: a [ [ a-attrs ] [ compile-children>xml-string ] bi - [ XML[[ <-> XML]] second swap >>attrs ] + [ XML-CHUNK[[ <-> ]] second swap >>attrs ] [xml-code] ] compile-with-scope ; CHLOE: base - compile-a-url [ XML[[ /> XML]] ] [xml-code] ; + compile-a-url [ XML-CHUNK[[ /> ]] ] [xml-code] ; : hidden-nested-fields ( -- xml ) nested-forms get " " join f like nested-forms-key @@ -93,7 +93,7 @@ CHLOE: base _ render-hidden hidden-nested-fields form-modifications - XML[[
<-><-><->
XML]] + XML-CHUNK[[
<-><-><->
]] ] [code] ; : (compile-form-attrs) ( method action -- ) @@ -122,18 +122,18 @@ CHLOE: form [ hidden-fields ] [ compile-children>xml-string ] tri [ - XML[[
<-><->
XML]] second + XML-CHUNK[[
<-><->
]] second swap >>attrs write-xml ] [code] ] compile-with-scope ; : button-tag-markup ( -- xml ) -
- XML> body>> clone ; + ]] body>> clone ; : add-tag-attrs ( attrs tag -- ) attrs>> swap assoc-union! drop ; diff --git a/frameworks/furnace/recaptcha/recaptcha.factor b/frameworks/furnace/recaptcha/recaptcha.factor index a51f48d5d6..ce8a2b4212 100644 --- a/frameworks/furnace/recaptcha/recaptcha.factor +++ b/frameworks/furnace/recaptcha/recaptcha.factor @@ -23,7 +23,7 @@ PRIVATE< : (render-recaptcha) ( url -- xml ) dup - XML[[ + XML-CHUNK[[ @@ -36,7 +36,7 @@ PRIVATE< - XML]] ; + ]] ; : recaptcha-url ( secure? -- ? ) "https" "http" ? "://www.google.com/recaptcha/api/challenge" append diff --git a/frameworks/furnace/utilities/utilities.factor b/frameworks/furnace/utilities/utilities.factor index a43c270f23..c726da7355 100644 --- a/frameworks/furnace/utilities/utilities.factor +++ b/frameworks/furnace/utilities/utilities.factor @@ -86,7 +86,7 @@ M: object modify-form drop f ; : hidden-form-field ( value name -- xml ) over [ - XML[[ name=<->/> XML]] + XML-CHUNK[[ name=<->/> ]] ] [ drop ] if ; CONSTANT: nested-forms-key "__n" ; diff --git a/language/compiler/tree/dead-code/dead-code-tests.factor b/language/compiler/tree/dead-code/dead-code-tests.factor index 335cf12693..86adccfd05 100644 --- a/language/compiler/tree/dead-code/dead-code-tests.factor +++ b/language/compiler/tree/dead-code/dead-code-tests.factor @@ -78,7 +78,7 @@ in: compiler.tree.dead-code.tests { [ stream-read1 drop 1 2 ] } [ [ stream-read1 [ 1 2 ] dip drop ] optimize-quot ] unit-test -{ [ over >R + R> ] } [ [ [ + ] [ drop ] 2bi ] optimize-quot ] unit-test +{ [ over >r + r> ] } [ [ [ + ] [ drop ] 2bi ] optimize-quot ] unit-test { [ [ ] [ ] if ] } [ [ [ 1 ] [ 2 ] if drop ] optimize-quot ] unit-test diff --git a/language/compiler/tree/debugger/debugger-docs.factor b/language/compiler/tree/debugger/debugger-docs.factor index 921be7bf9b..8cb41f7027 100644 --- a/language/compiler/tree/debugger/debugger-docs.factor +++ b/language/compiler/tree/debugger/debugger-docs.factor @@ -1,11 +1,11 @@ USING: compiler.tree help.markup help.syntax kernel ; in: compiler.tree.debugger -HELP: >R +HELP: >r { $description "Symbol in the debugger to show that the top datastack item is moved to the retainstack." } ; -HELP: R> -{ $description "Symbol in the debugger to show that the top retainstack item os moved to the datastack." } ; +HELP: r> +{ $description "Symbol in the debugger to show that the top retainstack item is moved to the datastack." } ; HELP: #>r? { $values { "#shuffle" #shuffle } { "?" boolean } } diff --git a/language/compiler/tree/debugger/debugger.factor b/language/compiler/tree/debugger/debugger.factor index ad99285d04..d7e7389348 100644 --- a/language/compiler/tree/debugger/debugger.factor +++ b/language/compiler/tree/debugger/debugger.factor @@ -75,12 +75,12 @@ M: shuffle-node pprint* effect>> effect>string text ; [ out-d>> length 1 = ] } 1&& ; -SYMBOLS: >R R> ; +SYMBOLS: >r r> ; M: #shuffle node>quot { - { [ dup #>r? ] [ drop \ >R , ] } - { [ dup #r>? ] [ drop \ R> , ] } + { [ dup #>r? ] [ drop \ >r , ] } + { [ dup #r>? ] [ drop \ r> , ] } { [ dup [ in-r>> empty? ] [ out-r>> empty? ] bi and ] [ diff --git a/language/compiler/tree/modular-arithmetic/modular-arithmetic-tests.factor b/language/compiler/tree/modular-arithmetic/modular-arithmetic-tests.factor index a1d7695e5c..f51e57c4f5 100644 --- a/language/compiler/tree/modular-arithmetic/modular-arithmetic-tests.factor +++ b/language/compiler/tree/modular-arithmetic/modular-arithmetic-tests.factor @@ -10,13 +10,13 @@ in: compiler.tree.modular-arithmetic.tests : test-modular-arithmetic ( quot -- quot' ) cleaned-up-tree nodes>quot ; -{ [ >R >fixnum R> >fixnum fixnum+fast ] } +{ [ >r >fixnum r> >fixnum fixnum+fast ] } [ [ { integer integer } declare + >fixnum ] test-modular-arithmetic ] unit-test { [ +-integer-integer dup >fixnum ] } [ [ { integer integer } declare + dup >fixnum ] test-modular-arithmetic ] unit-test -{ [ >R >fixnum R> >fixnum fixnum+fast 4 fixnum*fast ] } +{ [ >r >fixnum r> >fixnum fixnum+fast 4 fixnum*fast ] } [ [ { integer integer } declare + 4 * >fixnum ] test-modular-arithmetic ] unit-test TUPLE: declared-fixnum { x fixnum } ; @@ -144,7 +144,7 @@ TUPLE: declared-fixnum { x fixnum } ; { [ drop 0 ] } [ [ >integer 1 mod ] test-modular-arithmetic ] unit-test -{ [ >fixnum 255 >R R> fixnum-bitand ] } +{ [ >fixnum 255 >r r> fixnum-bitand ] } [ [ >integer 256 rem ] test-modular-arithmetic ] unit-test { t } [ diff --git a/language/cpu/arm/assembler/assembler.factor b/language/cpu/arm/assembler/assembler.factor index 8d4594febe..d9569af6c0 100644 --- a/language/cpu/arm/assembler/assembler.factor +++ b/language/cpu/arm/assembler/assembler.factor @@ -53,33 +53,33 @@ PRIVATE> ! Condition codes symbol: cond-code -: >CC ( n -- ) +: n>CC ( n -- ) cond-code set ; -: CC> ( -- n ) +: CC>n ( -- n ) ! Default value is 0b1110 AL (= always) cond-code [ f ] change 0b1110 or ; -: EQ ( -- ) 0b0000 >CC ; -: NE ( -- ) 0b0001 >CC ; -: CS ( -- ) 0b0010 >CC ; -: CC ( -- ) 0b0011 >CC ; -: LO ( -- ) 0b0100 >CC ; -: PL ( -- ) 0b0101 >CC ; -: VS ( -- ) 0b0110 >CC ; -: VC ( -- ) 0b0111 >CC ; -: HI ( -- ) 0b1000 >CC ; -: LS ( -- ) 0b1001 >CC ; -: GE ( -- ) 0b1010 >CC ; -: LT ( -- ) 0b1011 >CC ; -: GT ( -- ) 0b1100 >CC ; -: LE ( -- ) 0b1101 >CC ; -: AL ( -- ) 0b1110 >CC ; -: NV ( -- ) 0b1111 >CC ; +: EQ ( -- ) 0b0000 n>CC ; +: NE ( -- ) 0b0001 n>CC ; +: CS ( -- ) 0b0010 n>CC ; +: CC ( -- ) 0b0011 n>CC ; +: LO ( -- ) 0b0100 n>CC ; +: PL ( -- ) 0b0101 n>CC ; +: VS ( -- ) 0b0110 n>CC ; +: VC ( -- ) 0b0111 n>CC ; +: HI ( -- ) 0b1000 n>CC ; +: LS ( -- ) 0b1001 n>CC ; +: GE ( -- ) 0b1010 n>CC ; +: LT ( -- ) 0b1011 n>CC ; +: GT ( -- ) 0b1100 n>CC ; +: LE ( -- ) 0b1101 n>CC ; +: AL ( -- ) 0b1110 n>CC ; +: NV ( -- ) 0b1111 n>CC ; PRIVATE< -: (insn) ( n -- ) CC> 28 shift bitor , ; +: (insn) ( n -- ) CC>n 28 shift bitor , ; : insn ( bitspec -- ) bitfield (insn) ; inline @@ -102,12 +102,12 @@ PRIVATE> : S ( -- ) updates-cond-code on ; -: S> ( -- ? ) updates-cond-code [ f ] change ; +: S>? ( -- ? ) updates-cond-code [ f ] change ; PRIVATE< : sinsn ( bitspec -- ) - bitfield S> [ 20 2^ bitor ] when (insn) ; inline + bitfield S>? [ 20 2^ bitor ] when (insn) ; inline GENERIC#: shift-imm/reg 2 ( shift-imm/Rs Rm shift -- n ) ; diff --git a/libs/farkup/farkup.factor b/libs/farkup/farkup.factor index 53757bcc4d..c16b86593a 100644 --- a/libs/farkup/farkup.factor +++ b/libs/farkup/farkup.factor @@ -218,7 +218,7 @@ CONSTANT: invalid-url "javascript:alert('Invalid URL in farkup');" ; : render-code ( string mode -- xml ) [ string-lines ] dip htmlize-lines - XML[[
<->
XML]] ; + XML-CHUNK[[
<->
]] ; GENERIC: (write-farkup) ( farkup -- xml ) ; @@ -243,15 +243,15 @@ M: table (write-farkup) "table" farkup-inside ; : write-link ( href text -- xml ) [ check-url link-no-follow? get "nofollow" and ] dip - XML[[ rel=<->><-> XML]] ; + XML-CHUNK[[ rel=<->><-> ]] ; : write-image-link ( href text -- xml ) disable-images? get [ 2drop - XML[[ Images are not allowed XML]] + XML-CHUNK[[ Images are not allowed ]] ] [ [ check-url ] [ f like ] bi* - XML[[ alt=<->/> XML]] + XML-CHUNK[[ alt=<->/> ]] ] if ; : open-link ( link -- href text ) @@ -267,15 +267,15 @@ M: code (write-farkup) [ string>> ] [ mode>> ] bi render-code ; M: line (write-farkup) - drop XML[[
XML]] ; + drop XML-CHUNK[[
]] ; M: line-break (write-farkup) - drop XML[[
XML]] ; + drop XML-CHUNK[[
]] ; M: table-row (write-farkup) child>> - [ (write-farkup) XML[[ <-> XML]] ] map - XML[[ <-> XML]] ; + [ (write-farkup) XML-CHUNK[[ <-> ]] ] map + XML-CHUNK[[ <-> ]] ; M: string (write-farkup) ; diff --git a/libs/html/components/components-tests.factor b/libs/html/components/components-tests.factor index 6934de4a1e..67799504a8 100644 --- a/libs/html/components/components-tests.factor +++ b/libs/html/components/components-tests.factor @@ -199,7 +199,7 @@ M: link-test link-href drop "http://www.apple.com/foo&bar" ; ! Test xml in html components { } [ - XML[[ XML]] "xmltest" set-value + XML-CHUNK[[ ]] "xmltest" set-value ] unit-test { "" } [ diff --git a/libs/html/components/components.factor b/libs/html/components/components.factor index 26ea7d6883..3326e0bcf4 100644 --- a/libs/html/components/components.factor +++ b/libs/html/components/components.factor @@ -46,10 +46,10 @@ M: label render* singleton: hidden M: hidden render* - drop XML[[ name=<-> type="hidden"/> XML]] ; + drop XML-CHUNK[[ name=<-> type="hidden"/> ]] ; : render-field ( value name size type -- xml ) - XML[[ name=<-> size=<-> type=<->/> XML]] ; + XML-CHUNK[[ name=<-> size=<-> type=<->/> ]] ; TUPLE: field size ; @@ -77,12 +77,12 @@ TUPLE: textarea rows cols ; M:: textarea render* ( value name area -- xml ) area rows>> :> rows area cols>> :> cols - XML[[ + XML-CHUNK[[ - XML]] ; + ]] ; ! Choice TUPLE: choice size multiple choices ; @@ -92,7 +92,7 @@ TUPLE: choice size multiple choices ; : render-option ( text selected? -- xml ) "selected" and swap - XML[[ XML]] ; + XML-CHUNK[[ ]] ; : render-options ( value choice -- xml ) [ choices>> value ] [ multiple>> ] bi @@ -103,10 +103,10 @@ M:: choice render* ( value name choice -- xml ) choice size>> :> size choice multiple>> "true" and :> multiple value choice render-options :> contents - XML[[ XML]] ; + multiple=<-multiple->><-contents-> ]] ; ! Checkboxes TUPLE: checkbox label ; @@ -116,9 +116,9 @@ TUPLE: checkbox label ; M: checkbox render* [ "true" and ] [ ] [ label>> ] tri* - XML[[ name=<->><-> XML]] ; + checked=<-> name=<->><-> ]] ; ! Link components GENERIC: link-title ( obj -- string ) ; @@ -142,7 +142,7 @@ TUPLE: link target ; M: link render* nip swap [ target>> ] [ [ link-href ] [ link-title ] bi ] bi* - XML[[ href=<->><-> XML]] ; + XML-CHUNK[[ href=<->><-> ]] ; ! XMode code component TUPLE: code mode ; diff --git a/libs/html/forms/forms.factor b/libs/html/forms/forms.factor index 28b651d958..7a41cca802 100644 --- a/libs/html/forms/forms.factor +++ b/libs/html/forms/forms.factor @@ -109,6 +109,6 @@ C: validation-error-state ; : render-validation-errors ( -- ) form get errors>> [ - [ XML[[
  • <->
  • XML]] ] map - XML[[
      <->
    XML]] write-xml + [ XML-CHUNK[[
  • <->
  • ]] ] map + XML-CHUNK[[
      <->
    ]] write-xml ] unless-empty ; diff --git a/libs/html/html.factor b/libs/html/html.factor index 3aa9d92dd5..7016e3b8d9 100644 --- a/libs/html/html.factor +++ b/libs/html/html.factor @@ -10,7 +10,7 @@ M: empty-prolog write-xml drop ; : ( -- prolog ) \ empty-prolog new ; : simple-page ( title head body -- xml ) - @@ -19,13 +19,13 @@ M: empty-prolog write-xml drop ; <-> - XML> >>prolog ; + ]] >>prolog ; : render-error ( message -- xml ) - XML[[ <-> XML]] ; + XML-CHUNK[[ <-> ]] ; : simple-link ( xml url -- xml' ) - url-encode swap XML[[ ><-> XML]] ; + url-encode swap XML-CHUNK[[ ><-> ]] ; : simple-image ( url -- xml ) - url-encode XML[[ /> XML]] ; + url-encode XML-CHUNK[[ /> ]] ; diff --git a/libs/html/streams/streams.factor b/libs/html/streams/streams.factor index 89830000bc..85e194b6ac 100644 --- a/libs/html/streams/streams.factor +++ b/libs/html/streams/streams.factor @@ -72,7 +72,7 @@ MACRO: make-css ( pairs -- str ) : span-tag ( xml style -- xml ) span-css-style - [ swap XML[[ ><-> XML]] ] unless-empty ; inline + [ swap XML-CHUNK[[ ><-> ]] ] unless-empty ; inline : emit-html ( stream quot -- ) dip data>> push ; inline @@ -125,7 +125,7 @@ CONSTANT: pre-css "white-space: pre; font-family: monospace; " ; : div-tag ( xml style -- xml' ) div-css-style - [ swap XML[[
    ><->
    XML]] ] unless-empty ; + [ swap XML-CHUNK[[
    ><->
    ]] ] unless-empty ; : format-html-div ( string style stream -- ) [ [ div-tag ] [ object-link-tag ] bi ] emit-html ; @@ -159,7 +159,7 @@ M: html-writer stream-format format-html-span ; M: html-writer stream-nl - [ XML[[
    XML]] ] emit-html ; + [ XML-CHUNK[[
    ]] ] emit-html ; M: html-writer make-span-stream html-span-stream new-html-sub-stream ; @@ -173,10 +173,10 @@ M: html-writer make-cell-stream M: html-writer stream-write-table [ table-style swap [ - [ data>> XML[[ ><-> XML]] ] with map - XML[[ <-> XML]] + [ data>> XML-CHUNK[[ ><-> ]] ] with map + XML-CHUNK[[ <-> ]] ] with map - XML[[ <->
    XML]] + XML-CHUNK[[ <->
    ]] ] emit-html ; M: html-writer dispose drop ; diff --git a/libs/html/templates/chloe/chloe-docs.factor b/libs/html/templates/chloe/chloe-docs.factor index 447f6a3a15..2cecf46776 100644 --- a/libs/html/templates/chloe/chloe-docs.factor +++ b/libs/html/templates/chloe/chloe-docs.factor @@ -274,7 +274,7 @@ ARTICLE: "html.templates.chloe.extend.components.example" "An example of a custo "As an example, let's develop a custom Chloe component which renders an image stored in a form value. Since the component does not require any configuration, we can define a singleton class:" { $code "singleton: image" } "Now we define a method on the " { $link render* } " generic word which renders the image using " { $link { "xml.syntax" "literals" } } ":" -{ $code "M: image render* 2drop XML[[ /> XML]] ;" } +{ $code "M: image render* 2drop XML-CHUNK[[ /> ]] ;" } "Finally, we can define a Chloe component:" { $code "component: image" } "We can use it as follows, assuming the current form has a value named " { $snippet "image" } ":" diff --git a/libs/html/templates/chloe/chloe.factor b/libs/html/templates/chloe/chloe.factor index b496fc5005..e2fbb47b7a 100644 --- a/libs/html/templates/chloe/chloe.factor +++ b/libs/html/templates/chloe/chloe.factor @@ -19,7 +19,7 @@ CHLOE: write-title drop "head" tag-stack get member? "title" tag-stack get member? not and - [ get-title XML[[ <-> XML]] ] + [ get-title XML-CHUNK[[ <-> ]] ] [ get-title ] ? [xml-code] ; @@ -33,7 +33,7 @@ CHLOE: style CHLOE: write-style drop [ get-style - XML[[ XML]] + XML-CHUNK[[ ]] ] [xml-code] ; CHLOE: even diff --git a/libs/html/templates/templates.factor b/libs/html/templates/templates.factor index 45303fda90..c4ff73f415 100644 --- a/libs/html/templates/templates.factor +++ b/libs/html/templates/templates.factor @@ -66,13 +66,13 @@ symbol: atom-feeds : get-atom-feeds ( -- xml ) atom-feeds get [ - XML[[ + XML-CHUNK[[ href=<->/> - XML]] + ]] ] { } assoc>map ; : write-atom-feeds ( -- ) diff --git a/libs/http/server/responses/responses.factor b/libs/http/server/responses/responses.factor index 4ab39ba557..ebae840223 100644 --- a/libs/http/server/responses/responses.factor +++ b/libs/http/server/responses/responses.factor @@ -19,13 +19,13 @@ IN: http.server.responses "text/html" ; : trivial-response-body ( code message -- ) -

    <-> <->

    - XML> write-xml ; + ]] write-xml ; : ( code message -- response ) 2dup [ trivial-response-body ] with-string-writer diff --git a/libs/http/server/static/static.factor b/libs/http/server/static/static.factor index 4edebda755..e0efca0e0e 100644 --- a/libs/http/server/static/static.factor +++ b/libs/http/server/static/static.factor @@ -60,14 +60,14 @@ TUPLE: file-responder root hook special index-names allow-listings ; : file>html ( name -- xml ) dup link-info directory? [ "/" append ] when - dup XML[[
  • ><->
  • XML]] ; + dup XML-CHUNK[[
  • ><->
  • ]] ; : directory>html ( path -- xml ) [ file-name ] [ drop f ] [ [ file-name ] [ [ natural-sort [ file>html ] map ] with-directory-files ] bi - XML[[

    <->

      <->
    XML]] + XML-CHUNK[[

    <->

      <->
    ]] ] tri simple-page ; diff --git a/libs/lcs/diff2html/diff2html.factor b/libs/lcs/diff2html/diff2html.factor index 7f662d36fb..b97f6b1f0e 100644 --- a/libs/lcs/diff2html/diff2html.factor +++ b/libs/lcs/diff2html/diff2html.factor @@ -11,30 +11,30 @@ GENERIC: diff-line ( obj -- xml ) ; M: retain diff-line item-string - XML[[ <-> XML]] - dup XML[[ <-><-> XML]] ; + XML-CHUNK[[ <-> ]] + dup XML-CHUNK[[ <-><-> ]] ; M: insert diff-line - item-string XML[[ + item-string XML-CHUNK[[ <-> - XML]] ; + ]] ; M: delete diff-line - item-string XML[[ + item-string XML-CHUNK[[ <-> - XML]] ; + ]] ; : htmlize-diff ( diff -- xml ) [ diff-line ] map - XML[[ + XML-CHUNK[[ <->
    OldNew
    - XML]] ; + ]] ; diff --git a/libs/syndication/syndication.factor b/libs/syndication/syndication.factor index daadde8abd..3b6ed3ee3a 100644 --- a/libs/syndication/syndication.factor +++ b/libs/syndication/syndication.factor @@ -119,23 +119,23 @@ M: byte-array parse-feed [ bytes>xml xml>feed ] with-html-entities ; [ date>> timestamp>rfc3339 ] [ description>> ] } cleave - XML[[ + XML-CHUNK[[ <-> /> <-> <-> - XML]] ; + ]] ; : feed>xml ( feed -- xml ) [ title>> ] [ url>> present ] [ entries>> [ entry>xml ] map ] tri - <-> /> <-> - XML> ; + ]] ; diff --git a/libs/xml-rpc/xml-rpc.factor b/libs/xml-rpc/xml-rpc.factor index b0d9c13bc2..36d277ba82 100644 --- a/libs/xml-rpc/xml-rpc.factor +++ b/libs/xml-rpc/xml-rpc.factor @@ -16,34 +16,34 @@ GENERIC: item>xml ( object -- xml ) ; M: integer item>xml dup 31 2^ neg 31 2^ 1 - between? [ "Integers must fit in 32 bits" throw ] unless - XML[[ <-> XML]] ; + XML-CHUNK[[ <-> ]] ; M: boolean item>xml - "1" "0" ? XML[[ <-> XML]] ; + "1" "0" ? XML-CHUNK[[ <-> ]] ; M: float item>xml - number>string XML[[ <-> XML]] ; + number>string XML-CHUNK[[ <-> ]] ; M: string item>xml - XML[[ <-> XML]] ; + XML-CHUNK[[ <-> ]] ; : struct-member ( name value -- tag ) over string? [ "Struct member name must be string" throw ] unless item>xml - XML[[ + XML-CHUNK[[ <-> <-> - XML]] ; + ]] ; M: hashtable item>xml [ struct-member ] { } assoc>map - XML[[ <-> XML]] ; + XML-CHUNK[[ <-> ]] ; M: array item>xml - [ item>xml XML[[ <-> XML]] ] map - XML[[ <-> XML]] ; + [ item>xml XML-CHUNK[[ <-> ]] ] map + XML-CHUNK[[ <-> ]] ; TUPLE: base64 string ; @@ -51,33 +51,33 @@ C: base64 ; M: base64 item>xml string>> >base64 - XML[[ <-> XML]] ; + XML-CHUNK[[ <-> ]] ; : params ( seq -- xml ) - [ item>xml XML[[ <-> XML]] ] map - XML[[ <-> XML]] ; + [ item>xml XML-CHUNK[[ <-> ]] ] map + XML-CHUNK[[ <-> ]] ; : method-call ( name seq -- xml ) params - <-> <-> - XML> ; + ]] ; : return-params ( seq -- xml ) - params <-> XML> ; + params XML-DOC[[ <-> ]] ; : return-fault ( fault-code fault-string -- xml ) [ "faultString" ,, "faultCode" ,, ] H{ } make item>xml - <-> - XML> ; + ]] ; TUPLE: rpc-method name params ; diff --git a/libs/xml/errors/errors-docs.factor b/libs/xml/errors/errors-docs.factor index b9c83c80bb..39ed0cf64c 100644 --- a/libs/xml/errors/errors-docs.factor +++ b/libs/xml/errors/errors-docs.factor @@ -75,11 +75,11 @@ HELP: bad-cdata { $class-description "Describes the error where CDATA is used outside of the main tag of an XML document." } { $xml-error "y\n" } ; -HELP: text-w/]]> +HELP: text-w/terminator { $class-description "Describes the error where a text node contains the literal string " { $snippet "]]>" } " which is disallowed." } { $xml-error "Here's some text: ]]> there it was" } ; -HELP: attr-w/< +HELP: attr-w/lt { $class-description "Describes the error where an attribute value contains the literal character " { $snippet "<" } " which is disallowed." } { $xml-error "" } ; @@ -111,8 +111,8 @@ ARTICLE: "xml.errors" "XML parsing errors" unexpected-end duplicate-attr bad-cdata - text-w/]]> - attr-w/< + text-w/terminator + attr-w/lt misplaced-directive } "Additionally, most of these errors are a kind of " { $link xml-error } " which provides more information about where the error occurred." diff --git a/libs/xml/errors/errors-tests.factor b/libs/xml/errors/errors-tests.factor index 26335a2747..40a732433a 100644 --- a/libs/xml/errors/errors-tests.factor +++ b/libs/xml/errors/errors-tests.factor @@ -29,8 +29,8 @@ T{ unclosed-quote f 1 12 } "" xml-error-test -T{ text-w/]]> f 1 6 } "]]>" xml-error-test +T{ attr-w/lt f 1 11 } "" xml-error-test +T{ text-w/terminator f 1 6 } "]]>" xml-error-test T{ duplicate-attr f 1 21 T{ name { space "" } { main "this" } } V{ "a" "b" } } "" xml-error-test T{ bad-cdata f 1 3 } "" xml-error-test T{ bad-cdata f 1 7 } "" xml-error-test diff --git a/libs/xml/syntax/syntax-docs.factor b/libs/xml/syntax/syntax-docs.factor index 8e375bd5b4..84d9cf97c1 100644 --- a/libs/xml/syntax/syntax-docs.factor +++ b/libs/xml/syntax/syntax-docs.factor @@ -15,49 +15,49 @@ ARTICLE: "xml.syntax" "Syntax extensions for XML" ARTICLE: { "xml.syntax" "tags" } "Dispatch on XML tag names" "There is a system, analogous to generic words, for processing XML. A word can dispatch off the name of the tag that is passed to it. To define such a word, use" -{ $subsections postpone\ TAGS: } +{ $subsections \ TAGS: } "and to define a new 'method' for this word, use" -{ $subsections postpone\ TAG: } ; +{ $subsections \ TAG: } ; HELP: \ TAGS: { $syntax "TAGS: word effect ;" } { $values { "word" "a new word to define" } } { $description "Creates a new word to which dispatches on XML tag names." } -{ $see-also postpone\ TAG: } ; +{ $see-also \ TAG: } ; HELP: \ TAG: { $syntax "TAG: tag word definition... ;" } { $values { "tag" "an XML tag name" } { "word" "an XML process" } } -{ $description "Defines a 'method' on a word created with " { $link postpone\ TAGS: } ". It determines what such a word should do for an argument that is has the given name." } +{ $description "Defines a 'method' on a word created with " { $link \ TAGS: } ". It determines what such a word should do for an argument that is has the given name." } { $examples { $code "TAGS: x ( tag -- )\nTAG: a x drop \"hi\" write ;" } } -{ $see-also postpone\ TAGS: } ; +{ $see-also \ TAGS: } ; ARTICLE: { "xml.syntax" "literals" } "XML literals" "The following words provide syntax for XML literals:" { $subsections - postpone\ ... XML>" } +HELP: \ XML-DOC[[ +{ $syntax "XML-DOC[[ ... ]]" } { $description "This gives syntax for literal XML documents. When evaluated, there is an XML document (" { $link xml } ") on the stack. It can be used for interpolation as well, if interpolation slots are used. For more information about XML interpolation, see " { $link { "xml.syntax" "interpolation" } } "." } ; -HELP: \ XML[[ -{ $syntax "XML[[ foo ... bar ... baz XML]]" } +HELP: \ XML-CHUNK[[ +{ $syntax "XML-CHUNK[[ foo ... bar ... baz ]]" } { $description "This gives syntax for literal XML documents. When evaluated, there is an XML chunk (" { $link xml-chunk } ") on the stack. For more information about XML interpolation, see " { $link { "xml.syntax" "interpolation" } } "." } ; ARTICLE: { "xml.syntax" "interpolation" } "XML interpolation syntax" -"XML interpolation has two forms for each of the words " { $link postpone\ " } ". To splice something in from the stack, in the style of " { $vocab-link "fry" } ", use the syntax " { $snippet "<->" } ". An XML interpolation form may only use one of these styles." +"XML interpolation has two forms for each of the words " { $link \ XML-DOC[[ } " and " { $link \ XML-CHUNK[[ } ": a fry-like form and a locals form. To splice locals in, use the syntax " { $snippet "<-variable->" } ". To splice something in from the stack, in the style of " { $vocab-link "fry" } ", use the syntax " { $snippet "<->" } ". An XML interpolation form may only use one of these styles." $nl -"These forms can be used where a tag might go, as in " { $snippet "XML[[ <-> XML]]" } " or where an attribute might go, as in " { $snippet "XML[[ /> XML]]" } ". When an attribute is spliced in, it is not included if the value is " { $snippet "f" } " and if the value is not a string, the value is put through " { $link present } ". Here is an example of the fry style of XML interpolation:" +"These forms can be used where a tag might go, as in " { $snippet "XML-CHUNK[[ <-> ]]" } " or where an attribute might go, as in " { $snippet "XML-CHUNK[[ /> ]]" } ". When an attribute is spliced in, it is not included if the value is " { $snippet "f" } " and if the value is not a string, the value is put through " { $link present } ". Here is an example of the fry style of XML interpolation:" { $example "USING: splitting xml.writer xml.syntax ; \"one two three\" \" \" split -[ XML[[ <-> XML]] ] map -<-> XML> pprint-xml" +[ XML-CHUNK[[ <-> ]] ] map +XML-DOC[[ <-> ]] pprint-xml" " @@ -80,14 +80,14 @@ let[ URL\" http://factorcode.org/\" :> url \"hello\" :> string \\ drop :> word - false=<-false-> url=<-url-> string=<-string-> word=<-word-> /> - XML> pprint-xml + ]] pprint-xml ]" " @@ -96,12 +96,12 @@ let[ { $example "USING: xml.syntax inverse ; : dispatch ( xml -- string ) { - { [ XML[[ <-> XML]] ] [ \"a\" prepend ] } - { [ XML[[ <-> XML]] ] [ \"b\" prepend ] } - { [ XML[[ XML]] ] [ \"yes\" ] } - { [ XML[[ /> XML]] ] [ \"no\" prepend ] } + { [ XML-CHUNK[[ <-> ]] ] [ \"a\" prepend ] } + { [ XML-CHUNK[[ <-> ]] ] [ \"b\" prepend ] } + { [ XML-CHUNK[[ ]] ] [ \"yes\" ] } + { [ XML-CHUNK[[ /> ]] ] [ \"no\" prepend ] } } switch ; -XML[[ pple XML]] dispatch write" +XML-CHUNK[[ pple ]] dispatch write" "apple" } ; HELP: \ XML-NS: diff --git a/libs/xml/syntax/syntax-tests.factor b/libs/xml/syntax/syntax-tests.factor index 40cb4249f9..35c27003fb 100644 --- a/libs/xml/syntax/syntax-tests.factor +++ b/libs/xml/syntax/syntax-tests.factor @@ -55,10 +55,10 @@ XML-NS: foo http://blah.com ; y " } [ - let[ "one" :> a "two" :> c "y" :> x XML[[ <-x-> XML]] :> d - a "two" :> c "y" :> x XML-CHUNK[[ <-x-> ]] :> d + XML-DOC[[ <-a-> /> <-d-> - XML> pprint-xml>string + ]] pprint-xml>string ] ] unit-test @@ -75,69 +75,69 @@ XML-NS: foo http://blah.com ; " } [ "one two three" " " split - [ XML[[ <-> XML]] ] map - <-> XML> pprint-xml>string + [ XML-CHUNK[[ <-> ]] ] map + XML-DOC[[ <-> ]] pprint-xml>string ] unit-test { " " } [ 3 f "http://factorcode.org/" "hello" \ drop - false=<-> url=<-> string=<-> word=<->/> XML> + XML-DOC[[ false=<-> url=<-> string=<-> word=<->/> ]] pprint-xml>string ] unit-test -{ "3" } [ 3 XML[[ <-> XML]] xml>string ] unit-test -{ "" } [ f XML[[ <-> XML]] xml>string ] unit-test +{ "3" } [ 3 XML-CHUNK[[ <-> ]] xml>string ] unit-test +{ "" } [ f XML-CHUNK[[ <-> ]] xml>string ] unit-test -[ XML[[ <-> XML]] ] must-infer -[ XML[[ <-> /> XML]] ] must-infer +[ XML-CHUNK[[ <-> ]] ] must-infer +[ XML-CHUNK[[ <-> /> ]] ] must-infer -{ xml-chunk } [ [ XML[[ XML]] ] first class-of ] unit-test -{ xml } [ [ XML> ] first class-of ] unit-test -{ xml-chunk } [ [ XML[[ /> XML]] ] third class-of ] unit-test -{ xml } [ [ /> XML> ] third class-of ] unit-test -{ 1 } [ [ XML[[ XML]] ] length ] unit-test -{ 1 } [ [ XML> ] length ] unit-test +{ xml-chunk } [ [ XML-CHUNK[[ ]] ] first class-of ] unit-test +{ xml } [ [ XML-DOC[[ ]] ] first class-of ] unit-test +{ xml-chunk } [ [ XML-CHUNK[[ /> ]] ] third class-of ] unit-test +{ xml } [ [ XML-DOC[[ /> ]] ] third class-of ] unit-test +{ 1 } [ [ XML-CHUNK[[ ]] ] length ] unit-test +{ 1 } [ [ XML-DOC[[ ]] ] length ] unit-test -{ "" } [ XML[[ XML]] concat ] unit-test +{ "" } [ XML-CHUNK[[ ]] concat ] unit-test -{ "foo" } [ XML[[ foo XML]] [ XML[[ <-> XML]] ] undo ] unit-test -{ "foo" } [ XML[[ XML]] [ XML[[ /> XML]] ] undo ] unit-test -{ "foo" "baz" } [ XML[[ baz XML]] [ XML[[ ><-> XML]] ] undo ] unit-test +{ "foo" } [ XML-CHUNK[[ foo ]] [ XML-CHUNK[[ <-> ]] ] undo ] unit-test +{ "foo" } [ XML-CHUNK[[ ]] [ XML-CHUNK[[ /> ]] ] undo ] unit-test +{ "foo" "baz" } [ XML-CHUNK[[ baz ]] [ XML-CHUNK[[ ><-> ]] ] undo ] unit-test : dispatch ( xml -- string ) { - { [ XML[[ <-> XML]] ] [ "a" prepend ] } - { [ XML[[ <-> XML]] ] [ "b" prepend ] } - { [ XML[[ XML]] ] [ "byes" ] } - { [ XML[[ /> XML]] ] [ "bno" prepend ] } + { [ XML-CHUNK[[ <-> ]] ] [ "a" prepend ] } + { [ XML-CHUNK[[ <-> ]] ] [ "b" prepend ] } + { [ XML-CHUNK[[ ]] ] [ "byes" ] } + { [ XML-CHUNK[[ /> ]] ] [ "bno" prepend ] } } switch ; -{ "apple" } [ XML[[ pple XML]] dispatch ] unit-test -{ "banana" } [ XML[[ anana XML]] dispatch ] unit-test -{ "byes" } [ XML[[ XML]] dispatch ] unit-test -{ "bnowhere" } [ XML[[ XML]] dispatch ] unit-test -{ "baboon" } [ XML[[ aboon XML]] dispatch ] unit-test -{ "apple" } [ pple XML> dispatch ] unit-test -{ "apple" } [ pple XML> body>> dispatch ] unit-test +{ "apple" } [ XML-CHUNK[[ pple ]] dispatch ] unit-test +{ "banana" } [ XML-CHUNK[[ anana ]] dispatch ] unit-test +{ "byes" } [ XML-CHUNK[[ ]] dispatch ] unit-test +{ "bnowhere" } [ XML-CHUNK[[ ]] dispatch ] unit-test +{ "baboon" } [ XML-CHUNK[[ aboon ]] dispatch ] unit-test +{ "apple" } [ XML-DOC[[ pple ]] dispatch ] unit-test +{ "apple" } [ XML-DOC[[ pple ]] body>> dispatch ] unit-test : dispatch-doc ( xml -- string ) { - { [ <-> XML> ] [ "a" prepend ] } - { [ <-> XML> ] [ "b" prepend ] } - { [ XML> ] [ "byes" ] } - { [ /> XML> ] [ "bno" prepend ] } + { [ XML-DOC[[ <-> ]] ] [ "a" prepend ] } + { [ XML-DOC[[ <-> ]] ] [ "b" prepend ] } + { [ XML-DOC[[ ]] ] [ "byes" ] } + { [ XML-DOC[[ /> ]] ] [ "bno" prepend ] } } switch ; -{ "apple" } [ pple XML> dispatch-doc ] unit-test -{ "apple" } [ XML[[ pple XML]] dispatch-doc ] unit-test -{ "apple" } [ pple XML> body>> dispatch-doc ] unit-test +{ "apple" } [ XML-DOC[[ pple ]] dispatch-doc ] unit-test +{ "apple" } [ XML-CHUNK[[ pple ]] dispatch-doc ] unit-test +{ "apple" } [ XML-DOC[[ pple ]] body>> dispatch-doc ] unit-test ! Make sure nested XML documents interpolate correctly { "it's blue!" } [ - "it's blue!" <-> XML> - <-> XML> xml>string + "it's blue!" XML-DOC[[ <-> ]] + XML-DOC[[ <-> ]] xml>string ] unit-test { @@ -147,5 +147,5 @@ XML-NS: foo http://blah.com ; "asdf" "asdf" f f "asdf2" - <-> XML> xml>string + XML-DOC[[ <-> ]] xml>string ] unit-test diff --git a/libs/xml/syntax/syntax.factor b/libs/xml/syntax/syntax.factor index 3465fc8ece..5d94c4e804 100644 --- a/libs/xml/syntax/syntax.factor +++ b/libs/xml/syntax/syntax.factor @@ -170,11 +170,11 @@ MACRO: interpolate-xml ( xml -- quot ) PRIVATE> -SYNTAX: \ " [ string>doc ] parse-def ; +SYNTAX: \ XML-DOC[[ + "]]" [ string>doc ] parse-def ; -SYNTAX: \ XML[[ - "XML]]" [ string>chunk ] parse-def ; +SYNTAX: \ XML-CHUNK[[ + "]]" [ string>chunk ] parse-def ; use: vocabs.loader diff --git a/libs/xml/tokenize/tokenize.factor b/libs/xml/tokenize/tokenize.factor index 931065c48f..3322db1462 100644 --- a/libs/xml/tokenize/tokenize.factor +++ b/libs/xml/tokenize/tokenize.factor @@ -153,7 +153,7 @@ HINTS: next* { spot } ; 512 [ spot get (parse-char) ] keep "" like ; inline : assure-no-terminator ( pos char -- pos' ) - "]]>" next-matching dup 2 > [ text-w/terminatorl ] when ; inline + "]]>" next-matching dup 2 > [ text-w/terminator ] when ; inline :: parse-text ( -- string ) depth get zero? :> no-text diff --git a/libs/xml/writer/writer-docs.factor b/libs/xml/writer/writer-docs.factor index 92660705ff..ac752488d5 100644 --- a/libs/xml/writer/writer-docs.factor +++ b/libs/xml/writer/writer-docs.factor @@ -48,7 +48,7 @@ HELP: pprint-xml HELP: indenter { $var-description "Contains the string which is used for indenting in the XML prettyprinter. For example, to print an XML document using " { $snippet "%%%%" } " for indentation, you can use the following:" } { $example "USING: xml.syntax xml.writer namespaces ; -XML[[ bar XML]] \"%%%%\" indenter [ pprint-xml ] with-variable " " +XML-CHUNK[[ bar ]] \"%%%%\" indenter [ pprint-xml ] with-variable " " %%%%bar " } ; @@ -56,9 +56,9 @@ XML[[ bar XML]] \"%%%%\" indenter [ pprint-xml ] with-variable " " HELP: sensitive-tags { $var-description "Contains a sequence of " { $link name } "s where whitespace should be considered significant for prettyprinting purposes. The sequence can contain " { $link string } "s in place of names. For example, to preserve whitespace inside a " { $snippet "pre" } " tag:" } { $example "USING: xml.syntax xml.writer namespaces ; -XML[[ something
    bing
    +XML-CHUNK[[      something
    bing
     bang
    -   bong
    XML]] { \"pre\" } sensitive-tags [ pprint-xml ] with-variable" + bong
    ]] { \"pre\" } sensitive-tags [ pprint-xml ] with-variable" " diff --git a/libs/xml/writer/writer-tests.factor b/libs/xml/writer/writer-tests.factor index 04f96717f1..03b48316d8 100644 --- a/libs/xml/writer/writer-tests.factor +++ b/libs/xml/writer/writer-tests.factor @@ -71,8 +71,8 @@ in: xml.writer.tests { } [ { 1 2 3 4 } [ [ number>string ] [ sq number>string ] bi - XML[[ <-><-> XML]] - ] map XML[[

    Timings

    <->
    XML]] + XML-CHUNK[[ <-><-> ]] + ] map XML-CHUNK[[

    Timings

    <->
    ]] pprint-xml ] unit-test diff --git a/libs/xmode/code2html/code2html.factor b/libs/xmode/code2html/code2html.factor index b3511234be..21d452407f 100644 --- a/libs/xmode/code2html/code2html.factor +++ b/libs/xmode/code2html/code2html.factor @@ -7,7 +7,7 @@ IN: xmode.code2html [ [ str>> ] [ id>> ] bi [ name>> swap - XML[[ ><-> XML]] + XML-CHUNK[[ ><-> ]] ] when* ] map ; @@ -21,14 +21,14 @@ IN: xmode.code2html : default-stylesheet ( -- xml ) "resource:basis/xmode/code2html/stylesheet.css" utf8 file-contents - XML[[ XML]] ; + XML-CHUNK[[ ]] ; :: htmlize-stream ( path stream -- xml ) stream stream-lines [ "" ] [ path over first find-mode htmlize-lines ] if-empty :> input default-stylesheet :> stylesheet - + XML-DOC[[ <-stylesheet-> <-path-> @@ -36,7 +36,7 @@ IN: xmode.code2html
    <-input->
    - XML> ; + ]] ; : htmlize-file ( path -- ) dup utf8 [ diff --git a/tools/codebook/codebook.factor b/tools/codebook/codebook.factor index df2d69320c..18a2f49751 100644 --- a/tools/codebook/codebook.factor +++ b/tools/codebook/codebook.factor @@ -16,23 +16,23 @@ IN: codebook CONSTANT: codebook-style { - { COMMENT1 [ XML[[ <-> XML]] ] } - { COMMENT2 [ XML[[ <-> XML]] ] } - { COMMENT3 [ XML[[ <-> XML]] ] } - { COMMENT4 [ XML[[ <-> XML]] ] } - { DIGIT [ XML[[ <-> XML]] ] } - { FUNCTION [ XML[[ <-> XML]] ] } - { KEYWORD1 [ XML[[ <-> XML]] ] } - { KEYWORD2 [ XML[[ <-> XML]] ] } - { KEYWORD3 [ XML[[ <-> XML]] ] } - { KEYWORD4 [ XML[[ <-> XML]] ] } - { LABEL [ XML[[ <-> XML]] ] } - { LITERAL1 [ XML[[ <-> XML]] ] } - { LITERAL2 [ XML[[ <-> XML]] ] } - { LITERAL3 [ XML[[ <-> XML]] ] } - { LITERAL4 [ XML[[ <-> XML]] ] } - { MARKUP [ XML[[ <-> XML]] ] } - { OPERATOR [ XML[[ <-> XML]] ] } + { COMMENT1 [ XML-CHUNK[[ <-> ]] ] } + { COMMENT2 [ XML-CHUNK[[ <-> ]] ] } + { COMMENT3 [ XML-CHUNK[[ <-> ]] ] } + { COMMENT4 [ XML-CHUNK[[ <-> ]] ] } + { DIGIT [ XML-CHUNK[[ <-> ]] ] } + { FUNCTION [ XML-CHUNK[[ <-> ]] ] } + { KEYWORD1 [ XML-CHUNK[[ <-> ]] ] } + { KEYWORD2 [ XML-CHUNK[[ <-> ]] ] } + { KEYWORD3 [ XML-CHUNK[[ <-> ]] ] } + { KEYWORD4 [ XML-CHUNK[[ <-> ]] ] } + { LABEL [ XML-CHUNK[[ <-> ]] ] } + { LITERAL1 [ XML-CHUNK[[ <-> ]] ] } + { LITERAL2 [ XML-CHUNK[[ <-> ]] ] } + { LITERAL3 [ XML-CHUNK[[ <-> ]] ] } + { LITERAL4 [ XML-CHUNK[[ <-> ]] ] } + { MARKUP [ XML-CHUNK[[ <-> ]] ] } + { OPERATOR [ XML-CHUNK[[ <-> ]] ] } [ drop ] } @@ -70,7 +70,7 @@ TUPLE: code-file : toc-list ( files -- list ) [ name>> ] map natural-sort [ [ file-html-name ] keep - XML[[
  • ><->
  • XML]] + XML-CHUNK[[
  • ><->
  • ]] ] map ; ! insert zero-width non-joiner between all characters so words can wrap anywhere @@ -82,7 +82,7 @@ TUPLE: code-file : htmlize-tokens ( tokens line# -- html-tokens ) swap [ [ str>> zwnj ] [ id>> ] bi codebook-style case - ] map XML[[ <-> <-> XML]] + ] map XML-CHUNK[[ <-> <-> ]] "\n" 2array ; : line#>string ( i line#len -- i-string ) @@ -96,7 +96,7 @@ TUPLE: code-file file mode>> load-mode :> rules f lines |[ l i | l rules tokenize-line i 1 + line#len line#>string htmlize-tokens ] map-index concat nip :> html-lines - + XML-DOC[[ <-name-> @@ -106,7 +106,7 @@ TUPLE: code-file
    <-html-lines->
    - XML> ; + ]] ; :: code>toc-html ( dir name files -- html ) "Generating HTML table of contents" print flush @@ -116,7 +116,7 @@ TUPLE: code-file dir [ files toc-list :> toc - + XML-DOC[[ <-name-> @@ -130,7 +130,7 @@ TUPLE: code-file
      <-toc->
    - XML> + ]] ] with-directory ; :: code>ncx ( dir name files -- xml ) @@ -141,13 +141,13 @@ TUPLE: code-file name file-html-name :> filename i 2 + number>string :> istr - XML[[ playOrder=<-istr->> + XML-CHUNK[[ playOrder=<-istr->> <-name-> /> - XML]] + ]] ] map-index :> file-nav-points - + XML-DOC[[ @@ -156,7 +156,7 @@ TUPLE: code-file <-file-nav-points-> - XML> ; + ]] ; :: code>opf ( dir name files -- xml ) "Generating OPF manifest" print flush @@ -164,12 +164,12 @@ TUPLE: code-file files [ name>> file-html-name dup - XML[[ href=<-> media-type="text/html" /> XML]] + XML-CHUNK[[ href=<-> media-type="text/html" /> ]] ] map :> html-manifest - files [ name>> file-html-name XML[[ /> XML]] ] map :> html-spine + files [ name>> file-html-name XML-CHUNK[[ /> ]] ] map :> html-spine - + XML-DOC[[ - XML> ; + ]] ; : write-dest-file ( xml name ext -- ) append utf8 [ write-xml ] with-file-writer ; diff --git a/tools/help/html/html.factor b/tools/help/html/html.factor index d95fd21a4c..33d49caeee 100644 --- a/tools/help/html/html.factor +++ b/tools/help/html/html.factor @@ -69,11 +69,11 @@ M: pathname url-of : help-stylesheet ( stylesheet -- xml ) "vocab:help/html/stylesheet.css" ascii file-contents - swap "\n" glue XML[[ XML]] ; + swap "\n" glue XML-CHUNK[[ ]] ; : help-navbar ( -- xml ) "conventions" >link topic>filename - XML[[ + XML-CHUNK[[ - XML]] ; + ]] ; : bijective-base26 ( n -- name ) [ dup 0 > ] [ 1 - 26 /mod char: a + ] "" produce-as nip reverse! ; diff --git a/tools/mason/report/report.factor b/tools/mason/report/report.factor index b2b501f2e5..58383f430c 100644 --- a/tools/mason/report/report.factor +++ b/tools/mason/report/report.factor @@ -8,7 +8,7 @@ IN: mason.report : git-link ( id -- link ) [ "http://github.com/factor/factor/commit/" "" prepend-as ] keep - XML[[ ><-> XML]] ; + XML-CHUNK[[ ><-> ]] ; : common-report ( -- xml ) target-os get @@ -17,7 +17,7 @@ IN: mason.report disk-usage build-dir current-git-id get git-link - XML[[ + XML-CHUNK[[

    Build report for <->/<->

    @@ -25,14 +25,14 @@ IN: mason.report
    Build machine:<->
    Build directory:<->
    GIT ID:<->
    - XML]] ; + ]] ; : with-report ( quot -- ) [ "report" utf8 ] dip '[ common-report _ call( -- xml ) - XML[[ <-><-> XML]] + XML-CHUNK[[ <-><-> ]] write-xml ] with-file-writer ; inline @@ -44,13 +44,13 @@ IN: mason.report error [ error. ] with-string-writer :> error file utf8 400 file-tail :> output - XML[[ + XML-CHUNK[[

    <-what->

    Build output:
    <-output->
    Launcher error:
    <-error->
    - XML]] + ]] ] with-report status-error ; @@ -73,30 +73,30 @@ IN: mason.report html-help-time-file } [ dup eval-file nanos>time - XML[[ <-><-> XML]] - ] map XML[[

    Timings

    <->
    XML]] ; + XML-CHUNK[[ <-><-> ]] + ] map XML-CHUNK[[

    Timings

    <->
    ]] ; : error-dump ( heading vocabs-file messages-file -- xml ) [ eval-file ] dip over empty? [ 3drop f ] [ [ ] - [ [ XML[[
  • <->
  • XML]] ] map XML[[
      <->
    XML]] ] + [ [ XML-CHUNK[[
  • <->
  • ]] ] map XML-CHUNK[[
      <->
    ]] ] [ utf8 file-contents ] tri* - XML[[

    <->

    <-> Details:
    <->
    XML]] + XML-CHUNK[[

    <->

    <-> Details:
    <->
    ]] ] if ; : benchmarks-table ( assoc -- xml ) [ 1,000,000,000 /f - XML[[ <-><-> XML]] + XML-CHUNK[[ <-><-> ]] ] { } assoc>map - XML[[ + XML-CHUNK[[

    Benchmarks

    <->
    BenchmarkTime (seconds)
    - XML]] ; + ]] ; : successful-report ( -- ) [ diff --git a/tools/spider/report/report.factor b/tools/spider/report/report.factor index 5237bac720..bc4f739e5b 100644 --- a/tools/spider/report/report.factor +++ b/tools/spider/report/report.factor @@ -56,18 +56,18 @@ symbol: time-std : info-table ( alist -- html ) [ first2 dupd 1000000 /f - XML[[ + XML-CHUNK[[ ><-><-> seconds - XML]] - ] map XML[[ <->
    XML]] ; + ]] + ] map XML-CHUNK[[ <->
    ]] ; : report-broken-pages ( -- html ) broken-pages get info-table ; : report-network-failures ( -- html ) network-failures get [ - dup XML[[
  • ><->
  • XML]] - ] map XML[[
      <->
    XML]] ; + dup XML-CHUNK[[
  • ><->
  • ]] + ] map XML-CHUNK[[
      <->
    ]] ; : slowest-pages-table ( -- html ) slowest-pages get info-table ; @@ -76,31 +76,31 @@ symbol: time-std mean-time get median-time get time-std get - XML[[ + XML-CHUNK[[
    Mean<-> seconds
    Median<-> seconds
    Standard deviation<-> seconds
    - XML]] ; + ]] ; : report-timings ( -- html ) slowest-pages-table timing-summary-table - XML[[ + XML-CHUNK[[

    Slowest pages

    <->

    Summary

    <-> - XML]] ; + ]] ; : generate-report ( -- html ) url get dup report-broken-pages report-network-failures report-timings - XML[[ + XML-CHUNK[[

    Spider report

    URL: ><-> @@ -112,7 +112,7 @@ symbol: time-std

    Load times

    <-> - XML]] ; + ]] ; : spider-report ( spider -- html ) [ "Spider report" f ] dip diff --git a/tools/tools/deploy/test/20/20.factor b/tools/tools/deploy/test/20/20.factor index 5e1c704734..9784c5ec70 100644 --- a/tools/tools/deploy/test/20/20.factor +++ b/tools/tools/deploy/test/20/20.factor @@ -2,7 +2,7 @@ USING: io xml.syntax xml.writer ; IN: tools.deploy.test.20 : test-xml ( str -- str' ) - <->
    XML> xml>string ; + XML-DOC[[ <-> ]] xml>string ; : main ( -- ) "Factor" test-xml print ; diff --git a/unmaintained/tc-lisp-talk/tc-lisp-talk.factor b/unmaintained/tc-lisp-talk/tc-lisp-talk.factor index 88b125f660..75e1a7a17a 100644 --- a/unmaintained/tc-lisp-talk/tc-lisp-talk.factor +++ b/unmaintained/tc-lisp-talk/tc-lisp-talk.factor @@ -27,8 +27,8 @@ CONSTANT: tc-lisp-slides { $code "USING: splitting xml.writer xml.syntax ; { \"one\" \"two\" \"three\" } -[ XML[[ <-> XML]] ] map -<-> XML> pprint-xml" +[ XML-CHUNK[[ <-> ]] ] map +XML-DOC[[ <-> ]] pprint-xml" } } { $slide "Differences between Factor and Lisp" diff --git a/webapps/webapps/mason/backend/watchdog/watchdog.factor b/webapps/webapps/mason/backend/watchdog/watchdog.factor index 958be16ef9..5dc7d46bb6 100644 --- a/webapps/webapps/mason/backend/watchdog/watchdog.factor +++ b/webapps/webapps/mason/backend/watchdog/watchdog.factor @@ -5,8 +5,8 @@ mason.email webapps.mason.backend ; IN: webapps.mason.backend.watchdog : crashed-builder-body ( crashed-builders -- string content-type ) - [ os/cpu XML[[
  • <->
  • XML]] ] map - <-> ]] ] map + XML-DOC[[

    Machines which are not sending heartbeats:

    @@ -14,7 +14,7 @@ IN: webapps.mason.backend.watchdog Dashboard - XML> xml>string + ]] xml>string "text/html" ; : s ( n before after -- string ) diff --git a/webapps/webapps/mason/dashboard/dashboard.factor b/webapps/webapps/mason/dashboard/dashboard.factor index c508f63384..fb18b6fc19 100644 --- a/webapps/webapps/mason/dashboard/dashboard.factor +++ b/webapps/webapps/mason/dashboard/dashboard.factor @@ -6,10 +6,10 @@ webapps.mason.utils ; IN: webapps.mason.downloads CONSTANT: CRASHED -XML[[ CRASHED XML]] +XML-CHUNK[[ CRASHED ]] CONSTANT: BROKEN -XML[[ BROKEN XML]] +XML-CHUNK[[ BROKEN ]] : builder-status ( builder -- status/f ) { @@ -22,10 +22,10 @@ XML[[ BROKEN XML]] [ os/cpu ] sort-with [ [ report-url ] [ os/cpu ] [ builder-status ] tri - XML[[
  • ><-> <->
  • XML]] + XML-CHUNK[[
  • ><-> <->
  • ]] ] map - [ XML[[

    No machines.

    XML]] ] - [ XML[[
      <->
    XML]] ] + [ XML-CHUNK[[

    No machines.

    ]] ] + [ XML-CHUNK[[
      <->
    ]] ] if-empty ; : ( -- action ) diff --git a/webapps/webapps/mason/grids/grids.factor b/webapps/webapps/mason/grids/grids.factor index 849536c32b..1fec58ed61 100644 --- a/webapps/webapps/mason/grids/grids.factor +++ b/webapps/webapps/mason/grids/grids.factor @@ -9,8 +9,8 @@ IN: webapps.mason.grids : render-grid-cell ( cpu os quot -- xml ) call( cpu os -- url label ) 2dup and - [ link XML[[
    <->
    XML]] ] - [ 2drop XML[[ XML]] ] + [ link XML-CHUNK[[
    <->
    ]] ] + [ 2drop XML-CHUNK[[ ]] ] if ; CONSTANT: oses @@ -27,21 +27,21 @@ CONSTANT: cpus } : render-grid-header ( -- xml ) - oses values [ XML[[ <-> XML]] ] map ; + oses values [ XML-CHUNK[[ <-> ]] ] map ; :: render-grid-row ( cpu quot -- xml ) cpu second oses keys |[ os | cpu os quot render-grid-cell ] map - XML[[ <-><-> XML]] ; + XML-CHUNK[[ <-><-> ]] ; :: render-grid ( quot -- xml ) render-grid-header cpus [ quot render-grid-row ] map - XML[[ + XML-CHUNK[[ <-> <->
    OS/CPU
    - XML]] ; + ]] ; : package-date ( filename -- date ) "." split1 drop 16 tail* 6 head* ; diff --git a/webapps/webapps/mason/package/package.factor b/webapps/webapps/mason/package/package.factor index bc4860b0f9..05a8c07732 100644 --- a/webapps/webapps/mason/package/package.factor +++ b/webapps/webapps/mason/package/package.factor @@ -9,7 +9,7 @@ IN: webapps.mason.package : building ( builder string -- xml ) swap current-git-id>> git-link - XML[[ <-> for <-> XML]] ; + XML-CHUNK[[ <-> for <-> ]] ; : status-string ( builder -- string ) dup status>> { diff --git a/webapps/webapps/mason/report/report.factor b/webapps/webapps/mason/report/report.factor index e45521116b..35bd00b287 100644 --- a/webapps/webapps/mason/report/report.factor +++ b/webapps/webapps/mason/report/report.factor @@ -20,4 +20,4 @@ IN: webapps.mason.report [ URL" report" ] dip [ os>> "os" set-query-param ] [ cpu>> "cpu" set-query-param ] bi - XML[[ >Latest build report XML]] ; + XML-CHUNK[[ >Latest build report ]] ; diff --git a/webapps/webapps/mason/utils/utils.factor b/webapps/webapps/mason/utils/utils.factor index b849f4e03c..a4b6dadcee 100644 --- a/webapps/webapps/mason/utils/utils.factor +++ b/webapps/webapps/mason/utils/utils.factor @@ -7,7 +7,7 @@ webapps.mason.version.data xml.syntax ; IN: webapps.mason.utils : link ( url label -- xml ) - XML[[ ><-> XML]] ; + XML-CHUNK[[ ><-> ]] ; : validate-os/cpu ( -- ) { @@ -35,7 +35,7 @@ IN: webapps.mason.utils ? ] [ drop f ] if ] bi - 2array sift [ XML[[
  • <->
  • XML]] ] map XML[[
      <->
    XML]] ; + 2array sift [ XML-CHUNK[[
  • <->
  • ]] ] map XML-CHUNK[[
      <->
    ]] ; : download-url ( string -- string' ) "http://downloads.factorcode.org/" prepend ;