Cypher

EBNF

Cypher = [SP], QueryOptions, Statement, [[SP], ';'], [SP], EOI ;
Statement = Command
          | Query
          ;
Command = CreateIndex
        | DropIndex
        | CreateUniqueConstraint
        | DropUniqueConstraint
        | CreateNodePropertyExistenceConstraint
        | DropNodePropertyExistenceConstraint
        | CreateRelationshipPropertyExistenceConstraint
        | DropRelationshipPropertyExistenceConstraint
        ;
CreateIndex = (C,R,E,A,T,E), SP, Index ;
DropIndex = (D,R,O,P), SP, Index ;
CreateUniqueConstraint = (C,R,E,A,T,E), SP, UniqueConstraint ;
DropUniqueConstraint = (D,R,O,P), SP, UniqueConstraint ;
CreateNodePropertyExistenceConstraint = (C,R,E,A,T,E), SP, NodePropertyExistenceConstraint ;
DropNodePropertyExistenceConstraint = (D,R,O,P), SP, NodePropertyExistenceConstraint ;
CreateRelationshipPropertyExistenceConstraint = (C,R,E,A,T,E), SP, RelationshipPropertyExistenceConstraint ;
DropRelationshipPropertyExistenceConstraint = (D,R,O,P), SP, RelationshipPropertyExistenceConstraint ;
Query = RegularQuery
      | StandaloneCall
      | BulkImportQuery
      ;
RegularQuery = SingleQuery, { [SP], Union } ;
SingleQuery = SinglePartQuery
            | MultiPartQuery
            ;
Union = ((U,N,I,O,N), SP, (A,L,L), [SP], SingleQuery)
      | ((U,N,I,O,N), [SP], SingleQuery)
      ;