openCypher icon indicating copy to clipboard operation
openCypher copied to clipboard

Antlr parser demo

Open hvub opened this issue 3 years ago • 0 comments

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.

hvub avatar Nov 26 '21 09:11 hvub