optional* ( parser -- parser )


Vocabulary
peg

Inputs
parsera parser


Outputs
parsera 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