!752 static OccTree tree; !include #1003370 // DialogBot sclass StrictBot extends DialogBot { *(OccTree node) { super(node); } bool matchE(E a, E b) { ret eq(a, b); // strict! } } p { L> poems = parsePoems(splitAtEmptyLines([[ Usr: Yes Bot: ok yes [good] Usr: No Bot: ok no [good] Usr: No Bot: ok yes [bad] Usr: Yes Bot: ok no [bad] ]])); print("Got " + n(l(poems), "dialog") + "."); psl(poems); tree = poems2occTree(poems); print(asciiHeading("Occurrence Tree")); printOccTree(tree); check("Usr: Yes", "Bot: ok yes"); check("Usr: No", "Bot: ok no"); check("Usr: yes", "fail"); // we are very strict! print("OK"); } svoid check(S in, S out) { checkBot(new StrictBot(tree), in, out); }