Lines Matching defs:links
65 struct tree *links; /* Tree of edges leaving this node. */
110 kwset->trie->links = 0;
134 struct tree *links[12];
148 /* Descend the tree of outgoing links for this trie node,
151 link = trie->links;
152 links[0] = (struct tree *) &trie->links;
158 links[depth] = link;
181 link->trie->links = 0;
192 links[depth]->llink = link;
194 links[depth]->rlink = link;
197 while (depth && !links[depth]->balance)
200 --links[depth]->balance;
202 ++links[depth]->balance;
207 if (depth && ((dirs[depth] == L && --links[depth]->balance)
208 || (dirs[depth] == R && ++links[depth]->balance)))
210 switch (links[depth]->balance)
216 r = links[depth], t = r->llink, rl = t->rlink;
221 r = links[depth], l = r->llink, t = l->rlink;
236 l = links[depth], t = l->rlink, lr = t->llink;
241 l = links[depth], r = l->rlink, t = r->llink;
257 links[depth - 1]->llink = t;
259 links[depth - 1]->rlink = t;
312 link = fail->links;
329 /* Set delta entries for the links of the given tree such that
406 kwset->target[i] = curr->links->label;
407 curr = curr->links->trie;
426 enqueue(curr->links, &last);
432 treedelta(curr->links, curr->depth, delta);
435 treefails(curr->links, curr->fail, kwset->trie);
444 if (!hasevery(fail->links, curr->links))
466 /* Create a vector, indexed by character code, of the outgoing links
470 treenext(kwset->trie->links, next);
649 tree = trie->links;
700 tree = trie->links;