aboutsummaryrefslogtreecommitdiffstats
path: root/cps-path-parser/src/main/antlr4/org/onap
diff options
context:
space:
mode:
authorPriyank Maheshwari <priyank.maheshwari@est.tech>2024-12-03 13:26:09 +0000
committerGerrit Code Review <gerrit@onap.org>2024-12-03 13:26:09 +0000
commit902d17332d3e5cebe545991e01a5e55f739f0f80 (patch)
treec319db49944ee804c1d73947708391b3220d40f0 /cps-path-parser/src/main/antlr4/org/onap
parentd6b552017a60769de4ec5e01274c0c1794c90f15 (diff)
parentd262e1c3f4671673a02ea402366a8c9b93fe4e53 (diff)
Merge "[Cps Path Parser] Introduce Attribute axis"
Diffstat (limited to 'cps-path-parser/src/main/antlr4/org/onap')
-rw-r--r--cps-path-parser/src/main/antlr4/org/onap/cps/cpspath/parser/antlr4/CpsPath.g44
1 files changed, 3 insertions, 1 deletions
diff --git a/cps-path-parser/src/main/antlr4/org/onap/cps/cpspath/parser/antlr4/CpsPath.g4 b/cps-path-parser/src/main/antlr4/org/onap/cps/cpspath/parser/antlr4/CpsPath.g4
index 74b99feb33..bb6bfc3942 100644
--- a/cps-path-parser/src/main/antlr4/org/onap/cps/cpspath/parser/antlr4/CpsPath.g4
+++ b/cps-path-parser/src/main/antlr4/org/onap/cps/cpspath/parser/antlr4/CpsPath.g4
@@ -27,10 +27,12 @@
grammar CpsPath ;
-cpsPath : ( prefix | descendant ) multipleLeafConditions? textFunctionCondition? containsFunctionCondition? ancestorAxis? EOF ;
+cpsPath : ( prefix | descendant ) multipleLeafConditions? textFunctionCondition? containsFunctionCondition? ancestorAxis? attributeAxis? EOF ;
slash : SLASH ;
+attributeAxis : SLASH AT leafName ;
+
ancestorAxis : KW_ANCESTOR_AXIS_PREFIX ancestorPath ;
ancestorPath : yangElement ( slash yangElement)* ;