Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 861 Bytes

other_examples.rst

File metadata and controls

31 lines (21 loc) · 861 Bytes

Other examples

parsy

This section has some further example parsers that you can study. There are also examples in the /tutorial and in /ref/generating.

SQL SELECT statement parser

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

JSON parser

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