Handbook
Glossary
parse-literal ( accum end quot -- accum )
Factor handbook
»
The language
»
Parsing words
»
Nested structure
Next:
parse-until ( end -- vec )
Vocabulary
parser
Inputs
accum
a
vector
end
a
word
quot
a
quotation
with stack effect
( seq -- obj )
Outputs
accum
a
vector
Word description
Parses objects from parser input until
end
, applies the quotation to the resulting sequence, and adds the output value to the accumulator.
Examples
This word is used to implement
[
.
Notes
This word should only be called from parsing words.
Definition
USING:
kernel
sequences
;
IN:
parser
:
parse-literal
( accum end quot -- accum )
[
parse-until
]
dip
call
suffix!
;
inline