You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Add OR operator to cps-path

  steps to be followed :


  1. Antlr grammer file changes should be made to recognise OR
  2. Implement the code logic in order to add OR functionality
  3. Add test cases
  4. Update documentation
  5. Demo to team


Here following are the antlr changes which made to recognise the OR

So, Cps has and condition which is applied with leaf condition ,similarly we have added or to the antlr

path :cps-path-parser/src/main/antlr4/org/onap/cps/cpspath/parser/antlr4/CpsPath.g4


listElementRef :  OB leafCondition ( ( KW_AND | KW_OR) leafCondition)* CB 

multipleLeafConditions : OB leafCondition ( ( KW_AND | KW_OR) leafCondition)* CB 


The problem is we are unable to find the logic how and condition has been implemented , like is there any query written for it.

Also found there is class  path :cps-path-parser/src/main/java/org/onap/cps/cpspath/parser/CpsPathBuilder.java ,here found that they used and as append condition but this doesn't seems like the logic implementation.

So, would like to get help with it.

to-do:
Need to implement the logic for OR Operation

But there are few doubts regarding this to be discussed

  • No labels