Warning: session_start(): open(/var/lib/php/sessions/sess_ge9odcok94e8tm4um66kphstc9, 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
cmodule2 InputTreeTest > DynPrintLog {
concept Node {
new RefL followUps;
toString { ret getString comment(this); }
}
concept StringNode > Node {
S string;
*() {}
*(S *string) {}
toString { ret quote(string); }
}
transient Node root;
transient LS texts = ll("Hello world", "Hello you");
start-thread {
root = new Node;
cset(root, comment := "Root");
fOr (S text : texts)
addText(text);
printStruct(+root);
}
void addText(S text) {
Node node = root;
for (S string : charactersAsStrings(text)) {
Node next = findObject(node.followUps, +string);
if (next == null)
node.followUps.add(next = cnew StringNode(+string));
node = next;
}
}
}