https://github.com/a-poor/open-cypher
Parse openCypher queries in Rust
https://github.com/a-poor/open-cypher
cypher cypher-query-language graph-database hacktoberfest opencypher parser rust
Last synced: 5 months ago
JSON representation
Parse openCypher queries in Rust
- Host: GitHub
- URL: https://github.com/a-poor/open-cypher
- Owner: a-poor
- License: mit
- Created: 2022-07-23T01:44:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-02T22:04:50.000Z (over 2 years ago)
- Last Synced: 2024-11-29T11:01:13.713Z (5 months ago)
- Topics: cypher, cypher-query-language, graph-database, hacktoberfest, opencypher, parser, rust
- Language: Rust
- Homepage:
- Size: 23.4 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# open-cypher
_created by Austin Poor_
Parse [openCypher](https://opencypher.org/) queries using Rust.
`open-cypher` uses the [pest](https://pest.rs/) library to parse cypher queries using the pestfile, `src/cypher.pest`, based on the openCypher EBNF file ([link](https://opencypher.org/resources/) or [file](assets/cypher.ebnf)).
## Project Status
This library is still in a very early stage. The repo includes a pest grammar file for defining the cyper language, based on the ebnf file from the openCypher site.
My goal is to finish the pest definition and possibly generate a cleaner AST based on what pest parses.
For reference, the following other projects use pest: https://github.com/pest-parser/pest#projects-using-pest
## Project Structure
- `src/`
- `cypher.pest`: The [pest](https://pest.rs/) grammar file for generating a rust parser and types, based on the [ebnf file](./assets/cypher.ebnf) from the [openCypher site](https://opencypher.org/).
- `main.rs`: Currently the main directory for quick tests (will be removed)
- `parser.rs`: Contains functions for parsing and viewing parsed cypher queries
- `ast.rs`: Will contain code for _potentially_ exposing a cleaner cypher AST, than is created by pest
- `assets/`
- `cypher.ebnf`: Open cypher grammar definition from the openCypher site## Contributing
Contributions of any size are more than welcome! Please feel free to submit issues or PRs.
I'm also open to any suggestions regarding overall project direction.
## To Do
- [ ] Add tests
- [ ] Add examples
- [ ] Add documentation