!7 set flag AllowMetaCode. set flag Reparse. meta-transformNow { tok_standardBot } standard bot TheAIShould { static noeq record Entry(S text) extends HasGlobalID {} Map db = ciMap(); S add(S s) { if (!db.containsKey(s)) { db.put(s, new Entry(s)); change(); } null; } S remove(S s) { ret db.remove(s) ? with(r change, "OK, then not") : null; } S listWithPattern(S pat) { ret or2(lines(map(db, x -> format(ellipsisToStar(pat), x))), "nothing"); } sync S processSimplifiedLine(S s, O... _) { try answer super.processSimplifiedLine(s, _); new Matches m; meta { S program = [[ The AI should ... = + The AI should not ...|The AI shouldn't ... = - What should the AI do = listWithPattern("The AI should ...") ]]; ret ai_lineEquationsToMatchX2Statements(jreplace_multi(program, "+", "add(\\$1);", "-", "remove(\\$1);")); } null; } }