Handbook
Glossary
with-sequence-parser ( ..a sequence-parser quot: ( ..a parser -- ..b obj/f ) -- ..b obj/f )
Vocabulary
sequences
.
parser
Inputs
sequence-parser
a
sequence-parser
quot
a
quotation
with stack effect
( ..a parser -- ..b obj/f )
Outputs
obj/f
an
object
or
f
Word description
Saves the position of the parser and calls the quotation on it. If the quotation returns
f
the parser is rewound to the saved position.
See also
parse-sequence
Definition
USING:
accessors
kernel
;
IN:
sequences.parser
::
with-sequence-parser
( ..a sequence-parser quot: ( ..a parser -- ..b obj/f ) -- ..b obj/f )
sequence-parser
n>>
:>
n sequence-parser quot
call
[
n sequence-parser
n<<
f
]
unless*
;
inline