The peg.ebnf vocabulary provides a DSL that allows writing PEG parsers that look like EBNF syntax. It provides three parsing words described below. These words all accept the same EBNF syntax. The difference is in how they are used.
Grammars defined in EBNF need to handle each character, or sequence of characters in the input. This can be tedious for dealing with whitespace in grammars that have 'tokens' separated by whitespace. You can define your own tokenizer that for an EBNF grammar, and write the grammar in terms of those tokens, allowing you to ignore the whitespace issue. The tokenizer can be changed at various parts in the grammar as needed. The JavaScript grammar does this to define the optional semicolon rule for example. EBNF Tokenizers