parsy
This section has some further example parsers that you can study. There are also examples in the /tutorial
and in /ref/generating
.
This shows a very simplified parser for a SQL SELECT
statement, using custom data structures, and the convenient keyword argument syntax for seq
, followed by Parser.combine_dict
.
../../examples/sql_select.py
A full parser for JSON. (This will not be competitive in terms of performance with other implementations!)
This demonstrates the use of forward_declaration
, needed due to the circular definition of json_value
.
../../examples/json.py