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
- Static analysis tool based on Syntax.graph
- Profile hook on Cache
- try_parse based on Syntax.parallel
- regex.py convert Regex to FABuilder
- Visualization (railroad diagrams + AST).
- Interactive dev (Jupyter).
- Semantic layer (datalog + unification).
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
syncraft-0.3.1.tar.gz
(130.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
syncraft-0.3.1-py3-none-any.whl
(132.0 kB
view details)
File details
Details for the file syncraft-0.3.1.tar.gz.
File metadata
- Download URL: syncraft-0.3.1.tar.gz
- Upload date:
- Size: 130.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b31ac06141e72ae7b3e7258378d6e5d7d8cc580a6bc9623a3200906b4528a42
|
|
| MD5 |
386758b18266aa11dcf9e476a1918683
|
|
| BLAKE2b-256 |
0ed917f46a1ec5254f11aedf16bd81576e320412c70a63474ebc0b88bfe92900
|
File details
Details for the file syncraft-0.3.1-py3-none-any.whl.
File metadata
- Download URL: syncraft-0.3.1-py3-none-any.whl
- Upload date:
- Size: 132.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3f7e4d9f759e3cc682e3a604e7ea0e2f309c1d08402172b3bf087bc14c6f214
|
|
| MD5 |
9a08b0ab1e2eef6df9576b5b7b8a1af8
|
|
| BLAKE2b-256 |
03cbbf880aafaf89ec150f0a07e01d2fce81ffc2ae3badbc5a99844bbe703891
|