Metadata-Version: 2.4
Name: syncraft
Version: 0.3.2
Summary: Parser combinator library
Author-email: Michael Afmokt <michael@esacca.com>
License-Expression: MIT
Keywords: parser,combinator,sql,sqlite,generator,printer
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rstr>=3.2.2
Requires-Dist: sqlglot>=27.14.0
Dynamic: license-file

# 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
```bash
pip install syncraft
```

### uv
```bash
uv add syncraft
```

Python 3.10+ is required.

### With pip
```bash
pip install syncraft[dev]
```

### With uv
```bash
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
- [ ]  Semantic layer (datalog + unification).


