Handbook
Glossary
ebnf-transform ( ast -- parser quot )
Vocabulary
peg
.
ebnf
.
private
Inputs
ast
an
object
Outputs
parser
an
object
quot
an
object
Definition
USING:
accessors
kernel
parser
sequences
splitting
vocabs.parser
;
IN:
peg.ebnf.private
:
ebnf-transform
( ast -- parser quot )
[
parser>>
(transform)
]
[
code>>
insert-escapes
]
[
parser>>
]
tri
build-locals
H{
{
"dup"
dup
}
{
"nip"
nip
}
{
"nth"
nth
}
{
"over"
over
}
}
[
split-lines
parse-lines
]
with-words
;