Warning: session_start(): open(/var/lib/php/sessions/sess_8a3lpthah322n9b7el1ls8vert, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
p-exp {
PTElement input = ai_parseToCulledTree("What is this thing you have");
PTElement pat = ai_parseToCulledTree("What is X");
matchTrees(input, pat);
}
svoid matchTrees(PTElement pat, PTElement input) {
print("Matching: " + pat + " / " + input);
if (pat == null || input == null) ret;
if (pat instanceof ChooseCategory && input instanceof ChooseCategory) {
HaveCategory l = cast first(pat.children);
HaveCategory r = cast first(input.children);
if (l != null && r != null && eq(l.category, r.category)) {
print("Using category: " + l.category);
matchTrees(l, r);
}
ret;
}
if (pat instanceof HaveCategory && input instanceof HaveCategory) {
matchTree(first(pat.children), first(input.children));
ret;
}
print("Non-matching classes: " + className(pat) + " vs " + className(input));
}