-
Notifications
You must be signed in to change notification settings - Fork 102
Parser
andyfeng edited this page Mar 15, 2021
·
2 revisions
We use the same grammar as open cypher but remove features that are not yet supported. See issue#57 for a list of features that are currently removed.
Parser class structure closely follows open cypher grammar.
- NodePattern:
(a:Person)
- name, type
- RelPattern:
-[e1:knows]->
- name, label, direction
- PatternElementChain:
-[e1:knows]->(b:Student)
- relPattern, nodePattern
- PatternElement:
(a:Person) -[e1:knows]->(b:Student) -[e2]->(c)
- nodePattern, vector<PatternElementChain>
- MatchStatement:
MATCH ..., ...
- vector<PatternElement>
- SingleQuery
MATCH ... MATCH ...
- vector<MatchStatement>
- Boolean Connection
- AND, XOR, OR, NOT
- Comparison
- = , <>, >, <, >=, <=
- Arithmetic
- +, - , *, /, %, ^
- String Operator
- STARTS WITH, ENDS WITH, CONTAINS
- Null Operator
- IS NULL, IS NOT NULL
- Property
- e.g. a.name
- Function Invocation
- functionName(param1, param2, ..)
- Parenthesized Expression Support
- (a.isStudent AND a.isMale) OR a.name CONTAINS "Xiyang"
- Variable (Leaf Expression)
- Literal (Leaf Expression)
- INT, DOUBLE, BOOLEAN, STRING, NULL
- Every expression is represented as ParsedExpression with 3 attributes
- ExpressionType
- string text (used to store content for LiteralExpression, VaraibleName, FunctionName and PropertyName)
- vector<ParsedExpression> children (empty for leaf expression)
- Coding Style
- Casting Rules
- Frontend
- Processor
- Storage
- Test