Skip to main content

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

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.8.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.8-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

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

Uploaded Python 2

File details

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

File metadata

  • Download URL: spark_parser-1.8.8.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.8.tar.gz
Algorithm Hash digest
SHA256 73aa385250d26823f78314c6ec30e5e30d07bdeeef61f823e0e4db0689897657
MD5 107e00b5a9bde189dcca4bf2573322d1
BLAKE2b-256 1245d4bf83b054bb64e7b99ecf2ab995aa791a11f341f39eb01e16e17b550b5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spark_parser-1.8.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 825afdebcb8488523c7a307c6dee5b36c20b640ba229a777d3c48153c488472f
MD5 f16c5ca91256fc50475bf7e2f6808ffb
BLAKE2b-256 4665d25c77d8ab2ae791bb42fb6692d115ff0546938d2d0d2518b5f194dbb90b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spark_parser-1.8.8-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.8-py2-none-any.whl
Algorithm Hash digest
SHA256 7ae7d5d688c013d5174e6c6e82418ba7b14f5b871c2427954c649647b5a03a9c
MD5 b6a4e47de252983e705297284d3e59fd
BLAKE2b-256 00310cb9617ff5e6e5eb3e4afbaee923357d37aa21edcc9c20ce8f79c4bd2893

See more details on using hashes here.

Release history Release notifications | RSS feed

1.9.0

6 files

1.8.9

7 files

This release

1.8.8 This release

3 files

1.8.7

9 files

1.8.6

10 files

1.8.5

12 files

1.8.4

9 files

1.8.3

9 files

1.8.2

9 files

1.8.1

9 files

1.8.0

9 files

1.7.2

9 files

1.7.1

10 files

1.7.0

10 files

1.6.1

9 files

1.6.0

11 files

1.5.2

11 files

1.5.1

11 files

1.5.0

11 files

1.4.3

12 files

1.4.2

10 files

1.4.0

5 files

1.3.0

6 files

1.2.1

6 files

1.1.1

6 files

1.1.0

6 files

1.0.2

6 files

1.0.1

6 files

1.0.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page