]> gitweb.factorcode.org Git - factor.git/commitdiff
parsed -> suffix!, add append!
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 28 Oct 2009 18:38:27 +0000 (13:38 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 28 Oct 2009 18:38:27 +0000 (13:38 -0500)
52 files changed:
basis/alien/fortran/fortran.factor
basis/alien/syntax/syntax.factor
basis/byte-arrays/hex/hex.factor
basis/classes/struct/struct.factor
basis/cocoa/cocoa.factor
basis/colors/constants/constants.factor
basis/compiler/cfg/registers/registers.factor
basis/cpu/ppc/linux/bootstrap.factor
basis/cpu/ppc/macosx/bootstrap.factor
basis/cpu/x86/32/bootstrap.factor
basis/cpu/x86/64/bootstrap.factor
basis/cpu/x86/64/unix/bootstrap.factor
basis/cpu/x86/64/winnt/bootstrap.factor
basis/cpu/x86/bootstrap.factor
basis/functors/functors.factor
basis/html/templates/fhtml/fhtml.factor
basis/io/encodings/iso2022/iso2022.factor
basis/locals/locals.factor
basis/math/rectangles/rectangles.factor
basis/multiline/multiline.factor
basis/opengl/debug/debug.factor
basis/peg/ebnf/ebnf.factor
basis/persistent/hashtables/config/config.factor
basis/prettyprint/prettyprint-docs.factor
basis/regexp/regexp.factor
basis/roman/roman.factor
basis/serialize/serialize-tests.factor
basis/shuffle/shuffle.factor
basis/specialized-arrays/specialized-arrays.factor
basis/tools/test/test.factor
basis/tools/walker/walker.factor
basis/urls/urls.factor
basis/values/values.factor
basis/windows/com/syntax/syntax.factor
basis/xml/syntax/syntax.factor
core/parser/parser-docs.factor
core/parser/parser.factor
core/sequences/sequences.factor
core/syntax/syntax.factor
extra/alien/data/map/map.factor
extra/annotations/annotations.factor
extra/db/info/info.factor
extra/decimals/decimals.factor
extra/infix/infix.factor
extra/llvm/types/types.factor
extra/money/money.factor
extra/morse/morse.factor
extra/pair-rocket/pair-rocket.factor
extra/persistency/persistency.factor
extra/qw/qw.factor
extra/slides/slides.factor
unmaintained/advice/advice.factor

index bf8721b549497b43eee9b977724f1979ce9aba43..caa3b7a1154482a45467ebd76d4738c1002ea898 100644 (file)
@@ -205,9 +205,6 @@ M: fortran-type (fortran-ret-type>c-type) (fortran-type>c-type) ;
 M: real-type (fortran-ret-type>c-type)
     drop real-functions-return-double? [ "double" ] [ "float" ] if ;
 
-: suffix! ( seq   elt   -- seq   ) over push     ; inline
-: append! ( seq-a seq-b -- seq-a ) over push-all ; inline
-
 GENERIC: (fortran-arg>c-args) ( type -- main-quot added-quot )
 
 : args?dims ( type quot -- main-quot added-quot )
index 7adf837841675d02a141ccc1e6386a5a36115a4a..c51a446b6ce7c5e056d8d37e5bad69fbd39a79d1 100644 (file)
@@ -7,11 +7,11 @@ effects assocs combinators lexer strings.parser alien.parser
 fry vocabs.parser words.constant alien.libraries ;
 IN: alien.syntax
 
-SYNTAX: DLL" lexer get skip-blank parse-string dlopen parsed ;
+SYNTAX: DLL" lexer get skip-blank parse-string dlopen suffix! ;
 
-SYNTAX: ALIEN: 16 scan-base <alien> parsed ;
+SYNTAX: ALIEN: 16 scan-base <alien> suffix! ;
 
-SYNTAX: BAD-ALIEN <bad-alien> parsed ;
+SYNTAX: BAD-ALIEN <bad-alien> suffix! ;
 
 SYNTAX: LIBRARY: scan "c-library" set ;
 
index 5c381b7db0a07253de2d4d5367d102d5fcfb945e..ae9b9c8ba21f11ee60bc9ebfe2266dce25b6c444 100644 (file)
@@ -7,4 +7,4 @@ SYNTAX: HEX{
     "}" parse-tokens "" join
     [ blank? not ] filter
     2 group [ hex> ] B{ } map-as
-    parsed ;
+    suffix! ;
index af23834383ea7f02d200163943f51835059d1125..417f188c3ce9eda249ba44898043382ce3b2b54f 100755 (executable)
@@ -365,10 +365,10 @@ SYNTAX: UNION-STRUCT:
     parse-struct-definition define-union-struct-class ;
 
 SYNTAX: S{
-    scan-word dup struct-slots parse-tuple-literal-slots parsed ;
+    scan-word dup struct-slots parse-tuple-literal-slots suffix! ;
 
 SYNTAX: S@
-    scan-word scan-object swap memory>struct parsed ;
+    scan-word scan-object swap memory>struct suffix! ;
 
 ! functor support
 
@@ -389,7 +389,7 @@ SYNTAX: S@
 PRIVATE>
 
 FUNCTOR-SYNTAX: STRUCT:
-    scan-param parsed
+    scan-param suffix!
     [ 8 <vector> ] over push-all
     [ parse-struct-slots` ] [ ] while
     [ >array define-struct-class ] over push-all ;
index ec5db31940158b406c2c741b7081d7255afaba1f..ec09f8f2ba3108a017b52b017eae01f1c146544d 100644 (file)
@@ -14,14 +14,14 @@ SYMBOL: sent-messages
 : remember-send ( selector -- )
     sent-messages (remember-send) ;
 
-SYNTAX: -> scan dup remember-send parsed \ send parsed ;
+SYNTAX: -> scan dup remember-send suffix! \ send suffix! ;
 
 SYMBOL: super-sent-messages
 
 : remember-super-send ( selector -- )
     super-sent-messages (remember-send) ;
 
-SYNTAX: SUPER-> scan dup remember-super-send parsed \ super-send parsed ;
+SYNTAX: SUPER-> scan dup remember-super-send suffix! \ super-send suffix! ;
 
 SYMBOL: frameworks
 
index 8598fc06636c04c24b325bb24096e7b3c685f2e3..c17d1069b27533263a456e06c4d69c47d27781df 100644 (file)
@@ -30,4 +30,4 @@ ERROR: no-such-color name ;
 : named-color ( name -- color )
     dup colors at [ ] [ no-such-color ] ?if ;
 
-SYNTAX: COLOR: scan named-color parsed ;
\ No newline at end of file
+SYNTAX: COLOR: scan named-color suffix! ;
index 0d518735afb337dcd004acca4a297ebc9b5e4f79..2f4f2a99e69be5735c423c0b1b048fd672b48e5a 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors namespaces kernel parser assocs ;
+USING: accessors namespaces kernel parser assocs sequences ;
 IN: compiler.cfg.registers
 
 ! Virtual registers, used by CFG and machine IRs, are just integers
@@ -42,5 +42,5 @@ C: <ds-loc> ds-loc
 TUPLE: rs-loc < loc ;
 C: <rs-loc> rs-loc
 
-SYNTAX: D scan-word <ds-loc> parsed ;
-SYNTAX: R scan-word <rs-loc> parsed ;
+SYNTAX: D scan-word <ds-loc> suffix! ;
+SYNTAX: R scan-word <rs-loc> suffix! ;
index cf6517b664739cb052ef723481ba0228bb5f5630..a5250414ab22dbb7abd63ca75ff43e219f2d316e 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: parser layouts system kernel ;
+USING: parser layouts system kernel sequences ;
 IN: bootstrap.ppc
 
 : c-area-size ( -- n ) 10 bootstrap-cells ;
 : lr-save ( -- n ) bootstrap-cell ;
 
-<< "vocab:cpu/ppc/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/ppc/bootstrap.factor" parse-file suffix! >>
 call
index 0c383c2fb08f77c04665d7f7ccac9c4374a4687f..2aa0ddc4a27f4ec8e5e392e5442add49aea30531 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: parser layouts system kernel ;
+USING: parser layouts system kernel sequences ;
 IN: bootstrap.ppc
 
 : c-area-size ( -- n ) 14 bootstrap-cells ;
 : lr-save ( -- n ) 2 bootstrap-cells ;
 
-<< "vocab:cpu/ppc/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/ppc/bootstrap.factor" parse-file suffix! >>
 call
index c5f6975d33b7a731ff655bdc8ed0d6a3f655e5fe..e532d42dfed06d6a35f4544e6a1b3d2aa56eb08a 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: bootstrap.image.private kernel namespaces system
 cpu.x86.assembler cpu.x86.assembler.operands layouts
-vocabs parser compiler.constants ;
+vocabs parser compiler.constants sequences ;
 IN: bootstrap.x86
 
 4 \ cell set
@@ -35,5 +35,5 @@ IN: bootstrap.x86
     0 JMP rc-relative rt-primitive jit-rel
 ] jit-primitive jit-define
 
-<< "vocab:cpu/x86/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/x86/bootstrap.factor" parse-file suffix! >>
 call
index b42a38b2d2d6feb513b96537361654726758c61c..662eaed3e08cb32d2fc96c82ae4befe73829454e 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: bootstrap.image.private kernel namespaces system
 layouts vocabs parser compiler.constants math
-cpu.x86.assembler cpu.x86.assembler.operands ;
+cpu.x86.assembler cpu.x86.assembler.operands sequences ;
 IN: bootstrap.x86
 
 8 \ cell set
@@ -35,5 +35,5 @@ IN: bootstrap.x86
     temp1 JMP
 ] jit-primitive jit-define
 
-<< "vocab:cpu/x86/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/x86/bootstrap.factor" parse-file suffix! >>
 call
index 2ad3a721af0ae082cecb906161b4c22c30e993aa..238fad984a86420115d186df8433a648f64c05e4 100644 (file)
@@ -1,12 +1,13 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: bootstrap.image.private kernel namespaces system
-cpu.x86.assembler cpu.x86.assembler.operands layouts vocabs parser ;
+USING: bootstrap.image.private cpu.x86.assembler
+cpu.x86.assembler.operands kernel layouts namespaces parser
+sequences system vocabs ;
 IN: bootstrap.x86
 
 : stack-frame-size ( -- n ) 4 bootstrap-cells ;
 : arg1 ( -- reg ) RDI ;
 : arg2 ( -- reg ) RSI ;
 
-<< "vocab:cpu/x86/64/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/x86/64/bootstrap.factor" parse-file suffix! >>
 call
index 2dd3e889a554abc9392aaaeaa771df520084177c..723c9baf378f1b236124c5b53750f57b2038f961 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: bootstrap.image.private kernel namespaces system
-layouts vocabs parser cpu.x86.assembler
+layouts vocabs sequences cpu.x86.assembler
 cpu.x86.assembler.operands ;
 IN: bootstrap.x86
 
@@ -9,5 +9,5 @@ IN: bootstrap.x86
 : arg1 ( -- reg ) RCX ;
 : arg2 ( -- reg ) RDX ;
 
-<< "vocab:cpu/x86/64/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/x86/64/bootstrap.factor" parse-file suffix! >>
 call
index fb94445f780bac9944012a3dc906111cbe67eb7c..79309701933bc2401ab9cd520ce99f4d9ed14eaf 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2007, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: bootstrap.image.private kernel kernel.private namespaces system
-layouts compiler.units math math.private compiler.constants vocabs
-slots.private words locals.backend make sequences combinators arrays
- cpu.x86.assembler cpu.x86.assembler.operands ;
+USING: bootstrap.image.private compiler.constants
+compiler.units cpu.x86.assembler cpu.x86.assembler.operands
+kernel kernel.private layouts locals.backend make math
+math.private namespaces sequences slots.private vocabs ;
 IN: bootstrap.x86
 
 big-endian off
index dacd87507bd66b760c25b254d5105746e31f1fcb..1d11d78b33f90045f4a1235ac50975f86030a63c 100644 (file)
@@ -42,85 +42,85 @@ M: fake-call-next-method (fake-quotations>)
 M: object (fake-quotations>) , ;
 
 : parse-definition* ( accum -- accum )
-    parse-definition >fake-quotations parsed
+    parse-definition >fake-quotations suffix!
     [ fake-quotations> first ] over push-all ;
 
 : parse-declared* ( accum -- accum )
     complete-effect
     [ parse-definition* ] dip
-    parsed ;
+    suffix! ;
 
 FUNCTOR-SYNTAX: TUPLE:
-    scan-param parsed
+    scan-param suffix!
     scan {
-        { ";" [ tuple parsed f parsed ] }
-        { "<" [ scan-param parsed [ parse-tuple-slots ] { } make parsed ] }
+        { ";" [ tuple suffix! f suffix! ] }
+        { "<" [ scan-param suffix! [ parse-tuple-slots ] { } make suffix! ] }
         [
-            [ tuple parsed ] dip
+            [ tuple suffix! ] dip
             [ parse-slot-name [ parse-tuple-slots ] when ] { }
-            make parsed
+            make suffix!
         ]
     } case
-    \ define-tuple-class parsed ;
+    \ define-tuple-class suffix! ;
 
 FUNCTOR-SYNTAX: SINGLETON:
-    scan-param parsed
-    \ define-singleton-class parsed ;
+    scan-param suffix!
+    \ define-singleton-class suffix! ;
 
 FUNCTOR-SYNTAX: MIXIN:
-    scan-param parsed
-    \ define-mixin-class parsed ;
+    scan-param suffix!
+    \ define-mixin-class suffix! ;
 
 FUNCTOR-SYNTAX: M:
-    scan-param parsed
-    scan-param parsed
+    scan-param suffix!
+    scan-param suffix!
     [ create-method-in dup method-body set ] over push-all
     parse-definition*
-    \ define* parsed ;
+    \ define* suffix! ;
 
 FUNCTOR-SYNTAX: C:
-    scan-param parsed
-    scan-param parsed
+    scan-param suffix!
+    scan-param suffix!
     complete-effect
-    [ [ [ boa ] curry ] over push-all ] dip parsed
-    \ define-declared* parsed ;
+    [ [ [ boa ] curry ] over push-all ] dip suffix!
+    \ define-declared* suffix! ;
 
 FUNCTOR-SYNTAX: :
-    scan-param parsed
+    scan-param suffix!
     parse-declared*
-    \ define-declared* parsed ;
+    \ define-declared* suffix! ;
 
 FUNCTOR-SYNTAX: SYMBOL:
-    scan-param parsed
-    \ define-symbol parsed ;
+    scan-param suffix!
+    \ define-symbol suffix! ;
 
 FUNCTOR-SYNTAX: SYNTAX:
-    scan-param parsed
+    scan-param suffix!
     parse-definition*
-    \ define-syntax parsed ;
+    \ define-syntax suffix! ;
 
 FUNCTOR-SYNTAX: INSTANCE:
-    scan-param parsed
-    scan-param parsed
-    \ add-mixin-instance parsed ;
+    scan-param suffix!
+    scan-param suffix!
+    \ add-mixin-instance suffix! ;
 
 FUNCTOR-SYNTAX: GENERIC:
-    scan-param parsed
-    complete-effect parsed
-    \ define-simple-generic* parsed ;
+    scan-param suffix!
+    complete-effect suffix!
+    \ define-simple-generic* suffix! ;
 
 FUNCTOR-SYNTAX: MACRO:
-    scan-param parsed
+    scan-param suffix!
     parse-declared*
-    \ define-macro parsed ;
+    \ define-macro suffix! ;
 
 FUNCTOR-SYNTAX: inline [ word make-inline ] over push-all ;
 
-FUNCTOR-SYNTAX: call-next-method T{ fake-call-next-method } parsed ;
+FUNCTOR-SYNTAX: call-next-method T{ fake-call-next-method } suffix! ;
 
 : (INTERPOLATE) ( accum quot -- accum )
     [ scan interpolate-locals ] dip
-    '[ _ with-string-writer @ ] parsed ;
+    '[ _ with-string-writer @ ] suffix! ;
 
 PRIVATE>
 
index a98a21f177c2ca6ebdbaa4daf3e89a201220bec3..d4cb484a7919821c4615efe68216ca2f14a857d6 100644 (file)
@@ -31,14 +31,14 @@ DEFER: <% delimiter
 : found-<% ( accum lexer col -- accum )
     [
         over line-text>>
-        [ column>> ] 2dip subseq parsed
-        \ write parsed
+        [ column>> ] 2dip subseq suffix!
+        \ write suffix!
     ] 2keep 2 + >>column drop ;
 
 : still-looking ( accum lexer -- accum )
     [
         [ line-text>> ] [ column>> ] bi tail
-        parsed \ print parsed
+        suffix! \ print suffix!
     ] keep next-line ;
 
 : parse-%> ( accum lexer -- accum )
index a057df28e0aa2a0b90e60b2fba0b1568b4fbafe4..17264267777486fc000ae91e6d7bd5daa0e7744b 100644 (file)
@@ -31,7 +31,7 @@ M: iso2022 <encoder>
 M: iso2022 <decoder>
     make-iso-coder <decoder> ;
 
-<< SYNTAX: ESC HEX: 16 parsed ; >>
+<< SYNTAX: ESC HEX: 16 suffix! ; >>
 
 CONSTANT: switch-ascii B{ ESC CHAR: ( CHAR: B }
 CONSTANT: switch-jis201 B{ ESC CHAR: ( CHAR: J }
index 9e26a8caaa413c143e06563021286e57412b58de..4f908aaf066200a41b27ecdda17d514669000080 100644 (file)
@@ -7,7 +7,7 @@ IN: locals
 
 SYNTAX: :>
     scan locals get [ :>-outside-lambda-error ] unless*
-    [ make-local ] bind <def> parsed ;
+    [ make-local ] bind <def> suffix! ;
 
 SYNTAX: [| parse-lambda over push-all ;
 
index c8569dfdb9a12d02af8667a9d295c8bbf0471ba3..bfde3918841d1e2375f5bbade28e2d9edc940bdd 100644 (file)
@@ -8,7 +8,7 @@ TUPLE: rect { loc initial: { 0 0 } } { dim initial: { 0 0 } } ;
 
 : <rect> ( loc dim -- rect ) rect boa ; inline
 
-SYNTAX: RECT: scan-object scan-object <rect> parsed ;
+SYNTAX: RECT: scan-object scan-object <rect> suffix! ;
 
 : <zero-rect> ( -- rect ) rect new ; inline
 
@@ -64,4 +64,4 @@ M: rect contains-point?
 
 USING: vocabs vocabs.loader ;
 
-"prettyprint" vocab [ "math.rectangles.prettyprint" require ] when
\ No newline at end of file
+"prettyprint" vocab [ "math.rectangles.prettyprint" require ] when
index e28537066bac43893e270734b744e30563ae972e..5182c33e599bba3853324109e8d53a63dfaaf8c5 100644 (file)
@@ -81,10 +81,10 @@ SYNTAX: HEREDOC:
     lexer get skip-blank
     rest-of-line
     lexer get next-line
-    parse-til-line-begins parsed ;
+    parse-til-line-begins suffix! ;
 
 SYNTAX: DELIMITED:
     lexer get skip-blank
     rest-of-line
     lexer get next-line
-    0 (parse-multiline-string) parsed ;
+    0 (parse-multiline-string) suffix! ;
index 7cbdf623462fe1d66b8d2aa50ba6f034da4bc2dc..cd0985b1b03fe0bd9c32b1e3e7917d5af9025ab9 100644 (file)
@@ -19,5 +19,5 @@ SYMBOL: G-world
 << \ gl-break t "break?" set-word-prop >>
 
 SYNTAX: GB
-    \ gl-break parsed ;
+    \ gl-break suffix! ;
 
index 136007e7ce01114371181ff21cb133a346e88805..a7fd07a5ecb0abc47899447ec30f157c3a0adf04 100644 (file)
@@ -547,12 +547,12 @@ PRIVATE>
 SYNTAX: <EBNF\r
   "EBNF>"\r
   reset-tokenizer parse-multiline-string parse-ebnf main swap at  \r
-  parsed reset-tokenizer ;\r
+  suffix! reset-tokenizer ;\r
 \r
 SYNTAX: [EBNF\r
   "EBNF]"\r
   reset-tokenizer parse-multiline-string ebnf>quot nip \r
-  parsed \ call parsed reset-tokenizer ;\r
+  suffix! \ call suffix! reset-tokenizer ;\r
 \r
 SYNTAX: EBNF: \r
   reset-tokenizer CREATE-WORD dup ";EBNF" parse-multiline-string  \r
index cb2abd801568773df3bcb066be453b4ef2d678dc..190db9e9ab88d0342c3661ee61e4f6f16d2bd527 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: layouts kernel parser math ;
+USING: layouts kernel parser math sequences ;
 IN: persistent.hashtables.config
 
-: radix-bits ( -- n ) << cell 4 = 4 5 ? parsed >> ; foldable
+: radix-bits ( -- n ) << cell 4 = 4 5 ? suffix! >> ; foldable
 : radix-mask ( -- n ) radix-bits 2^ 1 - ; foldable
 : full-bitmap-mask ( -- n ) radix-bits 2^ 2^ 1 - ; inline
index e17e14f323d24b25552124e439ffb2a1196cd2e8..bd2c4bd924d9dffd0546952f07a6c95436e5812a 100644 (file)
@@ -121,7 +121,7 @@ ARTICLE: "prettyprint-literal" "Literal prettyprinting protocol"
     "    scan-word \\ * assert="
     "    scan-word"
     "    scan-word \\ ] assert="
-    "    <rect> parsed ;"
+    "    <rect> suffix! ;"
 }
 "An example literal might be:"
 { $code "RECT[ 100 * 200 ]" }
index ba4aa47e7b87f7dcd26ff157cc5b86d4ff25501c..e9a86516cacda4de84ae629e9e30903bccb219aa 100644 (file)
@@ -200,7 +200,7 @@ PRIVATE>
 
 : parsing-regexp ( accum end -- accum )
     lexer get [ take-until ] [ parse-noblank-token ] bi
-    <optioned-regexp> compile-next-match parsed ;
+    <optioned-regexp> compile-next-match suffix! ;
 
 PRIVATE>
 
index 817b6637d6ea4a8fbdb2e3eff3bc2c8bb1a2c9d5..bc86db31c6444399493858c62f4ae219cc0563e5 100644 (file)
@@ -69,4 +69,4 @@ ROMAN-OP: *
 ROMAN-OP: /i
 ROMAN-OP: /mod
 
-SYNTAX: ROMAN: scan roman> parsed ;
+SYNTAX: ROMAN: scan roman> suffix! ;
index cebf69595f523ff91b61c90d186cbed939e8330b..6dbc76386d1c4824f9546d3203d041a88e1cdec0 100644 (file)
@@ -50,7 +50,7 @@ CONSTANT: objects
         B{ 50 13 55 64 1 }
         ?{ t f t f f t f }
         double-array{ 1.0 3.0 4.0 1.0 2.35 0.33 }
-        << 1 [ 2 ] curry parsed >>
+        << 1 [ 2 ] curry suffix! >>
         { { "a" "bc" } { "de" "fg" } }
         H{ { "a" "bc" } { "de" "fg" } }
     }
index d6a4ba8bbbfad58715825ca05269955eaeabad45..079e81d082236dcecfb9a896b2bcacbbc5184f99 100644 (file)
@@ -20,7 +20,7 @@ MACRO: shuffle-effect ( effect -- )
     ] [ ] make ;
 
 SYNTAX: shuffle(
-    ")" parse-effect parsed \ shuffle-effect parsed ;
+    ")" parse-effect suffix! \ shuffle-effect suffix! ;
 
 : 2swap ( x y z t -- z t x y ) 2 2 mnswap ; inline
 
index 7a15e5067da94fc5f1570b574e3ff2405c3a8a07..711354d8034970a2120dd6780b8b6bccafa7b29b 100755 (executable)
@@ -105,7 +105,7 @@ M: A pprint-delims drop \ A{ \ } ;
 M: A >pprint-sequence ;
 
 SYNTAX: A{ \ } [ >A ] parse-literal ;
-SYNTAX: A@ scan-object scan-object <direct-A> parsed ;
+SYNTAX: A@ scan-object scan-object <direct-A> suffix! ;
 
 INSTANCE: A specialized-array
 
index 097460837bfa5f83210835436c4fe66fd756512c..009789a739aba4561725934c46a636741fb9fac5 100644 (file)
@@ -96,9 +96,9 @@ MACRO: <experiment> ( word -- )
     ] [ drop ] if ; inline
 
 : parse-test ( accum word -- accum )
-    literalize parsed
-    lexer get line>> parsed
-    \ experiment parsed ; inline
+    literalize suffix!
+    lexer get line>> suffix!
+    \ experiment suffix! ; inline
 
 <<
 
index 19924d67e43e650a3555329da3990e4412d51d3e..35a9ce7787e831f99acdabced598c16a654328b0 100644 (file)
@@ -167,4 +167,4 @@ SYMBOL: +stopped+
 ! For convenience
 IN: syntax
 
-SYNTAX: B \ break parsed ;
+SYNTAX: B \ break suffix! ;
index a72fac567a28b0f532e786f78583da339ffc228c..bf4a9bb76c9d6cd83cd1c3bf815fa333468fa737 100644 (file)
@@ -181,7 +181,7 @@ PRIVATE>
     clone dup protocol>> '[ _ protocol-port or ] change-port ;
 
 ! Literal syntax
-SYNTAX: URL" lexer get skip-blank parse-string >url parsed ;
+SYNTAX: URL" lexer get skip-blank parse-string >url suffix! ;
 
 USING: vocabs vocabs.loader ;
 
index b15dcebe491ea0d76494815433a76c1651360e17..4329affe82b33ec342ec5127a54ab458d5b56b61 100644 (file)
@@ -44,8 +44,8 @@ M: value-word definition drop f ;
     def>> first (>>obj) ;
 
 SYNTAX: to:
-    scan-word literalize parsed
-    \ set-value parsed ;
+    scan-word literalize suffix!
+    \ set-value suffix! ;
 
 : get-value ( word -- value )
     def>> first obj>> ;
index bbade332cc0d77fc22348ba6fa3445187779e880..fc7d986cbc63ccc4a15707b4ca41951e1d0789e1 100755 (executable)
@@ -101,7 +101,7 @@ SYNTAX: COM-INTERFACE:
     dup save-com-interface-definition
     define-words-for-com-interface ;
 
-SYNTAX: GUID: scan string>guid parsed ;
+SYNTAX: GUID: scan string>guid suffix! ;
 
 USING: vocabs vocabs.loader ;
 
index 5b2a0bcfb4d3dc2223dd82117cda190c497a83a5..4b9900d3b0c4acc18750b4ed22748be505c3ab38 100644 (file)
@@ -156,16 +156,16 @@ MACRO: interpolate-xml ( xml -- quot )
 : collect ( accum variables -- accum ? )
     {
         { [ dup empty? ] [ drop f ] } ! Just a literal
-        { [ dup [ ] all? ] [ >search-hash parsed t ] } ! locals
-        { [ dup [ not ] all? ] [ length parsed \ nenum parsed t ] } ! fry
+        { [ dup [ ] all? ] [ >search-hash suffix! t ] } ! locals
+        { [ dup [ not ] all? ] [ length suffix! \ nenum suffix! t ] } ! fry
         [ drop "XML interpolation contains both fry and locals" throw ] ! mixed
     } cond ;
 
 : parse-def ( accum delimiter quot -- accum )
     [ parse-multiline-string [ blank? ] trim ] dip call
     [ extract-variables collect ] keep swap
-    [ number<-> parsed ] dip
-    [ \ interpolate-xml parsed ] when ; inline
+    [ number<-> suffix! ] dip
+    [ \ interpolate-xml suffix! ] when ; inline
 
 PRIVATE>
 
index 888f9f3b4cf9a81576794cd598e028b10e199431..844581c6d98ae07b7f06350456962aa50b8a7cf0 100644 (file)
@@ -66,7 +66,7 @@ $nl
 $nl
 "Parsing words can read input, add word definitions to the dictionary, and do anything an ordinary word can."
 $nl
-"Because of the stack restriction, parsing words cannot pass data to other words by leaving values on the stack; instead, use " { $link parsed } " to add the data to the parse tree so that it can be evaluated later."
+"Because of the stack restriction, parsing words cannot pass data to other words by leaving values on the stack; instead, use " { $link suffix! } " to add the data to the parse tree so that it can be evaluated later."
 $nl
 "Parsing words cannot be called from the same source file where they are defined, because new definitions are only compiled at the end of the source file. An attempt to use a parsing word in its own source file raises an error:"
 { $subsections staging-violation }
@@ -172,11 +172,6 @@ $parsing-note ;
 
 { parse-tokens (parse-until) parse-until } related-words
 
-HELP: parsed
-{ $values { "accum" vector } { "obj" object } }
-{ $description "Convenience word for parsing words. It behaves exactly the same as " { $link push } ", except the accumulator remains on the stack." }
-$parsing-note ;
-
 HELP: (parse-lines)
 { $values { "lexer" lexer } { "quot" "a new " { $link quotation } } }
 { $description "Parses Factor source code using a custom lexer. The vocabulary search path is taken from the current scope." }
index 3152afc0933855b698c18957e220b2b14611474f..d920e1fc734767adfc95c518d4688a8c59478fd8 100644 (file)
@@ -79,8 +79,6 @@ HOOK: parse-quotation quotation-parser ( -- quot )
 
 M: f parse-quotation \ ] parse-until >quotation ;
 
-: parsed ( accum obj -- accum ) over push ;
-
 : (parse-lines) ( lexer -- quot )
     [ f parse-until >quotation ] with-lexer ;
 
@@ -88,7 +86,7 @@ M: f parse-quotation \ ] parse-until >quotation ;
     lexer-factory get call( lines -- lexer ) (parse-lines) ;
 
 : parse-literal ( accum end quot -- accum )
-    [ parse-until ] dip call parsed ; inline
+    [ parse-until ] dip call suffix! ; inline
 
 : parse-definition ( -- quot )
     \ ; parse-until >quotation ;
@@ -104,7 +102,7 @@ ERROR: bad-number ;
     scan swap base> [ bad-number ] unless* ;
 
 : parse-base ( parsed base -- parsed )
-    scan-base parsed ;
+    scan-base suffix! ;
 
 SYMBOL: bootstrap-syntax
 
index c74a7c3ad0a3d3010895f318d16ebc7c9ced224d..6a40e2236b9fafbf817c7fa08e55ffd01d2f9c52 100755 (executable)
@@ -650,6 +650,10 @@ PRIVATE>
         [ 0 swap copy ] keep
     ] new-like ;
 
+: suffix! ( seq elt -- seq ) over push ;
+
+: append! ( seq1 seq2 -- seq1 ) over push-all ;
+
 : last ( seq -- elt ) [ length 1 - ] [ nth ] bi ;
 
 : set-last ( elt seq -- ) [ length 1 - ] keep set-nth ;
index 80c7a42f30534d32a933ac01c02246072282d457..dfb3e0bc1054b93e981a7770b0bdfb462b56e615 100644 (file)
@@ -73,9 +73,9 @@ IN: bootstrap.syntax
     "OCT:" [ 8 parse-base ] define-core-syntax
     "BIN:" [ 2 parse-base ] define-core-syntax
 
-    "NAN:" [ 16 scan-base <fp-nan> parsed ] define-core-syntax
+    "NAN:" [ 16 scan-base <fp-nan> suffix! ] define-core-syntax
 
-    "f" [ f parsed ] define-core-syntax
+    "f" [ f suffix! ] define-core-syntax
     "t" "syntax" lookup define-singleton-class
 
     "CHAR:" [
@@ -83,31 +83,31 @@ IN: bootstrap.syntax
             { [ dup length 1 = ] [ first ] }
             { [ "\\" ?head ] [ next-escape >string "" assert= ] }
             [ name>char-hook get call( name -- char ) ]
-        } cond parsed
+        } cond suffix!
     ] define-core-syntax
 
-    "\"" [ parse-multiline-string parsed ] define-core-syntax
+    "\"" [ parse-multiline-string suffix! ] define-core-syntax
 
     "SBUF\"" [
-        lexer get skip-blank parse-string >sbuf parsed
+        lexer get skip-blank parse-string >sbuf suffix!
     ] define-core-syntax
 
     "P\"" [
-        lexer get skip-blank parse-string <pathname> parsed
+        lexer get skip-blank parse-string <pathname> suffix!
     ] define-core-syntax
 
-    "[" [ parse-quotation parsed ] define-core-syntax
+    "[" [ parse-quotation suffix! ] define-core-syntax
     "{" [ \ } [ >array ] parse-literal ] define-core-syntax
     "V{" [ \ } [ >vector ] parse-literal ] define-core-syntax
     "B{" [ \ } [ >byte-array ] parse-literal ] define-core-syntax
     "BV{" [ \ } [ >byte-vector ] parse-literal ] define-core-syntax
     "H{" [ \ } [ >hashtable ] parse-literal ] define-core-syntax
-    "T{" [ parse-tuple-literal parsed ] define-core-syntax
+    "T{" [ parse-tuple-literal suffix! ] define-core-syntax
     "W{" [ \ } [ first <wrapper> ] parse-literal ] define-core-syntax
 
-    "POSTPONE:" [ scan-word parsed ] define-core-syntax
-    "\\" [ scan-word <wrapper> parsed ] define-core-syntax
-    "M\\" [ scan-word scan-word method <wrapper> parsed ] define-core-syntax
+    "POSTPONE:" [ scan-word suffix! ] define-core-syntax
+    "\\" [ scan-word <wrapper> suffix! ] define-core-syntax
+    "M\\" [ scan-word scan-word method <wrapper> suffix! ] define-core-syntax
     "inline" [ word make-inline ] define-core-syntax
     "recursive" [ word make-recursive ] define-core-syntax
     "foldable" [ word make-foldable ] define-core-syntax
@@ -227,7 +227,7 @@ IN: bootstrap.syntax
     ] define-core-syntax
 
     "((" [
-        "))" parse-effect parsed
+        "))" parse-effect suffix!
     ] define-core-syntax
 
     "MAIN:" [ scan-word current-vocab (>>main) ] define-core-syntax
@@ -240,8 +240,8 @@ IN: bootstrap.syntax
 
     "call-next-method" [
         current-method get [
-            literalize parsed
-            \ (call-next-method) parsed
+            literalize suffix!
+            \ (call-next-method) suffix!
         ] [
             not-in-a-method-error
         ] if*
index 62bd45938b96813d7d4265f3f398b6dd4964f856..6c93e8f4b633d400df3f52ce4cceb0704e010440 100644 (file)
@@ -118,14 +118,14 @@ MACRO: data-map! ( ins outs -- )
 
 : parse-data-map-effect ( accum -- accum )
     ")" parse-effect
-    [ in>>  [ (parse-c-type) ] map parsed ]
-    [ out>> [ (parse-c-type) ] map parsed ] bi ;
+    [ in>>  [ (parse-c-type) ] map suffix! ]
+    [ out>> [ (parse-c-type) ] map suffix! ] bi ;
 
 PRIVATE>
 
 SYNTAX: data-map(
-    parse-data-map-effect \ data-map parsed ;
+    parse-data-map-effect \ data-map suffix! ;
 
 SYNTAX: data-map!(
-    parse-data-map-effect \ data-map! parsed ;
+    parse-data-map-effect \ data-map! suffix! ;
 
index 387c73abe4807e0f2eb4ede82d245b91f4bf4ecf..e463206e4fee99be771bc19e54d7c8714aecd973 100644 (file)
@@ -7,7 +7,7 @@ IN: annotations
 <<
 
 : (parse-annotation) ( accum -- accum )
-    lexer get [ line-text>> parsed ] [ next-line ] bi ;
+    lexer get [ line-text>> suffix! ] [ next-line ] bi ;
 
 : (non-annotation-usage) ( word -- usages )
     smart-usage
@@ -24,7 +24,7 @@ NAMEs. DEFINES ${NAME}s.
 WHERE
 
 : (NAME) ( str -- ) drop ; inline
-SYNTAX: !NAME (parse-annotation) \ (NAME) parsed ;
+SYNTAX: !NAME (parse-annotation) \ (NAME) suffix! ;
 
 : NAMEs ( -- usages )
     \ (NAME) (non-annotation-usage) ;
index 66409f283418235db896f07ac2d742af75e52071..4d17b6bf10542182ad0ad3a03c5e4258a3bb522e 100644 (file)
@@ -10,6 +10,6 @@ SYNTAX: get-psql-info <postgresql-db> get-info 5 firstn
         [ >>username ]
         [ [ f ] [ ] if-empty >>password ]
         [ >>database ]
-    } spread parsed ;
+    } spread suffix! ;
 
-SYNTAX: get-sqlite-info get-info first <sqlite-db> parsed ;
\ No newline at end of file
+SYNTAX: get-sqlite-info get-info first <sqlite-db> suffix! ;
index ae1fb2f9a36c11dd8da1e2d88e27ba1fef690635..8ca9ea91c51e9f816afec21f60f10427d283b635 100644 (file)
@@ -20,7 +20,7 @@ TUPLE: decimal { mantissa read-only } { exponent read-only } ;
 
 : parse-decimal ( -- decimal ) scan string>decimal ;
 
-SYNTAX: D: parse-decimal parsed ;
+SYNTAX: D: parse-decimal suffix! ;
 
 : decimal>ratio ( decimal -- ratio ) >decimal< 10^ * ;
 : decimal>float ( decimal -- ratio ) decimal>ratio >float ;
index ce197800583f5f0231581d6425ddba57e5468172..4530d6c5c4f7b068be6f896823863743b6c8245c 100644 (file)
@@ -82,7 +82,7 @@ M: ast-function infix-codegen
 PRIVATE>
 
 SYNTAX: [infix
-    "infix]" [infix-parse parsed \ call parsed ;
+    "infix]" [infix-parse suffix! \ call suffix! ;
 
 <PRIVATE
 
index 426e464b1bff3640c1174dad6bae92cf226ab199..ddb54ecb2799e8b13d110494c268b4627902e585 100644 (file)
@@ -242,4 +242,4 @@ Program = Type
 
 ;EBNF
 
-SYNTAX: TYPE: ";" parse-multiline-string parse-type parsed ; 
\ No newline at end of file
+SYNTAX: TYPE: ";" parse-multiline-string parse-type suffix! ; 
index 36dedb2a653b92e2f661317f227a2a1256ce23f0..6cafeff2895f3a90d558bce921ac62bf67846607 100644 (file)
@@ -30,4 +30,4 @@ ERROR: not-an-integer x ;
     ] keep length
     10^ / + swap [ neg ] when ;
 
-SYNTAX: DECIMAL: scan parse-decimal parsed ;
+SYNTAX: DECIMAL: scan parse-decimal suffix! ;
index ddfd3c20424c98c5923d9c88db67a2bd63f68fcf..cbe3c0f2fad1dae09d95020188a957743648e5ff 100644 (file)
@@ -109,7 +109,7 @@ PRIVATE>
 : morse> ( morse -- plain )
     replace-underscores morse>sentence ;
 
-SYNTAX: [MORSE "MORSE]" parse-multiline-string morse> parsed ; 
+SYNTAX: [MORSE "MORSE]" parse-multiline-string morse> suffix! ; 
     
 <PRIVATE
     
index 3bd8a098f6a9e9496b8eb378153b62a1c41ae40e..299c66cc23fcd4503b3d17e76c0325adfdec3262 100644 (file)
@@ -2,5 +2,5 @@
 USING: arrays kernel parser sequences ;
 IN: pair-rocket
 
-SYNTAX: => dup pop scan-object 2array parsed ;
+SYNTAX: => dup pop scan-object 2array suffix! ;
 
index f459eca7e442bf4029fb4a52e9f6efbd1e6f1ad2..db999f4c988ab13ae31a67c6d7b1f6aa8fbbab11 100644 (file)
@@ -26,5 +26,5 @@ SYNTAX: STORED-TUPLE: parse-tuple-definition [ drop persistent ] dip [ remove-ty
 : remove-tuples ( tuple -- ) [ delete-tuples ] w/db ;
     
 TUPLE: pattern value ; C: <pattern> pattern
-SYNTAX: %" parse-string <pattern> parsed ;
+SYNTAX: %" parse-string <pattern> suffix! ;
 M: pattern where value>> over column-name>> 0% " LIKE " 0% bind# ;
index ce96587c92997e2b0187627d2d7baa1aa6f89803..e0ad6e0a749366a74c25aa727dc7435dcade21c6 100644 (file)
@@ -1,5 +1,5 @@
 ! (c)2009 Joe Groff bsd license
-USING: lexer parser ;
+USING: lexer sequences parser ;
 IN: qw
 
-SYNTAX: qw{ "}" parse-tokens parsed ;
+SYNTAX: qw{ "}" parse-tokens suffix! ;
index af37580ff268863b815b3beac23141b3751c9b9b..19b0dead484fc094396d936dae56544eac9b4747 100755 (executable)
@@ -99,7 +99,7 @@ TUPLE: slides < book ;
     ] with map ;
 
 SYNTAX: STRIP-TEASE:
-    parse-definition strip-tease [ parsed ] each ;
+    parse-definition strip-tease [ suffix! ] each ;
 
 \ slides H{
     { T{ button-down } [ request-focus ] }
index 44280456c1b275cbf28df13d9d59fd9cc129cef0..8e22609714a75a480cb5a81b59e65be546a0b315 100644 (file)
@@ -66,4 +66,4 @@ SYNTAX: ADVISE: ! word adname location => word adname quot loc
     scan-word scan scan-word parse-definition swap [ spin ] dip advise ;
     
 SYNTAX: UNADVISE:    
-    scan-word parsed \ unadvise parsed ;
+    scan-word suffix! \ unadvise suffix! ;