Handbook
Glossary
choice-parser ( -- parser )
Vocabulary
peg
.
ebnf
.
private
Inputs
None
Outputs
parser
an
object
Definition
USING:
kernel
peg
peg.parsers
sequences
;
IN:
peg.ebnf.private
:
choice-parser
( -- parser )
actioned-sequence-parser
sp
repeat1
[
dup
length
1
=
[
first
]
[
<ebnf-sequence>
]
if
]
action
"|"
token
sp
list-of
[
dup
length
1
=
[
first
]
[
<ebnf-choice>
]
if
]
action
;