{"id":19248442,"url":"https://github.com/rocky/python-spark","last_synced_at":"2025-04-05T00:08:13.209Z","repository":{"id":57469599,"uuid":"56736032","full_name":"rocky/python-spark","owner":"rocky","description":"An Earley-Algorithm Context-free grammar Parser Toolkit","archived":false,"fork":false,"pushed_at":"2024-12-03T01:33:46.000Z","size":544,"stargazers_count":46,"open_issues_count":5,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T23:08:49.528Z","etag":null,"topics":["parser","parsing-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rocky.png","metadata":{"files":{"readme":"README.rst","changelog":"ChangeLog-spell-corrected.diff","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["rocky"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":"rocky","issuehunt":null,"otechie":null,"custom":null}},"created_at":"2016-04-21T02:24:23.000Z","updated_at":"2025-03-01T18:00:43.000Z","dependencies_parsed_at":"2024-06-18T20:11:52.724Z","dependency_job_id":"45ff1702-64ad-4e76-9faf-fb6793252d88","html_url":"https://github.com/rocky/python-spark","commit_stats":{"total_commits":245,"total_committers":4,"mean_commits":61.25,"dds":0.1673469387755102,"last_synced_commit":"a243bc4198fe5b0274ee59de5f16ff9cf27b1c2a"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocky%2Fpython-spark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocky%2Fpython-spark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocky%2Fpython-spark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocky%2Fpython-spark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rocky","download_url":"https://codeload.github.com/rocky/python-spark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266564,"owners_count":20910836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parser","parsing-library"],"created_at":"2024-11-09T18:07:54.799Z","updated_at":"2025-04-05T00:08:13.190Z","avatar_url":"https://github.com/rocky.png","language":"Python","funding_links":["https://github.com/sponsors/rocky","https://liberapay.com/rocky"],"categories":[],"sub_categories":[],"readme":"|CircleCI| |Pypi Installs| |Latest Version| |Supported Python Versions|\n\n|packagestatus|\n\nAn Earley Algorithm Parser toolkit.\n===========================================\n\nThis package uses Jay Earley's algorithm for parsing context-free\ngrammars, and comes with some generic Abstract Syntax Tree\nroutines. There is also a prototype scanner that does its job by\ncombining Python regular expressions.\n\n(SPARK stands for Scanning, Parsing, and Rewriting Kit. It is a poor\nname since it conflicts with a more popular package of the same\nname. In the future we will rename this.)\n\nThe original version of this was written by John Aycock for his Ph.d\nthesis and was described in his 1998 paper: \"Compiling Little\nLanguages in Python\" at the 7th International Python Conference. The\ncurrent incarnation of this code is maintained (or not) by Rocky\nBernstein.\n\nNote: Earley algorithm parsers are almost linear when given an LR grammar.\nThese are grammars that are left-recursive.\n\nInstallation\n------------\n\nThis package is available from PyPI::\n\n    $ pip install spark-parser\n\nHowever if you want to install from the github source::\n\n    $ pip install       # creates wheel and install\n\nTo run from the source tree::\n\n    $ pip install -e .  # set up to run from source tree\n\n\nFeatures\n--------\n\nMany of the added features are directly related to using it in the Python decompiler uncompyle6_.\n\nOne unique feature of this code is the ability to have it profile\nwhich grammar rules have been used over a series of parses. This can\ninform which grammar rules are not needed.\n\nAnother unusual feature is to be able to remove grammar rules after a\nrule has been added. This is used in uncompyle6_ where grammar rules\ninherited from one version of Python to another.\n\nThe non-standard grammar generator system feature is the ability to\nperform a callback check just before a reduction rule occurs. This\nallows for checking a token stream or partial parse tree by means\nother than through the grammar language.\n\n`NEW-FEATURES\n\u003chttps://github.com/rocky/python-spark/blob/master/NEW-FEATURES.rst\u003e`_\ndescribes these features and others in more detail.\n\n\nExample\n-------\n\nThe github `example directory \u003chttps://github.com/rocky/python-spark/tree/master/example\u003e`_ has worked-out examples; The PyPI package uncompyle6_ uses this and contains a much larger example.\n\nSupport of older versions of Python\n-----------------------------------\n\nWe support running this from older versions of Python in various git branches:\n\n* ``python-2.4-to-2.7`` has code for Python 2.4 to 2.7\n* ``python-3.0-to-3.2`` has code for Python 3.0 to 3.2\n* ``python-3.3-to-3.5`` has code for Python 3.3 to 3.5\n* ``python-3.6-to-3.10`` has code for Python 3.6 to 3.10\n* ``master`` has code for Python 3.11 to the current version of Python\n\n\nSee Also\n--------\n\n* http://pages.cpsc.ucalgary.ca/~aycock/spark/ (Old and not very well maintained)\n* https://pypi.python.org/pypi/uncompyle6/\n\n.. |CircleCI| image:: https://circleci.com/gh/rocky/python-spark.svg?style=svg\n.. _features: https://github.com/rocky/python-spark/blob/master/NEW-FEATURES.rst\n.. _directory: https://github.com/rocky/python-spark/tree/master/example\n.. _uncompyle6: https://pypi.python.org/pypi/uncompyle6/\n.. |downloads| image:: https://img.shields.io/pypi/dd/spark.svg\n.. |buildstatus| image:: https://travis-ci.org/rocky/python-spark.svg\n\t\t :target: https://travis-ci.org/rocky/python-spark\n.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/spark_parser.svg\n.. |Latest Version| image:: https://badge.fury.io/py/spark-parser.svg\n\t\t :target: https://badge.fury.io/py/spark-parser\n.. |Pypi Installs| image:: https://pepy.tech/badge/spark-parser/month\n.. |packagestatus| image:: https://repology.org/badge/vertical-allrepos/python:spark.svg\n\t\t :target: https://repology.org/project/python:spark/versions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocky%2Fpython-spark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocky%2Fpython-spark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocky%2Fpython-spark/lists"}