Skip to main content

An Earley-Algorithm Context-free grammar Parser Toolkit

Project description

buildstatus Supported Python Versions

SPARK

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

Project details


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.6.1.tar.gz (134.1 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.6.1-py3.5.egg (33.5 kB view details)

Uploaded Egg

spark_parser-1.6.1-py3.4.egg (33.6 kB view details)

Uploaded Egg

spark_parser-1.6.1-py3.3.egg (34.1 kB view details)

Uploaded Egg

spark_parser-1.6.1-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

spark_parser-1.6.1-py2.7.egg (32.8 kB view details)

Uploaded Egg

spark_parser-1.6.1-py2.6.egg (33.0 kB view details)

Uploaded Egg

spark_parser-1.6.1-py2.5.egg (33.0 kB view details)

Uploaded Egg

spark_parser-1.6.1-py2.4.egg (33.7 kB view details)

Uploaded Egg

File details

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

File metadata

  • Download URL: spark_parser-1.6.1.tar.gz
  • Upload date:
  • Size: 134.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for spark_parser-1.6.1.tar.gz
Algorithm Hash digest
SHA256 77bc483450edb0d6ab22023799e6c77e7c64603774bf716a4effb3b280bdeda5
MD5 5a1bed000f951e395ef7d99db9b6df8b
BLAKE2b-256 df97e6c38e1a567748fadae9afede3e249b4e4e9cc94934e5e10a032f2db385f

See more details on using hashes here.

File details

Details for the file spark_parser-1.6.1-py3.5.egg.

File metadata

File hashes

Hashes for spark_parser-1.6.1-py3.5.egg
Algorithm Hash digest
SHA256 a9d4a63923c2afebea064aa973dc076e526fe1f2346f00defac759c83f470241
MD5 7fdb194220092d93ff8359e49cb5149f
BLAKE2b-256 db495cdef36344d212fd566dd10c58173a5f445884a15d0facd2a9abc70fd1dc

See more details on using hashes here.

File details

Details for the file spark_parser-1.6.1-py3.4.egg.

File metadata

File hashes

Hashes for spark_parser-1.6.1-py3.4.egg
Algorithm Hash digest
SHA256 c778a38bc592baac3f6be2802d47585470d76a5dd6ae43947a69cc0dfff64701
MD5 6646b31168d4362a0295070011727c72
BLAKE2b-256 9f8c13bdebe9b1aa7c9935754073cb6a8e08fea1736ea4f2f060fee0cfa77c27

See more details on using hashes here.

File details

Details for the file spark_parser-1.6.1-py3.3.egg.

File metadata

File hashes

Hashes for spark_parser-1.6.1-py3.3.egg
Algorithm Hash digest
SHA256 09514011e97dfa80ba29976c3c90c33140429f7f69e57d786f01d2da5369944d
MD5 fb7323aabab270e713269c9c57c985c4
BLAKE2b-256 6af2962c99f0ea40382281112215d7de06cc5a4fdb648dfc6940a768aa982037

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spark_parser-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 817484a2a7ef44ef0770bfd1e5d449fa05825c3d5d8f1a49e3524212cb127440
MD5 c0c7bffde4f88c64ba214041aaf21e2e
BLAKE2b-256 f34ea95a1ff543744bfaa33449b301fe74272556db2e852c5c3852517a5024be

See more details on using hashes here.

File details

Details for the file spark_parser-1.6.1-py2.7.egg.

File metadata

File hashes

Hashes for spark_parser-1.6.1-py2.7.egg
Algorithm Hash digest
SHA256 842a75171fea55005c1048531ab1f20acfe943af23d700221e2e3231e76f2622
MD5 534a96299c9f041bb240a34c9c821165
BLAKE2b-256 d9ea1f132b2cb5d7fbb1bbd2dff08607b9c04b8a8e8530f6515ec48a333fd137

See more details on using hashes here.

File details

Details for the file spark_parser-1.6.1-py2.6.egg.

File metadata

File hashes

Hashes for spark_parser-1.6.1-py2.6.egg
Algorithm Hash digest
SHA256 7a54b74e0112ade7680af0971bcce1eac5d336f02b10feb124a4d332058cc391
MD5 064cde8c4af71f84ddfd4eeafb9afa0a
BLAKE2b-256 7c95ddc807ddbbfe98ccbfeaa7c5c58a63f1ab589a222b3f8bb88f5e0612048d

See more details on using hashes here.

File details

Details for the file spark_parser-1.6.1-py2.5.egg.

File metadata

File hashes

Hashes for spark_parser-1.6.1-py2.5.egg
Algorithm Hash digest
SHA256 ba25025105a89e947f71b555eeb1bf8546ff875369fc6b043c0d7aa12692eb20
MD5 554aa878e66300956a5de514adad97d1
BLAKE2b-256 8b033403ad70e9a96d0e5326caf8c78c2200cc57b484d07072a0d60ade1c3383

See more details on using hashes here.

File details

Details for the file spark_parser-1.6.1-py2.4.egg.

File metadata

File hashes

Hashes for spark_parser-1.6.1-py2.4.egg
Algorithm Hash digest
SHA256 ce3f9b4c89d25d6c4503f8dc5125064cdd84f3ba5221ecaffc351b934b2069f8
MD5 cfa2e5a0bc47f4a27c742e9bebea28fb
BLAKE2b-256 81284132bb13f52dcfce4bb6e37670c31119dc38fc7cbbda7cf994c096d1f7cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page