Skip to content

a-poor/open-cypher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

open-cypher

created by Austin Poor

Parse openCypher queries using Rust.

open-cypher uses the pest library to parse cypher queries using the pestfile, src/cypher.pest, based on the openCypher EBNF file (link or file).

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 grammar file for generating a rust parser and types, based on the ebnf file from the openCypher site.
    • 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