1 | please include function javaTokNPunctuationWithBrackets. |
2 | please include function javaTokNoQuotes. |
3 | please include function javaTokNoQuotesWithBrackets. |
4 | |
5 | static LS ai_gazelle_statementsFromAppliedRule(RuleEngine2_MatchedRule r, S judgement) { |
6 | if (r == null || r.rule == null) ret new L; |
7 | if (nempty(judgement) && neq(judgement, 'good)) judgement = 'bad; // funny -> bad |
8 | |
9 | S ruleID = r.rule.globalID; |
10 | S ruleIn = first(r.rule.in); |
11 | if (ruleIn == null) ret new L; |
12 | SS varMap = r.map; |
13 | S tokenize = r.tokenizationFunction; |
14 | LS tok = cast callAndMake(tokenize, ruleIn); |
15 | LS tokC = codeTokens(tok); |
16 | Set<S> possibleVars = asCISet(tokC); |
17 | new LS statements; |
18 | for (S a, b : varMap) { |
19 | statements.add(format("in a * mapping, variable " + quote(a) + " was used", judgement)); |
20 | statements.add(format("in a * mapping, variable " + quote(a) + " was mapped to " + quote(b), judgement)); |
21 | } |
22 | for (S var : possibleVars) |
23 | statements.add("possible variable " + quote(var)); |
24 | statements.add(format("a * mapping is *", judgement, sfu(varMap))); |
25 | ret statements; |
26 | } |
Began life as a copy of #1021432
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: | #1021452 |
Snippet name: | ai_gazelle_statementsFromAppliedRule - statements are not uniquified |
Eternal ID of this version: | #1021452/8 |
Text MD5: | cbfb864f1f50b2fd6de4f36b0494a112 |
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-04 13:59:38 |
Source code size: | 1093 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 322 / 371 |
Version history: | 7 change(s) |
Referenced in: | [show references] |