Skip to main content

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


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)

Uploaded Source

Built Distribution

aptwe-0.1-py3-none-any.whl (10.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page