Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

An Earley-Algorithm Context-free grammar Parser Toolkit

Project description

buildstatus Supported Python Versions

An Earley Algorithm Parser toolkit.

This package uses Jay Earley’s algorithm for parsing context free grammars, and comes with some generic Abstract Syntax Tree routines. There is also a prototype scanner which does its job by combining Python regular expressions.

(SPARK stands for Scanning, Parsing, and Rewriting Kit. It is a poor name since it conflicts with a more popular package of the same name. In the future we will rename this.)

The original version of this was written by John Aycock for his Ph.d thesis and was described in his 1998 paper: “Compiling Little Languages in Python” at the 7th International Python Conference. The current incarnation of this code is maintained (or not) by Rocky Bernstein.

Note: Earley algorithm parsers are almost linear when given an LR grammar. These are grammars which are left-recursive.

Installation

This uses setup.py, so it follows the standard Python routine:

python setup.py install # may need sudo
# or if you have pyenv:
python setup.py develop

Example

The github example directory has a worked-out examples; Package uncompyle6 uses this and contains a much larger example.

Release history Release notifications

This version
History Node

1.8.7

History Node

1.8.6

History Node

1.8.5

History Node

1.8.4

History Node

1.8.3

History Node

1.8.2

History Node

1.8.1

History Node

1.8.0

History Node

1.7.2

History Node

1.7.1

History Node

1.7.0

History Node

1.6.1

History Node

1.6.0

History Node

1.5.2

History Node

1.5.1

History Node

1.5.0

History Node

1.4.3

History Node

1.4.2

History Node

1.4.0

History Node

1.3.0

History Node

1.2.1

History Node

1.1.1

History Node

1.1.0

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
spark_parser-1.8.7-py2.4.egg (36.0 kB) Copy SHA256 hash SHA256 Egg 2.4 May 19, 2018
spark_parser-1.8.7-py2.5.egg (35.4 kB) Copy SHA256 hash SHA256 Egg 2.5 May 19, 2018
spark_parser-1.8.7-py2.6.egg (35.3 kB) Copy SHA256 hash SHA256 Egg 2.6 May 19, 2018
spark_parser-1.8.7-py2.7.egg (35.1 kB) Copy SHA256 hash SHA256 Egg 2.7 May 19, 2018
spark_parser-1.8.7-py2-none-any.whl (19.0 kB) Copy SHA256 hash SHA256 Wheel py2 May 19, 2018
spark_parser-1.8.7-py3.2.egg (35.6 kB) Copy SHA256 hash SHA256 Egg 3.2 May 19, 2018
spark_parser-1.8.7-py3.3.egg (36.4 kB) Copy SHA256 hash SHA256 Egg 3.3 May 19, 2018
spark_parser-1.8.7-py3-none-any.whl (19.0 kB) Copy SHA256 hash SHA256 Wheel py3 May 19, 2018
spark_parser-1.8.7.tar.gz (116.8 kB) Copy SHA256 hash SHA256 Source None May 19, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page