static LPair ai_ruleEngine2_rulesForInput(RuleEngine2 engine, S q) { LS tokI = javaTokNPunctuationWithBrackets(q); new LPair l; for (RuleEngine2.Rule rule : engine.rules) { S cond = first(rule.in); SS map = zipTwoListsToCIMap_strict_withoutEquals(javaTokNPunctuationWithBrackets(cond), tokI); if (map == null) continue; //print(map + " | " + cond + " | " + rule.vars); l.add(pair(rule, map)); } ret l; }