Commit c3da5507 authored by eckhart's avatar eckhart
Browse files

ebnf.py: documentation extended

parent 153878e2
......@@ -100,7 +100,13 @@ The structure of a JSON file can easily be described in EBNF::
'bool = "true" ~ | "false" ~ \\n'\
'null = "null" ~ \\n'
Let's try this on our test-string
Let's try this on our test-string. In order to compile this grammar into
executable Python-code, we use the high-level-function
:py:func:`create_parser()` from :py:mod:`DHParser.dsl`-module.
>>> from DHParser.dsl import create_parser
>>> parser = create_parser(grammar, branding="JSON")
>>> contrete_syntax_tree = parser(grammar)
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment