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.9.tar.gz (118.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spark_parser-1.8.9-py38-none-any.whl (18.0 kB view details)

Uploaded Python 3.8

spark_parser-1.8.9-py26-none-any.whl (19.1 kB view details)

Uploaded Python 2.6

spark_parser-1.8.9-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

spark_parser-1.8.9-py2.6.egg (35.6 kB view details)

Uploaded Egg

spark_parser-1.8.9-py2.4.egg (36.1 kB view details)

Uploaded Egg

spark_parser-1.8.9-py2-none-any.whl (18.0 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: spark_parser-1.8.9.tar.gz
  • Upload date:
  • Size: 118.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.4.8

File hashes

Hashes for spark_parser-1.8.9.tar.gz
Algorithm Hash digest
SHA256 a7bb97b97953fb8bf0cd8158d820b6467ef1e7f747738e82248ae4c824f1e25a
MD5 ea048fffc1778b557a9ffaf78145fde3
BLAKE2b-256 d4eceb81227524ce6991cb2ea0e5570804b569c118e6ceb58d205059b6777fda

See more details on using hashes here.

File details

Details for the file spark_parser-1.8.9-py38-none-any.whl.

File metadata

  • Download URL: spark_parser-1.8.9-py38-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

File hashes

Hashes for spark_parser-1.8.9-py38-none-any.whl
Algorithm Hash digest
SHA256 0a96852dacfbe3a267bba6c9ebc1fcab8904158a5045107267e310e8d18919e5
MD5 443f864f43a256c702be44df7b7fc89c
BLAKE2b-256 4914d2e92845c424583a14a2ddd44d46dd0ca176e7a8cacd06095e5c0877d0cd

See more details on using hashes here.

File details

Details for the file spark_parser-1.8.9-py26-none-any.whl.

File metadata

  • Download URL: spark_parser-1.8.9-py26-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 2.6
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

File hashes

Hashes for spark_parser-1.8.9-py26-none-any.whl
Algorithm Hash digest
SHA256 0a6293d05e30a093273bf81eebb97443cb4b8e733c71ad6cc2b6a223b80f3aeb
MD5 30267485b3ca00197dacc7bcd46efc63
BLAKE2b-256 cac515167916f99600ad6ed9e9feb676313a46916012db51f55dea1338deeff4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spark_parser-1.8.9-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.4.8

File hashes

Hashes for spark_parser-1.8.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e4d366116268010100f054ebda99b3b880c64e4b0aa3d58629ec79e6d033b077
MD5 41795164bd83d94a47ac2bb8e75fcf06
BLAKE2b-256 e1c3745adc57618998882a6e120cedebfba6ebf76aa9052c8b89e49c0fe47c2e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spark_parser-1.8.9-py2.6.egg
  • Upload date:
  • Size: 35.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

File hashes

Hashes for spark_parser-1.8.9-py2.6.egg
Algorithm Hash digest
SHA256 c9914d49a46d08346b03efa85d9c1f353cf8dcb660307277ccead151a9cf22ef
MD5 36d0713151fd84b55c9ad438221cb468
BLAKE2b-256 cabfbdee33e0998079236ff9aa067709d7ea83f9264449dfba9a3a6fa43e82aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spark_parser-1.8.9-py2.4.egg
  • Upload date:
  • Size: 36.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

File hashes

Hashes for spark_parser-1.8.9-py2.4.egg
Algorithm Hash digest
SHA256 bfd887af6c68c0061fbcc2e763c961a4d82a057081afc5fa26af1a9cfc6bb372
MD5 5b164b20efe3c8fd8b8abc2f48d635e3
BLAKE2b-256 4460826886db16f67af890ff33bcf1b81432c170b1da307d94c0ec6b0260f8db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spark_parser-1.8.9-py2-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.4.8

File hashes

Hashes for spark_parser-1.8.9-py2-none-any.whl
Algorithm Hash digest
SHA256 ea9c25fa79206f23b2b4c233edf5ce9c17edc97b4f39a70056b31f50a2166cce
MD5 dfd2801d929ca4c80457dfadcfb19a27
BLAKE2b-256 d47f8ac36ff59340cd63c46370c366fd023f3a458d4819cb58df40072d470e07

See more details on using hashes here.

Supported by

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