Skip to main content

Parser combinator library

Project description

Syncraft

Syncraft is a parser/generator combinator library for Python. It helps you

  • Build grammars
  • Parse SQL statement to AST
  • Search AST by grammar
  • Convert AST to dataclass
  • Check constraints over the AST/dataclass
  • Change dataclass and convert back to AST

Installation

pip

pip install syncraft

uv

uv add syncraft

Python 3.10+ is required.

With pip

pip install syncraft[dev]

With uv

uv sync --group dev 

TODO

  • regex.py a subset of Python re
  • Visualization (railroad diagrams + AST).
  • Interactive dev (Jupyter).
  • Semantic layer (datalog + unification).

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

syncraft-0.3.0.tar.gz (129.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syncraft-0.3.0-py3-none-any.whl (131.0 kB view details)

Uploaded Python 3

File details

Details for the file syncraft-0.3.0.tar.gz.

File metadata

  • Download URL: syncraft-0.3.0.tar.gz
  • Upload date:
  • Size: 129.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for syncraft-0.3.0.tar.gz
Algorithm Hash digest
SHA256 879ded932b76302bf010b158ea57baeb1c47faccd6405b466a3f63f7fccf5cad
MD5 0b5514ad745ac00302edecc99b406202
BLAKE2b-256 748957d205555be8977edae7246d3e2b54f0c314d38bea9f0285761e282d68d6

See more details on using hashes here.

File details

Details for the file syncraft-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: syncraft-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 131.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for syncraft-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bd6c28b24ef4462d603bb5d57e98e7c54b55be57001c7b2785316470267dd2e
MD5 a4d233629e45091149e4306de28125d5
BLAKE2b-256 89d4bf3e8b33a07a971d5ebded7db52a71850b973645a17db211f64800cb6926

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