EBNF:
EBNF

Next:EBNF[[


Vocabulary
peg.ebnf

Syntax
EBNF: word [=[ ...ebnf... ]=]


Inputs and outputs
worda word
...ebnf...EBNF DSL text


Word description
Defines a word that when called will parse a string using the syntax defined with the EBNF DSL. The word has stack effect ( string -- ast ) where 'string' is the text to be parsed and 'ast' is the resulting abstract syntax tree. If the parsing fails the word throws an exception.

Examples
USING: prettyprint multiline peg.ebnf ; IN: scratchpad EBNF: foo [=[ rule="a" "b" ]=] "ab" foo .
V{ "a" "b" }


Definition