Lines Matching refs:links
64 struct tree *links; /* Tree of edges leaving this node. */
109 kwset->trie->links = 0;
133 struct tree *links[12];
147 /* Descend the tree of outgoing links for this trie node,
150 link = trie->links;
151 links[0] = (struct tree *) &trie->links;
157 links[depth] = link;
180 link->trie->links = 0;
191 links[depth]->llink = link;
193 links[depth]->rlink = link;
196 while (depth && !links[depth]->balance)
199 --links[depth]->balance;
201 ++links[depth]->balance;
206 if (depth && ((dirs[depth] == L && --links[depth]->balance)
207 || (dirs[depth] == R && ++links[depth]->balance)))
209 switch (links[depth]->balance)
215 r = links[depth], t = r->llink, rl = t->rlink;
220 r = links[depth], l = r->llink, t = l->rlink;
235 l = links[depth], t = l->rlink, lr = t->llink;
240 l = links[depth], r = l->rlink, t = r->llink;
256 links[depth - 1]->llink = t;
258 links[depth - 1]->rlink = t;
311 link = fail->links;
328 /* Set delta entries for the links of the given tree such that
405 kwset->target[i] = curr->links->label;
406 curr = curr->links->trie;
425 enqueue(curr->links, &last);
431 treedelta(curr->links, curr->depth, delta);
434 treefails(curr->links, curr->fail, kwset->trie);
443 if (!hasevery(fail->links, curr->links))
465 /* Create a vector, indexed by character code, of the outgoing links
469 treenext(kwset->trie->links, next);
646 tree = trie->links;
697 tree = trie->links;