sbool nlLogic_checkFirstConditions2_debug; // returns (number of succeeded conditions, remaining conditions) static Pair nlLogic_checkFirstConditions2(NLLogicChecker_v2 c, IfThen rule, NLLogicChecker_v2.Matching m) { Exp exp = rule.in; int succeeded = 0; while ping (exp != null) { Pair p = c.checkFirstCondition(exp, m); if (nlLogic_checkFirstConditions2_debug) print("nlLogic_checkFirstConditions2: exp=" + exp + ", p=" + p); if (!p.a) break; ++succeeded; exp = p.b; } ret pair(succeeded, exp); }