Skip to content
Chris Leishman edited this page Mar 30, 2016 · 6 revisions

What kind of grammar does libcypher-parser use?

libcypher-parser uses a Parsing Expression Grammar (PEG), which is also the same approach that Neo4j uses in its Cypher implementation (both were implemented by @cleishm).

PEG's are a relatively new approach to describing language grammars, that offer some advantages for parsing software programming languages, such as ease of description, easier error handling and performance.

libcypher-parser uses a PEG implementation called leg, which generates C code. You can see the entire grammar here:

Clone this wiki locally
You can’t perform that action at this time.