Searched refs:tnfa (Results 1 – 8 of 8) sorted by relevance
| /netbsd/src/external/bsd/tre/dist/lib/ |
| D | regexec.c | 40 const tre_tnfa_t *tnfa, int *tags, int match_eo) in tre_fill_pmatch() argument 53 DPRINT(("end tag = t%d = %d\n", tnfa->end_tag, match_eo)); in tre_fill_pmatch() 54 submatch_data = tnfa->submatch_data; in tre_fill_pmatch() 55 while (i < tnfa->num_submatches && i < nmatch) in tre_fill_pmatch() 57 if (submatch_data[i].so_tag == tnfa->end_tag) in tre_fill_pmatch() 62 if (submatch_data[i].eo_tag == tnfa->end_tag) in tre_fill_pmatch() 80 while (i < tnfa->num_submatches && i < nmatch) in tre_fill_pmatch() 115 tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD; in tre_have_backrefs() local 116 return tnfa->have_backrefs; in tre_have_backrefs() 122 tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD; in tre_have_approx() local [all …]
|
| D | tre-match-parallel.c | 69 tre_print_reach(const tre_tnfa_t *tnfa, tre_tnfa_reach_t *reach, int num_tags) in tre_print_reach() argument 94 tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, int len, in tre_tnfa_run_parallel() argument 111 int reg_newline = tnfa->cflags & REG_NEWLINE; in tre_tnfa_run_parallel() 136 num_tags = tnfa->num_tags; in tre_tnfa_run_parallel() 148 if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states)) in tre_tnfa_run_parallel() 152 if (tnfa->num_states+1 > SIZE_MAX/(8 * sizeof(*reach_next))) in tre_tnfa_run_parallel() 156 if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_pos))) in tre_tnfa_run_parallel() 161 rbytes = sizeof(*reach_next) * (tnfa->num_states + 1); in tre_tnfa_run_parallel() 162 pbytes = sizeof(*reach_pos) * tnfa->num_states; in tre_tnfa_run_parallel() 166 + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes; in tre_tnfa_run_parallel() [all …]
|
| D | tre-compile.c | 123 tre_purge_regset(int *regset, tre_tnfa_t *tnfa, int tag) in tre_purge_regset() argument 135 tnfa->submatch_data[id].so_tag = tag; in tre_purge_regset() 137 tnfa->submatch_data[id].eo_tag = tag; in tre_purge_regset() 147 tre_tnfa_t *tnfa) in tre_add_tags() argument 154 int first_pass = (mem == NULL || tnfa == NULL); in tre_add_tags() 168 tnfa->end_tag = 0; in tre_add_tags() 169 tnfa->minimal_tags[0] = -1; in tre_add_tags() 172 regset = xmalloc(sizeof(*regset) * ((tnfa->num_submatches + 1) * 2)); in tre_add_tags() 178 parents = xmalloc(sizeof(*parents) * (tnfa->num_submatches + 1)); in tre_add_tags() 186 saved_states = xmalloc(sizeof(*saved_states) * (tnfa->num_submatches + 1)); in tre_add_tags() [all …]
|
| D | tre-match-backtrack.c | 132 sizeof(*tags) * tnfa->num_tags); \ 155 for (i = 0; i < tnfa->num_tags; i++) \ 173 for (i = 0; i < tnfa->num_tags; i++) \ 184 tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string, in tre_tnfa_run_backtrack() argument 201 int reg_newline = tnfa->cflags & REG_NEWLINE; in tre_tnfa_run_backtrack() 254 tags = alloca(sizeof(*tags) * tnfa->num_tags); in tre_tnfa_run_backtrack() 255 pmatch = alloca(sizeof(*pmatch) * tnfa->num_submatches); in tre_tnfa_run_backtrack() 256 states_seen = alloca(sizeof(*states_seen) * tnfa->num_states); in tre_tnfa_run_backtrack() 258 if (tnfa->num_tags) in tre_tnfa_run_backtrack() 260 tags = xmalloc(sizeof(*tags) * tnfa->num_tags); in tre_tnfa_run_backtrack() [all …]
|
| D | tre-match-approx.c | 69 tre_print_reach(const tre_tnfa_t *tnfa, tre_tnfa_approx_reach_t *reach, in tre_print_reach() argument 76 for (id = 0; id < tnfa->num_states; id++) in tre_print_reach() 189 tre_tnfa_run_approx(const tre_tnfa_t *tnfa, const void *string, int len, in tre_tnfa_run_approx() argument 207 int reg_newline = tnfa->cflags & REG_NEWLINE; in tre_tnfa_run_approx() 234 num_tags = tnfa->num_tags; in tre_tnfa_run_approx() 259 if (num_tags > SIZE_MAX/(8 * sizeof(*tmp_tags) * tnfa->num_states)) in tre_tnfa_run_approx() 263 if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_next))) in tre_tnfa_run_approx() 269 size_t reach_bytes = sizeof(*reach_next) * tnfa->num_states; in tre_tnfa_run_approx() 271 size_t total_bytes = reach_bytes * 2 + (tnfa->num_states * 2 + 1 ) * tag_bytes; in tre_tnfa_run_approx() 302 for (i = 0; i < tnfa->num_states; i++) in tre_tnfa_run_approx() [all …]
|
| D | tre-internal.h | 229 typedef struct tnfa tre_tnfa_t; 231 struct tnfa { struct 260 const tre_tnfa_t *tnfa, int *tags, int match_eo); argument 263 tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, int len, 268 tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, int len, 273 tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string, 279 tre_tnfa_run_approx(const tre_tnfa_t *tnfa, const void *string, int len,
|
| D | tre-match-utils.h | 157 #define CHECK_CHAR_CLASSES(trans_i, tnfa, eflags) \ argument 159 && !(tnfa->cflags & REG_ICASE) \ 162 && (tnfa->cflags & REG_ICASE) \ 167 tnfa->cflags & REG_ICASE)))
|
| /netbsd/src/external/bsd/tre/dist/ |
| D | ChangeLog.old | 687 number is bigger than tnfa->num_tags, the marker boundary tag
|