Handbook
Glossary
ebnf-sequence
Vocabulary
peg
.
ebnf
.
private
Definition
IN:
peg.ebnf.private
TUPLE:
ebnf-sequence
elements
;
Methods
USING:
accessors
kernel
namespaces
peg
peg.ebnf.private
sequences
;
M:
ebnf-sequence
(transform)
elements>>
[
f
ignore-ws
[
(transform)
]
with-variable
ignore-ws
get
[
sp
]
when
]
map
seq
[
dup
length
1
=
[
first
]
when
]
action
;
USING:
accessors
kernel
make
math.parser
peg.ebnf.private
sequences
;
M:
ebnf-sequence
build-locals
elements>>
filter-hidden
dup
length
1
=
[
first
build-locals
]
[
dup
[
ebnf-var?
]
none?
[
drop
]
[
[
"[let "
%
[
over
ebnf-var?
[
" "
%
#
" over nth :> "
%
name>>
%
]
[
2drop
]
if
]
each-index
" "
%
%
" nip ]"
%
]
""
make
]
if
]
if
;