1 | svoid dm_gazelle_matchAdditionalInput(L<GazelleTree> l, LS inputs, O... _) { |
2 | for (GazelleTree t : l) |
3 | if (t.rule() != null) { |
4 | RuleEngine2_MatchedRule mr = t.mr; |
5 | LS in = t.rule().in; |
6 | int iCond = t.mr.iCond; |
7 | if (l(in) > iCond) { |
8 | LS conditions = dropFirst(iCond, in); |
9 | print("Remaining conditions for " + t.ruleID() + " with " + t.mr.map + ": " + conditions); |
10 | new Matches m; |
11 | if (matchAny("in " + (iCond+1) + " = *", t.rule().comments, m) && neq($1, 'input)) |
12 | continue with print("Not an input condition"); |
13 | |
14 | S input = get(inputs, iCond); |
15 | if (input == null) |
16 | continue with print("No more input (iCond=" + iCond + ", inputs=" + inputs + ")"); |
17 | |
18 | if (ai_ruleEngine2_matchStep(t.mr, litmap(standard := input), true)) |
19 | print("Input match OK: " + input + " - new map: " + t.mr.map); |
20 | else |
21 | print("Input match failed: " + input); |
22 | } |
23 | } |
24 | } |
Began life as a copy of #1021772
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021775 |
Snippet name: | dm_gazelle_matchAdditionalInput (OLD, use v2) |
Eternal ID of this version: | #1021775/6 |
Text MD5: | 26ef41ca3a16d0e804b6a6e42e976030 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-05 16:41:42 |
Source code size: | 1002 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 310 / 337 |
Version history: | 5 change(s) |
Referenced in: | [show references] |