java.lang.Object
org.evomaster.client.java.controller.neo4j.parser.cypher25.Cypher25AntlrParser
All Implemented Interfaces:
CypherParser

public class Cypher25AntlrParser extends Object implements CypherParser
CypherParser implementation built on the official Neo4j Cypher25 ANTLR grammar. Because the grammar is the one Neo4j itself uses, any query this parser accepts is guaranteed to be valid Cypher.
Syntax errors are not swallowed: the lexer and parser are wired with a listener that fails fast, and the error (with line/column) is surfaced as a CypherParserException.
  • Constructor Details

    • Cypher25AntlrParser

      public Cypher25AntlrParser()
  • Method Details

    • parse

      public MatchOperation parse(String query) throws CypherParserException
      Description copied from interface: CypherParser
      Parse a Cypher query, extracting its MATCH pattern and conditions.
      Specified by:
      parse in interface CypherParser
      Parameters:
      query - the Cypher query string
      Returns:
      the structural pattern and conditions of the MATCH clause
      Throws:
      CypherParserException - if the query is not syntactically valid Cypher, or does not contain a MATCH clause