with-sequence-parser ( ..a sequence-parser quot: ( ..a parser -- ..b obj/f ) -- ..b obj/f )


Vocabulary
sequences.parser

Inputs
sequence-parsera sequence-parser
quota quotation with stack effect ( ..a parser -- ..b obj/f )


Outputs
obj/fan 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


:: 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