openCypher
openCypher copied to clipboard
Antlr parser demo
This PR adds a new grammar-demo
module, which contains the AntlrParserDemo
.
The AntlrParserDemo
demonstates code for how to use the openCypher Antlr parser in four ways:
- With tree listener and grammar from XML
- With tree listener and grammar from g4
- Manual tree walking and grammar from XML
- Manual tree walking and grammar from g4
The module current has the g4 grammar as resources, which is not ideal, since it is a generated artifact from the view point of the rest of repository. Ideas how to improve this are welcome.