Lines Matching refs:code
125 op = r->code[pc]; in slre_dump()
131 (void) fprintf(fp, "%d ", r->code[pc + 1]); in slre_dump()
136 pc + r->code[pc + 1] - i); in slre_dump()
141 r->code[pc + 1], r->code[pc + 2]); in slre_dump()
146 for (j = 0; j < r->code[pc + 2]; j++) { in slre_dump()
147 ch = r->data[r->code[pc + 1] + j]; in slre_dump()
173 r->code[pc] = (unsigned char) (r->code_size - offset); in set_jump_offset()
177 emit(struct slre *r, int code) in emit() argument
179 if (r->code_size >= (int) (sizeof(r->code) / sizeof(r->code[0]))) in emit()
182 r->code[r->code_size++] = (unsigned char) code; in emit()
283 memmove(r->code + begin + shift, r->code + begin, r->code_size - begin); in relocate()
290 if (r->code[prev] == EXACT && r->code[prev + 2] > 1) { in quantifier()
291 r->code[prev + 2]--; in quantifier()
293 emit(r, r->code[prev + 1] + r->code[prev + 2]); in quantifier()
298 r->code[prev] = op; in quantifier()
398 r->code[branch_start] = BRANCH; in compile()
401 r->code[fixup] = 0xff; in compile()
426 if (r->code[2] == BRANCH) in slre_compile()
448 if (match(r, pc + r->code[pc + 1], s, len, ofs, NULL)) in loop_greedy()
463 if (match(r, pc + r->code[pc + 1], s, len, ofs, NULL)) in loop_non_greedy()
508 while (res && r->code[pc] != END) { in match()
511 assert(pc < (int) (sizeof(r->code) / sizeof(r->code[0]))); in match()
513 switch (r->code[pc]) { in match()
519 res = match(r, pc + r->code[pc + 1], in match()
522 pc += r->code[pc + 2]; in match()
526 n = r->code[pc + 2]; /* String length */ in match()
528 r->code[pc + 1], n)) { in match()
539 pc += r->code[pc + 1]; in match()
544 pc += r->code[pc + 1]; in match()
549 pc += r->code[pc + 1]; in match()
557 pc += r->code[pc + 1]; in match()
565 pc += r->code[pc + 1]; in match()
603 res = is_any_of(r->data + r->code[pc + 1], in match()
604 r->code[pc + 2], s, ofs); in match()
610 res = is_any_but(r->data + r->code[pc + 1], in match()
611 r->code[pc + 2], s, ofs); in match()
624 caps[r->code[pc + 1]].ptr = s + *ofs; in match()
629 caps[r->code[pc + 1]].len = (s + *ofs) - in match()
630 caps[r->code[pc + 1]].ptr; in match()
637 printf("unknown cmd (%d) at %d\n", r->code[pc], pc); in match()