summaryrefslogtreecommitdiffstats
path: root/aai-traversal/src/main/resources/antlr4/org
diff options
context:
space:
mode:
Diffstat (limited to 'aai-traversal/src/main/resources/antlr4/org')
-rw-r--r--aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g417
1 files changed, 6 insertions, 11 deletions
diff --git a/aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g4 b/aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g4
index 2713677..f0c866a 100644
--- a/aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g4
+++ b/aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g4
@@ -6,21 +6,15 @@ grammar AAIDsl;
aaiquery: dslStatement;
-dslStatement: (queryStep) (traverseStep | unionTraverseStep)* limitStep*;
-
-queryStep : (singleNodeStep |singleQueryStep | multiQueryStep);
+dslStatement: (singleNodeStep ) (traverseStep )* limitStep*;
unionQueryStep: LBRACKET dslStatement ( COMMA (dslStatement))* RBRACKET;
-traverseStep: (TRAVERSE ( queryStep | unionQueryStep));
-
-unionTraverseStep: TRAVERSE unionQueryStep;
+traverseStep: (TRAVERSE ( singleNodeStep | unionQueryStep));
-singleNodeStep: NODE STORE? ;
-singleQueryStep: NODE STORE? (filterStep | filterTraverseStep);
-multiQueryStep: NODE STORE? (filterStep | filterTraverseStep) (filterStep)+;
+singleNodeStep: NODE STORE? (filterStep | filterTraverseStep)*;
-filterStep: NOT? (LPAREN KEY COMMA KEY (COMMA KEY)*RPAREN);
+filterStep: NOT? (LPAREN KEY (COMMA KEY)* RPAREN);
filterTraverseStep: (LPAREN traverseStep* RPAREN);
limitStep: LIMIT NODE;
@@ -28,7 +22,8 @@ limitStep: LIMIT NODE;
LIMIT: 'LIMIT';
NODE: ID;
-KEY: ['] ID ['] ;
+KEY: ['] (ID | ' ')* ['] ;
+
AND: [&];