Improve error handling on unexpected 'postfix'
[cps.git] / cps-path-parser / src / main / antlr4 / org / onap / cps / cpspath / parser / antlr4 / CpsPath.g4
index 8609545..a4fd58e 100644 (file)
@@ -25,7 +25,7 @@ ancestorAxis: SLASH KW_ANCESTOR COLONCOLON ancestorPath ;
 
 ancestorPath: yangElement (SLASH yangElement)* ;
 
-cpsPathWithSingleLeafCondition: prefix singleValueCondition ;
+cpsPathWithSingleLeafCondition: prefix singleValueCondition postfix? ;
 
 /*
 No need to ditinguish between cpsPathWithDescendant | cpsPathWithDescendantAndLeafConditions really!
@@ -40,6 +40,8 @@ descendant: SLASH prefix ;
 
 prefix: (SLASH yangElement)* SLASH containerName ;
 
+postfix: (SLASH yangElement)+ ;
+
 yangElement: containerName listElementRef? ;
 
 containerName: QName ;