Parser framework
Project description
aptwe
aptwe is a framework to create recursive descent parsers. It intends to define parsers inside the Python syntax similarily to writing EBNF. For example:
nested_lists_ = Parser('NestedLists')
list_contents_ = int_ >> str_(',') >> int_
list_ = (str_('[') >> list_contents_ >> str_(']'))[getitem(1)]
nested_lists_[...] = int_ | list_
nested_lists_.loads('[1,[2,3]]') # Returns [1,[2,3]]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aptwe-0.1.tar.gz
(7.4 kB
view hashes)
Built Distribution
aptwe-0.1-py3-none-any.whl
(10.3 kB
view hashes)