Warning: session_start(): open(/var/lib/php/sessions/sess_g9o49e0a180r9pcl84uee4pgu5, 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
// tok = CNC
// returns [(index, tree leaf)]
static LPair matchEndUsingWordTree_all(L tok, Map tree) {
O best = null; // best leaf
int bestIndex = 0; // best index
int j = l(tok)-2;
LPair out = new L;
while (j > 0) {
O def = tree.get("");
if (def != null) { best = def; bestIndex = j; }
O t = tree.get(tok.get(j));
if (t == null) break;
if (!t instanceof Map) break with addPair(out, j, t); // leaf!
j -= 2;
tree = (Map) t;
}
if (best != null) addPair(out, bestIndex, best);
ret out;
}