Lines Matching refs:regexp
63 static bin_tree_t *parse (re_string_t *regexp, regex_t *preg,
65 static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg,
68 static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg,
71 static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg,
74 static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg,
77 static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp,
80 static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa,
84 re_string_t *regexp,
90 re_string_t *regexp,
731 re_string_t regexp; in re_compile_internal() local
774 err = re_string_construct (®exp, pattern, length, preg->translate, in re_compile_internal()
780 re_string_destruct (®exp); in re_compile_internal()
790 dfa->str_tree = parse (®exp, preg, syntax, &err); in re_compile_internal()
810 re_string_destruct (®exp); in re_compile_internal()
2117 parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, in parse() argument
2124 fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); in parse()
2125 tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); in parse()
2151 parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, in parse_reg_exp() argument
2157 tree = parse_branch (regexp, preg, token, syntax, nest, err); in parse_reg_exp()
2163 fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); in parse_reg_exp()
2169 branch = parse_branch (regexp, preg, token, syntax, nest, err); in parse_reg_exp()
2200 parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, in parse_branch() argument
2205 tree = parse_expression (regexp, preg, token, syntax, nest, err); in parse_branch()
2212 expr = parse_expression (regexp, preg, token, syntax, nest, err); in parse_branch()
2245 parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, in parse_expression() argument
2262 while (!re_string_eoi (regexp) in parse_expression()
2263 && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) in parse_expression()
2266 fetch_token (token, regexp, syntax); in parse_expression()
2280 tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); in parse_expression()
2286 tree = parse_bracket_exp (regexp, dfa, token, syntax, err); in parse_expression()
2325 fetch_token (token, regexp, syntax); in parse_expression()
2326 return parse_expression (regexp, preg, token, syntax, nest, err); in parse_expression()
2395 fetch_token (token, regexp, syntax); in parse_expression()
2411 tree = build_charclass_op (dfa, regexp->trans, in parse_expression()
2421 tree = build_charclass_op (dfa, regexp->trans, in parse_expression()
2442 fetch_token (token, regexp, syntax); in parse_expression()
2447 bin_tree_t *dup_tree = parse_dup_op (tree, regexp, dfa, token, in parse_expression()
2479 parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, in parse_sub_exp() argument
2487 fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); in parse_sub_exp()
2494 tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); in parse_sub_exp()
2522 parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, in parse_dup_op() argument
2526 Idx i, start, end, start_idx = re_string_cur_idx (regexp); in parse_dup_op()
2532 start = fetch_number (regexp, token, syntax); in parse_dup_op()
2548 ? fetch_number (regexp, token, syntax) : -2)); in parse_dup_op()
2564 re_string_set_index (regexp, start_idx); in parse_dup_op()
2592 fetch_token (token, regexp, syntax); in parse_dup_op()
3095 parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, in parse_bracket_exp() argument
3153 token_len = peek_token_bracket (token, regexp, syntax); in parse_bracket_exp()
3167 re_string_skip_bytes (regexp, token_len); /* Skip a token. */ in parse_bracket_exp()
3168 token_len = peek_token_bracket (token, regexp, syntax); in parse_bracket_exp()
3192 ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, in parse_bracket_exp()
3202 token_len = peek_token_bracket (token, regexp, syntax); in parse_bracket_exp()
3214 re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ in parse_bracket_exp()
3215 token_len2 = peek_token_bracket (&token2, regexp, syntax); in parse_bracket_exp()
3224 re_string_skip_bytes (regexp, -token_len); in parse_bracket_exp()
3236 ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, in parse_bracket_exp()
3244 token_len = peek_token_bracket (token, regexp, syntax); in parse_bracket_exp()
3309 *err = build_charclass (regexp->trans, sbcset, in parse_bracket_exp()
3332 re_string_skip_bytes (regexp, token_len); /* Skip a token. */ in parse_bracket_exp()
3409 parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, in parse_bracket_element() argument
3415 cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); in parse_bracket_element()
3419 elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); in parse_bracket_element()
3420 re_string_skip_bytes (regexp, cur_char_size); in parse_bracket_element()
3424 re_string_skip_bytes (regexp, token_len); /* Skip a token. */ in parse_bracket_element()
3427 return parse_bracket_symbol (elem, regexp, token); in parse_bracket_element()
3433 (void) peek_token_bracket (&token2, regexp, syntax); in parse_bracket_element()
3449 parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, in parse_bracket_symbol() argument
3454 if (re_string_eoi(regexp)) in parse_bracket_symbol()
3461 ch = re_string_fetch_byte_case (regexp); in parse_bracket_symbol()
3463 ch = re_string_fetch_byte (regexp); in parse_bracket_symbol()
3464 if (re_string_eoi(regexp)) in parse_bracket_symbol()
3466 if (ch == delim && re_string_peek_byte (regexp, 0) == ']') in parse_bracket_symbol()
3470 re_string_skip_bytes (regexp, 1); in parse_bracket_symbol()