• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/tcl-105/tcl/tcl/generic/

Lines Matching defs:nfa

44 static void makesearch(struct vars *, struct nfa *);
103 static void okcolors(struct nfa *, struct colormap *);
106 static void rainbow(struct nfa *, struct colormap *, int, pcolor, struct state *, struct state *);
107 static void colorcomplement(struct nfa *, struct colormap *, int, struct state *, struct state *, struct state *);
114 static struct nfa *newnfa(struct vars *, struct colormap *, struct nfa *);
115 static void freenfa(struct nfa *);
116 static struct state *newstate(struct nfa *);
117 static struct state *newfstate(struct nfa *, int flag);
118 static void dropstate(struct nfa *, struct state *);
119 static void freestate(struct nfa *, struct state *);
120 static void destroystate(struct nfa *, struct state *);
121 static void newarc(struct nfa *, int, pcolor, struct state *, struct state *);
122 static struct arc *allocarc(struct nfa *, struct state *);
123 static void freearc(struct nfa *, struct arc *);
125 static void cparc(struct nfa *, struct arc *, struct state *, struct state *);
126 static void moveins(struct nfa *, struct state *, struct state *);
127 static void copyins(struct nfa *, struct state *, struct state *);
128 static void moveouts(struct nfa *, struct state *, struct state *);
129 static void copyouts(struct nfa *, struct state *, struct state *);
130 static void cloneouts(struct nfa *, struct state *, struct state *, struct state *, int);
131 static void delsub(struct nfa *, struct state *, struct state *);
132 static void deltraverse(struct nfa *, struct state *, struct state *);
133 static void dupnfa(struct nfa *, struct state *, struct state *, struct state *, struct state *);
134 static void duptraverse(struct nfa *, struct state *, struct state *);
135 static void cleartraverse(struct nfa *, struct state *);
136 static void specialcolors(struct nfa *);
137 static long optimize(struct nfa *, FILE *);
138 static void pullback(struct nfa *, FILE *);
139 static int pull(struct nfa *, struct arc *);
140 static void pushfwd(struct nfa *, FILE *);
141 static int push(struct nfa *, struct arc *);
146 static void fixempties(struct nfa *, FILE *);
147 static int unempty(struct nfa *, struct arc *);
148 static void cleanup(struct nfa *);
149 static void markreachable(struct nfa *, struct state *, struct state *, struct state *);
150 static void markcanreach(struct nfa *, struct state *, struct state *, struct state *);
151 static long analyze(struct nfa *);
152 static void compact(struct nfa *, struct cnfa *);
155 static void dumpnfa(struct nfa *, FILE *);
203 struct nfa *nfa; /* the NFA */
206 struct state *wordchrs; /* state in nfa holding word-char outarcs */
231 #define EMPTYARC(x, y) newarc(v->nfa, EMPTY, 0, x, y)
314 v->nfa = NULL;
346 v->nfa = newnfa(v, v->cm, NULL);
364 okcolors(v->nfa, v->cm);
367 v->tree = parse(v, EOS, PLAIN, v->nfa->init, v->nfa->final);
373 * Finish setup of nfa and its subre tree.
376 specialcolors(v->nfa);
380 dumpnfa(v->nfa, debug);
422 (DISCARD) optimize(v->nfa, debug);
424 makesearch(v, v->nfa);
426 compact(v->nfa, &g->search);
511 if (v->nfa != NULL) {
512 freenfa(v->nfa);
540 ^ static void makesearch(struct vars *, struct nfa *);
545 struct nfa *nfa)
548 struct state *pre = nfa->pre;
557 if (a->co != nfa->bos[0] && a->co != nfa->bos[1]) {
566 rainbow(nfa, v->cm, PLAIN, COLORLESS, pre, pre);
572 newarc(nfa, PLAIN, nfa->bos[0], pre, pre);
573 newarc(nfa, PLAIN, nfa->bos[1], pre, pre);
613 s2 = newstate(nfa);
615 copyouts(nfa, s, s2);
620 cparc(nfa, a, a->from, s2);
621 freearc(nfa, a);
669 left = newstate(v->nfa);
670 right = newstate(v->nfa);
740 lp = newstate(v->nfa);
742 moveins(v->nfa, right, lp);
781 #define ARCV(t, val) newarc(v->nfa, t, val, lp, rp)
835 s = newstate(v->nfa);
842 s = newstate(v->nfa);
849 s = newstate(v->nfa);
853 s = newstate(v->nfa);
860 s = newstate(v->nfa);
864 s = newstate(v->nfa);
872 s = newstate(v->nfa);
873 s2 = newstate(v->nfa);
916 okcolors(v->nfa, v->cm);
930 rainbow(v->nfa, v->cm, PLAIN,
957 s = newstate(v->nfa);
958 s2 = newstate(v->nfa);
1068 delsub(v->nfa, lp, rp);
1115 s = newstate(v->nfa); /* first, new endpoints for the atom */
1116 s2 = newstate(v->nfa);
1118 moveouts(v->nfa, lp, s);
1119 moveins(v->nfa, rp, s2);
1123 s = newstate(v->nfa); /* and spots for prefix and bypass */
1124 s2 = newstate(v->nfa);
1157 delsub(v->nfa, atom->begin, atom->end);
1166 dupnfa(v->nfa, v->subs[subno]->begin, v->subs[subno]->end,
1222 dupnfa(v->nfa, atom->begin, atom->end, s, atom->begin);
1265 newarc(v->nfa, anchor, 1, lp, rp);
1266 newarc(v->nfa, anchor, 0, lp, rp);
1267 colorcomplement(v->nfa, v->cm, dir, v->wordchrs, lp, rp);
1284 cloneouts(v->nfa, v->wordchrs, lp, rp, dir);
1339 delsub(v->nfa, lp, rp);
1351 s = newstate(v->nfa);
1353 moveouts(v->nfa, lp, s);
1354 moveins(v->nfa, rp, s);
1361 s = newstate(v->nfa);
1363 moveouts(v->nfa, lp, s);
1364 dupnfa(v->nfa, s, rp, lp, s);
1371 s = newstate(v->nfa);
1372 s2 = newstate(v->nfa);
1374 moveouts(v->nfa, lp, s);
1375 moveins(v->nfa, rp, s2);
1381 s = newstate(v->nfa);
1383 moveouts(v->nfa, lp, s);
1384 dupnfa(v->nfa, s, rp, lp, s);
1389 s = newstate(v->nfa);
1391 moveouts(v->nfa, lp, s);
1392 dupnfa(v->nfa, s, rp, lp, s);
1420 okcolors(v->nfa, v->cm);
1437 struct state *left = newstate(v->nfa);
1438 struct state *right = newstate(v->nfa);
1443 newarc(v->nfa, PLAIN, v->nlcolor, left, right);
1454 colorcomplement(v->nfa, v->cm, PLAIN, left, lp, rp);
1456 dropstate(v->nfa, left);
1458 freestate(v->nfa, right);
1620 newarc(v->nfa, PLAIN, subcolor(v->cm, c), lp, rp);
1650 newarc(v->nfa, PLAIN, subcolor(v->cm, ch), lp, rp);
1684 left = newstate(v->nfa);
1685 right = newstate(v->nfa);
1918 struct nfa *nfa;
1928 nfa = newnfa(v, v->cm, v->nfa);
1930 dupnfa(nfa, t->begin, t->end, nfa->init, nfa->final);
1932 specialcolors(nfa);
1933 ret = optimize(nfa, f);
1936 compact(nfa, &t->cnfa);
1939 freenfa(nfa);