It’s already there
• Open Source
• Separate “Backend”
• CodeMirror support
• Integrated into Neo4j 3.2
' /neo4j-contrib/cypher-editor
Slide 8
Slide 8 text
openCypher ?
Slide 9
Slide 9 text
1. Grammar
2. Tests
3. Improvements
Slide 10
Slide 10 text
1. Grammar
• Based on ANTLR4 grammar
• Copied & Modified for Cypher Editor usage
• Superset of openCypher grammar version
• Neo4j version of Cypher
File: cypher-editor-support/src/_generated/Cypher.g4
Slide 11
Slide 11 text
ANTLR4 ♥ JavaScript *
* With a few exceptions.
Slide 12
Slide 12 text
2. Tests
$ cd cypher-editor-support/test/parser/openCypherTestFiles
$ ls -1
cypher-legacy.js
cypher.js
$ cat * | grep "§" | wc -l
227
Challenges (2)
Little details that matters
nodeLabel : ‘:’ SP? labelName ;
MATCH (n:Person)
MATCH (n:`Army:General`)
MATCH (n: Person)
MATCH (n: `Army:General`)
Slide 16
Slide 16 text
Challenges (2)
Little details that matters
MATCH (n:␣ RETURN n
MATCH (n:␣ RETURN n
What user sees:
What grammar sees:
Slide 17
Slide 17 text
' /slizaa / slizaa-opencypher-xtext
Slide 18
Slide 18 text
Our team responsibility
• Sync up with openCypher grammar when
possible and makes sense
• Contribute our grammar fixes & improvements
back to openCypher