|
7 | 7 | /* |
8 | 8 | ============================================================ |
9 | 9 | First created on: Mar/05/2021 |
10 | | -Last modified on: Sep/20/2023 |
| 10 | +Last modified on: Sep/27/2023 |
11 | 11 | Author(s): Senthil Nathan ( [email protected]) |
12 | 12 |
|
13 | 13 | This toolkit's public GitHub URL: |
@@ -1993,7 +1993,7 @@ namespace eval_predicate_functions { |
1993 | 1993 | // the usage of attributes (LHS), operations performed (in the middle), |
1994 | 1994 | // the values to be compared (RHS) and the intra subexpression logical |
1995 | 1995 | // operators if any. By building that structure once here, |
1996 | | - // it can be reused when the user application ode calls the eval_predicate |
| 1996 | + // it can be reused when the user application code calls the eval_predicate |
1997 | 1997 | // function available in this file repeatedly for evaluating a |
1998 | 1998 | // given expression. It will help in improving the expression evaluation performance. |
1999 | 1999 | // This subexpression layout list will have a sequence of items as shown below. |
@@ -2402,7 +2402,7 @@ namespace eval_predicate_functions { |
2402 | 2402 |
|
2403 | 2403 | Please search for Sep/20/2023 in this file to get a broader |
2404 | 2404 | understanding of how I handle the multi-level nested subexpressions. |
2405 | | - As always, I only tested half a dozen example expressions that include |
| 2405 | + As always, I only tested a dozen example expressions that include |
2406 | 2406 | multi-level nested SEs. There will definitely be other forms |
2407 | 2407 | of multi-level nested SEs that are not handled adequately. |
2408 | 2408 | If that happens in the field, I will have to do more |
@@ -2439,7 +2439,7 @@ namespace eval_predicate_functions { |
2439 | 2439 | NestedSubexpressionId="2.2.1.2.4.1", Logical operator="||" |
2440 | 2440 |
|
2441 | 2441 | Test cases covering the multi-level nested subexpressions can be found in the |
2442 | | - EvalPredicateExample.spl (3.7 to 3.12) and FunctionalTests.spl (A51.1 to A51.20). |
| 2442 | + EvalPredicateExample.spl (3.7 to 3.12) and FunctionalTests.spl (A51.1 to A51.21). |
2443 | 2443 | ********************************************************* |
2444 | 2444 | */ |
2445 | 2445 |
|
@@ -2540,24 +2540,25 @@ namespace eval_predicate_functions { |
2540 | 2540 |
|
2541 | 2541 | boolean breakFromOpenParenthesisProcessingWhileLoopIfNeeded = true; |
2542 | 2542 |
|
2543 | | - // There are special cases such as the A51.20 test case in |
| 2543 | + // There are special test cases such as the A51.20 and A51.21 in |
2544 | 2544 | // FunctionalTests.spl will have a reason for us to meet the |
2545 | 2545 | // condition in this if block. |
2546 | | - if((subexpressionId == "") && ((idx > 0) && (myBlob[idx-1] == '('))) { |
2547 | | - // If we get inside this if block, then we have met these conditions. |
| 2546 | + // Senthil made a change in the following statement on Sep/27/2023. |
| 2547 | + if(idx > 0 && myBlob[idx-1] == '(') { |
| 2548 | + // If we reach inside this if block, then we have met these conditions. |
2548 | 2549 | // selol size is non-zero. |
2549 | 2550 | // We encountered a new OP. |
2550 | | - // SE Id is an empty string. |
2551 | | - // That means, we already completed validating |
2552 | | - // the very first SE in the full expression. |
2553 | | - // Since we also passed the test for finding the |
2554 | | - // previous character as another OP, it is an indication |
| 2551 | + // SE Id is either an empty string or a non-empty string. |
| 2552 | + // These conditions indicate that we already completed validating |
| 2553 | + // the previous SE we encountered in the given expression. |
| 2554 | + // Since we also passed the test for finding that the |
| 2555 | + // previous character is another OP, it is an indication |
2555 | 2556 | // that there is a new nested SE starting right after the |
2556 | | - // entire expression's very first SE that we just now |
| 2557 | + // previously completed SE that we just now |
2557 | 2558 | // validated. In this case, let us not break from the |
2558 | | - // OP processing white loop so that it can continue to |
2559 | | - // create the very first SE id of this entire expression as |
2560 | | - // 1.1 right here in this iteration of the OP processing while loop. |
| 2559 | + // OP processing while loop so that it can continue to |
| 2560 | + // create the SE id of the previously completed subexpression |
| 2561 | + // right here in this iteration of the OP processing while loop. |
2561 | 2562 | // So, let us not give a chance for the next if-block to |
2562 | 2563 | // break from the OP processing based on that if block's |
2563 | 2564 | // conditional check result. |
@@ -2663,7 +2664,7 @@ namespace eval_predicate_functions { |
2663 | 2664 | // We are going to declare the end of this nested subexpression. |
2664 | 2665 | subexpressionLayoutList[selolSize - 1] = ""; |
2665 | 2666 |
|
2666 | | - // Test cases such as A51.19 and A51.20 in FunctionalTests.spl will make it to |
| 2667 | + // Test cases such as A51.19 to A51.21 in FunctionalTests.spl will make it to |
2667 | 2668 | // go via this part of the OP processing logic. |
2668 | 2669 | if(trace == true) { |
2669 | 2670 | cout << "_HHHHH_03 Inside the OP processing block just before getting " << |
@@ -2696,7 +2697,7 @@ namespace eval_predicate_functions { |
2696 | 2697 | // If it is a multi-level nested expression, then we have to call the following |
2697 | 2698 | // method in such a way to get an SE ID that follows the format x.y.z instead of x.y. |
2698 | 2699 | // |
2699 | | - // You can refer to A51.19 and A51.20 test cases in FunctionalTests.spl file to |
| 2700 | + // You can refer to A51.19 to A51.21 test cases in FunctionalTests.spl file to |
2700 | 2701 | // see how the following if-else condition will work for the very first part of the |
2701 | 2702 | // subexpression in those two test cases. |
2702 | 2703 | // |
|
0 commit comments