• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gettext-tools/libgrep/

Lines Matching defs:dfa

0 /* dfa.c - deterministic extended regexp routines for GNU
89 #include "dfa.h"
102 static void dfamust (struct dfa *dfa);
241 /* A pointer to the current dfa is kept here during parsing. */
242 static struct dfa *dfa;
244 /* Find the index of charclass s in dfa->charclasses, or allocate a new charclass. */
250 for (i = 0; i < dfa->cindex; ++i)
251 if (equal(s, dfa->charclasses[i]))
253 REALLOC_IF_NECESSARY(dfa->charclasses, charclass, dfa->calloc, dfa->cindex);
254 ++dfa->cindex;
255 copyset(s, dfa->charclasses[i]);
444 REALLOC_IF_NECESSARY(dfa->mbcsets, struct mb_char_classes,
445 dfa->mbcsets_alloc, dfa->nmbcsets + 1);
446 /* dfa->multibyte_prop[] hold the index of dfa->mbcsets.
447 We will update dfa->multibyte_prop in addtok(), because we can't
448 decide the index in dfa->tokens[]. */
451 work_mbc = &(dfa->mbcsets[dfa->nmbcsets++]);
480 dfa is ever called. */
992 dfa is ever called. */
1103 REALLOC_IF_NECESSARY(dfa->multibyte_prop, int, dfa->nmultibyte_prop,
1104 dfa->tindex);
1105 /* Set dfa->multibyte_prop. See struct dfa in dfa.h. */
1107 dfa->multibyte_prop[dfa->tindex] = ((dfa->nmbcsets - 1) << 2) + 3;
1109 dfa->multibyte_prop[dfa->tindex]
1116 dfa->multibyte_prop[dfa->tindex] = 3;
1120 REALLOC_IF_NECESSARY(dfa->tokens, token, dfa->talloc, dfa->tindex);
1121 dfa->tokens[dfa->tindex++] = t;
1137 ++dfa->nleaves;
1142 if (depth > dfa->depth)
1143 dfa->depth = depth;
1247 switch (dfa->tokens[tindex - 1])
1270 addtok(dfa->tokens[tindex + i]);
1282 ntokens = nsubtoks(dfa->tindex);
1283 tindex = dfa->tindex - ntokens;
1336 the struct dfa to parse into. */
1338 dfaparse (char const *s, size_t len, struct dfa *d)
1340 dfa = d;
1461 state_index (struct dfa *d, position_set const *s, int newline, int letter)
1531 epsclosure (position_set *s, struct dfa const *d)
1647 dfaanalyze (struct dfa *d, int searchflag)
1912 dfastate (int s, struct dfa *d, int trans[])
2203 /* Some routines for manipulating a compiled dfa's transition tables.
2211 build_state (int s, struct dfa *d)
2284 build_state_zero (struct dfa *d)
2321 realloc_trans_if_necessary(struct dfa *d, int new_state)
2357 transit_state_singlebyte (struct dfa *d, int s, unsigned char const *p,
2401 match_anychar (struct dfa *d, int s, position pos, int index)
2441 match_mb_charset (struct dfa *d, int s, position pos, int index)
2556 check_matching_with_multibyte_ops (struct dfa *d, int s, int index)
2587 transit_state_consume_1char (struct dfa *d, int s, unsigned char const **pp,
2637 transit_state (struct dfa *d, int s, unsigned char const **pp)
2721 /* Search through a buffer looking for a match to the given struct dfa.
2731 dfaexec (struct dfa *d, char const *begin, size_t size, int *backref)
2907 /* Initialize the components of a dfa that the other routines don't
2910 dfainit (struct dfa *d)
2938 dfacomp (char const *s, size_t len, struct dfa *d, int searchflag)
2975 /* Free the storage held by the components of a dfa. */
2977 dfafree (struct dfa *d)
3330 dfamust (struct dfa *dfa)
3345 musts = (must *) malloc((dfa->tindex + 1) * sizeof *musts);
3349 for (i = 0; i <= dfa->tindex; ++i)
3351 for (i = 0; i <= dfa->tindex; ++i)
3365 for (i = 0; i < dfa->tindex; ++i)
3368 prtok(dfa->tokens[i]);
3372 for (ri = 0; ri < dfa->tindex; ++ri)
3374 switch (t = dfa->tokens[ri])
3543 prtok(dfa->tokens[ri]);
3560 dm->next = dfa->musts;
3561 dfa->musts = dm;
3564 for (i = 0; i <= dfa->tindex; ++i)