You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the grammar also does not support node label expressions (patterns) and relationship type patterns as in:
MATCH (p:Person|(!Organization))-[:(KNOWS&!HURTS)]->(:Person) RETURN p
also function calls in a RETURN are not working when the function names use "keywords":
MATCH (p) RETURN p, labels(p), types(p)
I think I was able to improve the grammar for my purposes but I lost some of the original functionality, so this is merely a note about the shortcomings of the current file. I don't require a fix anymore, but others may do.
yGuy
changed the title
Cypher ANTLR grammar file does not include sub queries
Cypher ANTLR grammar file does not include newer Cypher features
Sep 1, 2023
I tried the cypher antlr grammar:
https://github.com/neo4j/cypher-editor/blob/6f476d6e4d73eacb12f922ebe5e6d2c7e11d67df/packages/antlr4/src/Cypher.g4#L149C14-L149C14
It seems the grammar is outdated and does not consider subqueries. It fails to parse the following queries, e.g.:
(from https://neo4j.com/docs/cypher-manual/current/clauses/call-subquery/ )
as well as
and
(from https://neo4j.com/docs/cypher-manual/current/syntax/expressions/#existential-subquery-simple-case )
Suggestion:
Include subqueryclauses like this
and add the exists sub query to the expressions:
Note that I am not a cypher expert so the above may be wrong or incomplete.
The text was updated successfully, but these errors were encountered: