1 | sbool nlLogic_checkFirstConditions2_debug; |
2 | |
3 | // returns (number of succeeded conditions, remaining conditions) |
4 | static Pair<Int, Exp> nlLogic_checkFirstConditions2(NLLogicChecker_v2 c, IfThen rule, NLLogicChecker_v2.Matching m) { |
5 | Exp exp = rule.in; |
6 | int succeeded = 0; |
7 | while ping (exp != null) { |
8 | Pair<Bool, Exp> p = c.checkFirstCondition(exp, m); |
9 | if (nlLogic_checkFirstConditions2_debug) |
10 | print("nlLogic_checkFirstConditions2: exp=" + exp + ", p=" + p); |
11 | if (!p.a) break; |
12 | ++succeeded; |
13 | exp = p.b; |
14 | } |
15 | ret pair(succeeded, exp); |
16 | } |
Began life as a copy of #1018054
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018075 |
Snippet name: | nlLogic_checkFirstConditions2 - returns number of succeeded conditions too |
Eternal ID of this version: | #1018075/1 |
Text MD5: | 97838a39a7851d354e4a53fc8f8b0a8e |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-08-29 15:08:00 |
Source code size: | 571 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 348 / 380 |
Referenced in: | [show references] |