svoid philosophyBot1_orHandler(PhilosophyBot1 bot) { bot.addLogicRulePreprocessor(rule -> { if (!(rule.lhs instanceof S)) false; LS tok = bot.mainTokenize(tok_deCurlyOrRound((S) rule.lhs)); if (countCodeTokens(tok) == 3 && eq(secondCodeToken(tok), "|")) { // split into two rules print("Splitting or: " + tok); bot.addLogicRule(new PhilosophyBot1.LogicRule(firstCodeToken(tok), rule.rhs)); bot.addLogicRule(new PhilosophyBot1.LogicRule(lastCodeToken(tok), rule.rhs)); true; } false; }); }