Lines Matching defs:firstpos
1629 Firstpos: The firstpos of a node is the set of positions (nonempty leaves)
1632 * EMPTY leaves have empty firstpos.
1633 * The firstpos of a nonempty leaf is that leaf itself.
1634 * The firstpos of a QMARK, STAR, or PLUS node is the firstpos of its
1636 * The firstpos of a CAT node is the firstpos of the left argument, union
1637 the firstpos of the right if the left argument is nullable.
1638 * The firstpos of an OR node is the union of firstpos of each argument.
1658 * Every node in the firstpos of the argument of a STAR or PLUS node is in
1660 * Every node in the firstpos of the second argument of a CAT node is in
1672 int *nfirstpos; /* Element count stack for firstpos sets. */
1673 position *firstpos; /* Array where firstpos elements are stored. */
1702 MALLOC(firstpos, position, d->nleaves);
1703 o_firstpos = firstpos, firstpos += d->nleaves;
1725 /* The firstpos and lastpos of the empty leaf are both empty. */
1731 /* Every element in the firstpos of the argument is in the follow
1734 tmp.elems = firstpos;
1751 /* Every element in the firstpos of the second argument is in the
1754 tmp.elems = firstpos;
1764 /* The firstpos of a CAT node is the firstpos of the first argument,
1769 firstpos += nfirstpos[-1];
1793 /* The firstpos is the union of the firstpos of each argument. */
1814 /* This position is in its own firstpos and lastpos. */
1816 --firstpos, --lastpos;
1817 firstpos->index = lastpos->index = i;
1818 firstpos->constraint = lastpos->constraint = NO_CONSTRAINT;
1831 fprintf(stderr, " firstpos:");
1834 fprintf(stderr, " %d:", firstpos[j].index);
1835 prtok(d->tokens[firstpos[j].index]);
1875 /* Get the epsilon closure of the firstpos of the regexp. The result will
1879 insert(firstpos[i], &merged);