From f0e82f45c07878ce6df145e8e97a05ba9a8d0c82 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Tue, 12 Nov 2024 13:05:14 +0100 Subject: [PATCH] Update for tests. --- .../pure2-regex-general.cpp.execution | 11 +++ .../pure2-regex_04_start_end.cpp.execution | 1 + .../pure2-regex_19_lookahead.cpp.execution | 10 +++ ...re2-regex_21_atomic_patterns.cpp.execution | 8 ++ .../pure2-regex-general.cpp.execution | 11 +++ .../pure2-regex_04_start_end.cpp.execution | 1 + .../pure2-regex_19_lookahead.cpp.execution | 10 +++ ...re2-regex_21_atomic_patterns.cpp.execution | 8 ++ .../pure2-regex-general.cpp.execution | 11 +++ .../pure2-regex_04_start_end.cpp.execution | 1 + .../pure2-regex_19_lookahead.cpp.execution | 10 +++ ...re2-regex_21_atomic_patterns.cpp.execution | 8 ++ .../pure2-regex-general.cpp.execution | 11 +++ .../pure2-regex_04_start_end.cpp.execution | 1 + .../pure2-regex_19_lookahead.cpp.execution | 10 +++ ...re2-regex_21_atomic_patterns.cpp.execution | 8 ++ .../pure2-regex-general.cpp.output | 78 +++++++++++++++++++ .../pure2-regex-general.cpp.execution | 11 +++ .../pure2-regex_04_start_end.cpp.execution | 1 + .../pure2-regex_19_lookahead.cpp.execution | 10 +++ ...re2-regex_21_atomic_patterns.cpp.execution | 8 ++ .../pure2-regex-general.cpp.execution | 11 +++ .../pure2-regex_04_start_end.cpp.execution | 1 + .../pure2-regex_19_lookahead.cpp.execution | 10 +++ ...re2-regex_21_atomic_patterns.cpp.execution | 8 ++ .../pure2-regex-general.cpp.execution | 11 +++ .../pure2-regex-general.cpp.output | 1 + .../pure2-regex_04_start_end.cpp.execution | 1 + .../pure2-regex_19_lookahead.cpp.execution | 10 +++ ...re2-regex_21_atomic_patterns.cpp.execution | 8 ++ .../pure2-regex_21_atomic_patterns.cpp.output | 1 + .../pure2-regex-general.cpp.execution | 11 +++ .../pure2-regex-general.cpp.output | 1 + .../pure2-regex_04_start_end.cpp.execution | 1 + .../pure2-regex_19_lookahead.cpp.execution | 10 +++ ...re2-regex_21_atomic_patterns.cpp.execution | 8 ++ .../pure2-regex_21_atomic_patterns.cpp.output | 1 + .../test-results/pure2-regex-general.cpp | 67 +++++++--------- 38 files changed, 348 insertions(+), 41 deletions(-) create mode 100644 regression-tests/test-results/apple-clang-14-c++2b/pure2-regex-general.cpp.execution create mode 100644 regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex-general.cpp.execution create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_21_atomic_patterns.cpp.execution create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex-general.cpp.execution create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_21_atomic_patterns.cpp.execution create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex-general.cpp.execution create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_21_atomic_patterns.cpp.execution create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex-general.cpp.output create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex-general.cpp.execution create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_21_atomic_patterns.cpp.execution create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex-general.cpp.execution create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.execution create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.output create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.execution create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.output create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.execution create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.output create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.execution create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.output diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex-general.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex-general.cpp.execution new file mode 100644 index 0000000000..c44d084902 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution index 6fef36434a..a1e2b9b631 100644 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution index d4c65d951e..0f723eb774 100644 --- a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 0000000000..4812cfbb85 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex-general.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex-general.cpp.execution new file mode 100644 index 0000000000..c44d084902 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution index 6fef36434a..a1e2b9b631 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution index d4c65d951e..0f723eb774 100644 --- a/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 0000000000..4812cfbb85 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex-general.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex-general.cpp.execution new file mode 100644 index 0000000000..c44d084902 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution index 6fef36434a..a1e2b9b631 100644 --- a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution index d4c65d951e..0f723eb774 100644 --- a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 0000000000..4812cfbb85 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex-general.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex-general.cpp.execution new file mode 100644 index 0000000000..c44d084902 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution index 6fef36434a..a1e2b9b631 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution index d4c65d951e..0f723eb774 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 0000000000..4812cfbb85 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex-general.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex-general.cpp.output new file mode 100644 index 0000000000..40ba2e6c35 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex-general.cpp.output @@ -0,0 +1,78 @@ +PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. +Stack dump: +0. Program arguments: /usr/lib/llvm-18/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -dumpdir test.exe- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name pure2-regex-general.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/runner/work/cppfront/cppfront/regression-tests/test-results/clang-18-c++20 -fcoverage-compilation-dir=/home/runner/work/cppfront/cppfront/regression-tests/test-results/clang-18-c++20 -resource-dir /usr/lib/llvm-18/lib/clang/18 -I ../../../include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/backward -internal-isystem /usr/lib/llvm-18/lib/clang/18/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -std=c++20 -fdeprecated-macro -ferror-limit 19 -pthread -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/pure2-regex-general-8173f8.o -x c++ pure2-regex-general.cpp +1. parser at end of file +2. cpp2regex.h2:833:113: instantiating function definition 'cpp2::regex::regular_expression>::find_all' +3. pure2-regex-general.cpp2:13:16: instantiating function definition 'general_regex_test::run()::(anonymous class)::operator()>::search_return>' +4. pure2-regex-general.cpp2:15:54 : instantiating function definition 'general_regex_test::run()::(anonymous class)::operator()(const cpp2::regex::regular_expression>::search_return &)::(anonymous class)::operator()>::search_return &, int>' + #0 0x00007f4a111a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xda63bf) + #1 0x00007f4a111a44f9 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xda44f9) + #2 0x00007f4a111a6b00 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xda6b00) + #3 0x00007f4a0fc45320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320) + #4 0x00007f4a19318f6a clang::Sema::tryCaptureVariable(clang::ValueDecl*, clang::SourceLocation, clang::Sema::TryCaptureKind, clang::SourceLocation, bool, clang::QualType&, clang::QualType&, unsigned int const*) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1718f6a) + #5 0x00007f4a192e10a6 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::NestedNameSpecifierLoc, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x16e10a6) + #6 0x00007f4a192e1005 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*, clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&, clang::CXXScopeSpec const*, clang::NamedDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo const*) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x16e1005) + #7 0x00007f4a192e533c clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&, clang::DeclarationNameInfo const&, clang::NamedDecl*, clang::NamedDecl*, clang::TemplateArgumentListInfo const*, bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x16e533c) + #8 0x00007f4a19777871 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b77871) + #9 0x00007f4a1977abfb (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b7abfb) +#10 0x00007f4a197599c4 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b599c4) +#11 0x00007f4a19770a28 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b70a28) +#12 0x00007f4a19760341 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b60341) +#13 0x00007f4a1976681c (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b6681c) +#14 0x00007f4a1976b4b4 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b6b4b4) +#15 0x00007f4a1976e08d (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b6e08d) +#16 0x00007f4a1976b4b4 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b6b4b4) +#17 0x00007f4a19772670 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b72670) +#18 0x00007f4a19765c77 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b65c77) +#19 0x00007f4a1978645a (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b8645a) +#20 0x00007f4a1978449f (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b8449f) +#21 0x00007f4a19770669 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b70669) +#22 0x00007f4a1975fa03 clang::Sema::SubstStmt(clang::Stmt*, clang::MultiLevelTemplateArgumentList const&) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b5fa03) +#23 0x00007f4a197a1f26 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1ba1f26) +#24 0x00007f4a18fecde0 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x13ecde0) +#25 0x00007f4a1970280e clang::Sema::DeduceReturnType(clang::FunctionDecl*, clang::SourceLocation, bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b0280e) +#26 0x00007f4a192d6bc9 clang::Sema::DiagnoseUseOfDecl(clang::NamedDecl*, llvm::ArrayRef, clang::ObjCInterfaceDecl const*, bool, bool, clang::ObjCInterfaceDecl*, bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x16d6bc9) +#27 0x00007f4a195de3ce (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x19de3ce) +#28 0x00007f4a195e5884 clang::Sema::BuildCallToObjectOfClassType(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef, clang::SourceLocation) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x19e5884) +#29 0x00007f4a192dbb7d clang::Sema::BuildCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef, clang::SourceLocation, clang::Expr*, bool, bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x16dbb7d) +#30 0x00007f4a192f60a1 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef, clang::SourceLocation, clang::Expr*) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x16f60a1) +#31 0x00007f4a1976b65d (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b6b65d) +#32 0x00007f4a1976f44e (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b6f44e) +#33 0x00007f4a1976f42d (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b6f42d) +#34 0x00007f4a1975fa77 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b5fa77) +#35 0x00007f4a19770669 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b70669) +#36 0x00007f4a1975fa03 clang::Sema::SubstStmt(clang::Stmt*, clang::MultiLevelTemplateArgumentList const&) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1b5fa03) +#37 0x00007f4a197a1f26 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1ba1f26) +#38 0x00007f4a197a4744 clang::Sema::PerformPendingInstantiations(bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1ba4744) +#39 0x00007f4a197a2029 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool, bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1ba2029) +#40 0x00007f4a197a4744 clang::Sema::PerformPendingInstantiations(bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x1ba4744) +#41 0x00007f4a18fee90b clang::Sema::ActOnEndOfTranslationUnitFragment(clang::Sema::TUFragmentKind) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x13ee90b) +#42 0x00007f4a18feef7b clang::Sema::ActOnEndOfTranslationUnit() (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x13eef7b) +#43 0x00007f4a1885fe2e clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&, clang::Sema::ModuleImportState&) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0xc5fe2e) +#44 0x00007f4a1879747e clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0xb9747e) +#45 0x00007f4a1a60662c clang::FrontendAction::Execute() (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x2a0662c) +#46 0x00007f4a1a5830b4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x29830b4) +#47 0x00007f4a1a68263d clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18.1+0x2a8263d) +#48 0x000055f3eaf2042e cc1_main(llvm::ArrayRef, char const*, void*) (/usr/lib/llvm-18/bin/clang+0x1442e) +#49 0x000055f3eaf1d894 (/usr/lib/llvm-18/bin/clang+0x11894) +#50 0x000055f3eaf1ca26 clang_main(int, char**, llvm::ToolContext const&) (/usr/lib/llvm-18/bin/clang+0x10a26) +#51 0x000055f3eaf2a383 main (/usr/lib/llvm-18/bin/clang+0x1e383) +#52 0x00007f4a0fc2a1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca) +#53 0x00007f4a0fc2a28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b) +#54 0x000055f3eaf1a255 _start (/usr/lib/llvm-18/bin/clang+0xe255) +clang++-18: error: unable to execute command: Segmentation fault (core dumped) +clang++-18: error: clang frontend command failed due to signal (use -v to see invocation) +Ubuntu clang version 18.1.3 (1ubuntu1) +Target: x86_64-pc-linux-gnu +Thread model: posix +InstalledDir: /usr/bin +clang++-18: note: diagnostic msg: +******************** + +PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: +Preprocessed source(s) and associated run script(s) are located at: +clang++-18: note: diagnostic msg: /tmp/pure2-regex-general-9097b6.cpp +clang++-18: note: diagnostic msg: /tmp/pure2-regex-general-9097b6.sh +clang++-18: note: diagnostic msg: + +******************** diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex-general.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex-general.cpp.execution new file mode 100644 index 0000000000..c44d084902 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution index 6fef36434a..a1e2b9b631 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution index d4c65d951e..0f723eb774 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 0000000000..4812cfbb85 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex-general.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex-general.cpp.execution new file mode 100644 index 0000000000..c44d084902 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution index 6fef36434a..a1e2b9b631 100644 --- a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution index d4c65d951e..0f723eb774 100644 --- a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 0000000000..4812cfbb85 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.execution new file mode 100644 index 0000000000..c44d084902 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.output new file mode 100644 index 0000000000..e8e495e81f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex-general.cpp.output @@ -0,0 +1 @@ +pure2-regex-general.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution index 6fef36434a..a1e2b9b631 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution index d4c65d951e..0f723eb774 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 0000000000..4812cfbb85 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.output new file mode 100644 index 0000000000..3d25e76611 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_21_atomic_patterns.cpp.output @@ -0,0 +1 @@ +pure2-regex_21_atomic_patterns.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.execution new file mode 100644 index 0000000000..c44d084902 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.execution @@ -0,0 +1,11 @@ +Running tests_01_char_matcher: +Not full match fails: 0 +Full match is ok: 1 +Search finds at position 1: 1 +Search finds at position 3: 3 +Find all finds at position: 1 +Find all finds at position: 4 +Find all finds at position: 7 +Find all found 3 matched: 3 +Find all finds at position: 2 +Find all found 1 match: 1 diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.output new file mode 100644 index 0000000000..e8e495e81f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex-general.cpp.output @@ -0,0 +1 @@ +pure2-regex-general.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution index 6fef36434a..a1e2b9b631 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution @@ -8,4 +8,5 @@ Running tests_04_start_end: 07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results - +10_n: OK regex: \GX.*X parsed_regex: \GX.*X str: aaaXbX result_expr: - expected_results - diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution index d4c65d951e..0f723eb774 100644 --- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution @@ -27,6 +27,14 @@ Running tests_19_lookahead: 26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa 27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc 28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc +29_y: OK regex: (?=foo) parsed_regex: (?=foo) str: foo result_expr: @+ expected_results 0 +30_y: OK regex: (?=foo) parsed_regex: (?=foo) str: XfooY result_expr: @+ expected_results 1 +31_y: OK regex: .*(?=foo) parsed_regex: .*(?=foo) str: XfooY result_expr: @+ expected_results 1 +32_y: OK regex: (?=.*P)P parsed_regex: (?=.*P)P str: aP result_expr: @+ expected_results 2 +33_y: OK regex: X(?=foo)f parsed_regex: X(?=foo)f str: ..XfooY.. result_expr: @+ expected_results 4 +34_y: OK regex: X(?=foo) parsed_regex: X(?=foo) str: ..XfooY.. result_expr: @+ expected_results 3 +35_y: OK regex: (?=XY*foo) parsed_regex: (?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 +36_y: OK regex: ^(?=XY*foo) parsed_regex: ^(?=XY*foo) str: Xfoo result_expr: @+ expected_results 0 37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab] 38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab 39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a\nxb\n result_expr: - expected_results - @@ -44,4 +52,6 @@ Running tests_19_lookahead: 51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a\nb\nc\n result_expr: $1:$& expected_results b\n:b\nc 53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - +54_y: OK regex: (?)foo parsed_regex: (?)foo str: bar>ABCfoo result_expr: $& expected_results foo +55_y: OK regex: (?ABC)foo parsed_regex: (?ABC)foo str: bar>ABCfoo result_expr: $& expected_results ABCfoo diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.execution new file mode 100644 index 0000000000..4812cfbb85 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.execution @@ -0,0 +1,8 @@ +Running tests_21_atomic_patterns: +01_y: OK regex: (?>a+)b parsed_regex: (?>a+)b str: aaab result_expr: - expected_results - +02_y: OK regex: ((?>a+)b) parsed_regex: ((?>a+)b) str: aaab result_expr: $1 expected_results aaab +03_y: OK regex: (?>(a+))b parsed_regex: (?>(a+))b str: aaab result_expr: $1 expected_results aaa +04_y: OK regex: ((?>[^()]+)|\([^()]*\))+ parsed_regex: ((?>[^()]+)|\([^()]*\))+ str: ((abc(ade)ufh()()x result_expr: $& expected_results abc(ade)ufh()()x +05_y: OK regex: round\(((?>[^()]+))\) parsed_regex: round\(((?>[^()]+))\) str: _I(round(xs * sz),1) result_expr: $1 expected_results xs * sz +06_y: OK regex: ^((?>(?:aa)?b)?) parsed_regex: ^((?>(?:aa)?b)?) str: aab result_expr: $1 expected_results aab + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.output new file mode 100644 index 0000000000..3d25e76611 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_21_atomic_patterns.cpp.output @@ -0,0 +1 @@ +pure2-regex_21_atomic_patterns.cpp diff --git a/regression-tests/test-results/pure2-regex-general.cpp b/regression-tests/test-results/pure2-regex-general.cpp index 088e9b8509..599877fa1b 100644 --- a/regression-tests/test-results/pure2-regex-general.cpp +++ b/regression-tests/test-results/pure2-regex-general.cpp @@ -19,26 +19,19 @@ class general_regex_test { #line 4 "pure2-regex-general.cpp2" public: auto run() const& -> void; - public: class regex_01_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: template class regex_01_matcher { + public: template using context = cpp2::regex::match_context; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; public: [[nodiscard]] constexpr static auto is_start_match() -> bool; - - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; -}; - - public: [[nodiscard]] static auto to_string() -> std::string; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_01_matcher() = default; public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -46,31 +39,24 @@ public: class func_0 { }; - public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { - public: template class wrap { - public: using context = cpp2::regex::match_context; + public: cpp2::regex::regular_expression> regex_01 {}; public: template class regex_02_matcher { + public: template using context = cpp2::regex::match_context; public: class func_1 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; public: class func_0 { - public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + public: template [[nodiscard]] auto operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return; }; - public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + public: template [[nodiscard]] static auto entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return; public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; public: [[nodiscard]] constexpr static auto is_start_match() -> bool; - - public: wrap() = default; - public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(wrap const&) -> void = delete; -}; - - public: [[nodiscard]] static auto to_string() -> std::string; +public: [[nodiscard]] static auto to_string() -> std::string; public: regex_02_matcher() = default; public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ @@ -78,7 +64,7 @@ public: class func_1 { }; - public: cpp2::regex::regular_expression regex_02 {}; + public: cpp2::regex::regular_expression> regex_02 {}; public: general_regex_test() = default; public: general_regex_test(general_regex_test const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(general_regex_test const&) -> void = delete; @@ -122,8 +108,7 @@ auto main() -> int; - - template [[nodiscard]] auto general_regex_test::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto general_regex_test::regex_01_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -151,10 +136,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto general_regex_test::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto general_regex_test::regex_01_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -162,21 +148,19 @@ int i{0}; return r; } - template [[nodiscard]] auto general_regex_test::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto general_regex_test::regex_01_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - template [[nodiscard]] constexpr auto general_regex_test::regex_01_matcher::wrap::is_start_match() -> bool { return false; } - - [[nodiscard]] auto general_regex_test::regex_01_matcher::to_string() -> std::string{return R"(AA)"; } + template [[nodiscard]] constexpr auto general_regex_test::regex_01_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto general_regex_test::regex_01_matcher::to_string() -> std::string{return R"(AA)"; } - - template [[nodiscard]] auto general_regex_test::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto general_regex_test::regex_02_matcher::func_1::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -204,11 +188,12 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto general_regex_test::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + template template [[nodiscard]] auto general_regex_test::regex_02_matcher::func_0::operator()(Iter const& cur, auto&& ctx, auto const& other) const& -> cpp2::regex::match_return{ auto r {ctx.pass(cur)}; do { @@ -223,10 +208,11 @@ int i{0}; else { r.pos = ctx.end; } + static_cast(CPP2_FORWARD(ctx)); return r; } - template [[nodiscard]] auto general_regex_test::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + template template [[nodiscard]] auto general_regex_test::regex_02_matcher::entry(Iter const& cur, context& ctx) -> cpp2::regex::match_return{ ctx.set_group_start(0, cur); auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; @@ -234,14 +220,13 @@ int i{0}; return r; } - template [[nodiscard]] auto general_regex_test::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + template [[nodiscard]] auto general_regex_test::regex_02_matcher::get_named_group_index(auto const& name) -> int{ static_cast(name); return -1; } - template [[nodiscard]] constexpr auto general_regex_test::regex_02_matcher::wrap::is_start_match() -> bool { return false; } - - [[nodiscard]] auto general_regex_test::regex_02_matcher::to_string() -> std::string{return R"((?=aa))"; } + template [[nodiscard]] constexpr auto general_regex_test::regex_02_matcher::is_start_match() -> bool { return false; } +template [[nodiscard]] auto general_regex_test::regex_02_matcher::to_string() -> std::string{return R"((?=aa))"; } #line 30 "pure2-regex-general.cpp2"