Lines Matching refs:regex_string

405 static const regex_char_t* decode_number(const regex_char_t *regex_string, int length, int *result)  in decode_number()  argument
410 if (*regex_string < '0' || *regex_string > '9') { in decode_number()
412 return regex_string; in decode_number()
415 while (length > 0 && *regex_string >= '0' && *regex_string <= '9') { in decode_number()
416 value = value * 10 + (*regex_string - '0'); in decode_number()
418 regex_string++; in decode_number()
422 return regex_string; in decode_number()
560 static int parse_iterator(const regex_char_t *regex_string, int length, struct stack *stack, sljit_… in parse_iterator() argument
564 const regex_char_t *base_from = regex_string; in parse_iterator()
568 regex_string++; in parse_iterator()
574 if (*regex_string == ',') { in parse_iterator()
577 regex_string++; in parse_iterator()
580 from = regex_string; in parse_iterator()
581 regex_string = decode_number(regex_string, length, &val1); in parse_iterator()
584 length -= regex_string - from; in parse_iterator()
588 if (*regex_string == '}') { in parse_iterator()
593 else if (length >= 2 && *regex_string == '!' && regex_string[1] == '}') { in parse_iterator()
598 return (regex_string - base_from) + 1; in parse_iterator()
601 if (*regex_string != ',') in parse_iterator()
604 regex_string++; in parse_iterator()
615 if (*regex_string == '}') in parse_iterator()
618 from = regex_string; in parse_iterator()
619 regex_string = decode_number(regex_string, length, &val2); in parse_iterator()
620 length -= regex_string - from; in parse_iterator()
621 if (val2 < 0 || length == 0 || *regex_string != '}' || val2 < val1) in parse_iterator()
663 return regex_string - base_from; in parse_iterator()
666 static int parse_char_range(const regex_char_t *regex_string, int length, struct compiler_common *c… in parse_char_range() argument
669 const regex_char_t *base_from = regex_string; in parse_char_range()
673 regex_string++; in parse_char_range()
678 if (*regex_string != '^') { in parse_char_range()
684 regex_string++; in parse_char_range()
696 if (*regex_string == ']') { in parse_char_range()
698 regex_string++; in parse_char_range()
708 if (*regex_string == ']') in parse_char_range()
711 if (*regex_string != '\\') in parse_char_range()
712 left_char = *regex_string; in parse_char_range()
714 regex_string++; in parse_char_range()
718 left_char = *regex_string; in parse_char_range()
720 regex_string++; in parse_char_range()
724 if (length >= 3 && *regex_string == '-' && *(regex_string + 1) != ']') { in parse_char_range()
725 regex_string++; in parse_char_range()
728 if (*regex_string != '\\') in parse_char_range()
729 right_char = *regex_string; in parse_char_range()
731 regex_string++; in parse_char_range()
735 right_char = *regex_string; in parse_char_range()
737 regex_string++; in parse_char_range()
762 return regex_string - base_from; in parse_char_range()
765 static int parse(const regex_char_t *regex_string, int length, struct compiler_common *compiler_com… in parse() argument
781 if (length > 0 && *regex_string == '^') { in parse()
784 regex_string++; in parse()
799 switch (*regex_string) { in parse()
802 regex_string++; in parse()
805 if (stack_push(stack, type_char, *regex_string)) in parse()
862 if (stack_push(stack, (*regex_string == '+') ? type_plus_sign : type_qestion_mark, 0)) in parse()
868 tmp = parse_iterator(regex_string, length, stack, &compiler_common->dfa_size, begin); in parse()
872 regex_string += tmp; in parse()
886 tmp = parse_char_range(regex_string, length, compiler_common); in parse()
889 regex_string += tmp; in parse()
901 if (length == 1 && *regex_string == '$') { in parse()
905 if (stack_push(stack, type_char, *regex_string)) in parse()
912 regex_string++; in parse()
1835 struct regex_machine* regex_compile(const regex_char_t *regex_string, int length, int re_flags, int… in regex_compile() argument
1866 error_code = parse(regex_string, length, &compiler_common); in regex_compile()