skip to navigation
skip to content

spark_parser 1.7.2

An Earley-Algorithm Context-free grammar Parser Toolkit

Latest Version: 1.8.5

SPARK - An Earley Algorithm Parser toolkit.

SPARK stands for Scanning, Parsing, and Rewriting Kit. It 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.

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.


This uses, so it follows the standard Python routine:

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


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

File Type Py Version Uploaded on Size
spark_parser-1.7.2-py2-none-any.whl (md5) Python Wheel py2 2017-11-15 17KB
spark_parser-1.7.2-py2.4.egg (md5) Python Egg 2.4 2017-11-15 33KB
spark_parser-1.7.2-py2.5.egg (md5) Python Egg 2.5 2017-11-15 32KB
spark_parser-1.7.2-py2.6.egg (md5) Python Egg 2.6 2017-11-15 32KB
spark_parser-1.7.2-py3-none-any.whl (md5) Python Wheel py3 2017-11-15 17KB
spark_parser-1.7.2-py3.3.egg (md5) Python Egg 3.3 2017-11-15 33KB
spark_parser-1.7.2-py3.4.egg (md5) Python Egg 3.4 2017-11-15 33KB
spark_parser-1.7.2-py3.6.egg (md5) Python Egg 3.6 2017-11-15 32KB
spark_parser-1.7.2.tar.gz (md5) Source 2017-11-15 104KB