Ulrich Drepper 02f3550c8b [BZ #605, BZ #611]
Update.
2004-12-13  Paolo Bonzini  <bonzini@gnu.org>

	Separate parsing and creation of the NFA.  Avoided recursion on
	the (very unbalanced) parse tree.
	[BZ #611]
	* posix/regcomp.c (struct subexp_optimize, analyze_tree, calc_epsdest,
	re_dfa_add_tree_node, mark_opt_subexp_iter): Removed.
	(optimize_subexps, duplicate_tree, calc_first, calc_next,
	mark_opt_subexp): Rewritten.
	(preorder, postorder, lower_subexps, lower_subexp, link_nfa_nodes,
	create_token_tree, free_tree, free_token): New.
	(analyze): Accept a regex_t *.  Invoke the passes via the preorder and
	postorder generic visitors.  Do not initialize the fields in the
	re_dfa_t that represent the transitions.
	(free_dfa_content): Use free_token.
	(re_compile_internal): Analyze before UTF-8 optimizations.  Do not
	include optimization of subexpressions.
	(create_initial_state): Fetch the DFA node index from the first node's
	bin_tree_t *.
	(optimize_utf8): Abort on unexpected nodes, including OP_DUP_QUESTION.
	Return on COMPLEX_BRACKET.
	(duplicate_node_closure): Fix comment.
	(duplicate_node): Do not initialize the fields in the
	re_dfa_t that represent the transitions.
	(calc_eclosure, calc_inveclosure): Do not handle OP_DELETED_SUBEXP.
	(create_tree): Remove final argument.  All callers adjusted.  Rewritten
	to use create_token_tree.
	(parse_reg_exp, parse_branch, parse_expression, parse_bracket_exp,
	build_charclass_op): Use create_tree or create_token_tree instead
	of re_dfa_add_tree_node.
	(parse_dup_op): Likewise.  Also free the tree using free_tree for
	"<re>{0}", and lower OP_DUP_QUESTION to OP_ALT: "a?" is equivalent
	to "a|".  Adjust invocation of mark_opt_subexp.
	(parse_sub_exp): Create a single SUBEXP node.
	* posix/regex_internal.c (re_dfa_add_node): Remove last parameter,
	always perform as if it was 1.  Do not initialize OPT_SUBEXP and
	DUPLICATED, and initialize the DFA fields representing the transitions.
	* posix/regex_internal.h (re_dfa_add_node): Adjust prototype.
	(re_token_type_t): Move OP_DUP_PLUS and OP_DUP_QUESTION to the tokens
	section.  Add a tree-only code SUBEXP.  Remove OP_DELETED_SUBEXP.
	(bin_tree_t): Include a full re_token_t for TOKEN.  Turn FIRST and
	NEXT into pointers to trees.  Remove ECLOSURE.

2004-12-28  Paolo Bonzini  <bonzini@gnu.org >

	[BZ #605]
	* posix/regcomp.c (parse_bracket_exp): Do not modify DFA nodes
	that were already created.
	* posix/regex_internal.c (re_dfa_add_node): Set accept_mb field
	in the token if needed.
	(create_ci_newstate, create_cd_newstate): Set accept_mb field
	from the tokens' field.
	* posix/regex_internal.h (re_token_t): Add accept_mb field.
	(ACCEPT_MB_NODE): Removed.
	* posix/regexec.c (proceed_next_node, transit_states_mb,
	build_sifted_states, check_arrival_add_next_nodes): Use
	accept_mb instead of ACCEPT_MB_NODE.
2005-01-26 22:42:49 +00:00
..
2007-07-12 18:26:36 +00:00
2005-01-26 19:56:03 +00:00
2007-07-12 18:26:36 +00:00
2003-12-27 23:40:06 +00:00
2002-08-03 07:02:10 +00:00
2004-02-23 19:54:06 +00:00
2004-10-01 15:44:06 +00:00
2001-02-07 07:25:37 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2007-07-12 18:26:36 +00:00
2002-07-27 08:28:46 +00:00
2002-07-27 08:28:46 +00:00
2002-07-27 08:28:46 +00:00
2002-08-12 19:50:26 +00:00
2002-08-26 23:00:40 +00:00
2003-12-30 20:01:17 +00:00
2003-10-02 22:41:11 +00:00
2003-12-22 06:52:35 +00:00
2003-01-16 19:20:36 +00:00
2003-11-12 07:56:31 +00:00
2003-11-29 06:13:09 +00:00
2005-01-26 19:56:03 +00:00
2003-11-26 03:24:15 +00:00
2003-11-19 19:37:31 +00:00
2007-07-12 18:26:36 +00:00
2004-02-11 22:49:57 +00:00
2004-11-15 22:00:25 +00:00
2004-12-13 21:29:18 +00:00
2005-01-20 20:10:02 +00:00
2005-01-20 20:10:02 +00:00
2005-01-20 20:10:02 +00:00
2007-07-12 18:26:36 +00:00
2005-01-20 20:10:02 +00:00
2007-07-12 18:26:36 +00:00
2007-07-12 18:26:36 +00:00
2004-09-14 04:41:35 +00:00
2004-03-09 10:36:53 +00:00
2001-08-11 19:43:52 +00:00
2004-03-09 10:36:53 +00:00
2007-07-12 18:26:36 +00:00
2004-03-19 00:37:59 +00:00
2004-09-17 00:56:07 +00:00
2001-07-06 04:58:11 +00:00
2003-10-27 01:36:12 +00:00
2005-01-23 04:42:14 +00:00
2004-11-25 22:32:18 +00:00
2003-11-26 03:24:15 +00:00
2003-11-26 03:24:15 +00:00
2003-11-13 01:04:26 +00:00
2001-07-06 04:58:11 +00:00
2005-01-26 22:42:49 +00:00
2005-01-26 22:42:49 +00:00
2005-01-26 22:42:49 +00:00
2007-07-12 18:26:36 +00:00
2007-07-12 18:26:36 +00:00
1999-08-30 19:23:15 +00:00
2005-01-26 22:42:49 +00:00
2003-11-26 03:24:15 +00:00
2003-11-13 20:04:16 +00:00
2004-03-19 00:14:42 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2000-04-15 16:51:16 +00:00
2001-07-06 04:58:11 +00:00
2004-09-12 18:05:37 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2004-09-12 18:05:37 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2000-01-18 10:53:15 +00:00
2001-03-15 09:36:19 +00:00
2000-01-18 10:53:15 +00:00
2007-07-12 18:26:36 +00:00
2003-12-04 08:04:57 +00:00
2004-04-21 18:58:31 +00:00
2007-07-12 18:26:36 +00:00
2001-07-06 04:58:11 +00:00
2004-09-02 03:38:10 +00:00
2001-07-06 04:58:11 +00:00
2004-10-06 18:09:57 +00:00
2001-07-06 04:58:11 +00:00
2004-09-30 06:42:39 +00:00
2007-07-12 18:26:36 +00:00
2003-12-04 08:04:57 +00:00
2001-07-06 04:58:11 +00:00
2007-07-12 18:26:36 +00:00
2004-12-10 00:41:30 +00:00
2004-12-10 00:41:30 +00:00
2001-07-06 04:58:11 +00:00
2005-01-26 19:56:03 +00:00
2007-07-12 18:26:36 +00:00
2004-11-27 22:47:48 +00:00
2001-07-06 04:58:11 +00:00
2007-07-12 18:26:36 +00:00
2004-03-10 05:25:48 +00:00
2004-03-10 05:25:48 +00:00
2004-11-10 15:48:06 +00:00
2000-09-06 18:07:07 +00:00
2005-01-07 19:30:51 +00:00
2004-05-03 21:40:12 +00:00
2003-09-18 02:54:32 +00:00
2000-10-21 00:02:39 +00:00