From 3e4b95de4c6d21f9b05e08197677c94287a9757d Mon Sep 17 00:00:00 2001 From: Nicola Vitucci Date: Fri, 20 Feb 2026 14:19:24 +0000 Subject: [PATCH 01/10] Add syntax section for clauses and full grammar --- modules/ROOT/content-nav.adoc | 1 + .../syntax/clauses/call-procedure.bnf | 2 + .../ROOT/examples/syntax/clauses/create.bnf | 2 + .../ROOT/examples/syntax/clauses/delete.bnf | 2 + .../ROOT/examples/syntax/clauses/filter.bnf | 2 + .../ROOT/examples/syntax/clauses/foreach.bnf | 2 + modules/ROOT/examples/syntax/clauses/let.bnf | 2 + .../ROOT/examples/syntax/clauses/limit.bnf | 2 + .../ROOT/examples/syntax/clauses/load-csv.bnf | 2 + .../ROOT/examples/syntax/clauses/match.bnf | 139 + .../ROOT/examples/syntax/clauses/merge.bnf | 2 + .../syntax/clauses/optional-match.bnf | 2 + .../ROOT/examples/syntax/clauses/order-by.bnf | 2 + .../ROOT/examples/syntax/clauses/remove.bnf | 2 + .../ROOT/examples/syntax/clauses/return.bnf | 2 + .../ROOT/examples/syntax/clauses/search.bnf | 2 + modules/ROOT/examples/syntax/clauses/set.bnf | 2 + .../syntax/clauses/show-functions.bnf | 9 + .../syntax/clauses/show-procedures.bnf | 12 + .../examples/syntax/clauses/show-settings.bnf | 2 + .../syntax/clauses/show-transactions.bnf | 6 + modules/ROOT/examples/syntax/clauses/skip.bnf | 2 + .../syntax/clauses/terminate-transactions.bnf | 5 + .../ROOT/examples/syntax/clauses/unwind.bnf | 2 + modules/ROOT/examples/syntax/clauses/use.bnf | 2 + .../ROOT/examples/syntax/clauses/where.bnf | 2 + modules/ROOT/examples/syntax/clauses/with.bnf | 2 + modules/ROOT/examples/syntax/full-grammar.bnf | 3572 +++++++++++++++++ .../images/syntax/clauses/call-procedure.svg | 56 + modules/ROOT/images/syntax/clauses/create.svg | 51 + modules/ROOT/images/syntax/clauses/delete.svg | 58 + modules/ROOT/images/syntax/clauses/filter.svg | 56 + .../ROOT/images/syntax/clauses/foreach.svg | 54 + modules/ROOT/images/syntax/clauses/let.svg | 51 + modules/ROOT/images/syntax/clauses/limit.svg | 51 + .../ROOT/images/syntax/clauses/load-csv.svg | 61 + modules/ROOT/images/syntax/clauses/match.svg | 607 +++ modules/ROOT/images/syntax/clauses/merge.svg | 56 + .../images/syntax/clauses/optional-match.svg | 51 + .../ROOT/images/syntax/clauses/order-by.svg | 51 + modules/ROOT/images/syntax/clauses/remove.svg | 51 + modules/ROOT/images/syntax/clauses/return.svg | 56 + modules/ROOT/images/syntax/clauses/search.svg | 72 + modules/ROOT/images/syntax/clauses/set.svg | 51 + .../images/syntax/clauses/show-functions.svg | 123 + .../images/syntax/clauses/show-procedures.svg | 120 + .../images/syntax/clauses/show-settings.svg | 61 + .../syntax/clauses/show-transactions.svg | 100 + modules/ROOT/images/syntax/clauses/skip.svg | 51 + .../syntax/clauses/terminate-transactions.svg | 94 + modules/ROOT/images/syntax/clauses/unwind.svg | 53 + modules/ROOT/images/syntax/clauses/use.svg | 51 + modules/ROOT/images/syntax/clauses/where.svg | 51 + modules/ROOT/images/syntax/clauses/with.svg | 61 + .../ROOT/pages/appendix/grammar/index.adoc | 6 + modules/ROOT/pages/clauses/call.adoc | 3 + modules/ROOT/pages/clauses/create.adoc | 4 + modules/ROOT/pages/clauses/delete.adoc | 7 +- modules/ROOT/pages/clauses/filter.adoc | 5 + modules/ROOT/pages/clauses/foreach.adoc | 7 +- modules/ROOT/pages/clauses/let.adoc | 7 +- modules/ROOT/pages/clauses/limit.adoc | 5 + .../ROOT/pages/clauses/listing-functions.adoc | 5 + .../pages/clauses/listing-procedures.adoc | 5 + .../ROOT/pages/clauses/listing-settings.adoc | 5 + modules/ROOT/pages/clauses/load-csv.adoc | 5 + modules/ROOT/pages/clauses/match.adoc | 7 +- modules/ROOT/pages/clauses/merge.adoc | 7 +- .../ROOT/pages/clauses/optional-match.adoc | 5 + modules/ROOT/pages/clauses/order-by.adoc | 5 + modules/ROOT/pages/clauses/remove.adoc | 4 + modules/ROOT/pages/clauses/return.adoc | 5 + modules/ROOT/pages/clauses/search.adoc | 5 + modules/ROOT/pages/clauses/set.adoc | 5 + modules/ROOT/pages/clauses/skip.adoc | 7 +- .../pages/clauses/transaction-clauses.adoc | 7 +- modules/ROOT/pages/clauses/unwind.adoc | 4 + modules/ROOT/pages/clauses/use.adoc | 5 + modules/ROOT/pages/clauses/where.adoc | 5 + modules/ROOT/pages/clauses/with.adoc | 5 + modules/ROOT/partials/syntax.adoc | 19 + 81 files changed, 6136 insertions(+), 7 deletions(-) create mode 100644 modules/ROOT/examples/syntax/clauses/call-procedure.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/create.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/delete.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/filter.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/foreach.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/let.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/limit.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/load-csv.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/match.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/merge.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/optional-match.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/order-by.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/remove.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/return.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/search.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/set.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/show-functions.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/show-procedures.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/show-settings.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/show-transactions.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/skip.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/terminate-transactions.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/unwind.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/use.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/where.bnf create mode 100644 modules/ROOT/examples/syntax/clauses/with.bnf create mode 100644 modules/ROOT/examples/syntax/full-grammar.bnf create mode 100644 modules/ROOT/images/syntax/clauses/call-procedure.svg create mode 100644 modules/ROOT/images/syntax/clauses/create.svg create mode 100644 modules/ROOT/images/syntax/clauses/delete.svg create mode 100644 modules/ROOT/images/syntax/clauses/filter.svg create mode 100644 modules/ROOT/images/syntax/clauses/foreach.svg create mode 100644 modules/ROOT/images/syntax/clauses/let.svg create mode 100644 modules/ROOT/images/syntax/clauses/limit.svg create mode 100644 modules/ROOT/images/syntax/clauses/load-csv.svg create mode 100644 modules/ROOT/images/syntax/clauses/match.svg create mode 100644 modules/ROOT/images/syntax/clauses/merge.svg create mode 100644 modules/ROOT/images/syntax/clauses/optional-match.svg create mode 100644 modules/ROOT/images/syntax/clauses/order-by.svg create mode 100644 modules/ROOT/images/syntax/clauses/remove.svg create mode 100644 modules/ROOT/images/syntax/clauses/return.svg create mode 100644 modules/ROOT/images/syntax/clauses/search.svg create mode 100644 modules/ROOT/images/syntax/clauses/set.svg create mode 100644 modules/ROOT/images/syntax/clauses/show-functions.svg create mode 100644 modules/ROOT/images/syntax/clauses/show-procedures.svg create mode 100644 modules/ROOT/images/syntax/clauses/show-settings.svg create mode 100644 modules/ROOT/images/syntax/clauses/show-transactions.svg create mode 100644 modules/ROOT/images/syntax/clauses/skip.svg create mode 100644 modules/ROOT/images/syntax/clauses/terminate-transactions.svg create mode 100644 modules/ROOT/images/syntax/clauses/unwind.svg create mode 100644 modules/ROOT/images/syntax/clauses/use.svg create mode 100644 modules/ROOT/images/syntax/clauses/where.svg create mode 100644 modules/ROOT/images/syntax/clauses/with.svg create mode 100644 modules/ROOT/pages/appendix/grammar/index.adoc create mode 100644 modules/ROOT/partials/syntax.adoc diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index 560f3fc7c..fac68f004 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -158,6 +158,7 @@ *** xref:appendix/gql-conformance/supported-optional.adoc[] *** xref:appendix/gql-conformance/analogous-cypher.adoc[] *** xref:appendix/gql-conformance/additional-cypher.adoc[] +** xref:appendix/grammar/index.adoc[] ** xref:appendix/tutorials/index.adoc[] *** xref:appendix/tutorials/basic-query-tuning.adoc[] *** xref:appendix/tutorials/advanced-query-tuning.adoc[] \ No newline at end of file diff --git a/modules/ROOT/examples/syntax/clauses/call-procedure.bnf b/modules/ROOT/examples/syntax/clauses/call-procedure.bnf new file mode 100644 index 000000000..2ad150550 --- /dev/null +++ b/modules/ROOT/examples/syntax/clauses/call-procedure.bnf @@ -0,0 +1,2 @@ + ::= + [ "OPTIONAL" ] "CALL" \ No newline at end of file diff --git a/modules/ROOT/examples/syntax/clauses/create.bnf b/modules/ROOT/examples/syntax/clauses/create.bnf new file mode 100644 index 000000000..38e806a1a --- /dev/null +++ b/modules/ROOT/examples/syntax/clauses/create.bnf @@ -0,0 +1,2 @@ + ::= + "CREATE" \ No newline at end of file diff --git a/modules/ROOT/examples/syntax/clauses/delete.bnf b/modules/ROOT/examples/syntax/clauses/delete.bnf new file mode 100644 index 000000000..ac70cda93 --- /dev/null +++ b/modules/ROOT/examples/syntax/clauses/delete.bnf @@ -0,0 +1,2 @@ + ::= + [ "DETACH" | "NODETACH" ] "DELETE" \ No newline at end of file diff --git a/modules/ROOT/examples/syntax/clauses/filter.bnf b/modules/ROOT/examples/syntax/clauses/filter.bnf new file mode 100644 index 000000000..24f73918e --- /dev/null +++ b/modules/ROOT/examples/syntax/clauses/filter.bnf @@ -0,0 +1,2 @@ + ::= + "FILTER" [ "WHERE" ] \ No newline at end of file diff --git a/modules/ROOT/examples/syntax/clauses/foreach.bnf b/modules/ROOT/examples/syntax/clauses/foreach.bnf new file mode 100644 index 000000000..3d7a684ff --- /dev/null +++ b/modules/ROOT/examples/syntax/clauses/foreach.bnf @@ -0,0 +1,2 @@ + ::= + "FOREACH" "(" ")" \ No newline at end of file diff --git a/modules/ROOT/examples/syntax/clauses/let.bnf b/modules/ROOT/examples/syntax/clauses/let.bnf new file mode 100644 index 000000000..0a8e69e56 --- /dev/null +++ b/modules/ROOT/examples/syntax/clauses/let.bnf @@ -0,0 +1,2 @@ + ::= + "LET" \ No newline at end of file diff --git a/modules/ROOT/examples/syntax/clauses/limit.bnf b/modules/ROOT/examples/syntax/clauses/limit.bnf new file mode 100644 index 000000000..9d9fa9c04 --- /dev/null +++ b/modules/ROOT/examples/syntax/clauses/limit.bnf @@ -0,0 +1,2 @@ + ::= + "LIMIT" \ No newline at end of file diff --git a/modules/ROOT/examples/syntax/clauses/load-csv.bnf b/modules/ROOT/examples/syntax/clauses/load-csv.bnf new file mode 100644 index 000000000..ef7f0f71a --- /dev/null +++ b/modules/ROOT/examples/syntax/clauses/load-csv.bnf @@ -0,0 +1,2 @@ + ::= + "LOAD CSV" [ "WITH HEADERS" ] [ ] \ No newline at end of file diff --git a/modules/ROOT/examples/syntax/clauses/match.bnf b/modules/ROOT/examples/syntax/clauses/match.bnf new file mode 100644 index 000000000..952625a28 --- /dev/null +++ b/modules/ROOT/examples/syntax/clauses/match.bnf @@ -0,0 +1,139 @@ + ::= + "MATCH" + + ::= + "LIMIT" + + ::= + "WHERE" + + ::= + [ ] [ { "," }... ] [ ] + + ::= + [ ] + | [ ] + + ::= + "REPEATABLE" { "ELEMENT" [ "BINDINGS" ] | "ELEMENTS" } + | "DIFFERENT" { "RELATIONSHIP" [ "BINDINGS" ] | "RELATIONSHIPS" } + + ::= + "SEARCH" "IN" "(" [ ] ")" [ ] + + ::= + "VECTOR INDEX" + + ::= + "FOR" + + ::= + "SCORE AS" + + ::= + [ "=" ] [ ] + + ::= + "(" [ [ ] [ ] | [ ] | ] ")" + + ::= + "WHERE" + | + | "$" + + ::= + "{" "}" + + ::= + [ { "," }... ] + + ::= + ":" + + ::= + "<-" [ "[" [ ] "]" ] "-" + | "-" [ "[" [ ] "]" ] "->" + | "<-" [ "[" [ ] "]" ] "->" + | "-" [ "[" [ ] "]" ] "-" + + ::= + [ ] [ ] [ ] + | [ ] [ ] + | [ ] + | + + ::= + "*" [ [ ] ".." [ ] | ] + + ::= + ":" + | { ":" | "IS" }