Lines Matching refs:code
127 op = r->code[pc]; in slre_dump()
133 (void) fprintf(fp, "%d ", r->code[pc + 1]); in slre_dump()
138 pc + r->code[pc + 1] - i); in slre_dump()
143 r->code[pc + 1], r->code[pc + 2]); in slre_dump()
148 for (j = 0; j < r->code[pc + 2]; j++) { in slre_dump()
149 ch = r->data[r->code[pc + 1] + j]; in slre_dump()
175 r->code[pc] = (unsigned char) (r->code_size - offset); in set_jump_offset()
179 emit(struct slre *r, int code) in emit() argument
181 if (r->code_size >= (int) (sizeof(r->code) / sizeof(r->code[0]))) in emit()
184 r->code[r->code_size++] = (unsigned char) code; in emit()
294 memmove(r->code + begin + shift, r->code + begin, r->code_size - begin); in relocate()
301 if (r->code[prev] == EXACT && r->code[prev + 2] > 1) { in quantifier()
302 r->code[prev + 2]--; in quantifier()
304 emit(r, r->code[prev + 1] + r->code[prev + 2]); in quantifier()
309 r->code[prev] = op; in quantifier()
409 r->code[branch_start] = BRANCH; in compile()
412 r->code[fixup] = 0xff; in compile()
434 if (r->code[2] == BRANCH) in slre_compile()
456 if (match(r, pc + r->code[pc + 1], s, len, ofs, NULL)) in loop_greedy()
471 if (match(r, pc + r->code[pc + 1], s, len, ofs, NULL)) in loop_non_greedy()
541 while (res && r->code[pc] != END) { in match()
544 assert(pc < (int) (sizeof(r->code) / sizeof(r->code[0]))); in match()
546 switch (r->code[pc]) { in match()
552 res = match(r, pc + r->code[pc + 1], in match()
555 pc += r->code[pc + 2]; in match()
559 n = r->code[pc + 2]; /* String length */ in match()
561 r->code[pc + 1], n)) { in match()
572 pc += r->code[pc + 1]; in match()
577 pc += r->code[pc + 1]; in match()
582 pc += r->code[pc + 1]; in match()
590 pc += r->code[pc + 1]; in match()
598 pc += r->code[pc + 1]; in match()
636 res = is_any_of(r->data + r->code[pc + 1], in match()
637 r->code[pc + 2], s, ofs); in match()
643 res = is_any_but(r->data + r->code[pc + 1], in match()
644 r->code[pc + 2], s, ofs); in match()
657 caps[r->code[pc + 1]].ptr = s + *ofs; in match()
662 caps[r->code[pc + 1]].len = (s + *ofs) - in match()
663 caps[r->code[pc + 1]].ptr; in match()
670 printf("unknown cmd (%d) at %d\n", r->code[pc], pc); in match()