diff options
author | 2020-06-22 12:50:38 -0400 | |
---|---|---|
committer | 2020-06-22 12:51:08 -0400 | |
commit | bd4c050748ac957f6bb6684915233e478d71c0a1 (patch) | |
tree | d5c9254a1123e49c18e7ef3e97aa7b9ca9afab2e /aai-traversal/src/main/resources/antlr4/org | |
parent | 02b1b37d795f0bccf4500e14de5586891e78d306 (diff) |
traversal support for v20
Issue-ID: AAI-2933
Change-Id: I76f970d15ef911a3dd14d97f2fa050c8b6e29e96
Signed-off-by: LaMont, William(wl2432) <wl2432@att.com>
Diffstat (limited to 'aai-traversal/src/main/resources/antlr4/org')
-rw-r--r-- | aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v1/AAIDsl.g4 | 4 | ||||
-rw-r--r-- | aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v2/AAIDsl.g4 | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v1/AAIDsl.g4 b/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v1/AAIDsl.g4 index 3ba370c..29f6e3f 100644 --- a/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v1/AAIDsl.g4 +++ b/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v1/AAIDsl.g4 @@ -5,14 +5,14 @@ grammar AAIDsl; aaiquery: startStatement limit?; -startStatement: (vertex ) (traversal)* ; +startStatement: (vertex|unionVertex ) (traversal)* ; nestedStatement: (vertex|unionVertex ) (traversal)* ; vertex: label store? (filter)?; traversal: (edge (vertex|unionVertex)); -filter: (propertyFilter)* whereFilter?; +filter: (propertyFilter)* whereFilter*; propertyFilter: (not? '(' key (',' (key | num | bool))* ')'); bool: BOOL; diff --git a/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v2/AAIDsl.g4 b/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v2/AAIDsl.g4 index 453c0fe..5d923e1 100644 --- a/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v2/AAIDsl.g4 +++ b/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v2/AAIDsl.g4 @@ -5,7 +5,7 @@ grammar AAIDsl; aaiquery: startStatement limit?; -startStatement: (vertex ) (traversal)* ; +startStatement: (vertex|unionVertex ) (traversal)* ; nestedStatement: (traversal)+ ; vertex: label store? (filter)?; @@ -13,14 +13,15 @@ vertex: label store? (filter)?; //traversal: ( vertex|unionVertex edge); traversal: (edge* (vertex|unionVertex)); -filter: (selectFilter)* (propertyFilter)* whereFilter?; +filter: (selectFilter)* (propertyFilter)* whereFilter*; propertyFilter: (not? '(' key (',' (key | num | bool))* ')'); -selectFilter: (not? '{' key (',' key)* '}'); +selectFilter: ( '{' key (',' key)* '}'); bool: BOOL; whereFilter: (not? '(' nestedStatement ')' ); -unionVertex: '[' ( nestedStatement ( comma (nestedStatement))*) ']' store?; +//unionVertex: '[' ( nestedStatement ( comma (nestedStatement))*) ']' store?; +unionVertex: '[' ( (edgeFilter)* nestedStatement ( comma ( (edgeFilter)* nestedStatement))*) ']' store?; comma: ','; edge: ( TRAVERSE|DIRTRAVERSE) (edgeFilter)?; |