diff options
author | ToineSiebelink <toine.siebelink@est.tech> | 2021-06-03 16:05:08 +0100 |
---|---|---|
committer | ToineSiebelink <toine.siebelink@est.tech> | 2021-06-03 16:09:41 +0100 |
commit | cfc500b4192c356a3499040ebb714ec0b5f26584 (patch) | |
tree | adb749f9fb884fdbe00a61fa841d09a1a1a9b96d /cps-path-parser/src/main/antlr4 | |
parent | 6a6e2fe266d954c8f8bdd7584371f103d78b4e62 (diff) |
Improve error handling on unexpected 'postfix'
Issue-ID: CPS-450
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ia8be460f4235f7f0c24498f861dbe42137111772
Diffstat (limited to 'cps-path-parser/src/main/antlr4')
-rw-r--r-- | cps-path-parser/src/main/antlr4/org/onap/cps/cpspath/parser/antlr4/CpsPath.g4 | 4 |
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 86095459ee..a4fd58e9c0 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 @@ -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 ; |