diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-11-18 23:57:34 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-11-18 23:57:34 +0000 |
commit | c06a6956a40a878fdbe319e4688196e7c990bf7a (patch) | |
tree | fee7b24f6276363e8b1f0e977231b413f9eb2fbf /posix/rxspencer/tests | |
parent | 1b1d36792e9d9c4ad9a67ad8bfc1a3be8f2104c1 (diff) | |
download | glibc-c06a6956a40a878fdbe319e4688196e7c990bf7a.tar glibc-c06a6956a40a878fdbe319e4688196e7c990bf7a.tar.gz glibc-c06a6956a40a878fdbe319e4688196e7c990bf7a.tar.bz2 glibc-c06a6956a40a878fdbe319e4688196e7c990bf7a.zip |
[BZ #544]
Update.
2004-11-18 Jakub Jelinek <jakub@redhat.com>
[BZ #544]
* posix/regex.h (RE_NO_SUB): New define.
* posix/regex_internal.h (OP_DELETED_SUBEXP): New.
(re_dfa_t): Add subexp_map.
* posix/regcomp.c (struct subexp_optimize): New type.
(optimize_subexps): New routine.
(re_compile_internal): Call it.
(re_compile_pattern): Set preg->no_sub to 1 if RE_NO_SUB.
(free_dfa_content): Free subexp_map.
(calc_inveclosure, calc_eclosure): Skip OP_DELETED_SUBEXP
nodes.
* posix/regexec.c (re_search_internal): If subexp_map
is not NULL, duplicate registers as needed.
* posix/Makefile: Add rules to build and run tst-regex2.
* posix/tst-regex2.c: New test.
* posix/rxspencer/tests: Fix last two tests (\0 -> \1).
Add some new tests for nested subexpressions.
Diffstat (limited to 'posix/rxspencer/tests')
-rw-r--r-- | posix/rxspencer/tests | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/posix/rxspencer/tests b/posix/rxspencer/tests index 30fff15946..a724252d8c 100644 --- a/posix/rxspencer/tests +++ b/posix/rxspencer/tests @@ -508,5 +508,21 @@ a*a*a*a*a*a*a* & aaaaaa aaaaaa (\b){0} - x @x - \(\b\)\{0,0\} b abc @abc - a(\b){0}c - ac ac - -a(.*)b(\0){0}c - abc abc @bc,- -a(.*)b(\0){0}c - axbc axbc x,- +a(.*)b(\1){0}c - abc abc @bc,- +a(.*)b(\1){0}c - axbc axbc x,- + +a\(\(b*\)\)c\1d b abbcbbd abbcbbd bb,bb +a\(\([bc]\)\)\2d b abcdabbd abbd b,b +a\(\(\(\([bc]\)\)\3\)\)*d b abbccd abbccd cc,cc,c,c +a(b)(c)d - abcd abcd b,c +a(((b)))c - abc abc b,b,b +a(((b|(((c))))))d - abd abd b,b,b,-,-,- +a(((b*|c|e)))d - abbd abbd bb,bb,bb +a((b|c)){0,0}d - ad ad -,- +a((b|c)){0,1}d - abd abd b,b +a((b|c)){0,2}d - abcd abcd c,c +a((b+|((c)*)))+d - abd abd b,b,-,- +a((b+|((c)*)))+d - abcd abcd c,c,c,c +(((\b))){0} - x @x -,-,- +a(((.*)))b((\2)){0}c - abc abc @bc,@bc,@bc,-,- +a(((.*)))b((\1)){0}c - axbc axbc x,x,x,-,- |