diff options
author | Rudrangi Anupriya <ra00745022@techmahindra.com> | 2023-05-30 17:20:20 +0530 |
---|---|---|
committer | Rudrangi Anupriya <ra00745022@techmahindra.com> | 2023-05-30 20:32:36 +0530 |
commit | 2696de664b097c8dceb4332e9896417835e77178 (patch) | |
tree | 5a455bbe60a5bf02519a39864956057747af2244 /cps-path-parser/src/main/antlr4 | |
parent | 325ac091ddea291c5659fa6e803f132a578deb14 (diff) |
Add <,> operators support to cps-path
Issue-ID: CPS-1273
Change-Id: I5d562463b9a49abfe0436047a637857d10596fff
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
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 | 10 |
1 files changed, 8 insertions, 2 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 86c1705617..c88a822654 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 @@ -47,13 +47,15 @@ listElementRef : OB leafCondition ( booleanOperators leafCondition)* CB ; multipleLeafConditions : OB leafCondition ( booleanOperators leafCondition)* CB ; -leafCondition : AT leafName EQ ( IntegerLiteral | StringLiteral) ; +leafCondition : AT leafName comparativeOperators ( IntegerLiteral | StringLiteral) ; leafName : QName ; booleanOperators : ( KW_AND | KW_OR ) ; -invalidPostFix : (AT | CB | COLONCOLON | EQ ).+ ; +comparativeOperators : ( EQ | GT | LT | GE | LE ) ; + +invalidPostFix : (AT | CB | COLONCOLON | comparativeOperators ).+ ; /* * Lexer Rules @@ -70,6 +72,10 @@ SLASH : '/' ; COMMA : ',' ; OP : '(' ; CP : ')' ; +GT : '>' ; +LT : '<' ; +GE : '>=' ; +LE : '<=' ; // KEYWORDS |