openCypher
openCypher copied to clipboard
Why remove `shortestPath` & `allShortestPaths`?
I noticed that shortestPath
& allShortestPaths
were removed from the grammar recently, I don't understand why.
The ShortestPathPattern
, which is the grammar non-terminal that contains both, shortestPath
and allShortestPaths
is still in the grammar specification. The specification files are the point of truth.
The EBNF files are generate for reader convenience from the grammar specification. So, it is a good question, why the production AnonymousPatternPart = PatternElement ;
lacks | ShortestPathPattern
. We have to investigate that.
These are marked as legacy
in the source file:
https://github.com/opencypher/openCypher/blob/649499cdd96432cd99a30f46a84b2369c7d3fe43/grammar/basic-grammar.xml#L75
That makes them not part of the main grammar artifact, but part of the legacy version of the artifacts. The legacy versions are also available on http://www.opencypher.org/resources.
This seems to be a mistake, however. The legacy mark was introduced in https://github.com/opencypher/openCypher/pull/98 but the Standardisation Scope document includes them. I would say that we should make sure that the grammar legacy markers are consistent with the document, by altering one or the other as appropriate.
Additional info on legacy grammar can be found in the README: https://github.com/opencypher/openCypher/tree/master/grammar#legacy-grammar
The real source of truth should probably be the Cypher 9 CIP: https://github.com/opencypher/openCypher/blob/master/cip/1.accepted/CIP2017-10-17-Cypher-9.adoc#21-neo4j-and-standardisation-scope