Handbook
Glossary
optional* ( parser -- parser )
Vocabulary
peg
Inputs
parser
a
parser
Outputs
parser
a
parser
Word description
Returns a parser that parses 0 or 1 instances of the
parser
. The AST produced is
f
if 0 instances are parsed, otherwise it is a singleton array containing the AST produced by
parser
or an empty array if the AST produced was
ignore
.
See also
optional
Definition
USING:
kernel
peg.private
;
IN:
peg
:
optional*
( parser -- parser )
optional*-parser
boa
wrap-peg
;