Lines Matching refs:code

126 		op = r->code[pc];  in slre_dump()
132 (void) fprintf(fp, "%d ", r->code[pc + 1]); in slre_dump()
137 pc + r->code[pc + 1] - i); in slre_dump()
142 r->code[pc + 1], r->code[pc + 2]); in slre_dump()
147 for (j = 0; j < r->code[pc + 2]; j++) { in slre_dump()
148 ch = r->data[r->code[pc + 1] + j]; in slre_dump()
174 r->code[pc] = (unsigned char) (r->code_size - offset); in set_jump_offset()
178 emit(struct slre *r, int code) in emit() argument
180 if (r->code_size >= (int) (sizeof(r->code) / sizeof(r->code[0]))) in emit()
183 r->code[r->code_size++] = (unsigned char) code; in emit()
284 memmove(r->code + begin + shift, r->code + begin, r->code_size - begin); in relocate()
291 if (r->code[prev] == EXACT && r->code[prev + 2] > 1) { in quantifier()
292 r->code[prev + 2]--; in quantifier()
294 emit(r, r->code[prev + 1] + r->code[prev + 2]); in quantifier()
299 r->code[prev] = op; in quantifier()
399 r->code[branch_start] = BRANCH; in compile()
402 r->code[fixup] = 0xff; in compile()
427 if (r->code[2] == BRANCH) in slre_compile()
449 if (match(r, pc + r->code[pc + 1], s, len, ofs, NULL)) in loop_greedy()
464 if (match(r, pc + r->code[pc + 1], s, len, ofs, NULL)) in loop_non_greedy()
509 while (res && r->code[pc] != END) { in match()
512 assert(pc < (int) (sizeof(r->code) / sizeof(r->code[0]))); in match()
514 switch (r->code[pc]) { in match()
520 res = match(r, pc + r->code[pc + 1], in match()
523 pc += r->code[pc + 2]; in match()
527 n = r->code[pc + 2]; /* String length */ in match()
529 r->code[pc + 1], n)) { in match()
540 pc += r->code[pc + 1]; in match()
545 pc += r->code[pc + 1]; in match()
550 pc += r->code[pc + 1]; in match()
558 pc += r->code[pc + 1]; in match()
566 pc += r->code[pc + 1]; in match()
604 res = is_any_of(r->data + r->code[pc + 1], in match()
605 r->code[pc + 2], s, ofs); in match()
611 res = is_any_but(r->data + r->code[pc + 1], in match()
612 r->code[pc + 2], s, ofs); in match()
625 caps[r->code[pc + 1]].ptr = s + *ofs; in match()
630 caps[r->code[pc + 1]].len = (s + *ofs) - in match()
631 caps[r->code[pc + 1]].ptr; in match()
638 printf("unknown cmd (%d) at %d\n", r->code[pc], pc); in match()