An Earley-Algorithm Context-free grammar Parser Toolkit
Project description
|Supported Python Versions|
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.
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
--------
* features_
* http://pages.cpsc.ucalgary.ca/~aycock/spark/ (Old and not very well maintained)
* https://pypi-hypernode.com/pypi/uncompyle6/
.. _features: https://github.com/rocky/python-spark/blob/master/NEW-FEATURES.rst
.. _directory: https://github.com/rocky/python-spark/tree/master/example
.. _uncompyle6: https://pypi-hypernode.com/pypi/uncompyle6/
.. |downloads| image:: https://img.shields.io/pypi/dd/spark.svg
.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/spark_parser.svg
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.
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
--------
* features_
* http://pages.cpsc.ucalgary.ca/~aycock/spark/ (Old and not very well maintained)
* https://pypi-hypernode.com/pypi/uncompyle6/
.. _features: https://github.com/rocky/python-spark/blob/master/NEW-FEATURES.rst
.. _directory: https://github.com/rocky/python-spark/tree/master/example
.. _uncompyle6: https://pypi-hypernode.com/pypi/uncompyle6/
.. |downloads| image:: https://img.shields.io/pypi/dd/spark.svg
.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/spark_parser.svg
Project details
Release history Release notifications | RSS feed
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.7.1.tar.gz
(91.0 kB
view hashes)
Built Distributions
spark_parser-1.7.1-py3.6.egg
(33.2 kB
view hashes)
spark_parser-1.7.1-py3.5.egg
(33.8 kB
view hashes)
spark_parser-1.7.1-py3.4.egg
(34.0 kB
view hashes)
spark_parser-1.7.1-py3.3.egg
(34.5 kB
view hashes)
spark_parser-1.7.1-py2.7.egg
(33.2 kB
view hashes)
spark_parser-1.7.1-py2.6.egg
(33.4 kB
view hashes)
spark_parser-1.7.1-py2.5.egg
(33.6 kB
view hashes)
spark_parser-1.7.1-py2.4.egg
(34.2 kB
view hashes)
Close
Hashes for spark_parser-1.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22dc5f8333c223f8e188aeecb7ab928754aee7cd4e5addaf7d64cb8a1512db48 |
|
MD5 | 72fd02bab1da78802cd75ea9c4a7f8c1 |
|
BLAKE2b-256 | d8714ef451abdba890c0cbe1a61e594bfb4e775c822f5fcddf6d7426d3662432 |