Skip to main content

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.

See Also

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

spark_parser-1.8.7.tar.gz (116.8 kB view details)

Uploaded Source

Built Distributions

spark_parser-1.8.7-py3.3.egg (36.4 kB view details)

Uploaded Source

spark_parser-1.8.7-py3.2.egg (35.6 kB view details)

Uploaded Source

spark_parser-1.8.7-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

spark_parser-1.8.7-py2.7.egg (35.1 kB view details)

Uploaded Source

spark_parser-1.8.7-py2.6.egg (35.3 kB view details)

Uploaded Source

spark_parser-1.8.7-py2.5.egg (35.4 kB view details)

Uploaded Source

spark_parser-1.8.7-py2.4.egg (36.0 kB view details)

Uploaded Source

spark_parser-1.8.7-py2-none-any.whl (19.0 kB view details)

Uploaded Python 2

File details

Details for the file spark_parser-1.8.7.tar.gz.

File metadata

File hashes

Hashes for spark_parser-1.8.7.tar.gz
Algorithm Hash digest
SHA256 4c5e6064afbb3c114749016d585b0e4f9222d4ffa97a1854c9ab70b25783ef48
MD5 1b73fe08081744faf905b13ec3e5fb2c
BLAKE2b-256 a3743e78d604b488add8606f14d8716589bd3e4597bb886352394a15a0679733

See more details on using hashes here.

Provenance

File details

Details for the file spark_parser-1.8.7-py3.3.egg.

File metadata

File hashes

Hashes for spark_parser-1.8.7-py3.3.egg
Algorithm Hash digest
SHA256 5426f3ade7ccad74f12e0ffdf34e28a29b0295c245ee5f5de96a5f942025c53c
MD5 143166a54ad858d17b5428b0cb27f99d
BLAKE2b-256 62c0c1fda9eaa21baecc4e98c00ee90bf3de02292805778772ad15807566b561

See more details on using hashes here.

Provenance

File details

Details for the file spark_parser-1.8.7-py3.2.egg.

File metadata

File hashes

Hashes for spark_parser-1.8.7-py3.2.egg
Algorithm Hash digest
SHA256 03e115c9c3cf849658ce191b4ad8a512e88c6337141f44b3d87a51a6bf18413a
MD5 60335af6d0c8b48adbc30122dd484d41
BLAKE2b-256 b263f0c5b60f7cacc798d62f6dc2f2b916a7a6099dbfcae46a77b0d6553d1477

See more details on using hashes here.

Provenance

File details

Details for the file spark_parser-1.8.7-py3-none-any.whl.

File metadata

File hashes

Hashes for spark_parser-1.8.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e8e456ffa6e83f963f4830884624830bbbea82c9ae6b3b1700f84566550e1ab0
MD5 7eab68162d40b82aeafac2b5384bdade
BLAKE2b-256 06134da9bccbef8da3c8ff6f113f69992ba34cdbe4d9fb768e25a79f8b0e304b

See more details on using hashes here.

Provenance

File details

Details for the file spark_parser-1.8.7-py2.7.egg.

File metadata

File hashes

Hashes for spark_parser-1.8.7-py2.7.egg
Algorithm Hash digest
SHA256 e0769cba3fe78af969b178c571ba297aa8de202a8d48661abf0e46fc8b427e02
MD5 cafb4263b3b7cae0564f46f6c1fdd091
BLAKE2b-256 0fadd3c2ef55b40e73f1c4c0a867025e4a33315a20ac438f26e7bfab68228af9

See more details on using hashes here.

Provenance

File details

Details for the file spark_parser-1.8.7-py2.6.egg.

File metadata

File hashes

Hashes for spark_parser-1.8.7-py2.6.egg
Algorithm Hash digest
SHA256 6c1edc94291385d23b56a0eab348aceba72b6d5f363e52e773c7b2c88ec9f8ab
MD5 cbc5e11949d34aad82a33dca517a404a
BLAKE2b-256 7e3a7915c420998d0f14314f6a73e8bf85f68e3f5d8a87dac89ff1de573226f6

See more details on using hashes here.

Provenance

File details

Details for the file spark_parser-1.8.7-py2.5.egg.

File metadata

File hashes

Hashes for spark_parser-1.8.7-py2.5.egg
Algorithm Hash digest
SHA256 1f37849f320d8f8454456c0ca985deda1413974256945f398e30addaa905d198
MD5 1def2d52d65522499081420ff990f04c
BLAKE2b-256 cc2a6cf9d8bb389612be34959777b88e74de3771b8119828fda011dcc4c45cef

See more details on using hashes here.

Provenance

File details

Details for the file spark_parser-1.8.7-py2.4.egg.

File metadata

File hashes

Hashes for spark_parser-1.8.7-py2.4.egg
Algorithm Hash digest
SHA256 76bb0acdfba2c7193e608e9cf995f41799b61b2e3b8e1f13320b7ee66aff7b65
MD5 38a0a5d9386b505fc6532b84a5845d97
BLAKE2b-256 8cab14b5b9d8324b2a280effd79da7395d8b866d8866c6368a4989ff2ed4a214

See more details on using hashes here.

Provenance

File details

Details for the file spark_parser-1.8.7-py2-none-any.whl.

File metadata

File hashes

Hashes for spark_parser-1.8.7-py2-none-any.whl
Algorithm Hash digest
SHA256 11be196977ce42710d44dbb7adb78b42853875a1f686c64b88315e519a8b1b0d
MD5 7ddeb8d9791d63942764f76a80c0c2ba
BLAKE2b-256 71831c351e3de0dce6b9a1c7afb222f48f2acfed635927ca7936cd2228b8b6ed

See more details on using hashes here.

Provenance

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