Handbook
Glossary
choice ( seq -- parser )
Vocabulary
peg
Inputs
seq
a sequence of parsers
Outputs
parser
a
parser
Word description
Returns a parser that will try all the parsers in the sequence, in order, until one succeeds. The resulting AST is that produced by the successful parser.
Definition
USING:
kernel
peg.private
;
IN:
peg
:
choice
( seq -- parser )
choice-parser
boa
wrap-peg
;