about summary refs log tree commit diff
path: root/posix/regex_internal.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-09-30 22:01:05 +0000
committerUlrich Drepper <drepper@redhat.com>2002-09-30 22:01:05 +0000
commita3022b820fa3bb5c5d2ee3260afa5b521a804c1d (patch)
treed280b1fe75a435dcd36cb5242666eab46a3edbd6 /posix/regex_internal.h
parentfdb7f386ddc59c11454f9510ba1d94413a557db2 (diff)
downloadglibc-a3022b820fa3bb5c5d2ee3260afa5b521a804c1d.tar.gz
glibc-a3022b820fa3bb5c5d2ee3260afa5b521a804c1d.tar.xz
glibc-a3022b820fa3bb5c5d2ee3260afa5b521a804c1d.zip
Update.
2002-09-30  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* 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  <drepper@redhat.com>

	* stdio-common/printf_fp.c: Shuffle a few lines around to help the
	compiler optimizing.  No semantical changes intended.
Diffstat (limited to 'posix/regex_internal.h')
-rw-r--r--posix/regex_internal.h16
1 files changed, 16 insertions, 0 deletions
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;