static S ctxFindRuleForInput() { CtxContext ctx = ctxContext(); WoodyRule activeRule = woodyBot().getRule(ctx.activeRule); WoodyBot bot = woodyBot(); if (ctx.activeAnalyzer != null && ctxProcessRule(ctx.activeAnalyzer)) ret ctx.nextRule; if (activeRule != null) { print("Active rule: " + activeRule.fullName); WoodyRule analyzer = bot.getRule(activeRule.properties.get("ANALYZER")); print("Analyzer: " + getOpt(analyzer, "fullName")); if (analyzer != null) { // TODO } try answer ctxFindRuleForInput_default(); ret activeRule.fullName; } ret ctxFindRuleForInput_default(); } sS ctxFindRuleForInput_default() { for (WoodyRule rule : woodyOnRules(woodyBot())) if (rule.parsedCondition != null && rule.parsedCondition.get()) { print("Matching: " + rule.fullName + " " + structForUser(rule.properties)); printIndent(struct(rule.body)); // Just return first matching rule for now ret rule.fullName; } null; }