METADATA 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. Metadata-Version: 2.1
  2. Name: spark-parser
  3. Version: 1.9.0
  4. Summary: An Earley-Algorithm Context-free grammar Parser Toolkit
  5. Author: John Aycock
  6. Author-email: Rocky Bernstein <rocky@gnu.org>
  7. Maintainer: Rocky Bernstein
  8. License: GPL
  9. Project-URL: Homepage, https://github.com/rocky/python-spark
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Intended Audience :: Developers
  12. Classifier: License :: OSI Approved :: MIT License
  13. Classifier: Programming Language :: Python
  14. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  15. Classifier: Programming Language :: Python :: 2.4
  16. Classifier: Programming Language :: Python :: 2.5
  17. Classifier: Programming Language :: Python :: 2.6
  18. Classifier: Programming Language :: Python :: 2.7
  19. Classifier: Programming Language :: Python :: 3.0
  20. Classifier: Programming Language :: Python :: 3.1
  21. Classifier: Programming Language :: Python :: 3.2
  22. Classifier: Programming Language :: Python :: 3.3
  23. Classifier: Programming Language :: Python :: 3.4
  24. Classifier: Programming Language :: Python :: 3.5
  25. Classifier: Programming Language :: Python :: 3.6
  26. Classifier: Programming Language :: Python :: 3.7
  27. Classifier: Programming Language :: Python :: 3.8
  28. Classifier: Programming Language :: Python :: 3.9
  29. Classifier: Programming Language :: Python :: 3.10
  30. Classifier: Programming Language :: Python :: 3.11
  31. Classifier: Programming Language :: Python :: 3.12
  32. Description-Content-Type: text/x-rst
  33. License-File: LICENSE
  34. Requires-Dist: click
  35. Provides-Extra: dev
  36. Requires-Dist: pytest; extra == "dev"
  37. Requires-Dist: pre-commit; extra == "dev"
  38. |CircleCI| |Pypi Installs| |Latest Version| |Supported Python Versions|
  39. |packagestatus|
  40. An Earley Algorithm Parser toolkit.
  41. ===========================================
  42. This package uses Jay Earley's algorithm for parsing context-free
  43. grammars, and comes with some generic Abstract Syntax Tree
  44. routines. There is also a prototype scanner that does its job by
  45. combining Python regular expressions.
  46. (SPARK stands for Scanning, Parsing, and Rewriting Kit. It is a poor
  47. name since it conflicts with a more popular package of the same
  48. name. In the future we will rename this.)
  49. The original version of this was written by John Aycock for his Ph.d
  50. thesis and was described in his 1998 paper: "Compiling Little
  51. Languages in Python" at the 7th International Python Conference. The
  52. current incarnation of this code is maintained (or not) by Rocky
  53. Bernstein.
  54. Note: Earley algorithm parsers are almost linear when given an LR grammar.
  55. These are grammars that are left-recursive.
  56. Installation
  57. ------------
  58. This package is available from PyPI::
  59. $ pip install spark-parser
  60. However if you want to install from the github source::
  61. $ pip install # creates wheel and install
  62. To run from the source tree::
  63. $ pip install -e . # set up to run from source tree
  64. Features
  65. --------
  66. Many of the added features are directly related to using it in the Python decompiler uncompyle6_.
  67. One unique feature of this code is the ability to have it profile
  68. which grammar rules have been used over a series of parses. This can
  69. inform which grammar rules are not needed.
  70. Another unusual feature is to be able to remove grammar rules after a
  71. rule has been added. This is used in uncompyle6_ where grammar rules
  72. inherited from one version of Python to another.
  73. The non-standard grammar generator system feature is the ability to
  74. perform a callback check just before a reduction rule occurs. This
  75. allows for checking a token stream or partial parse tree by means
  76. other than through the grammar language.
  77. `NEW-FEATURES
  78. <https://github.com/rocky/python-spark/blob/master/NEW-FEATURES.rst>`_
  79. describes these features and others in more detail.
  80. Example
  81. -------
  82. The github `example directory <https://github.com/rocky/python-spark/tree/master/example>`_ has worked-out examples; The PyPI package uncompyle6_ uses this and contains a much larger example.
  83. Support of older versions of Python
  84. -----------------------------------
  85. We support running this from older versions of Python in various git branches:
  86. * ``python-2.4-to-2.7`` has code for Python 2.4 to 2.7
  87. * ``python-3.0-to-3.2`` has code for Python 3.0 to 3.2
  88. * ``python-3.3-to-3.5`` has code for Python 3.3 to 3.5
  89. * ``python-3.6-to-3.10`` has code for Python 3.6 to 3.10
  90. * ``master`` has code for Python 3.11 to the current version of Python
  91. See Also
  92. --------
  93. * http://pages.cpsc.ucalgary.ca/~aycock/spark/ (Old and not very well maintained)
  94. * https://pypi.python.org/pypi/uncompyle6/
  95. .. |CircleCI| image:: https://circleci.com/gh/rocky/python-spark.svg?style=svg
  96. .. _features: https://github.com/rocky/python-spark/blob/master/NEW-FEATURES.rstxo
  97. .. _directory: https://github.com/rocky/python-spark/tree/master/example
  98. .. _uncompyle6: https://pypi.python.org/pypi/uncompyle6/
  99. .. |downloads| image:: https://img.shields.io/pypi/dd/spark.svg
  100. .. |buildstatus| image:: https://travis-ci.org/rocky/python-spark.svg
  101. :target: https://travis-ci.org/rocky/python-spark
  102. .. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/spark_parser.svg
  103. .. |Latest Version| image:: https://badge.fury.io/py/spark-parser.svg
  104. :target: https://badge.fury.io/py/spark-parser
  105. .. |Pypi Installs| image:: https://pepy.tech/badge/spark-parser/month
  106. .. |packagestatus| image:: https://repology.org/badge/vertical-allrepos/python:spark.svg
  107. :target: https://repology.org/project/python:spark/versions