From a3022b820fa3bb5c5d2ee3260afa5b521a804c1d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 30 Sep 2002 22:01:05 +0000 Subject: Update. 2002-09-30 Isamu Hasegawa * posix/regex_internal.h (re_match_context_t): Add a new member. (re_fail_stack_ent_t): New structure. (re_fail_stack_t): Likewise. * posix/regexec.c (re_search_internal): Use the new member of re_match_context_t. Use fail stack only if it has back references and there are plural matching candidates. (proceed_next_node): Use fail stack if it is indicated. (set_regs): Likewise. (push_fail_stack): New function. (pop_fail_stack): New function. (check_dst_limits): Likewise. (check_dst_limits_calc_pos): Likewise. (search_subexp): Check the limitations on the top of subexpressions. (sift_states_bkref): Check the limitations of the destination node. Reuse the array sctx->sifted_states. 2002-09-30 Ulrich Drepper * stdio-common/printf_fp.c: Shuffle a few lines around to help the compiler optimizing. No semantical changes intended. --- posix/regex_internal.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'posix/regex_internal.h') diff --git a/posix/regex_internal.h b/posix/regex_internal.h index cc6584561c..5aef684acc 100644 --- a/posix/regex_internal.h +++ b/posix/regex_internal.h @@ -419,6 +419,7 @@ typedef struct int eflags; /* Where the matching ends. */ int match_last; + int last_node; /* The string object corresponding to the input string. */ re_string_t *input; /* The state log used by the matcher. */ @@ -446,6 +447,21 @@ typedef struct int check_subexp; } re_sift_context_t; +struct re_fail_stack_ent_t +{ + int idx; + int node; + regmatch_t *regs; + re_node_set eps_via_nodes; +}; + +struct re_fail_stack_t +{ + int num; + int alloc; + struct re_fail_stack_ent_t *stack; +}; + struct re_dfa_t { re_bitset_ptr_t word_char; -- cgit v1.2.1