From 6b6557e8b3b094132c619e3a2e00fe28422fd16f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Dec 2003 23:40:06 +0000 Subject: Update. 2003-12-23 Paolo Bonzini * posix/regex_internal.c (re_dfa_add_node): Initialize opt_subexp. * posix/regex_internal.h (re_token_type_t): Put OP_DUP_PLUS among the tokens, rather than among the epsilon-transiting nodes. (re_token_t): Add the opt_subexp flag. * posix/regcomp.c (optimize_utf8, calc_first, calc_next, calc_epsdest): Don't consider OP_DUP_PLUS. (mark_opt_subexp, mark_opt_subexp_iter): New functions. (parse_dup_op): Mostly rewritten, lowering OP_DUP_PLUS to OP_DUP_ASTERISK and marking optional subexpressions as such using mark_opt_subexp. * posix/regexec.c (set_regs): Initialize PREV_INDEX_MATCH and pass it to update_regs. (update_regs): Use the PREV_INDEX_MATCH parameter, together with the opt_subexp flag, in order to discard a final empty match of a repeated subexpression. * posix/BOOST.tests: Adjust test vectors. * posix/PCRE.tests: Likewise. * posix/rxspencer/tests: Likewise. 2003-12-17 Paolo Bonzini 2003-12-16 Paolo Bonzini 2003-12-17 Paolo Bonzini 2003-12-16 Jakub Jelinek 2003-04-06 Kaz Kojima 2003-02-20 Paolo Bonzini 2003-01-12 Franz Sirl 2003-01-09 Richard Henderson 2003-01-09 Richard Henderson 2003-01-03 Paul Eggert --- posix/PCRE.tests | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'posix/PCRE.tests') diff --git a/posix/PCRE.tests b/posix/PCRE.tests index 182f29f7a1..7ea5b9e70c 100644 --- a/posix/PCRE.tests +++ b/posix/PCRE.tests @@ -1151,13 +1151,13 @@ No match /(abc|)+/ abc 0: abc - 1: + 1: abc abcabc 0: abcabc - 1: + 1: abc abcabcabc 0: abcabcabc - 1: + 1: abc xyz 0: 1: @@ -1165,46 +1165,44 @@ No match /([a]*)*/ a 0: a - 1: + 1: a aaaaa 0: aaaaa - 1: + 1: aaaaa /([ab]*)*/ a 0: a - 1: + 1: a b 0: b - 1: + 1: b ababab 0: ababab - 1: + 1: ababab aaaabcde 0: aaaab - 1: + 1: aaaab bbbb 0: bbbb - 1: + 1: bbbb /([^a]*)*/ b 0: b - 1: + 1: b bbbb 0: bbbb - 1: + 1: bbbb aaa 0: - 1: /([^ab]*)*/ cccc 0: cccc - 1: + 1: cccc abab 0: - 1: /abc/ abc -- cgit 1.4.1