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 )
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 ;
"}" parse-tokens "" join
[ blank? not ] filter
2 group [ hex> ] B{ } map-as
- parsed ;
+ suffix! ;
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
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 ;
: 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
: 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! ;
! 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
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! ;
! 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
! 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
! 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
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
! 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
temp1 JMP
] jit-primitive jit-define
-<< "vocab:cpu/x86/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/x86/bootstrap.factor" parse-file suffix! >>
call
! 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
! 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
: 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
! 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
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>
: 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 )
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 }
SYNTAX: :>
scan locals get [ :>-outside-lambda-error ] unless*
- [ make-local ] bind <def> parsed ;
+ [ make-local ] bind <def> suffix! ;
SYNTAX: [| parse-lambda over push-all ;
: <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
USING: vocabs vocabs.loader ;
-"prettyprint" vocab [ "math.rectangles.prettyprint" require ] when
\ No newline at end of file
+"prettyprint" vocab [ "math.rectangles.prettyprint" require ] when
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! ;
<< \ gl-break t "break?" set-word-prop >>
SYNTAX: GB
- \ gl-break parsed ;
+ \ gl-break suffix! ;
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
! 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
" scan-word \\ * assert="
" scan-word"
" scan-word \\ ] assert="
- " <rect> parsed ;"
+ " <rect> suffix! ;"
}
"An example literal might be:"
{ $code "RECT[ 100 * 200 ]" }
: 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>
ROMAN-OP: /i
ROMAN-OP: /mod
-SYNTAX: ROMAN: scan roman> parsed ;
+SYNTAX: ROMAN: scan roman> suffix! ;
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" } }
}
] [ ] 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
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
] [ 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
<<
! For convenience
IN: syntax
-SYNTAX: B \ break parsed ;
+SYNTAX: B \ break suffix! ;
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 ;
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>> ;
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 ;
: 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>
$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 }
{ 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." }
M: f parse-quotation \ ] parse-until >quotation ;
-: parsed ( accum obj -- accum ) over push ;
-
: (parse-lines) ( lexer -- quot )
[ f parse-until >quotation ] with-lexer ;
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 ;
scan swap base> [ bad-number ] unless* ;
: parse-base ( parsed base -- parsed )
- scan-base parsed ;
+ scan-base suffix! ;
SYMBOL: bootstrap-syntax
[ 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 ;
"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:" [
{ [ 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
] define-core-syntax
"((" [
- "))" parse-effect parsed
+ "))" parse-effect suffix!
] define-core-syntax
"MAIN:" [ scan-word current-vocab (>>main) ] define-core-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*
: 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! ;
<<
: (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
WHERE
: (NAME) ( str -- ) drop ; inline
-SYNTAX: !NAME (parse-annotation) \ (NAME) parsed ;
+SYNTAX: !NAME (parse-annotation) \ (NAME) suffix! ;
: NAMEs ( -- usages )
\ (NAME) (non-annotation-usage) ;
[ >>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! ;
: 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 ;
PRIVATE>
SYNTAX: [infix
- "infix]" [infix-parse parsed \ call parsed ;
+ "infix]" [infix-parse suffix! \ call suffix! ;
<PRIVATE
;EBNF
-SYNTAX: TYPE: ";" parse-multiline-string parse-type parsed ;
\ No newline at end of file
+SYNTAX: TYPE: ";" parse-multiline-string parse-type suffix! ;
] keep length
10^ / + swap [ neg ] when ;
-SYNTAX: DECIMAL: scan parse-decimal parsed ;
+SYNTAX: DECIMAL: scan parse-decimal suffix! ;
: morse> ( morse -- plain )
replace-underscores morse>sentence ;
-SYNTAX: [MORSE "MORSE]" parse-multiline-string morse> parsed ;
+SYNTAX: [MORSE "MORSE]" parse-multiline-string morse> suffix! ;
<PRIVATE
USING: arrays kernel parser sequences ;
IN: pair-rocket
-SYNTAX: => dup pop scan-object 2array parsed ;
+SYNTAX: => dup pop scan-object 2array suffix! ;
: 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# ;
! (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! ;
] with map ;
SYNTAX: STRIP-TEASE:
- parse-definition strip-tease [ parsed ] each ;
+ parse-definition strip-tease [ suffix! ] each ;
\ slides H{
{ T{ button-down } [ request-focus ] }
scan-word scan scan-word parse-definition swap [ spin ] dip advise ;
SYNTAX: UNADVISE:
- scan-word parsed \ unadvise parsed ;
+ scan-word suffix! \ unadvise suffix! ;