diff --git a/include/cpp2regex.h b/include/cpp2regex.h new file mode 100644 index 0000000000..12867bed29 --- /dev/null +++ b/include/cpp2regex.h @@ -0,0 +1,4141 @@ + +#ifndef CPP2REGEX_H_CPP2 +#define CPP2REGEX_H_CPP2 + + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "cpp2regex.h2" + +#line 30 "cpp2regex.h2" +namespace cpp2 { + +namespace regex { + +#line 47 "cpp2regex.h2" +class expression_flags; + +#line 59 "cpp2regex.h2" +template class match_group; + +#line 69 "cpp2regex.h2" +template class match_return; + +#line 77 "cpp2regex.h2" +template class match_context; + +#line 138 "cpp2regex.h2" +class true_end_func; + +#line 146 "cpp2regex.h2" +class no_reset; + +#line 153 "cpp2regex.h2" +template class on_return; + +#line 180 "cpp2regex.h2" +template class single_class_entry; + +#line 189 "cpp2regex.h2" +template class range_class_entry; + +#line 198 "cpp2regex.h2" +template class combined_class_entry; + +#line 207 "cpp2regex.h2" +template class list_class_entry; + +#line 216 "cpp2regex.h2" +template class named_class_entry; + +#line 223 "cpp2regex.h2" +template class negated_class_entry; + +#line 232 "cpp2regex.h2" +template class shorthand_class_entry; + +#line 285 "cpp2regex.h2" +class regex_token; + +#line 311 "cpp2regex.h2" +class regex_token_check; + +#line 330 "cpp2regex.h2" +class regex_token_code; + +#line 349 "cpp2regex.h2" +class regex_token_empty; + +#line 365 "cpp2regex.h2" +class regex_token_list; + +#line 407 "cpp2regex.h2" +class parse_context_group_state; + +#line 468 "cpp2regex.h2" +class parse_context_branch_reset_state; + +#line 511 "cpp2regex.h2" +class parse_context; + +#line 909 "cpp2regex.h2" +class generation_function_context; + + +#line 927 "cpp2regex.h2" +class generation_context; + +#line 1126 "cpp2regex.h2" +class alternative_token; + +#line 1141 "cpp2regex.h2" +class alternative_token_gen; + +#line 1191 "cpp2regex.h2" +template class alternative_token_matcher; + +#line 1220 "cpp2regex.h2" +class any_token; + +#line 1251 "cpp2regex.h2" +class char_token; + +#line 1388 "cpp2regex.h2" +class class_token; + +#line 1545 "cpp2regex.h2" +template class class_token_matcher; + +#line 1661 "cpp2regex.h2" +class group_ref_token; + +#line 1823 "cpp2regex.h2" +class group_token; + +#line 2129 "cpp2regex.h2" +class lookahead_token; + +#line 2235 "cpp2regex.h2" +class range_flags; + + +#line 2244 "cpp2regex.h2" +class range_token; + +#line 2390 "cpp2regex.h2" +template class range_token_matcher; + +#line 2527 "cpp2regex.h2" +class special_range_token; + +#line 2618 "cpp2regex.h2" +template class regular_expression; + +#line 2710 "cpp2regex.h2" +template class regex_generator; + +#line 2784 "cpp2regex.h2" +} +} + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "cpp2regex.h2" + +// Copyright (c) Herb Sutter +// SPDX-License-Identifier: CC-BY-NC-ND-4.0 + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +//=========================================================================== +// Regex support +//=========================================================================== + +#ifndef CPP2_CPP2REGEX_H +#define CPP2_CPP2REGEX_H + + +template +using matcher_wrapper_type = typename matcher_wrapper::template wrap; + +template +using matcher_context_type = typename matcher::context; + +using error_func = std::function; + +#line 30 "cpp2regex.h2" +namespace cpp2 { + +namespace regex { + +template using bview = std::basic_string_view; +template using bstring = std::basic_string; + +#line 47 "cpp2regex.h2" +class expression_flags + { +private: cpp2::u8 _value; private: constexpr expression_flags(cpp2::impl::in _val); + +private: constexpr auto operator=(cpp2::impl::in _val) -> expression_flags& ; +public: constexpr auto operator|=(expression_flags const& that) & -> void; +public: constexpr auto operator&=(expression_flags const& that) & -> void; +public: constexpr auto operator^=(expression_flags const& that) & -> void; +public: [[nodiscard]] constexpr auto operator|(expression_flags const& that) const& -> expression_flags; +public: [[nodiscard]] constexpr auto operator&(expression_flags const& that) const& -> expression_flags; +public: [[nodiscard]] constexpr auto operator^(expression_flags const& that) const& -> expression_flags; +public: [[nodiscard]] constexpr auto has(expression_flags const& that) const& -> bool; +public: constexpr auto set(expression_flags const& that) & -> void; +public: constexpr auto clear(expression_flags const& that) & -> void; +public: static const expression_flags case_insensitive; +public: static const expression_flags multiple_lines; +public: static const expression_flags single_line; +public: static const expression_flags no_group_captures; +public: static const expression_flags perl_code_syntax; +public: static const expression_flags perl_code_syntax_in_classes; +public: static const expression_flags none; +public: [[nodiscard]] constexpr auto get_raw_value() const& -> cpp2::u8; +public: constexpr explicit expression_flags(); +public: constexpr expression_flags(expression_flags const& that); +public: constexpr auto operator=(expression_flags const& that) -> expression_flags& ; +public: constexpr expression_flags(expression_flags&& that) noexcept; +public: constexpr auto operator=(expression_flags&& that) noexcept -> expression_flags& ; +public: [[nodiscard]] auto operator<=>(expression_flags const& that) const& -> std::strong_ordering = default; +public: [[nodiscard]] auto to_string() const& -> std::string; + +#line 55 "cpp2regex.h2" +}; + +#line 59 "cpp2regex.h2" +template class match_group + { + public: Iter start {}; + public: Iter end {}; + + public: bool matched {false}; + public: match_group(auto const& start_, auto const& end_, auto const& matched_); +public: match_group(); + +#line 65 "cpp2regex.h2" +}; + +#line 69 "cpp2regex.h2" +template class match_return + { + public: bool matched {false}; + public: Iter pos {}; + public: match_return(auto const& matched_, auto const& pos_); +public: match_return(); + +#line 73 "cpp2regex.h2" +}; + +#line 77 "cpp2regex.h2" +template class match_context + { + public: Iter begin; + public: Iter end; + + private: std::array,max_groups> groups {}; + + public: explicit match_context(Iter const& begin_, Iter const& end_); + +#line 89 "cpp2regex.h2" + public: match_context(match_context const& that); +#line 89 "cpp2regex.h2" + public: auto operator=(match_context const& that) -> match_context& ; +#line 89 "cpp2regex.h2" + public: match_context(match_context&& that) noexcept; +#line 89 "cpp2regex.h2" + public: auto operator=(match_context&& that) noexcept -> match_context& ; + +#line 93 "cpp2regex.h2" + public: [[nodiscard]] auto get_group(auto const& group) const& -> auto; + + public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int; + +#line 101 "cpp2regex.h2" + public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int; + +#line 107 "cpp2regex.h2" + public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string; + +#line 114 "cpp2regex.h2" + public: auto set_group_end(auto const& group, auto const& pos) & -> void; + +#line 119 "cpp2regex.h2" + public: auto set_group_invalid(auto const& group) & -> void; + +#line 123 "cpp2regex.h2" + public: auto set_group_start(auto const& group, auto const& pos) & -> void; + +#line 127 "cpp2regex.h2" + public: [[nodiscard]] auto size() const& -> auto; + +#line 131 "cpp2regex.h2" + public: [[nodiscard]] auto fail() const& -> auto; + public: [[nodiscard]] auto pass(cpp2::impl::in cur) const& -> auto; +}; + +#line 138 "cpp2regex.h2" +class true_end_func + { + public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> auto; +}; + +#line 146 "cpp2regex.h2" +class no_reset + { + public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void; +}; + +#line 153 "cpp2regex.h2" +template class on_return + { + private: Func func; + + public: explicit on_return(Func const& f); +#line 157 "cpp2regex.h2" + public: auto operator=(Func const& f) -> on_return& ; + +#line 161 "cpp2regex.h2" + public: ~on_return() noexcept; + public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(on_return const&) -> void = delete; + + +#line 164 "cpp2regex.h2" +}; + +#line 168 "cpp2regex.h2" +template [[nodiscard]] auto make_on_return(Func const& func) -> auto; + +#line 180 "cpp2regex.h2" +template class single_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: single_class_entry() = default; + public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(single_class_entry const&) -> void = delete; + +#line 184 "cpp2regex.h2" +}; + +#line 189 "cpp2regex.h2" +template class range_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: range_class_entry() = default; + public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(range_class_entry const&) -> void = delete; + +#line 193 "cpp2regex.h2" +}; + +#line 198 "cpp2regex.h2" +template class combined_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: combined_class_entry() = default; + public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(combined_class_entry const&) -> void = delete; + +#line 202 "cpp2regex.h2" +}; + +#line 207 "cpp2regex.h2" +template class list_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: list_class_entry() = default; + public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(list_class_entry const&) -> void = delete; + +#line 211 "cpp2regex.h2" +}; + +#line 216 "cpp2regex.h2" +template class named_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: named_class_entry() = default; + public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(named_class_entry const&) -> void = delete; + +#line 220 "cpp2regex.h2" +}; + +#line 223 "cpp2regex.h2" +template class negated_class_entry +: public Inner { + + public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto; + public: negated_class_entry() = default; + public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(negated_class_entry const&) -> void = delete; + +#line 227 "cpp2regex.h2" +}; + +#line 232 "cpp2regex.h2" +template class shorthand_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: shorthand_class_entry() = default; + public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(shorthand_class_entry const&) -> void = delete; + +#line 236 "cpp2regex.h2" +}; + +#line 241 "cpp2regex.h2" +template using digits_class = named_class_entry>; +template using lower_class = named_class_entry>; +template using upper_class = named_class_entry>; + +#line 247 "cpp2regex.h2" +template using alnum_class = named_class_entry,upper_class,digits_class>>; +template using alpha_class = named_class_entry,upper_class>>; +template using ascii_class = named_class_entry>; +template using blank_class = named_class_entry>; +template using cntrl_class = named_class_entry,single_class_entry>>; +template using graph_class = named_class_entry>; +template using hor_space_class = named_class_entry>; +template using print_class = named_class_entry>; +template using punct_class = named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; +template using space_class = named_class_entry>; +template using ver_space_class = named_class_entry>; +template using word_class = named_class_entry,single_class_entry>>; +template using xdigit_class = named_class_entry,range_class_entry,digits_class>>; + +#line 263 "cpp2regex.h2" +template using short_digits_class = shorthand_class_entry>; +template using short_hor_space_class = shorthand_class_entry>; +template using short_space_class = shorthand_class_entry>; +template using short_vert_space_class = shorthand_class_entry>; +template using short_word_class = shorthand_class_entry>; + +template using short_not_digits_class = negated_class_entry>>; +template using short_not_hor_space_class = negated_class_entry>>; +template using short_not_space_class = negated_class_entry>>; +template using short_not_vert_space_class = negated_class_entry>>; +template using short_not_word_class = negated_class_entry>>; + +#line 285 "cpp2regex.h2" +class regex_token + { + public: std::string string_rep; + + public: explicit regex_token(cpp2::impl::in str); + +#line 293 "cpp2regex.h2" + public: explicit regex_token(); + +#line 298 "cpp2regex.h2" + public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0; + + public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void; + public: [[nodiscard]] auto to_string() const& -> std::string; + public: auto set_string(cpp2::impl::in s) & -> void; + public: virtual ~regex_token() noexcept; + + public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token const&) -> void = delete; + +#line 303 "cpp2regex.h2" +}; + +using token_ptr = std::shared_ptr; +using token_vec = std::vector; + +#line 309 "cpp2regex.h2" +// Adds a check in code generation. +// +class regex_token_check +: public regex_token { + +#line 315 "cpp2regex.h2" + private: std::string check; + + public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_); + +#line 322 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + public: virtual ~regex_token_check() noexcept; + + public: regex_token_check(regex_token_check const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token_check const&) -> void = delete; + + +#line 325 "cpp2regex.h2" +}; + +#line 328 "cpp2regex.h2" +// Adds code in code generation. +// +class regex_token_code +: public regex_token { + +#line 334 "cpp2regex.h2" + private: std::string code; + + public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_); + +#line 341 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + public: virtual ~regex_token_code() noexcept; + + public: regex_token_code(regex_token_code const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token_code const&) -> void = delete; + + +#line 344 "cpp2regex.h2" +}; + +#line 347 "cpp2regex.h2" +// Token that does not influence the matching. E.g. comment. +// +class regex_token_empty +: public regex_token { + +#line 353 "cpp2regex.h2" + public: explicit regex_token_empty(cpp2::impl::in str); + +#line 357 "cpp2regex.h2" + public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override; + public: virtual ~regex_token_empty() noexcept; + + public: regex_token_empty(regex_token_empty const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token_empty const&) -> void = delete; + + +#line 360 "cpp2regex.h2" +}; + +#line 363 "cpp2regex.h2" +// Represents a list of regex tokens as one token. +// +class regex_token_list +: public regex_token { + +#line 369 "cpp2regex.h2" + public: token_vec tokens; + + public: explicit regex_token_list(cpp2::impl::in t); + +#line 376 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 382 "cpp2regex.h2" + public: auto add_groups(std::set& groups) const -> void override; + +#line 388 "cpp2regex.h2" + public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string; + public: virtual ~regex_token_list() noexcept; + + public: regex_token_list(regex_token_list const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_token_list const&) -> void = delete; + + +#line 395 "cpp2regex.h2" +}; + +#line 398 "cpp2regex.h2" +//----------------------------------------------------------------------- +// +// Parse and generation context. +// +//----------------------------------------------------------------------- +// + +// State of the current capturing group. See '()' +// +class parse_context_group_state + { + public: token_vec cur_match_list {}; // Current list of matchers. + public: token_vec alternate_match_lists {}; // List of alternate matcher lists. E.g. ab|cd|xy. + public: expression_flags modifiers {}; // Current modifiers for the group/regular expression. + + // Start a new alternative. + public: auto next_alternative() & -> void; + +#line 421 "cpp2regex.h2" + // Swap this state with the other one. + public: auto swap(parse_context_group_state& t) & -> void; + +#line 428 "cpp2regex.h2" + // Convert this state into a regex token. + public: [[nodiscard]] auto get_as_token() & -> token_ptr; + +#line 440 "cpp2regex.h2" + // Add a token to the current matcher list. + public: auto add(cpp2::impl::in token) & -> void; + +#line 445 "cpp2regex.h2" + // True if current matcher list is empty. + public: [[nodiscard]] auto empty() const& -> bool; + +#line 449 "cpp2regex.h2" + // Apply optimizations to the matcher list. + public: static auto post_process_list(token_vec& list) -> void; + public: parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_); +public: parse_context_group_state(); + + +#line 463 "cpp2regex.h2" +}; + +#line 466 "cpp2regex.h2" +// State for the branch reset. Takes care of the group numbering. See '(|)'. +// +class parse_context_branch_reset_state + { + public: bool is_active {false}; // If we have a branch reset group. + public: int cur_group {1}; // Next group identifier. 0 == global capture group. + public: int max_group {1}; // Maximum group identifier generated. + public: int from {1}; // Starting identifier on new alternative branch. + + // Next group identifier. + public: [[nodiscard]] auto next() & -> int; + +#line 484 "cpp2regex.h2" + // Set next group identifier. + public: auto set_next(cpp2::impl::in g) & -> void; + +#line 490 "cpp2regex.h2" + // Start a new alternative branch. + public: auto next_alternative() & -> void; + +#line 497 "cpp2regex.h2" + // Initialize for a branch reset group. + public: auto set_active_reset(cpp2::impl::in restart) & -> void; + public: parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_); +public: parse_context_branch_reset_state(); + + +#line 504 "cpp2regex.h2" +}; + +#line 507 "cpp2regex.h2" +// Context during parsing of the regular expressions. +// +// Keeps track of the distributed group identifiers, current parsed group and branch resets. +// +class parse_context + { + private: std::string_view regex; // Regular expression string. + private: size_t pos {0}; // Current parsing position. + private: token_ptr root; // Token representing the regular expression. + + private: parse_context_group_state cur_group_state {}; + private: parse_context_branch_reset_state cur_branch_reset_state {}; + +#line 521 "cpp2regex.h2" + public: std::map named_groups {}; + + private: error_func error_out; // TODO: Declaring std::function fails for cpp2. + private: bool has_error {false}; + + public: explicit parse_context(cpp2::impl::in r, auto const& e); + +#line 532 "cpp2regex.h2" + // State management functions + // + + // Returned group state needs to be stored and provided in `end_group`. + public: [[nodiscard]] auto start_group() & -> parse_context_group_state; + +#line 545 "cpp2regex.h2" + // `old_state` argument needs to be from start group. + public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr; + +#line 553 "cpp2regex.h2" + public: [[nodiscard]] auto get_modifiers() const& -> expression_flags; + +#line 557 "cpp2regex.h2" + public: auto set_modifiers(cpp2::impl::in mod) & -> void; + +#line 561 "cpp2regex.h2" + // Branch reset management functions + // + + public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state; + +#line 573 "cpp2regex.h2" + public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void; + +#line 580 "cpp2regex.h2" + public: auto next_alternative() & -> void; + +#line 586 "cpp2regex.h2" + // Regex token management + // + public: auto add_token(cpp2::impl::in token) & -> void; + +#line 592 "cpp2regex.h2" + public: [[nodiscard]] auto has_token() const& -> bool; + +#line 596 "cpp2regex.h2" + public: [[nodiscard]] auto pop_token() & -> token_ptr; + +#line 607 "cpp2regex.h2" + public: [[nodiscard]] auto get_as_token() & -> token_ptr; + +#line 611 "cpp2regex.h2" + // Group management + // + public: [[nodiscard]] auto get_cur_group() const& -> int; + +#line 617 "cpp2regex.h2" + public: [[nodiscard]] auto next_group() & -> int; + +#line 621 "cpp2regex.h2" + public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void; + +#line 628 "cpp2regex.h2" + public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int; + +#line 639 "cpp2regex.h2" + // Position management functions + // + public: [[nodiscard]] auto current() const& -> char; + + // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers. + private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t; + +#line 683 "cpp2regex.h2" + // Return true if next token is available. + private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool; + +#line 695 "cpp2regex.h2" + public: [[nodiscard]] auto next() & -> auto; + public: [[nodiscard]] auto next_in_class() & -> auto; + public: [[nodiscard]] auto next_no_skip() & -> auto; + + public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool; + +#line 708 "cpp2regex.h2" + public: [[nodiscard]] auto has_next() const& -> bool; + + private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool; + +#line 731 "cpp2regex.h2" + public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto; + public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto; + public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto; + + public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool; + +#line 748 "cpp2regex.h2" + public: [[nodiscard]] auto grab_number() & -> std::string; + +#line 769 "cpp2regex.h2" + private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char; + +#line 779 "cpp2regex.h2" + public: [[nodiscard]] auto peek() const& -> auto; + public: [[nodiscard]] auto peek_in_class() const& -> auto; + +#line 783 "cpp2regex.h2" + // Parsing functions + // + public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool; + +#line 839 "cpp2regex.h2" + public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool; + +#line 877 "cpp2regex.h2" + public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool; + +#line 892 "cpp2regex.h2" + // Misc functions + + public: [[nodiscard]] auto get_pos() const& -> auto; + public: [[nodiscard]] auto get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto; + public: [[nodiscard]] auto valid() const& -> bool; + + public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr; + public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(parse_context const&) -> void = delete; + + +#line 903 "cpp2regex.h2" +}; + +#line 906 "cpp2regex.h2" +// Context for one function generation. Generation of functions can be interleaved, +// therefore we buffer the code for one function here. +// +class generation_function_context { + public: std::string code {""}; + public: std::string tabs {""}; + + public: auto add_tabs(cpp2::impl::in c) & -> void; + +#line 920 "cpp2regex.h2" + public: auto remove_tabs(cpp2::impl::in c) & -> void; + public: generation_function_context(auto const& code_, auto const& tabs_); +public: generation_function_context(); + + +#line 923 "cpp2regex.h2" +}; + +#line 926 "cpp2regex.h2" +// Context for generating the state machine. +class generation_context + { + private: std::vector gen_stack {1}; // Element 0 contains all the code. + + private: int matcher_func {0}; + private: int reset_func {0}; + private: int temp_name {0}; + private: std::string entry_func {""}; + + // Generation helpers + // + public: [[nodiscard]] auto match_parameters() const& -> std::string; + + // Code generation. + + // Add code line. + public: auto add(cpp2::impl::in s) & -> void; + +#line 948 "cpp2regex.h2" + // Add check for token. The check needs to be a function call that returns a boolean. + public: auto add_check(cpp2::impl::in check) & -> void; + +#line 954 "cpp2regex.h2" + // Add a stateful check. The check needs to return a `match_return`. + public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void; + +#line 963 "cpp2regex.h2" + protected: auto start_func_named(cpp2::impl::in name) & -> void; + +#line 974 "cpp2regex.h2" + protected: [[nodiscard]] auto start_func() & -> std::string; + +#line 981 "cpp2regex.h2" + protected: auto end_func_statefull(cpp2::impl::in s) & -> void; + +#line 1000 "cpp2regex.h2" + // Generate the function for a token. + public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string; + +#line 1010 "cpp2regex.h2" + // Generate the reset for a list of group identifiers. + public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string; + +#line 1033 "cpp2regex.h2" + // Name generation + // + protected: [[nodiscard]] auto gen_func_name() & -> std::string; + +#line 1041 "cpp2regex.h2" + public: [[nodiscard]] auto next_func_name() & -> std::string; + +#line 1045 "cpp2regex.h2" + protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string; + +#line 1051 "cpp2regex.h2" + public: [[nodiscard]] auto gen_temp() & -> std::string; + +#line 1057 "cpp2regex.h2" + // Context management + // + public: [[nodiscard]] auto new_context() & -> generation_function_context*; + +#line 1067 "cpp2regex.h2" + public: auto finish_context() & -> void; + +#line 1075 "cpp2regex.h2" + // Misc functions + // + private: [[nodiscard]] auto get_current() & -> generation_function_context*; + +#line 1081 "cpp2regex.h2" + private: [[nodiscard]] auto get_base() & -> generation_function_context*; + +#line 1085 "cpp2regex.h2" + public: [[nodiscard]] auto get_entry_func() const& -> std::string; + +#line 1089 "cpp2regex.h2" + public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string; + +#line 1113 "cpp2regex.h2" + // Run the generation for the token. + public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string; + public: generation_context() = default; + public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(generation_context const&) -> void = delete; + + +#line 1119 "cpp2regex.h2" +}; + +#line 1122 "cpp2regex.h2" +// Regex syntax: | Example: ab|ba +// +// Non greedy implementation. First alternative that matches is chosen. +// +class alternative_token +: public regex_token_empty { + // No code gen here. alternative_token_gen is created in the parse_context + + public: explicit alternative_token(); + + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + public: virtual ~alternative_token() noexcept; + + public: alternative_token(alternative_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(alternative_token const&) -> void = delete; + + +#line 1139 "cpp2regex.h2" +}; + +class alternative_token_gen +: public regex_token { + +#line 1145 "cpp2regex.h2" + private: token_vec alternatives; + + public: explicit alternative_token_gen(cpp2::impl::in a); + +#line 1152 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 1169 "cpp2regex.h2" + public: auto add_groups(std::set& groups) const -> void override; + +#line 1176 "cpp2regex.h2" + public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string; + public: virtual ~alternative_token_gen() noexcept; + + public: alternative_token_gen(alternative_token_gen const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(alternative_token_gen const&) -> void = delete; + + +#line 1188 "cpp2regex.h2" +}; + +#line 1191 "cpp2regex.h2" +template class alternative_token_matcher + { + public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto; + +#line 1197 "cpp2regex.h2" + private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto; + public: alternative_token_matcher() = default; + public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(alternative_token_matcher const&) -> void = delete; + + +#line 1215 "cpp2regex.h2" +}; + +#line 1218 "cpp2regex.h2" +// Regex syntax: . +// +class any_token +: public regex_token_check { + +#line 1224 "cpp2regex.h2" + public: explicit any_token(cpp2::impl::in single_line); + +#line 1228 "cpp2regex.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + public: virtual ~any_token() noexcept; + + public: any_token(any_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(any_token const&) -> void = delete; + + +#line 1233 "cpp2regex.h2" +}; + +#line 1236 "cpp2regex.h2" +template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool; + +#line 1249 "cpp2regex.h2" +// Regex syntax: a +// +class char_token +: public regex_token { + +#line 1255 "cpp2regex.h2" + private: std::string token; + private: bool ignore_case; + + public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_); + +#line 1264 "cpp2regex.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 1268 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 1291 "cpp2regex.h2" + public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void; + +#line 1312 "cpp2regex.h2" + public: auto gen_case_sensitive(generation_context& ctx) const& -> void; + +#line 1330 "cpp2regex.h2" + public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string; + +#line 1345 "cpp2regex.h2" + public: auto append(char_token const& that) & -> void; + public: virtual ~char_token() noexcept; + + public: char_token(char_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(char_token const&) -> void = delete; + + +#line 1349 "cpp2regex.h2" +}; + +#line 1352 "cpp2regex.h2" +// TODO: Check if vectorization works at some point with this implementation. +// char_token_matcher: (inout cur, inout ctx) -> bool = { +// if !(std::distance(cur, ctx.end) < tokens..size()) { +// return false; +// } +// matched : bool = true; +// (copy i: int = 0) while i < tokens..size() next i += 1 { +// if tokens..data()[i] != cur[i] { +// matched = false; // No break for performance optimization. Without break, the loop vectorizes. +// } +// } +// if matched { +// cur += tokens..size(); +// } +// return matched; +// } + +// char_token_case_insensitive_matcher: (inout cur, inout ctx) -> bool = { +// if !(std::distance(cur, ctx.end) < lower..size()) { +// return false; +// } +// matched : bool = true; +// (copy i : int = 0) while i < lower..size() next i += 1 { +// if !(lower..data()[i] == cur[i] || upper..data()[i] == cur[i]) { +// matched = false; // No break for performance optimization. Without break, the loop vectorizes. +// } +// } +// if matched { +// cur += lower..size(); +// } +// return matched; +// } + +#line 1386 "cpp2regex.h2" +// Regex syntax: [] Example: [abcx-y[:digits:]] +// +class class_token +: public regex_token { + +#line 1392 "cpp2regex.h2" + private: bool negate; + private: bool case_insensitive; + private: std::string class_str; + + public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str); + +#line 1404 "cpp2regex.h2" + // TODO: Rework class generation: Generate check functions for classes. + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 1530 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 1535 "cpp2regex.h2" + private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string; + public: virtual ~class_token() noexcept; + + public: class_token(class_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(class_token const&) -> void = delete; + + +#line 1542 "cpp2regex.h2" +}; + +#line 1545 "cpp2regex.h2" +template class class_token_matcher + { + public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool; + +#line 1576 "cpp2regex.h2" + private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool; + public: class_token_matcher() = default; + public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(class_token_matcher const&) -> void = delete; + + +#line 1589 "cpp2regex.h2" + // TODO: Implement proper to string + // to_string: () -> bstring = { + // r: bstring = "["; + // if negate { + // r += "^"; + // } + // r += (bstring() + ... + List::to_string()); + // r += "]"; + + // return r; + // } +#line 1600 "cpp2regex.h2" +}; + +#line 1603 "cpp2regex.h2" +// Regex syntax: \a or \n or \[ +// +[[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr; + +#line 1644 "cpp2regex.h2" +// Regex syntax: \K Example: ab\Kcd +// +[[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr; + +#line 1655 "cpp2regex.h2" +// Regex syntax: \ Example: \1 +// \g{name_or_number} +// \k{name_or_number} +// \k +// \k'name_or_number' +// +class group_ref_token +: public regex_token { + +#line 1665 "cpp2regex.h2" + private: int id; + private: bool case_insensitive; + + public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str); + +#line 1675 "cpp2regex.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 1776 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + public: virtual ~group_ref_token() noexcept; + + public: group_ref_token(group_ref_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(group_ref_token const&) -> void = delete; + + +#line 1779 "cpp2regex.h2" +}; + +#line 1782 "cpp2regex.h2" +template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool; + +#line 1813 "cpp2regex.h2" +// Regex syntax: () Example: (abc) +// (?:) (?i:abc) +// (?<>:) (?:abc) +// (?#) (#Step 1 finished) +// (?|) (?|(abc)|(cde)) +// (?=) (?=abc) +// (?!) (?!abc) +// (*: syntax, cpp2::impl::in positive) -> token_ptr; + +#line 1844 "cpp2regex.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 1981 "cpp2regex.h2" + public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string; + +#line 1999 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 2019 "cpp2regex.h2" + public: auto add_groups(std::set& groups) const -> void override; + public: virtual ~group_token() noexcept; + + public: group_token() = default; + public: group_token(group_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(group_token const&) -> void = delete; + + +#line 2026 "cpp2regex.h2" +}; + +#line 2029 "cpp2regex.h2" +// Regex syntax: \x or \x{} Example: \x{62} +// +[[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr; + +#line 2070 "cpp2regex.h2" +// Regex syntax: $ Example: aa$ +// +[[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr; + +#line 2089 "cpp2regex.h2" +template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool; + +#line 2103 "cpp2regex.h2" +// Regex syntax: ^ Example: ^aa +// +[[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr; + +#line 2118 "cpp2regex.h2" +template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool; + +#line 2125 "cpp2regex.h2" +// Regex syntax: (?=) or (?!) or (*pla), etc. Example: (?=AA) +// +// Parsed in group_token. +// +class lookahead_token +: public regex_token { + +#line 2133 "cpp2regex.h2" + protected: bool positive; + public: token_ptr inner {nullptr}; + + public: explicit lookahead_token(cpp2::impl::in positive_); + +#line 2140 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 2146 "cpp2regex.h2" + public: auto add_groups(std::set& groups) const -> void override; + public: virtual ~lookahead_token() noexcept; + + public: lookahead_token(lookahead_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(lookahead_token const&) -> void = delete; + + +#line 2149 "cpp2regex.h2" +}; + +template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool; + +#line 2162 "cpp2regex.h2" +// Named character classes +// +[[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr; + +#line 2190 "cpp2regex.h2" +template using named_class_no_new_line = class_token_matcher>; +template using named_class_digits = class_token_matcher>; +template using named_class_hor_space = class_token_matcher>; +template using named_class_space = class_token_matcher>; +template using named_class_ver_space = class_token_matcher>; +template using named_class_word = class_token_matcher>; + +template using named_class_not_digits = class_token_matcher>; +template using named_class_not_hor_space = class_token_matcher>; +template using named_class_not_space = class_token_matcher>; +template using named_class_not_ver_space = class_token_matcher>; +template using named_class_not_word = class_token_matcher>; + +#line 2204 "cpp2regex.h2" +// Regex syntax: \o{} Example: \o{142} +// +[[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr; + +#line 2231 "cpp2regex.h2" +// TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147 + +#line 2234 "cpp2regex.h2" +// Options for range matching. +class range_flags { + public: static const int not_greedy;// Try to take as few as possible. + public: static const int greedy;// Try to take as many as possible. + public: static const int possessive;// Do not give back after a greedy match. No backtracking. + + public: range_flags() = default; + public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(range_flags const&) -> void = delete; +}; +#line 2240 "cpp2regex.h2" + +#line 2242 "cpp2regex.h2" +// Regex syntax: {min, max} Example: a{2,4} +// +class range_token +: public regex_token { + +#line 2248 "cpp2regex.h2" + protected: int min_count {-1}; + protected: int max_count {-1}; + protected: int kind {range_flags::greedy}; + protected: token_ptr inner_token {nullptr}; + + public: explicit range_token(); + + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + +#line 2328 "cpp2regex.h2" + public: auto parse_modifier(parse_context& ctx) & -> void; + +#line 2340 "cpp2regex.h2" + public: [[nodiscard]] auto gen_mod_string() const& -> std::string; + +#line 2353 "cpp2regex.h2" + public: [[nodiscard]] auto gen_range_string() const& -> std::string; + +#line 2372 "cpp2regex.h2" + public: auto generate_code(generation_context& ctx) const -> void override; + +#line 2383 "cpp2regex.h2" + public: auto add_groups(std::set& groups) const -> void override; + public: virtual ~range_token() noexcept; + + public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(range_token const&) -> void = delete; + + +#line 2387 "cpp2regex.h2" +}; + +#line 2390 "cpp2regex.h2" +template class range_token_matcher + { + + public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto; + +#line 2406 "cpp2regex.h2" + private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool; + +#line 2411 "cpp2regex.h2" + private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool; + +#line 2416 "cpp2regex.h2" + private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool; + +#line 2422 "cpp2regex.h2" + private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto; + +#line 2438 "cpp2regex.h2" + private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return; + +#line 2468 "cpp2regex.h2" + private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return; + +#line 2496 "cpp2regex.h2" + private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return; + public: range_token_matcher() = default; + public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(range_token_matcher const&) -> void = delete; + + +#line 2522 "cpp2regex.h2" +}; + +#line 2525 "cpp2regex.h2" +// Regex syntax: *, +, or ? Example: aa* +// +class special_range_token +: public range_token { + +#line 2531 "cpp2regex.h2" + public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr; + public: virtual ~special_range_token() noexcept; + + public: special_range_token() = default; + public: special_range_token(special_range_token const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(special_range_token const&) -> void = delete; + + +#line 2561 "cpp2regex.h2" +}; + +#line 2564 "cpp2regex.h2" +// Regex syntax: \b or \B Example: \bword\b +// +// Matches the start end end of word boundaries. +// +[[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr; + +#line 2585 "cpp2regex.h2" +template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool; + +#line 2610 "cpp2regex.h2" +//----------------------------------------------------------------------- +// +// Regular expression implementation. +// +//----------------------------------------------------------------------- +// + +// Regular expression implementation +template class regular_expression + { + public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 + public: template using context = matcher_context_type>;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 + + public: template class search_return + { + public: bool matched; + public: context ctx; + public: int pos; + + public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_); + +#line 2635 "cpp2regex.h2" + public: [[nodiscard]] auto group_number() const& -> auto; + public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto; + public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto; + public: [[nodiscard]] auto group_end(cpp2::impl::in g) const& -> auto; + + public: [[nodiscard]] auto group(cpp2::impl::in> g) const& -> auto; + public: [[nodiscard]] auto group_start(cpp2::impl::in> g) const& -> auto; + public: [[nodiscard]] auto group_end(cpp2::impl::in> g) const& -> auto; + + private: [[nodiscard]] auto get_group_id(cpp2::impl::in> g) const& -> auto; + public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(search_return const&) -> void = delete; + + +#line 2651 "cpp2regex.h2" + }; + + public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto; + public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start) const& -> auto; + public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto; + public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return; + +#line 2664 "cpp2regex.h2" + public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto; + public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto; + public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto; + public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return; + +#line 2687 "cpp2regex.h2" + public: [[nodiscard]] auto to_string() const& -> auto; + + // Helper functions + // + private: [[nodiscard]] static auto get_iter(cpp2::impl::in> str, auto const& pos) -> auto; + public: regular_expression() = default; + public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regular_expression const&) -> void = delete; + + +#line 2699 "cpp2regex.h2" +}; + +#line 2702 "cpp2regex.h2" +//----------------------------------------------------------------------- +// +// Parser for regular expression. +// +//----------------------------------------------------------------------- +// + +// Parser and generator for regular expressions. +template class regex_generator + { + private: std::string_view regex; + private: std::string modifier {""}; + private: std::string modifier_escape {""}; + + private: Error_out error_out; + + private: std::string source {""}; + + public: explicit regex_generator(cpp2::impl::in r, Error_out const& e); + +#line 2725 "cpp2regex.h2" + public: [[nodiscard]] auto parse() & -> std::string; + +#line 2760 "cpp2regex.h2" + private: auto extract_modifiers() & -> void; + public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_generator const&) -> void = delete; + + +#line 2774 "cpp2regex.h2" +}; + +template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string; + +#line 2784 "cpp2regex.h2" +} +} + + +#endif + +#line 1 "cpp2regex.h2" + +//=== Cpp2 function definitions ================================================= + +#line 1 "cpp2regex.h2" + +#line 30 "cpp2regex.h2" +namespace cpp2 { + +namespace regex { + + +constexpr expression_flags::expression_flags(cpp2::impl::in _val) + : _value{ cpp2::unsafe_narrow(_val) } { } + +constexpr auto expression_flags::operator=(cpp2::impl::in _val) -> expression_flags& { + _value = cpp2::unsafe_narrow(_val); + return *this; } +constexpr auto expression_flags::operator|=(expression_flags const& that) & -> void { _value |= that._value; } +constexpr auto expression_flags::operator&=(expression_flags const& that) & -> void { _value &= that._value; } +constexpr auto expression_flags::operator^=(expression_flags const& that) & -> void { _value ^= that._value; } +[[nodiscard]] constexpr auto expression_flags::operator|(expression_flags const& that) const& -> expression_flags { return _value | that._value; } +[[nodiscard]] constexpr auto expression_flags::operator&(expression_flags const& that) const& -> expression_flags { return _value & that._value; } +[[nodiscard]] constexpr auto expression_flags::operator^(expression_flags const& that) const& -> expression_flags { return _value ^ that._value; } +[[nodiscard]] constexpr auto expression_flags::has(expression_flags const& that) const& -> bool { return _value & that._value; } +constexpr auto expression_flags::set(expression_flags const& that) & -> void { _value |= that._value; } +constexpr auto expression_flags::clear(expression_flags const& that) & -> void { _value &= ~that._value; } +inline CPP2_CONSTEXPR expression_flags expression_flags::case_insensitive{ 1 }; + +inline CPP2_CONSTEXPR expression_flags expression_flags::multiple_lines{ 2 }; + +inline CPP2_CONSTEXPR expression_flags expression_flags::single_line{ 4 }; + +inline CPP2_CONSTEXPR expression_flags expression_flags::no_group_captures{ 8 }; + +inline CPP2_CONSTEXPR expression_flags expression_flags::perl_code_syntax{ 16 }; + +inline CPP2_CONSTEXPR expression_flags expression_flags::perl_code_syntax_in_classes{ 32 }; + +inline CPP2_CONSTEXPR expression_flags expression_flags::none{ 0 }; + +[[nodiscard]] constexpr auto expression_flags::get_raw_value() const& -> cpp2::u8 { return _value; } +constexpr expression_flags::expression_flags() + : _value{ none._value }{} +constexpr expression_flags::expression_flags(expression_flags const& that) + : _value{ that._value }{} +constexpr auto expression_flags::operator=(expression_flags const& that) -> expression_flags& { + _value = that._value; + return *this;} +constexpr expression_flags::expression_flags(expression_flags&& that) noexcept + : _value{ std::move(that)._value }{} +constexpr auto expression_flags::operator=(expression_flags&& that) noexcept -> expression_flags& { + _value = std::move(that)._value; + return *this;} +[[nodiscard]] auto expression_flags::to_string() const& -> std::string{ + +std::string _ret {"("}; + +std::string _comma {}; +if ((*this) == none) {return "(none)"; } +if (((*this) & case_insensitive) == case_insensitive) {_ret += _comma + "case_insensitive";_comma = ", ";} +if (((*this) & multiple_lines) == multiple_lines) {_ret += _comma + "multiple_lines";_comma = ", ";} +if (((*this) & single_line) == single_line) {_ret += _comma + "single_line";_comma = ", ";} +if (((*this) & no_group_captures) == no_group_captures) {_ret += _comma + "no_group_captures";_comma = ", ";} +if (((*this) & perl_code_syntax) == perl_code_syntax) {_ret += _comma + "perl_code_syntax";_comma = ", ";} +if (((*this) & perl_code_syntax_in_classes) == perl_code_syntax_in_classes) {_ret += _comma + "perl_code_syntax_in_classes";_comma = ", ";} +return cpp2::move(_ret) + ")"; +} + +template match_group::match_group(auto const& start_, auto const& end_, auto const& matched_) + : start{ start_ } + , end{ end_ } + , matched{ matched_ }{} +template match_group::match_group(){} +template match_return::match_return(auto const& matched_, auto const& pos_) + : matched{ matched_ } + , pos{ pos_ }{} +template match_return::match_return(){} +#line 38 "cpp2regex.h2" +//----------------------------------------------------------------------- +// +// Helper structures for the expression matching. +// +//----------------------------------------------------------------------- +// + +// Possible modifiers for a regular expression. +// + +#line 49 "cpp2regex.h2" + // mod: i + // mod: m + // mod: s + // mod: n + // mod: x + // mod: xx + +#line 57 "cpp2regex.h2" +// Structure for storing group information. +// + +#line 67 "cpp2regex.h2" +// Return value for every matcher. +// + +#line 75 "cpp2regex.h2" +// Modifiable state during matching. +// + +#line 84 "cpp2regex.h2" + template match_context::match_context(Iter const& begin_, Iter const& end_) + : begin{ begin_ } + , end{ end_ }{ + +#line 87 "cpp2regex.h2" + } + +#line 89 "cpp2regex.h2" + template match_context::match_context(match_context const& that) + : begin{ that.begin } + , end{ that.end } + , groups{ that.groups }{} +#line 89 "cpp2regex.h2" + template auto match_context::operator=(match_context const& that) -> match_context& { + begin = that.begin; + end = that.end; + groups = that.groups; + return *this; } +#line 89 "cpp2regex.h2" + template match_context::match_context(match_context&& that) noexcept + : begin{ std::move(that).begin } + , end{ std::move(that).end } + , groups{ std::move(that).groups }{} +#line 89 "cpp2regex.h2" + template auto match_context::operator=(match_context&& that) noexcept -> match_context& { + begin = std::move(that).begin; + end = std::move(that).end; + groups = std::move(that).groups; + return *this; } + + // Getter and setter for groups + // +#line 93 "cpp2regex.h2" + template [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group); } + +#line 95 "cpp2regex.h2" + template [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{ + if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) { + return 0; + } + return cpp2::unsafe_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end)); + } +#line 101 "cpp2regex.h2" + template [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{ + if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) { + return 0; + } + return cpp2::unsafe_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start)); + } +#line 107 "cpp2regex.h2" + template [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{ + if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) { + return ""; + } + return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); + } + +#line 114 "cpp2regex.h2" + template auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{ + CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos; + CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true; + } + +#line 119 "cpp2regex.h2" + template auto match_context::set_group_invalid(auto const& group) & -> void{ + CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false; + } + +#line 123 "cpp2regex.h2" + template auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{ + CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos; + } + +#line 127 "cpp2regex.h2" + template [[nodiscard]] auto match_context::size() const& -> auto { return max_groups; } + + // Misc functions + // +#line 131 "cpp2regex.h2" + template [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); } +#line 132 "cpp2regex.h2" + template [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur); } + +#line 136 "cpp2regex.h2" +// End function that returns a valid match. +// + +#line 140 "cpp2regex.h2" + [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return ctx.pass(cur); } + +#line 144 "cpp2regex.h2" +// Empty group reset function. +// + +#line 148 "cpp2regex.h2" + auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{} + +#line 152 "cpp2regex.h2" +// Evaluate func on destruction of the handle. + +#line 157 "cpp2regex.h2" + template on_return::on_return(Func const& f) + : func{ f }{ + +#line 159 "cpp2regex.h2" + } +#line 157 "cpp2regex.h2" + template auto on_return::operator=(Func const& f) -> on_return& { + func = f; + return *this; + +#line 159 "cpp2regex.h2" + } + +#line 161 "cpp2regex.h2" + template on_return::~on_return() noexcept{ + cpp2::move(*this).func(); + } + +#line 167 "cpp2regex.h2" +// Helper for auto deduction of the Func type. +#line 168 "cpp2regex.h2" +template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func); } + +#line 171 "cpp2regex.h2" +//----------------------------------------------------------------------- +// +// Character classes for regular expressions. +// +//----------------------------------------------------------------------- +// + +// Class syntax: Example: a +// + +#line 182 "cpp2regex.h2" + template [[nodiscard]] auto single_class_entry::includes(cpp2::impl::in c) -> auto { return c == C; } +#line 183 "cpp2regex.h2" + template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } + +#line 187 "cpp2regex.h2" +// Class syntax: - Example: a-c +// + +#line 191 "cpp2regex.h2" + template [[nodiscard]] auto range_class_entry::includes(cpp2::impl::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }(); } +#line 192 "cpp2regex.h2" + template [[nodiscard]] auto range_class_entry::to_string() -> auto { return "" + cpp2::to_string(Start) + "-" + cpp2::to_string(End) + ""; } + +#line 196 "cpp2regex.h2" +// Helper for combining two character classes +// + +#line 200 "cpp2regex.h2" + template [[nodiscard]] auto combined_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || List::includes(c)); } +#line 201 "cpp2regex.h2" + template [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); } + +#line 205 "cpp2regex.h2" +// Class syntax: Example: abcd +// + +#line 209 "cpp2regex.h2" + template [[nodiscard]] auto list_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || (List == c)); } +#line 210 "cpp2regex.h2" + template [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); } + +#line 214 "cpp2regex.h2" +// Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c); } +#line 219 "cpp2regex.h2" + template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(Name.data()) + ":]"; } + +#line 226 "cpp2regex.h2" + template [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c)); } + +#line 230 "cpp2regex.h2" +// Short class syntax: \ Example: \w +// + +#line 234 "cpp2regex.h2" + template [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c); } +#line 235 "cpp2regex.h2" + template [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return Name.str(); } + +#line 239 "cpp2regex.h2" +// Named basic character classes +// + +#line 245 "cpp2regex.h2" +// Named other classes +// + +#line 261 "cpp2regex.h2" +// Shorthand class entries +// + +#line 276 "cpp2regex.h2" +//----------------------------------------------------------------------- +// +// Tokens for regular expressions. +// +//----------------------------------------------------------------------- +// + +// Basic class for a regex token. +// + +#line 289 "cpp2regex.h2" + regex_token::regex_token(cpp2::impl::in str) + : string_rep{ str }{ + +#line 291 "cpp2regex.h2" + } + +#line 293 "cpp2regex.h2" + regex_token::regex_token() + : string_rep{ "" }{ + +#line 295 "cpp2regex.h2" + } + + //parse: (inout ctx: parse_context) -> token_ptr; + // Generate the matching code. + +#line 300 "cpp2regex.h2" + auto regex_token::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}// Adds all group indices to the set. +#line 301 "cpp2regex.h2" + [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }// Create a string representation. +#line 302 "cpp2regex.h2" + auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; } + + regex_token::~regex_token() noexcept{}// Set the string representation. + +#line 317 "cpp2regex.h2" + regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_) + : regex_token{ str } + , check{ check_ }{ + +#line 320 "cpp2regex.h2" + } + +#line 322 "cpp2regex.h2" + auto regex_token_check::generate_code(generation_context& ctx) const -> void{ + ctx.add_check(check + "(" + ctx.match_parameters() + ")"); + } + + regex_token_check::~regex_token_check() noexcept{} + +#line 336 "cpp2regex.h2" + regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_) + : regex_token{ str } + , code{ code_ }{ + +#line 339 "cpp2regex.h2" + } + +#line 341 "cpp2regex.h2" + auto regex_token_code::generate_code(generation_context& ctx) const -> void{ + ctx.add(code); + } + + regex_token_code::~regex_token_code() noexcept{} + +#line 353 "cpp2regex.h2" + regex_token_empty::regex_token_empty(cpp2::impl::in str) + : regex_token{ str }{ + +#line 355 "cpp2regex.h2" + } + +#line 357 "cpp2regex.h2" + auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{ + // Nothing. + } + + regex_token_empty::~regex_token_empty() noexcept{} + +#line 371 "cpp2regex.h2" + regex_token_list::regex_token_list(cpp2::impl::in t) + : regex_token{ gen_string(t) } + , tokens{ t }{ + +#line 374 "cpp2regex.h2" + } + +#line 376 "cpp2regex.h2" + auto regex_token_list::generate_code(generation_context& ctx) const -> void{ + for ( auto const& token : tokens ) { + (*cpp2::impl::assert_not_null(token)).generate_code(ctx); + } + } + +#line 382 "cpp2regex.h2" + auto regex_token_list::add_groups(std::set& groups) const -> void{ + for ( auto const& token : tokens ) { + (*cpp2::impl::assert_not_null(token)).add_groups(groups); + } + } + +#line 388 "cpp2regex.h2" + [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{ + std::string r {""}; + for ( auto const& token : vec ) { + r += (*cpp2::impl::assert_not_null(token)).to_string(); + } + return r; + } + + regex_token_list::~regex_token_list() noexcept{} + +#line 414 "cpp2regex.h2" + auto parse_context_group_state::next_alternative() & -> void{ + token_vec new_list {}; + std::swap(new_list, cur_match_list); + post_process_list(new_list); + static_cast(alternate_match_lists.insert(alternate_match_lists.end(), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list)))); + } + +#line 422 "cpp2regex.h2" + auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{ + std::swap(cur_match_list, t.cur_match_list); + std::swap(alternate_match_lists, t.alternate_match_lists); + std::swap(modifiers, t.modifiers); + } + +#line 429 "cpp2regex.h2" + [[nodiscard]] auto parse_context_group_state::get_as_token() & -> token_ptr{ + if (alternate_match_lists.empty()) { + post_process_list(cur_match_list); + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); + } + else { + next_alternative(); + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, alternate_match_lists); + } + } + +#line 441 "cpp2regex.h2" + auto parse_context_group_state::add(cpp2::impl::in token) & -> void{ + cur_match_list.push_back(token); + } + +#line 446 "cpp2regex.h2" + [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return cur_match_list.empty(); } + +#line 450 "cpp2regex.h2" + auto parse_context_group_state::post_process_list(token_vec& list) -> void{ + // Merge all characters + auto merge_pos {list.begin()}; + for( ; merge_pos != list.end(); (++merge_pos) ) { + if (cpp2::impl::is(*cpp2::impl::assert_not_null(*cpp2::impl::assert_not_null(merge_pos)))) { + auto combine_pos {merge_pos + 1}; + while( combine_pos != list.end() && cpp2::impl::is(*cpp2::impl::assert_not_null(*cpp2::impl::assert_not_null(combine_pos))) ) {// The erase advances combine_pos + (cpp2::impl::as_(*cpp2::impl::assert_not_null(*cpp2::impl::assert_not_null(merge_pos)))).append(cpp2::impl::as_(*cpp2::impl::assert_not_null(*cpp2::impl::assert_not_null(combine_pos)))); + combine_pos = list.erase(combine_pos); + } + } + } + } + + parse_context_group_state::parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_) + : cur_match_list{ cur_match_list_ } + , alternate_match_lists{ alternate_match_lists_ } + , modifiers{ modifiers_ }{} +parse_context_group_state::parse_context_group_state(){} + +#line 476 "cpp2regex.h2" + [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{ + auto g {cur_group}; + cur_group += 1; + max_group = max(max_group, cur_group); + + return g; + } + +#line 485 "cpp2regex.h2" + auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{ + cur_group = g; + max_group = max(max_group, g); + } + +#line 491 "cpp2regex.h2" + auto parse_context_branch_reset_state::next_alternative() & -> void{ + if (is_active) { + cur_group = from; + } + } + +#line 498 "cpp2regex.h2" + auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{ + is_active = true; + cur_group = restart; + from = restart; + max_group = restart; + } + + parse_context_branch_reset_state::parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_) + : is_active{ is_active_ } + , cur_group{ cur_group_ } + , max_group{ max_group_ } + , from{ from_ }{} +parse_context_branch_reset_state::parse_context_branch_reset_state(){} + +#line 526 "cpp2regex.h2" + parse_context::parse_context(cpp2::impl::in r, auto const& e) + : regex{ r } + , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") } + , error_out{ e }{ + +#line 530 "cpp2regex.h2" + } + +#line 536 "cpp2regex.h2" + [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state + { + parse_context_group_state old_state {}; + old_state.swap(cur_group_state); + cur_group_state.modifiers = old_state.modifiers; + + return old_state; + } + +#line 546 "cpp2regex.h2" + [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr + { + auto inner {cur_group_state.get_as_token()}; + cur_group_state = old_state; + return inner; + } + +#line 553 "cpp2regex.h2" + [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{ + return cur_group_state.modifiers; + } + +#line 557 "cpp2regex.h2" + auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{ + cur_group_state.modifiers = mod; + } + +#line 564 "cpp2regex.h2" + [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state + { + parse_context_branch_reset_state old_state {}; + std::swap(old_state, cur_branch_reset_state); + + cur_branch_reset_state.set_active_reset(old_state.cur_group); + return old_state; + } + +#line 573 "cpp2regex.h2" + auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void + { + auto max_group {cur_branch_reset_state.max_group}; + cur_branch_reset_state = old_state; + cur_branch_reset_state.set_next(cpp2::move(max_group)); + } + +#line 580 "cpp2regex.h2" + auto parse_context::next_alternative() & -> void + { + cur_group_state.next_alternative(); + cur_branch_reset_state.next_alternative(); + } + +#line 588 "cpp2regex.h2" + auto parse_context::add_token(cpp2::impl::in token) & -> void{ + cur_group_state.add(token); + } + +#line 592 "cpp2regex.h2" + [[nodiscard]] auto parse_context::has_token() const& -> bool{ + return !(cur_group_state.empty()); + } + +#line 596 "cpp2regex.h2" + [[nodiscard]] auto parse_context::pop_token() & -> token_ptr + { + token_ptr r {nullptr}; + if (has_token()) { + r = cur_group_state.cur_match_list.back(); + cur_group_state.cur_match_list.pop_back(); + } + + return r; + } + +#line 607 "cpp2regex.h2" + [[nodiscard]] auto parse_context::get_as_token() & -> token_ptr{ + return root; + } + +#line 613 "cpp2regex.h2" + [[nodiscard]] auto parse_context::get_cur_group() const& -> int{ + return cur_branch_reset_state.cur_group; + } + +#line 617 "cpp2regex.h2" + [[nodiscard]] auto parse_context::next_group() & -> int{ + return cur_branch_reset_state.next(); + } + +#line 621 "cpp2regex.h2" + auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void + { + if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained. + CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id; + } + } + +#line 628 "cpp2regex.h2" + [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int + { + auto iter {named_groups.find(name)}; + if (iter == named_groups.end()) { + return -1; + } + else { + return (*cpp2::impl::assert_not_null(cpp2::move(iter))).second; + } + } + +#line 641 "cpp2regex.h2" + [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); } + +#line 644 "cpp2regex.h2" + [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t + { + auto perl_syntax {false}; + if (!(no_skip)) { + if (in_class) { + perl_syntax = get_modifiers().has(expression_flags::perl_code_syntax) && get_modifiers().has(expression_flags::perl_code_syntax_in_classes); + } + else { + perl_syntax = get_modifiers().has(expression_flags::perl_code_syntax); + } + } + auto cur {pos + 1}; + if (cpp2::move(perl_syntax)) { + for( ; cpp2::impl::cmp_less(cur,regex.size()); (cur += 1) ) { + auto n {CPP2_ASSERT_IN_BOUNDS(regex, cur)}; + + if (space_class::includes(n)) { + continue; + } + else {if (!(in_class) && '#' == cpp2::move(n)) { + cur = regex.find("\n", cur); + if (std::string::npos == cur) { + // No new line, comment runs until the end of the pattern + cur = regex.size(); + } + } + else { // None space none comment char + break; + }} + } + } + + // Check for end of file. + if (cpp2::impl::cmp_greater(cur,regex.size())) { + cur = regex.size(); + } + return cur; + } + +#line 684 "cpp2regex.h2" + [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool + { + pos = get_next_position(in_class, no_skip); + if (pos != regex.size()) { + return true; + } + else { + return false; + } + } + +#line 695 "cpp2regex.h2" + [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); } +#line 696 "cpp2regex.h2" + [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false); } +#line 697 "cpp2regex.h2" + [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); } + +#line 699 "cpp2regex.h2" + [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{ + auto r {true}; + auto cur {0}; + for( ; r && cpp2::impl::cmp_less(cur,n); (r = next()) ) { + cur += 1; + } + return r; + } + +#line 708 "cpp2regex.h2" + [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); } + +#line 710 "cpp2regex.h2" + [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool + { + auto end {pos}; + if (any) { + end = regex.find_first_of(e, pos); + } + else { + end = regex.find(e, pos); + } + + if (end != std::string_view::npos) { + r.construct(regex.substr(pos, end - pos)); + pos = cpp2::move(end); + return true; + } + else { + r.construct(""); + return false; + } + } + +#line 731 "cpp2regex.h2" + [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); } +#line 732 "cpp2regex.h2" + [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); } +#line 733 "cpp2regex.h2" + [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true); } + +#line 735 "cpp2regex.h2" + [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool + { + if (cpp2::impl::cmp_less_eq(pos + n,regex.size())) { + r.construct(regex.substr(pos, n)); + pos += n - 1; + return true; + } + else { + r.construct(""); + return false; + } + } + +#line 748 "cpp2regex.h2" + [[nodiscard]] auto parse_context::grab_number() & -> std::string + { + auto start {pos}; + auto start_search {pos}; + if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') { + start_search += 1; + } + auto end {regex.find_first_not_of("1234567890", cpp2::move(start_search))}; + + cpp2::impl::deferred_init r; + if (end != std::string::npos) { + r.construct(regex.substr(start, end - start)); + pos = cpp2::move(end) - 1; + } + else { + r.construct(regex.substr(cpp2::move(start))); + pos = regex.size() - 1; + } + return cpp2::move(r.value()); + } + +#line 769 "cpp2regex.h2" + [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{ + auto next_pos {get_next_position(in_class, false)}; + if (cpp2::impl::cmp_less(next_pos,regex.size())) { + return CPP2_ASSERT_IN_BOUNDS(regex, cpp2::move(next_pos)); + } + else { + return '\0'; + } + } + +#line 779 "cpp2regex.h2" + [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); } +#line 780 "cpp2regex.h2" + [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true); } + +#line 785 "cpp2regex.h2" + [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool + { + auto is_negative {false}; + auto is_reset {false}; + + auto apply {[&, _1 = (&is_negative), _2 = (&parser_modifiers)](cpp2::impl::in flag) mutable -> void{ + if (*cpp2::impl::assert_not_null(_1)) { + (*cpp2::impl::assert_not_null(_2)).clear(flag); + } + else { + (*cpp2::impl::assert_not_null(_2)).set(flag); + } + }}; + + auto iter {change_str.begin()}; + for( ; iter != change_str.end(); (++iter) ) + { + auto cur {*cpp2::impl::assert_not_null(iter)}; + if (cur == '^') { + is_reset = true; + parser_modifiers = expression_flags::none; + } + else {if (cur == '-') { + if (is_reset) {static_cast(error("No negative modifier allowed.")); return false; } + is_negative = true; + } + else {if (cur == 'i') {apply(expression_flags::case_insensitive); } + else {if (cur == 'm') {apply(expression_flags::multiple_lines); } + else {if (cur == 's') {apply(expression_flags::single_line); } + else {if (cur == 'n') {apply(expression_flags::no_group_captures); } + else {if (cur == 'x') { + if ((iter + 1) == change_str.end() || *cpp2::impl::assert_not_null((iter + 1)) != 'x') { + // x modifier + apply(expression_flags::perl_code_syntax); + + // Just x unsets xx and remove x also removes xx + parser_modifiers.clear(expression_flags::perl_code_syntax_in_classes); + } + else { // xx modifier + // xx also sets or unsets x + apply(expression_flags::perl_code_syntax); + apply(expression_flags::perl_code_syntax_in_classes); + + ++iter; // Skip the second x + } + } + else { + static_cast(error("Unknown modifier: " + cpp2::to_string(cpp2::move(cur)) + "")); return false; + }}}}}}} + } + + return true; + } + +#line 839 "cpp2regex.h2" + [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{ + token_ptr cur_token {}; + + for( ; valid(); static_cast(next()) ) + { + if (term == current()) {break; } + + cur_token = nullptr; + + if (!(cur_token) && valid()) {cur_token = alternative_token::parse((*this)); } + if (!(cur_token) && valid()) {cur_token = any_token::parse((*this)); } + if (!(cur_token) && valid()) {cur_token = class_token::parse((*this)); } + if (!(cur_token) && valid()) {cur_token = escape_token_parse((*this)); } + if (!(cur_token) && valid()) {cur_token = global_group_reset_token_parse((*this)); } + if (!(cur_token) && valid()) {cur_token = group_ref_token::parse((*this)); } + if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); } + if (!(cur_token) && valid()) {cur_token = hexadecimal_token_parse((*this)); } + if (!(cur_token) && valid()) {cur_token = line_end_token_parse((*this)); } + if (!(cur_token) && valid()) {cur_token = line_start_token_parse((*this)); } + if (!(cur_token) && valid()) {cur_token = named_class_token_parse((*this)); } + if (!(cur_token) && valid()) {cur_token = octal_token_parse((*this)); } + if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); } + if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); } + if (!(cur_token) && valid()) {cur_token = word_boundary_token_parse((*this)); } + + // Everything else is matched as it is. + if (!(cur_token) && valid()) {cur_token = char_token::parse((*this)); } + + if (cur_token && valid()) { + add_token(cur_token); + }else { + return false; + } + } + + return true; + } + +#line 877 "cpp2regex.h2" + [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool + { + + expression_flags flags {}; + if (!(parser_group_modifiers(modifiers, flags))) {return false; } + set_modifiers(cpp2::move(flags)); + + auto r {parse_until('\0')}; + if (r) { + root = cur_group_state.get_as_token(); + } + + return r; + } + +#line 894 "cpp2regex.h2" + [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos; } +#line 895 "cpp2regex.h2" + [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1)); } +#line 896 "cpp2regex.h2" + [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && !(has_error); } + +#line 898 "cpp2regex.h2" + [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{ + has_error = true; + error_out("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(err) + ""); + return nullptr; + } + +#line 913 "cpp2regex.h2" + auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{ + int i {0}; + for( ; cpp2::impl::cmp_less(i,c); i += 1 ) { + tabs += " "; + } + } + +#line 920 "cpp2regex.h2" + auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{ + tabs = tabs.substr(0, c * 2); + } + + generation_function_context::generation_function_context(auto const& code_, auto const& tabs_) + : code{ code_ } + , tabs{ tabs_ }{} +generation_function_context::generation_function_context(){} + +#line 938 "cpp2regex.h2" + [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; } + +#line 943 "cpp2regex.h2" + auto generation_context::add(cpp2::impl::in s) & -> void{ + auto cur {get_current()}; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n"; + } + +#line 949 "cpp2regex.h2" + auto generation_context::add_check(cpp2::impl::in check) & -> void{ + auto cur {get_current()}; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n"; + } + +#line 955 "cpp2regex.h2" + auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void + { + end_func_statefull(check); + + auto name {next_func.substr(0, next_func.size() - 2)}; + start_func_named(cpp2::move(name)); + } + +#line 963 "cpp2regex.h2" + auto generation_context::start_func_named(cpp2::impl::in name) & -> void + { + auto cur {new_context()}; + + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " operator(): (this, cur: Iter, inout ctx: context, other) -> cpp2::regex::match_return = {\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " r := ctx..pass(cur);\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " do {\n"; + (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3); + } + +#line 974 "cpp2regex.h2" + [[nodiscard]] auto generation_context::start_func() & -> std::string + { + auto name {gen_func_name()}; + start_func_named(name); + return cpp2::move(name) + "()"; + } + +#line 981 "cpp2regex.h2" + auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void + { + auto cur {get_current()}; + (*cpp2::impl::assert_not_null(cur)).remove_tabs(3); + (*cpp2::impl::assert_not_null(cur)).code += "\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " } while false;\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " if r.matched {\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " r = " + cpp2::to_string(s) + ";\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " }\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " else {\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " r.pos = ctx.end;\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " }\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " return r;\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " }\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "}\n"; + + finish_context(); + } + +#line 1001 "cpp2regex.h2" + [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string + { + auto name {start_func()}; + (*cpp2::impl::assert_not_null(token)).generate_code((*this)); + end_func_statefull("other(" + cpp2::to_string(match_parameters()) + ")"); + + return name; + } + +#line 1011 "cpp2regex.h2" + [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string + { + if (groups.empty()) { + return "cpp2::regex::no_reset()"; + } + + auto name {gen_reset_func_name()}; + auto cur {new_context()}; + + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " operator(): (this, inout ctx) = {\n"; + for ( auto const& g : groups ) { + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " ctx..set_group_invalid(" + cpp2::to_string(g) + ");\n"; + } + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + " }\n"; + (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "}\n"; + + finish_context(); + + return cpp2::move(name) + "()"; + } + +#line 1035 "cpp2regex.h2" + [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{ + auto cur_id {matcher_func}; + matcher_func += 1; + return "func_" + cpp2::to_string(cpp2::move(cur_id)) + ""; + } + +#line 1041 "cpp2regex.h2" + [[nodiscard]] auto generation_context::next_func_name() & -> std::string{ + return gen_func_name() + "()"; + } + +#line 1045 "cpp2regex.h2" + [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{ + auto cur_id {reset_func}; + reset_func += 1; + return "reset_" + cpp2::to_string(cpp2::move(cur_id)) + ""; + } + +#line 1051 "cpp2regex.h2" + [[nodiscard]] auto generation_context::gen_temp() & -> std::string{ + auto cur_id {temp_name}; + temp_name += 1; + return "tmp_" + cpp2::to_string(cpp2::move(cur_id)) + ""; + } + +#line 1059 "cpp2regex.h2" + [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{ + gen_stack.push_back(generation_function_context()); + auto cur {get_current()}; + (*cpp2::impl::assert_not_null(cur)).tabs = " "; + + return cur; + } + +#line 1067 "cpp2regex.h2" + auto generation_context::finish_context() & -> void{ + auto cur {get_current()}; + auto base {get_base()}; + (*cpp2::impl::assert_not_null(base)).code += (*cpp2::impl::assert_not_null(cpp2::move(cur))).code; + + gen_stack.pop_back(); + } + +#line 1077 "cpp2regex.h2" + [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{ + return &gen_stack.back(); + } + +#line 1081 "cpp2regex.h2" + [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{ + return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); + } + +#line 1085 "cpp2regex.h2" + [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{ + return entry_func; + } + +#line 1089 "cpp2regex.h2" + [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string + { + std::string res {"get_named_group_index: (name) -> int = {\n"}; + + // Generate if selection. + std::string sep {""}; + for ( auto const& cur : named_groups ) { + res += "" + cpp2::to_string(sep) + "if name == \"" + cpp2::to_string(cur.first) + "\" { return " + cpp2::to_string(cur.second) + "; }"; + sep = "else "; + } + + // Generate else branch or return if list is empty. + if (named_groups.empty()) { + res += " _ = name;\n"; + res += " return -1;\n"; + } + else { + res += " else { return -1; }\n"; + } + res += "}\n"; + return res; + } + +#line 1114 "cpp2regex.h2" + [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{ + entry_func = generate_func(token); + + return (*cpp2::impl::assert_not_null(get_base())).code; + } + +#line 1130 "cpp2regex.h2" + alternative_token::alternative_token() + : regex_token_empty{ "" }{} + +#line 1132 "cpp2regex.h2" + [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{ + if (ctx.current() != '|') {return nullptr; } + + if (!(ctx.has_token())) {return ctx.error("Alternative with no content."); } + ctx.next_alternative(); + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); + } + + alternative_token::~alternative_token() noexcept{} + +#line 1147 "cpp2regex.h2" + alternative_token_gen::alternative_token_gen(cpp2::impl::in a) + : regex_token{ gen_string(a) } + , alternatives{ a }{ + +#line 1150 "cpp2regex.h2" + } + +#line 1152 "cpp2regex.h2" + auto alternative_token_gen::generate_code(generation_context& ctx) const -> void + { + std::string functions {""}; + + for ( auto const& cur : alternatives ) { + std::set groups {}; + (*cpp2::impl::assert_not_null(cur)).add_groups(groups); + + functions += ", " + ctx.generate_func(cur); + functions += ", " + ctx.generate_reset(cpp2::move(groups)); + } + + auto next_name {ctx.next_func_name()}; + + ctx.add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"); + } + +#line 1169 "cpp2regex.h2" + auto alternative_token_gen::add_groups(std::set& groups) const -> void + { + for ( auto const& cur : alternatives ) { + (*cpp2::impl::assert_not_null(cur)).add_groups(groups); + } + } + +#line 1176 "cpp2regex.h2" + [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string + { + std::string r {""}; + std::string sep {""}; + + for ( auto const& cur : a ) { + r += sep + (*cpp2::impl::assert_not_null(cur)).to_string(); + sep = "|"; + } + + return r; + } + + alternative_token_gen::~alternative_token_gen() noexcept{} + +#line 1193 "cpp2regex.h2" + template [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{ + return match_first(cur, ctx, end_func, tail, functions...); + } + +#line 1197 "cpp2regex.h2" + template template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto + { + auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{ + return _0(tail_cur, tail_ctx, _1); + }}; + auto r {cur_func(cur, ctx, cpp2::move(inner_call))}; + if (r.matched) { + return r; + }else { + cur_reset(ctx); + + if constexpr (0 != sizeof...(Other)) { + return match_first(cur, ctx, end_func, tail, other...); + }else { + return ctx.fail(); + } + } + } + +#line 1224 "cpp2regex.h2" + any_token::any_token(cpp2::impl::in single_line) + : regex_token_check{ ".", "any_token_matcher" }{ + +#line 1226 "cpp2regex.h2" + } + +#line 1228 "cpp2regex.h2" + [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{ + if ('.' != ctx.current()) {return nullptr; } + + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.get_modifiers().has(expression_flags::single_line)); + } + + any_token::~any_token() noexcept{} + +#line 1236 "cpp2regex.h2" +template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool +{ + if ( cur != ctx.end // any char except the end + && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) // do not match new lines in multi line mode + { + cur += 1; + return true; + } + // Else + return false; +} + +#line 1258 "cpp2regex.h2" + char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_) + : regex_token{ std::string(1, t) } + , token{ t } + , ignore_case{ ignore_case_ }{ + +#line 1262 "cpp2regex.h2" + } + +#line 1264 "cpp2regex.h2" + [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{ + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); + } + +#line 1268 "cpp2regex.h2" + auto char_token::generate_code(generation_context& ctx) const -> void + { + if (ignore_case) { + std::string upper {token}; + std::string lower {token}; +{ +size_t i{0}; + +#line 1274 "cpp2regex.h2" + for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) { + CPP2_ASSERT_IN_BOUNDS(lower, i) = string_util::safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i)); + CPP2_ASSERT_IN_BOUNDS(upper, i) = string_util::safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i)); + } +} + +#line 1279 "cpp2regex.h2" + if (upper != lower) { + gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx); + } + else { + gen_case_sensitive(ctx); + } + } + else { + gen_case_sensitive(ctx); + } + } + +#line 1291 "cpp2regex.h2" + auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void + { + std::string name {"str_" + cpp2::to_string(ctx.gen_temp()) + ""}; + std::string lower_name {"lower_" + cpp2::to_string(name) + ""}; + std::string upper_name {"upper_" + cpp2::to_string(cpp2::move(name)) + ""}; + auto size {token.size()}; + ctx.add("" + cpp2::to_string(lower_name) + " : std::array = \"" + cpp2::to_string(add_escapes(lower)) + "\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved. + ctx.add("" + cpp2::to_string(upper_name) + " : std::array = \"" + cpp2::to_string(add_escapes(upper)) + "\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved. + ctx.add("if std::distance(r.pos, ctx.end) < " + cpp2::to_string(size) + " {"); + ctx.add(" r.matched = false;"); + ctx.add(" break;"); + ctx.add("}"); + ctx.add(""); + ctx.add("(copy i : int = 0) while i < " + cpp2::to_string(size) + " next (i += 1) {"); + ctx.add(" if !(" + cpp2::to_string(cpp2::move(lower_name)) + "[i] == r.pos[i] || " + cpp2::to_string(cpp2::move(upper_name)) + "[i] == r.pos[i]) { r.matched = false; }"); + ctx.add("}"); + ctx.add(""); + ctx.add("if r.matched { r.pos += " + cpp2::to_string(cpp2::move(size)) + "; }"); + ctx.add("else { break; }"); + } + +#line 1312 "cpp2regex.h2" + auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void + { + std::string name {"str_" + cpp2::to_string(ctx.gen_temp()) + ""}; + auto size {token.size()}; + ctx.add("" + cpp2::to_string(name) + " : std::array = \"" + cpp2::to_string(add_escapes(token)) + "\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved. + ctx.add("if std::distance(r.pos, ctx.end) < " + cpp2::to_string(size) + " {"); + ctx.add(" r.matched = false;"); + ctx.add(" break;"); + ctx.add("}"); + ctx.add(""); + ctx.add("(copy i : int = 0) while i < " + cpp2::to_string(size) + " next (i += 1) {"); + ctx.add(" if " + cpp2::to_string(cpp2::move(name)) + "[i] != r.pos[i] { r.matched = false; }"); + ctx.add("}"); + ctx.add(""); + ctx.add("if r.matched { r.pos += " + cpp2::to_string(cpp2::move(size)) + "; }"); + ctx.add("else { break; }"); + } + +#line 1330 "cpp2regex.h2" + [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string + { + str = string_util::replace_all(str, "\\", "\\\\"); + str = string_util::replace_all(str, "\a", "\\a"); + str = string_util::replace_all(str, "\f", "\\f"); + str = string_util::replace_all(str, "\x1b", "\" \"\\x1b\" \""); // Generate a separated string. This prevents + // situations like `\x1bblub` from generating + // wrong hex characters. + str = string_util::replace_all(str, "\n", "\\n"); + str = string_util::replace_all(str, "\r", "\\r"); + str = string_util::replace_all(str, "\t", "\\t"); + + return cpp2::move(str); + } + +#line 1345 "cpp2regex.h2" + auto char_token::append(char_token const& that) & -> void{ + (*this).token += that.token; + (*this).string_rep += that.string_rep; + } + + char_token::~char_token() noexcept{} + +#line 1396 "cpp2regex.h2" + class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str) + : regex_token{ str } + , negate{ negate_ } + , case_insensitive{ case_insensitive_ } + , class_str{ class_str_ } +#line 1397 "cpp2regex.h2" + { + +#line 1402 "cpp2regex.h2" + } + +#line 1405 "cpp2regex.h2" + [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr + { + if (ctx.current() != '[') {return nullptr; } + + auto start_pos {ctx.get_pos()}; + + std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", + "lower", "print", "punct", "space", "upper", "word", "xdigit"}; + + std::vector classes {}; + + // First step: parse until the end bracket and push single chars, ranges or groups on the class stack. + auto is_negate {false}; + auto first {true}; + auto range {false}; + while( ctx.next_in_class() && (ctx.current() != ']' || first) ) + { + if (ctx.current() == '^') + { + is_negate = true; + continue; // Skip rest of the loop. Also the first update. + } + + if (ctx.current() == '[' && ctx.peek_in_class() == ':') + { + // We have a character class. + static_cast(ctx.next_n(2));// Skip [: + + std::string name {""}; + if (!(ctx.grab_until(":]", cpp2::impl::out(&name)))) {return ctx.error("Could not find end of character class."); } + if (supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name)) { + return ctx.error("Unsupported character class. Supported ones are: " + cpp2::to_string(string_util::join(supported_classes)) + ""); + } + + classes.push_back("[:" + cpp2::to_string(cpp2::move(name)) + ":]"); + + static_cast(ctx.next());// Skip ':' pointing to the ending ']'. + } + else {if (ctx.current() == '\\') + { + if (ctx. next_no_skip() && (ctx. current() != ']')) + { + if ( ' ' == ctx. current() + && ctx.get_modifiers().has(expression_flags::perl_code_syntax) + && ctx.get_modifiers().has(expression_flags::perl_code_syntax_in_classes)) + { + classes.push_back(std::string(1, ctx.current())); + } + else { + auto name {""}; + if ( 'd' == ctx. current()) { name = "short_digits"; } + else {if ('D' == ctx.current()) {name = "short_not_digits"; } + else {if ('h' == ctx.current()) {name = "short_hor_space"; } + else {if ('H' == ctx.current()) {name = "short_not_hor_space"; } + else {if ('s' == ctx.current()) {name = "short_space"; } + else {if ('S' == ctx.current()) {name = "short_not_space"; } + else {if ('v' == ctx.current()) {name = "short_ver_space"; } + else {if ('V' == ctx.current()) {name = "short_not_ver_space"; } + else {if ('w' == ctx.current()) {name = "short_word"; } + else {if ('W' == ctx.current()) {name = "short_not_word"; } + else { + return ctx.error("Unknown group escape."); + }}}}}}}}}} + classes.push_back("[:" + cpp2::to_string(cpp2::move(name)) + ":]"); + } + }else { + return ctx.error("Escape without a following character."); + } + } + else {if (ctx.current() == '-') + { + if (first) {// Literal if first entry. + classes.push_back("" + cpp2::to_string(ctx.current()) + ""); + }else { + range = true; + } + } + else + { + if (range) {// Modify last element to be a range. + classes.back() += "-" + cpp2::to_string(ctx.current()) + ""; + range = false; + } + else { + classes.push_back("" + cpp2::to_string(ctx.current()) + ""); + } + }}} + + first = false; + } + + if (ctx.current() != ']') { + return ctx.error("Error end of character class definition before terminating ']'."); + } + auto end_pos {ctx.get_pos()}; + + if (cpp2::move(range)) {// If '-' is last entry treat it as a literal char. + classes.push_back("-"); + } + + // Second step: Wrap the item on the class stack with corresponding class implementation. + for ( auto& cur : classes ) + { + if (cur.starts_with("[:")) { + auto name {cur.substr(2, cur.size() - 4)}; + cur = create_matcher("" + cpp2::to_string(cpp2::move(name)) + "_class", ""); + } + else {if (1 != cur.size()) { + cur = create_matcher("range_class_entry", "'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 2)) + "'"); + } + else { + cur = create_matcher("single_class_entry", "'" + cpp2::to_string(cur) + "'"); + }} + } + + auto inner {string_util::join(cpp2::move(classes))}; + auto string_rep {ctx.get_range(cpp2::move(start_pos), cpp2::move(end_pos))}; + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, + cpp2::move(is_negate), + ctx.get_modifiers().has(expression_flags::case_insensitive), + cpp2::move(inner), + cpp2::move(string_rep) + ); + } + +#line 1530 "cpp2regex.h2" + auto class_token::generate_code(generation_context& ctx) const -> void + { + ctx.add_check("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")"); + } + +#line 1535 "cpp2regex.h2" + [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string + { + auto sep {", "}; + if (template_arguments.empty()) {sep = ""; } + + return "::cpp2::regex::" + cpp2::to_string(name) + ""; + } + + class_token::~class_token() noexcept{} + +#line 1547 "cpp2regex.h2" + template [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool + { + if constexpr (case_insensitive) + { + if ( cur != ctx.end + && negate != ( + match_any(string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) + || match_any(string_util::safe_toupper(*cpp2::impl::assert_not_null(cur))))) + + { + cur += 1; + return true; + } + else { + return false; + } + } + else + { + if (cur != ctx.end && negate != match_any(*cpp2::impl::assert_not_null(cur))) { + cur += 1; + return true; + } + else { + return false; + } + } + } + +#line 1576 "cpp2regex.h2" + template template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool + { + bool r {First::includes(c)}; + + if (!(r)) { + if constexpr (0 != sizeof...(Other)) { + r = match_any(c); + } + } + + return r; + } + +#line 1605 "cpp2regex.h2" +[[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr +{ + if (ctx.current() != '\\') {return nullptr; } + +#line 1610 "cpp2regex.h2" + if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) { + return nullptr; + } + + static_cast(ctx.next());// Skip escape + + if (std::string::npos != std::string("afenrt\\").find(ctx.current())) + { + // Escape of string special char + char t {'\0'}; + if ( 'a' == ctx. current()) { t = '\a'; } + else {if ('f' == ctx.current()) {t = '\f'; } + else {if ('e' == ctx.current()) {t = '\x1b'; } + else {if ('n' == ctx.current()) {t = '\n'; } + else {if ('r' == ctx.current()) {t = '\r'; } + else {if ('t' == ctx.current()) {t = '\t'; } + else {if ('\\' == ctx.current()) {t = '\\'; } + else {return ctx.error("Internal: missing switch case for special escape."); }}}}}}} + + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(t), false)}; + (*cpp2::impl::assert_not_null(r)).set_string("\\" + cpp2::to_string(ctx.current()) + ""); + return r; + } + else + { + // Escape of regex special char + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), false)}; + (*cpp2::impl::assert_not_null(r)).set_string("\\" + cpp2::to_string(ctx.current()) + ""); + return r; + } + +} + +#line 1646 "cpp2regex.h2" +[[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr +{ + if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; } + + static_cast(ctx.next());// Skip escape. + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); +} + +#line 1668 "cpp2regex.h2" + group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str) + : regex_token{ str } + , id{ id_ } + , case_insensitive{ case_insensitive_ } +#line 1669 "cpp2regex.h2" + { + +#line 1673 "cpp2regex.h2" + } + +#line 1675 "cpp2regex.h2" + [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr + { + if (ctx.current() != '\\') {return nullptr; } + + std::string str {"\\"}; + std::string group {""}; + + if ([_0 = '0', _1 = ctx.peek(), _2 = '9']{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }()) + { + static_cast(ctx.next());// Skip escape + group = ctx.grab_number(); + + if (cpp2::impl::cmp_greater_eq(group.size(),cpp2::impl::as_())) + { + // Octal syntax (\000) not a group ref matcher. + auto number {0}; + if (!(string_util::string_to_int(group, number, 8))) {return ctx.error("Could not convert octal to int."); } + + char number_as_char {unsafe_narrow(cpp2::move(number))}; + + auto token {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive))}; + (*cpp2::impl::assert_not_null(token)).set_string("\\" + cpp2::to_string(string_util::int_to_string<8>(cpp2::impl::as_(cpp2::move(number_as_char)))) + ""); + + return token; + } + + str += group; + // Regular group ref + } + else {if ('g' == ctx.peek()) + { + static_cast(ctx.next());// Skip escape + if (!(ctx.next())) {return ctx.error("Group escape without a following char."); }// Skip g + + str += "g"; + + if (ctx.current() == '{') { + str += "{"; + if (!((ctx.next() && ctx.grab_until('}', cpp2::impl::out(&group))))) {return ctx.error("No ending bracket."); } + + str += group + "}"; + } + else { + group = ctx.grab_number(); + str += group; + } + } + else {if ('k' == ctx.peek()) + { + static_cast(ctx.next());// Skip escape + if (!(ctx.next())) {return ctx.error("Group escape without a following char."); }// Skip k + + str += "k"; + + auto term_char {'\0'}; + if (ctx.current() == '{') {term_char = '}'; } + else {if (ctx.current() == '<') {term_char = '>'; } + else {if (ctx.current() == '\'') {term_char = '\''; } + else { + return ctx.error("Group escape has wrong operator."); + }}} + + str += ctx.current(); + + if (!((ctx.next() && ctx.grab_until(term_char, cpp2::impl::out(&group))))) {return ctx.error("No ending bracket."); } + + str += group + cpp2::move(term_char); + } + else + { + // No group ref matcher + return nullptr; + }}} + + // Parse the group + group = string_util::trim_copy(group); + int group_id {0}; + if (string_util::string_to_int(group, group_id)) + { + if (cpp2::impl::cmp_less(group_id,0)) { + group_id = ctx.get_cur_group() + group_id; + + if (cpp2::impl::cmp_less(group_id,1)) {// Negative and zero are no valid groups. + return ctx.error("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)"); + } + } + + if (cpp2::impl::cmp_greater_eq(group_id,ctx.get_cur_group())) { + return ctx.error("Group reference is used before the group is declared."); + } + } + else + { + // Named group + group_id = ctx.get_named_group(group); + if (-1 == group_id) {return ctx.error("Group names does not exist. (Name is: " + cpp2::to_string(cpp2::move(group)) + ")"); } + } + + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); + } + +#line 1776 "cpp2regex.h2" + auto group_ref_token::generate_code(generation_context& ctx) const -> void{ + ctx.add_check("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"); + } + + group_ref_token::~group_ref_token() noexcept{} + +#line 1782 "cpp2regex.h2" +template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool +{ + auto g {ctx.get_group(group)}; + + auto group_pos {cpp2::move(g).start}; + for( ; + group_pos != g.end + && cur != ctx.end; + (++group_pos, ++cur) ) + { + if constexpr (case_insensitive) { + if (string_util::safe_tolower(*cpp2::impl::assert_not_null(group_pos)) != string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) { + return false; + } + } + else { + if (*cpp2::impl::assert_not_null(group_pos) != *cpp2::impl::assert_not_null(cur)) { + return false; + } + } + } + + if (cpp2::move(group_pos) == cpp2::move(g).end) { + return true; + } + else { + return false; + } +} + +#line 1830 "cpp2regex.h2" + [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr + { + static_cast(ctx.next());// Skip last token defining the syntax + + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, positive)}; + + auto old_state {ctx.start_group()}; + if (!(ctx.parse_until(')'))) {return ctx.error("Lookahead without a closing bracket."); } + (*cpp2::impl::assert_not_null(r)).inner = ctx.end_group(cpp2::move(old_state)); + (*cpp2::impl::assert_not_null(r)).set_string("(" + cpp2::to_string(syntax) + cpp2::to_string((*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner)).to_string()) + ")"); + + return r; + } + +#line 1844 "cpp2regex.h2" + [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr + { + if (ctx.current() != '(') {return nullptr; } + + auto has_id {!(ctx.get_modifiers().has(expression_flags::no_group_captures))}; + auto has_pattern {true}; + std::string group_name {""}; + auto group_name_brackets {true}; + std::string modifiers {""}; + auto modifiers_change_to {ctx.get_modifiers()}; + + // Skip the '(' + if (!(ctx.next())) {return ctx.error("Group without closing bracket."); } + + if (ctx.current() == '?') + { + // Special group + if (!(ctx.next_no_skip())) {return ctx.error("Missing character after group opening."); } + + if (ctx.current() == '<' || ctx.current() == '\'') + { + // Named group + auto end_char {ctx.current()}; + if (end_char == '<') { + end_char = '>'; + }else { + group_name_brackets = false; + } + has_id = true; // Force id for named groups. + if (!(ctx.next())) { return ctx. error("Missing ending bracket for named group."); }/* skip '<' */ + if (!(ctx.grab_until(cpp2::move(end_char), cpp2::impl::out(&group_name)))) {return ctx.error("Missing ending bracket for named group."); } + if (!(ctx.next())) {return ctx.error("Group without closing bracket."); } + } + else {if (ctx.current() == '#') + { + // Comment + std::string comment_str {""}; + static_cast(ctx.next());// Skip # + if (!(ctx.grab_until(")", cpp2::impl::out(&comment_str)))) {return ctx.error("Group without closing bracket."); } + // Do not add comment. Has problems with ranges. + + // Pop token and add a list. This fixes comments between a token and a range + if (ctx.has_token()) { + token_vec list {}; + list.push_back(ctx.pop_token()); + list.push_back(CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?#" + cpp2::to_string(cpp2::move(comment_str)) + ")")); + + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(list)); + } + else { + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?#" + cpp2::to_string(cpp2::move(comment_str)) + ")"); + } + } + else {if (ctx.current() == '|') + { + // Branch reset group + + if (!(ctx.next())) { return ctx. error("Missing ending bracket for named group."); }/* skip '|' */ + + auto old_parser_state {ctx.start_group()}; + auto old_branch_state {ctx.branch_reset_new_state()}; + if (!(ctx.parse_until(')'))) {return nullptr; } + ctx.branch_reset_restore_state(cpp2::move(old_branch_state)); + auto inner_ {ctx.end_group(cpp2::move(old_parser_state))}; + + token_vec list {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?|"), cpp2::move(inner_), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ")")}; + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(list)); + } + else {if (ctx.current() == '=' || ctx.current() == '!') + { + return parse_lookahead(ctx, "?" + cpp2::to_string(ctx.current()) + "", ctx.current() == '='); + } + else + { + // Simple modifier + has_id = false; + if (!(ctx.grab_until_one_of("):", cpp2::impl::out(&modifiers)))) {return ctx.error("Missing ending bracket for group."); } + if (!(ctx.parser_group_modifiers(modifiers, modifiers_change_to))) { + return nullptr; + } + + if (')' == ctx.current()) { + has_pattern = false; + } + else { + if (!(ctx.next())) { return ctx. error("Missing ending bracket for group."); }/* skip ':' */ + } + }}}} + } + else {if (ctx.current() == '*') + { + // Named pattern + static_cast(ctx.next());// Skip *. + std::string name {""}; + if (!(ctx.grab_until(':', cpp2::impl::out(&name)))) {return ctx.error("Missing colon for named pattern."); } + + if (name == "pla" || name == "positive_lookahead") { + return parse_lookahead(ctx, "*" + cpp2::to_string(cpp2::move(name)) + ":", true); + } + else {if (name == "nla" || name == "negative_lookahead") { + return parse_lookahead(ctx, "*" + cpp2::to_string(cpp2::move(name)) + ":", false); + } + else { + return ctx.error("Unknown named group pattern: '" + cpp2::to_string(cpp2::move(name)) + "'"); + }} + }} + + if (cpp2::move(has_pattern)) + { + // Regular group + + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; + if (has_id) { + (*cpp2::impl::assert_not_null(r)).number = ctx.next_group(); + + if (0 != group_name.size()) { + ctx.set_named_group(group_name, (*cpp2::impl::assert_not_null(r)).number); + } + } + + auto old_state {ctx.start_group()}; + ctx.set_modifiers(cpp2::move(modifiers_change_to)); + if (!(ctx.parse_until(')'))) {return nullptr; } + (*cpp2::impl::assert_not_null(r)).inner = ctx.end_group(cpp2::move(old_state)); + (*cpp2::impl::assert_not_null(r)).set_string(gen_string(cpp2::move(group_name), cpp2::move(group_name_brackets), !(cpp2::move(has_id)), cpp2::move(modifiers), (*cpp2::impl::assert_not_null(r)).inner)); + + return r; + } + else + { + // Only a modifier + ctx.set_modifiers(cpp2::move(modifiers_change_to)); + + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?" + cpp2::to_string(cpp2::move(modifiers)) + ")"); + } + } + +#line 1981 "cpp2regex.h2" + [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string + { + std::string start {"("}; + if (0 != name.size()) { + if (name_brackets) { + start += "?<" + cpp2::to_string(name.data()) + ">"; + } + else { + start += "?'" + cpp2::to_string(name.data()) + "'"; + } + } + else {if (has_modifier) { + start += "?" + modifiers + ":"; + }} + + return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; + } + +#line 1999 "cpp2regex.h2" + auto group_token::generate_code(generation_context& ctx) const -> void + { + if (-1 != number) { + ctx.add("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"); + } + + (*cpp2::impl::assert_not_null(inner)).generate_code(ctx); + if (-1 != number) { + ctx.add("ctx..set_group_end(" + cpp2::to_string(number) + ", r.pos);"); + auto tmp_name {ctx.gen_temp()}; + ctx.add("" + cpp2::to_string(tmp_name) + "_func := :() = {"); + ctx.add(" if !r&$*.matched {"); + ctx.add(" ctx&$*..set_group_invalid(" + cpp2::to_string(number) + ");"); + ctx.add(" }"); + ctx.add("};"); + ctx.add("" + cpp2::to_string(tmp_name) + " := cpp2::regex::make_on_return(" + cpp2::to_string(tmp_name) + "_func);"); + ctx.add("_ = " + cpp2::to_string(cpp2::move(tmp_name)) + ";");// Logic is done in the destructor. Same behavior as for guard objects. + } + } + +#line 2019 "cpp2regex.h2" + auto group_token::add_groups(std::set& groups) const -> void + { + (*cpp2::impl::assert_not_null(inner)).add_groups(groups); + if (-1 != number) { + static_cast(groups.insert(number)); + } + } + + group_token::~group_token() noexcept{} + +#line 2031 "cpp2regex.h2" +[[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr +{ + if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; } + + static_cast(ctx.next());// Skip escape. + + if (!(ctx.next())) {return ctx.error("x escape without number."); } + + auto has_brackets {false}; + std::string number_str {""}; + if ('{' == ctx.current()) { + // Bracketed + has_brackets = true; + static_cast(ctx.next());// Skip '{' + if (!(ctx.grab_until('}', cpp2::impl::out(&number_str)))) {return ctx.error("No ending bracket for \\x"); } + } + else { + // Grab two chars + if (!(ctx.grab_n(2, cpp2::impl::out(&number_str)))) {return ctx.error("Missing hexadecimal digits after \\x."); } + } + + auto number {0}; + if (!(string_util::string_to_int(cpp2::move(number_str), number, 16))) {return ctx.error("Could not convert hexadecimal to int."); } + + // TODO: Change for unicode. + char number_as_char {unsafe_narrow(cpp2::move(number))}; + + std::string syntax {string_util::int_to_string<16>(cpp2::impl::as_(number_as_char))}; + if (cpp2::move(has_brackets)) { + syntax = "{" + cpp2::to_string(syntax) + "}"; + } + syntax = "\\x" + cpp2::to_string(syntax) + ""; + + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), ctx.get_modifiers().has(expression_flags::case_insensitive))}; + (*cpp2::impl::assert_not_null(r)).set_string(cpp2::move(syntax)); + return r; +} + +#line 2072 "cpp2regex.h2" +[[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr +{ + if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) { + if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "$", "line_end_token_matcher"); + } + else {if (ctx.current() == '\\' && (ctx.peek() == 'z' || ctx.peek() == 'Z')) { + static_cast(ctx.next());// Skip escape + + auto negate {ctx.current() == 'Z'}; + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\" + cpp2::to_string(ctx.current()) + "", "line_end_token_matcher"); + } + else { + return nullptr; + }} +} + +#line 2089 "cpp2regex.h2" +template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool +{ + if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) { + return true; + } + else {if (match_new_line_before_end && (*cpp2::impl::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special case for new line at end. + return true; + } + else { + return false; + }} +} + +#line 2105 "cpp2regex.h2" +[[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr +{ + if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; } + + if (ctx.current() == '\\') { + static_cast(ctx.next()); + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\A", "line_start_token_matcher"); + } + else { + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", "line_start_token_matcher"); + } +} + +#line 2118 "cpp2regex.h2" +template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool +{ + return cur == ctx.begin || // Start of string + (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line +} + +#line 2136 "cpp2regex.h2" + lookahead_token::lookahead_token(cpp2::impl::in positive_) + : regex_token{ "" } + , positive{ positive_ }{ + +#line 2138 "cpp2regex.h2" + } + +#line 2140 "cpp2regex.h2" + auto lookahead_token::generate_code(generation_context& ctx) const -> void{ + auto inner_name {ctx.generate_func(inner)}; + + ctx.add_check("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"); + } + +#line 2146 "cpp2regex.h2" + auto lookahead_token::add_groups(std::set& groups) const -> void{ + (*cpp2::impl::assert_not_null(inner)).add_groups(groups); + } + + lookahead_token::~lookahead_token() noexcept{} + +#line 2151 "cpp2regex.h2" +template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool +{ + auto r {func(cur, ctx, true_end_func())}; + if (!(positive)) { + r.matched = !(r.matched); + } + + return cpp2::move(r).matched; +} + +#line 2164 "cpp2regex.h2" +[[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr +{ + if (ctx.current() != '\\') {return nullptr; } + + auto name {""}; + auto c_next {ctx.peek()}; + + if ( 'd' == c_next) { name = "named_class_digits"; } + else {if ('D' == c_next) {name = "named_class_not_digits"; } + else {if ('h' == c_next) {name = "named_class_hor_space"; } + else {if ('H' == c_next) {name = "named_class_not_hor_space"; } + else {if ('N' == c_next) {name = "named_class_no_new_line"; } + else {if ('s' == c_next) {name = "named_class_space"; } + else {if ('S' == c_next) {name = "named_class_not_space"; } + else {if ('v' == c_next) {name = "named_class_ver_space"; } + else {if ('V' == c_next) {name = "named_class_not_ver_space"; } + else {if ('w' == c_next) {name = "named_class_word"; } + else {if ('W' == cpp2::move(c_next)) {name = "named_class_not_word"; } + else { return nullptr; }}}}}}}}}}} + + static_cast(ctx.next());// Skip escape + + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\" + cpp2::to_string(ctx.current()) + "", "" + cpp2::to_string(cpp2::move(name)) + "::match"); +} + +#line 2206 "cpp2regex.h2" +[[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr +{ + if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; } + + static_cast(ctx.next());// Skip escape. + + if (!(ctx.next())) { return ctx. error("o escape without number."); } + if (ctx.current() != '{') {return ctx.error("Missing opening bracket for \\o."); } + + std::string number_str {""}; + static_cast(ctx.next());// Skip '{' + if (!(ctx.grab_until('}', cpp2::impl::out(&number_str)))) {return ctx.error("No ending bracket for \\o"); } + + auto number {0}; + if (!(string_util::string_to_int(cpp2::move(number_str), number, 8))) {return ctx.error("Could not convert octal to int."); } + + // TODO: Change for unicode. + char number_as_char {unsafe_narrow(cpp2::move(number))}; + + std::string syntax {"\\o{" + cpp2::to_string(string_util::int_to_string<8>(cpp2::impl::as_(number_as_char))) + "}"}; + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), ctx.get_modifiers().has(expression_flags::case_insensitive))}; + (*cpp2::impl::assert_not_null(r)).set_string(cpp2::move(syntax)); + return r; +} + +#line 2236 "cpp2regex.h2" + inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 }; + inline CPP2_CONSTEXPR int range_flags::greedy{ 2 }; + inline CPP2_CONSTEXPR int range_flags::possessive{ 3 }; + +#line 2253 "cpp2regex.h2" + range_token::range_token() + : regex_token{ "" }{} + +#line 2255 "cpp2regex.h2" + [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr + { + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; + if (ctx.current() == '{') + { + if (!(ctx.has_token())) {return ctx.error("'{' without previous element."); } + + std::string inner {""}; + if (!(ctx.grab_until('}', cpp2::impl::out(&inner)))) {return ctx.error("Missing closing bracket '}'."); } + + inner = string_util::trim_copy(inner.substr(1)); // Remove '{' and white spaces. + if (inner.empty()) {return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } + + // Non-greedy or possessive + (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx); + + // Get range arguments + std::string min_count_str {"-1"}; + std::string max_count_str {"-1"}; + + size_t sep {inner.find(",")}; + if (sep == std::string::npos) + { + min_count_str = inner; + max_count_str = inner; + if (!(string_util::string_to_int(cpp2::move(inner), (*cpp2::impl::assert_not_null(r)).min_count))) {return ctx.error("Could not convert range to number."); } + (*cpp2::impl::assert_not_null(r)).max_count = (*cpp2::impl::assert_not_null(r)).min_count; + } + else + { + std::string inner_first {string_util::trim_copy(inner.substr(0, sep))}; + std::string inner_last {string_util::trim_copy(cpp2::move(inner).substr(cpp2::move(sep) + 1))}; + + if ((inner_first.empty() && inner_last.empty())) { + return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); + } + + if (!(inner_first.empty())) { + min_count_str = inner_first; + if (!(string_util::string_to_int(cpp2::move(inner_first), (*cpp2::impl::assert_not_null(r)).min_count))) {return ctx.error("Could not convert range to number."); } + } + if (!(inner_last.empty())) { + max_count_str = inner_last; + if (!(string_util::string_to_int(cpp2::move(inner_last), (*cpp2::impl::assert_not_null(r)).max_count))) {return ctx.error("Could not convert range to number."); } + } + } + + // Check validity of the range. + if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) { + if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) { + return ctx.error("Min value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + ")"); + } + } + if (-1 != (*cpp2::impl::assert_not_null(r)).max_count) { + if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).max_count)))) { + return ctx.error("Max value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count) + ")"); + } + if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) { + if (!((cpp2::impl::cmp_less_eq((*cpp2::impl::assert_not_null(r)).min_count,(*cpp2::impl::assert_not_null(r)).max_count)))) { + return ctx.error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + " <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count) + ""); + } + } + } + + (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token(); + (*cpp2::impl::assert_not_null(r)).string_rep = (*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner_token)).to_string() + (*cpp2::impl::assert_not_null(r)).gen_range_string() + (*cpp2::impl::assert_not_null(r)).gen_mod_string(); + + return r; + } + + return nullptr; + } + +#line 2328 "cpp2regex.h2" + auto range_token::parse_modifier(parse_context& ctx) & -> void + { + if (ctx.peek() == '?') { + kind = range_flags::not_greedy; + static_cast(ctx.next()); + } + else {if (ctx.peek() == '+') { + kind = range_flags::possessive; + static_cast(ctx.next()); + }} + } + +#line 2340 "cpp2regex.h2" + [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string + { + if (kind == range_flags::not_greedy) { + return "?"; + } + else {if (kind == range_flags::possessive) { + return "+"; + } + else { + return ""; + }} + } + +#line 2353 "cpp2regex.h2" + [[nodiscard]] auto range_token::gen_range_string() const& -> std::string + { + std::string r {""}; + if (min_count == max_count) { + r += "{" + cpp2::to_string(min_count) + "}"; + } + else {if (min_count == -1) { + r += "{," + cpp2::to_string(max_count) + "}"; + } + else {if (max_count == -1) { + r += "{" + cpp2::to_string(min_count) + ",}"; + } + else { + r += "{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}"; + }}} + + return r; + } + +#line 2372 "cpp2regex.h2" + auto range_token::generate_code(generation_context& ctx) const -> void + { + auto inner_name {ctx.generate_func(inner_token)}; + std::set groups {}; + (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups); + auto reset_name {ctx.generate_reset(cpp2::move(groups))}; + + auto next_name {ctx.next_func_name()}; + ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"); + } + +#line 2383 "cpp2regex.h2" + auto range_token::add_groups(std::set& groups) const -> void{ + (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups); + } + + range_token::~range_token() noexcept{} + +#line 2393 "cpp2regex.h2" + template template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto + { + if (range_flags::possessive == kind) { + return match_possessive(cur, ctx, inner, end_func, tail); + } + else {if (range_flags::greedy == kind) { + return match_greedy(0, cur, ctx.end, ctx, inner, reset_func, end_func, tail); + } + else { // range_flags::not_greedy == kind + return match_not_greedy(cur, ctx, inner, end_func, tail); + }} + } + +#line 2406 "cpp2regex.h2" + template [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{ + if (-1 == max_count) {return true; } + else {return cpp2::impl::cmp_less(count,max_count); } + } + +#line 2411 "cpp2regex.h2" + template [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{ + if (-1 == min_count) {return false; } + else {return cpp2::impl::cmp_less(count,min_count); } + } + +#line 2416 "cpp2regex.h2" + template [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{ + if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; } + if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; } + return true; + } + +#line 2422 "cpp2regex.h2" + template template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto + { // TODO: count_r as out parameter introduces a performance loss. + auto res {ctx.pass(cur)}; + auto count {0}; + + while( is_below_lower_bound(count) && res.matched ) { + res = inner(res.pos, ctx, end_func); + if (res.matched) { + count += 1; + } + } + + count_r = cpp2::move(count); + return res; + } + +#line 2438 "cpp2regex.h2" + template template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return + { + auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{ + return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); + }}; + auto is_m_valid {true}; + auto r {ctx.fail()}; + if (is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid)) { + is_m_valid = false; // Group ranges in M are invalidated through the call. + r = inner(cur, ctx, cpp2::move(inner_call)); + } + + if (!(r.matched) && is_in_range(count)) + { + // The recursion did not yield a match try now the tail + r = other(cur, ctx, end_func); + + if (r.matched && !(cpp2::move(is_m_valid))) { + // We have a match rematch M if required + reset_func(ctx); + + if (cpp2::impl::cmp_greater(count,0)) { + static_cast(inner(last_valid, ctx, true_end_func())); + } + } + } + + return r; + } + +#line 2468 "cpp2regex.h2" + template template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return + { + auto count {0}; + auto r {match_min_count(cur, ctx, inner, end_func, count)}; + + if (!(r.matched)) { + return r; + } + + auto pos {r.pos}; + while( + r.matched + && is_below_upper_bound(count) ) + { + r = inner(pos, ctx, true_end_func()); + + if (pos == r.pos) { + break; // Break infinite loop. + } + if (r.matched) { + count += 1; + pos = r.pos; + } + } + + return other(cpp2::move(pos), ctx, end_func); + } + +#line 2496 "cpp2regex.h2" + template template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return + { + auto count {0}; + auto start {match_min_count(cur, ctx, inner, end_func, count)}; + if (!(start.matched)) { + return start; + } + + auto pos {cpp2::move(start).pos}; + while( is_below_upper_bound(count) ) + { + auto o {other(pos, ctx, end_func)}; + if (o.matched) { + return o; + } + + auto r {inner(pos, ctx, end_func)}; + if (!(r.matched)) { + return ctx.fail(); + } + count += 1; + pos = cpp2::move(r).pos; + } + + return other(cpp2::move(pos), ctx, end_func); // Upper bound reached. + } + +#line 2531 "cpp2regex.h2" + [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr + { + auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; + char symbol {'\0'}; + if (ctx.current() == '*') { + (*cpp2::impl::assert_not_null(r)).min_count = 0; + (*cpp2::impl::assert_not_null(r)).max_count = -1; + symbol = '*'; + } + else {if (ctx.current() == '+') { + (*cpp2::impl::assert_not_null(r)).min_count = 1; + (*cpp2::impl::assert_not_null(r)).max_count = -1; + symbol = '+'; + }else {if (ctx.current() == '?') { + (*cpp2::impl::assert_not_null(r)).min_count = 0; + (*cpp2::impl::assert_not_null(r)).max_count = 1; + symbol = '?'; + }else { + return nullptr; + }}} + + if (!(ctx.has_token())) {return ctx.error("'" + cpp2::to_string(ctx.current()) + "' without previous element."); } + +#line 2555 "cpp2regex.h2" + (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx); + + (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token(); + (*cpp2::impl::assert_not_null(r)).string_rep = (*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner_token)).to_string() + cpp2::move(symbol) + (*cpp2::impl::assert_not_null(r)).gen_mod_string(); + return r; + } + + special_range_token::~special_range_token() noexcept{} + +#line 2568 "cpp2regex.h2" +[[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr +{ + if (ctx.current() != '\\') {return nullptr; } + + if (ctx.peek() == 'b') { + static_cast(ctx.next()); + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\b", "word_boundary_token_matcher"); + } + else {if (ctx.peek() == 'B') { + static_cast(ctx.next()); + return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\B", "word_boundary_token_matcher"); + } + else { + return nullptr; + }} +} + +#line 2585 "cpp2regex.h2" +template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool +{ + word_class words {}; + auto is_match {false}; + if (cur == ctx.begin) {// String start + if (cur != ctx.end) {// No empty string + is_match = cpp2::move(words).includes(*cpp2::impl::assert_not_null(cur)); + } + } + else {if (cur == ctx.end) {// String end + is_match = cpp2::move(words).includes(*cpp2::impl::assert_not_null((cur - 1))); + } + else { // Middle of string + is_match = + (words.includes(*cpp2::impl::assert_not_null((cur - 1))) && !(words.includes(*cpp2::impl::assert_not_null(cur)))) // End of word: \w\W + || (!(words.includes(*cpp2::impl::assert_not_null((cur - 1)))) && words.includes(*cpp2::impl::assert_not_null(cur)));// Start of word: \W\w + }} + if (negate) { + is_match = !(is_match); + } + + return is_match; +} + +#line 2629 "cpp2regex.h2" + template template regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_) + : matched{ matched_ } + , ctx{ ctx_ } + , pos{ unsafe_narrow(std::distance(ctx_.begin, pos_)) }{ + +#line 2633 "cpp2regex.h2" + } + +#line 2635 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size(); } +#line 2636 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); } +#line 2637 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); } +#line 2638 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); } + +#line 2640 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); } +#line 2641 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); } +#line 2642 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); } + +#line 2644 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{ + auto group_id {matcher::get_named_group_index(g)}; + if (-1 == group_id) { + // TODO: Throw error. + } + return group_id; + } + +#line 2653 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); } +#line 2654 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); } +#line 2655 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); } +#line 2656 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return + { + context ctx {start, end}; + + auto r {matcher::entry(start, ctx)}; + return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); + } + +#line 2664 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); } +#line 2665 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); } +#line 2666 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); } +#line 2667 "cpp2regex.h2" + template template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return + { + context ctx {start, end}; + auto r {ctx.fail()}; + + auto cur {start}; + for( ; true; (++cur) ) { + r = matcher::entry(cur, ctx); + if (r.matched) { + break; + } + + if (cur == ctx.end) { + break; + } + } + + return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); + } + +#line 2687 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string(); } + +#line 2691 "cpp2regex.h2" + template [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{ + if (cpp2::impl::cmp_less(pos,str.size())) { + return str.begin() + pos; + } + else { + return str.end(); + } + } + +#line 2720 "cpp2regex.h2" + template regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e) + : regex{ r } + , error_out{ e }{ + +#line 2723 "cpp2regex.h2" + } + +#line 2725 "cpp2regex.h2" + template [[nodiscard]] auto regex_generator::parse() & -> std::string + { + // Extract modifiers and adapt regex. + extract_modifiers(); + + parse_context parse_ctx {regex, error_out}; + if (!(parse_ctx.parse(modifier))) { + return ""; + } + + source += "{\n"; + source += " wrap: type = {\n"; // TODO: Remove wrapper when template template parameters are available. + source += " context: type == cpp2::regex::match_context;"; + + generation_context gen_ctx {}; + source += gen_ctx.run(parse_ctx.get_as_token()); + source += " entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n"; + source += " ctx..set_group_start(0, cur);\n"; + source += " r := " + cpp2::to_string(gen_ctx.get_entry_func()) + "(cur, ctx, cpp2::regex::true_end_func());\n"; + source += " if r.matched { ctx..set_group_end(0, r.pos); }\n"; + source += " return r;\n"; + source += " }\n"; + + source += cpp2::move(gen_ctx).create_named_group_lookup(parse_ctx.named_groups); + source += "}\n"; + + auto string {(*cpp2::impl::assert_not_null(parse_ctx.get_as_token())).to_string()}; + source += " to_string: () -> std::string = { return R\"(" + cpp2::to_string(modifier_escape) + cpp2::to_string(cpp2::move(string)) + cpp2::to_string(modifier_escape) + cpp2::to_string(modifier) + ")\"; }\n"; + source += "}\n"; + + static_cast(cpp2::move(parse_ctx)); + + return source; + } + +#line 2760 "cpp2regex.h2" + template auto regex_generator::extract_modifiers() & -> void + { + if (regex.find_first_of("'/") == 0) { + char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; + + auto end_pos {regex.rfind(mod_token)}; + if (end_pos != 0) { + // Found valid start end escape + modifier = regex.substr(end_pos + 1); + modifier_escape = cpp2::move(mod_token); + regex = regex.substr(1, cpp2::move(end_pos) - 1); + } + } + } + +#line 2776 "cpp2regex.h2" +template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string +{ + regex_generator parser {regex, err}; + auto r {parser.parse()}; + static_cast(cpp2::move(parser)); + return r; +} + +} +} + +#endif diff --git a/include/cpp2regex.h2 b/include/cpp2regex.h2 new file mode 100644 index 0000000000..4605a77f86 --- /dev/null +++ b/include/cpp2regex.h2 @@ -0,0 +1,2789 @@ + +// Copyright (c) Herb Sutter +// SPDX-License-Identifier: CC-BY-NC-ND-4.0 + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +//=========================================================================== +// Regex support +//=========================================================================== + +#ifndef CPP2_CPP2REGEX_H +#define CPP2_CPP2REGEX_H + + +template +using matcher_wrapper_type = typename matcher_wrapper::template wrap; + +template +using matcher_context_type = typename matcher::context; + +using error_func = std::function; + +cpp2: namespace = { + +regex: namespace = { + +bview : type == std::basic_string_view; +bstring: type == std::basic_string; + + +//----------------------------------------------------------------------- +// +// Helper structures for the expression matching. +// +//----------------------------------------------------------------------- +// + +// Possible modifiers for a regular expression. +// +expression_flags: @flag_enum type = +{ + case_insensitive; // mod: i + multiple_lines; // mod: m + single_line; // mod: s + no_group_captures; // mod: n + perl_code_syntax; // mod: x + perl_code_syntax_in_classes; // mod: xx +} + +// Structure for storing group information. +// +match_group: @struct type = +{ + start: Iter = (); + end: Iter = (); + + matched: bool = false; +} + +// Return value for every matcher. +// +match_return: @struct type = +{ + matched: bool = false; + pos: Iter = (); +} + +// Modifiable state during matching. +// +match_context: type = +{ + public begin : Iter; + public end : Iter; + + private groups: std::array, max_groups> = (); + + operator=: (out this, begin_: Iter, end_: Iter) = { + begin = begin_; + end = end_; + } + + operator=: (out this, that) = {} + + // Getter and setter for groups + // + get_group: (in this, group) groups[group]; + + get_group_end: (in this, group) -> int = { + if group >= max_groups || !groups[group].matched { + return 0; + } + return cpp2::unsafe_narrow( std::distance(begin, groups[group].end) ); + } + get_group_start: (in this, group) -> int = { + if group >= max_groups || !groups[group].matched { + return 0; + } + return cpp2::unsafe_narrow( std::distance(begin, groups[group].start) ); + } + get_group_string: (in this, group) -> std::string = { + if group >= max_groups || !groups[group].matched { + return ""; + } + return std::string(groups[group].start, groups[group].end); + } + + set_group_end: (inout this, group, pos) = { + groups[group].end = pos; + groups[group].matched = true; + } + + set_group_invalid: (inout this, group) = { + groups[group].matched = false; + } + + set_group_start: (inout this, group, pos) = { + groups[group].start = pos; + } + + size: (in this) max_groups; + + // Misc functions + // + fail: (in this) match_return(false, end); + pass: (in this, cur: Iter) match_return(true, cur); +} + + +// End function that returns a valid match. +// +true_end_func: @struct type = +{ + operator(): (in this, cur, inout ctx) ctx..pass(cur); +} + + +// Empty group reset function. +// +no_reset: @struct type = +{ + operator(): (this, inout _:) = {} +} + + +// Evaluate func on destruction of the handle. +on_return: type = +{ + func: Func; + + operator=: (out this, f: Func) = { + func = f; + } + + operator=: (move this) = { + func(); + } +} + + +// Helper for auto deduction of the Func type. +make_on_return: (func: Func) on_return(func); + + +//----------------------------------------------------------------------- +// +// Character classes for regular expressions. +// +//----------------------------------------------------------------------- +// + +// Class syntax: Example: a +// +single_class_entry: type = +{ + includes : (c: CharT) c == C; + to_string: () bstring(1, C); +} + + +// Class syntax: - Example: a-c +// +range_class_entry: type = +{ + includes : (c: CharT) Start <= c <= End; + to_string: () "(Start)$-(End)$"; +} + + +// Helper for combining two character classes +// +combined_class_entry: type = +{ + includes : (c: CharT) (false || ... || List::includes(c)); + to_string: () (bstring() + ... + List::to_string()); +} + + +// Class syntax: Example: abcd +// +list_class_entry: type = +{ + includes : (c: CharT) (false || ... || (List == c)); + to_string: () (bstring() + ... + List); +} + + +// Class syntax: [: type = +{ + includes : (c: CharT) Inner::includes(c); + to_string: () "[:(Name..data())$:]"; +} + + +negated_class_entry: type = +{ + this : Inner = (); + includes: (c: CharT) !Inner::includes(c); +} + + +// Short class syntax: \ Example: \w +// +shorthand_class_entry: type = +{ + includes : (c: CharT) Inner::includes(c); + to_string: () Name..str(); +} + + +// Named basic character classes +// +digits_class : type == named_class_entry>; +lower_class : type == named_class_entry>; +upper_class : type == named_class_entry>; + +// Named other classes +// +alnum_class : type == named_class_entry, upper_class, digits_class>>; +alpha_class : type == named_class_entry, upper_class>>; +ascii_class : type == named_class_entry>; +blank_class : type == named_class_entry>; +cntrl_class : type == named_class_entry, single_class_entry>>; +graph_class : type == named_class_entry>; +hor_space_class : type == named_class_entry>; +print_class : type == named_class_entry>; +punct_class : type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; +space_class : type == named_class_entry>; +ver_space_class : type == named_class_entry>; +word_class : type == named_class_entry, single_class_entry>>; +xdigit_class : type == named_class_entry, range_class_entry, digits_class>>; + +// Shorthand class entries +// +short_digits_class : type == shorthand_class_entry>; +short_hor_space_class : type == shorthand_class_entry>; +short_space_class : type == shorthand_class_entry>; +short_vert_space_class : type == shorthand_class_entry>; +short_word_class : type == shorthand_class_entry>; + +short_not_digits_class : type == negated_class_entry>>; +short_not_hor_space_class : type == negated_class_entry>>; +short_not_space_class : type == negated_class_entry>>; +short_not_vert_space_class : type == negated_class_entry>>; +short_not_word_class : type == negated_class_entry>>; + + +//----------------------------------------------------------------------- +// +// Tokens for regular expressions. +// +//----------------------------------------------------------------------- +// + +// Basic class for a regex token. +// +regex_token: @polymorphic_base type = +{ + public string_rep: std::string; + + operator=:(out this, str: std::string) = { + string_rep = str; + } + + operator=:(out this) = { + string_rep = ""; + } + + //parse: (inout ctx: parse_context) -> token_ptr; + generate_code: (virtual this, inout _: generation_context); // Generate the matching code. + + add_groups: (virtual this, inout _: std::set) = {} // Adds all group indices to the set. + to_string: (this) -> std::string = { return string_rep; } // Create a string representation. + set_string: (inout this, s: std::string) = { string_rep = s; } // Set the string representation. +} + +token_ptr : type == std::shared_ptr; +token_vec: type == std::vector; + + +// Adds a check in code generation. +// +regex_token_check: @polymorphic_base type = +{ + this: regex_token; + + check: std::string; + + operator=:(out this, str: std::string, check_: std::string) = { + regex_token = (str); + check = check_; + } + + generate_code: (override this, inout ctx: generation_context) = { + ctx..add_check(check + "(" + ctx..match_parameters() + ")"); + } +} + + +// Adds code in code generation. +// +regex_token_code: @polymorphic_base type = +{ + this: regex_token; + + code: std::string; + + operator=:(out this, str: std::string, code_: std::string) = { + regex_token = (str); + code = code_; + } + + generate_code: (override this, inout ctx: generation_context) = { + ctx..add(code); + } +} + + +// Token that does not influence the matching. E.g. comment. +// +regex_token_empty: @polymorphic_base type = +{ + this: regex_token; + + operator=:(out this, str: std::string) = { + regex_token = (str); + } + + generate_code: (override this, inout _: generation_context) = { + // Nothing. + } +} + + +// Represents a list of regex tokens as one token. +// +regex_token_list: @polymorphic_base type = +{ + this: regex_token; + + public tokens: token_vec; + + operator=:(out this, t: token_vec) = { + regex_token = (gen_string(t)); + tokens = t; + } + + generate_code: (override this, inout ctx: generation_context) = { + for tokens do (token) { + token*..generate_code(ctx); + } + } + + add_groups: (override this, inout groups: std::set) = { + for tokens do (token) { + token*..add_groups(groups); + } + } + + gen_string: (vec: token_vec) -> std::string = { + r : std::string = ""; + for vec do (token) { + r += token*..to_string(); + } + return r; + } +} + + +//----------------------------------------------------------------------- +// +// Parse and generation context. +// +//----------------------------------------------------------------------- +// + +// State of the current capturing group. See '()' +// +parse_context_group_state: @struct type = +{ + cur_match_list: token_vec = (); // Current list of matchers. + alternate_match_lists: token_vec = (); // List of alternate matcher lists. E.g. ab|cd|xy. + modifiers : expression_flags = (); // Current modifiers for the group/regular expression. + + // Start a new alternative. + next_alternative: (inout this) = { + new_list: token_vec = (); + std::swap(new_list, cur_match_list); + post_process_list(new_list); + _ = alternate_match_lists..insert(alternate_match_lists..end(), shared.new(new_list)); + } + + // Swap this state with the other one. + swap: (inout this, inout t: parse_context_group_state) = { + std::swap(cur_match_list, t.cur_match_list); + std::swap(alternate_match_lists, t.alternate_match_lists); + std::swap(modifiers, t.modifiers); + } + + // Convert this state into a regex token. + get_as_token: (inout this) -> token_ptr = { + if alternate_match_lists..empty() { + post_process_list(cur_match_list); + return shared.new(cur_match_list); + } + else { + next_alternative(); + return shared.new(alternate_match_lists); + } + } + + // Add a token to the current matcher list. + add: (inout this, token: token_ptr) = { + cur_match_list..push_back(token); + } + + // True if current matcher list is empty. + empty: (this) -> bool = cur_match_list..empty(); + + + // Apply optimizations to the matcher list. + post_process_list: (inout list: token_vec) = { + // Merge all characters + merge_pos := list..begin(); + while merge_pos != list..end() next (merge_pos++) { + if merge_pos** is char_token { + combine_pos := merge_pos + 1; + while combine_pos != list..end() && combine_pos** is char_token { // The erase advances combine_pos + (merge_pos** as char_token)..append(combine_pos** as char_token); + combine_pos = list..erase(combine_pos); + } + } + } + } +} + + +// State for the branch reset. Takes care of the group numbering. See '(|)'. +// +parse_context_branch_reset_state: @struct type = +{ + is_active : bool = false; // If we have a branch reset group. + cur_group : int = 1; // Next group identifier. 0 == global capture group. + max_group : int = 1; // Maximum group identifier generated. + from : int = 1; // Starting identifier on new alternative branch. + + // Next group identifier. + next: (inout this) -> int = { + g := cur_group; + cur_group += 1; + max_group = max(max_group, cur_group); + + return g; + } + + // Set next group identifier. + set_next: (inout this, g: int) = { + cur_group = g; + max_group = max(max_group, g); + } + + // Start a new alternative branch. + next_alternative: (inout this) = { + if is_active { + cur_group = from; + } + } + + // Initialize for a branch reset group. + set_active_reset: (inout this, restart: int) = { + is_active = true; + cur_group = restart; + from = restart; + max_group = restart; + } +} + + +// Context during parsing of the regular expressions. +// +// Keeps track of the distributed group identifiers, current parsed group and branch resets. +// +parse_context: type = +{ + regex: std::string_view; // Regular expression string. + pos: size_t = 0; // Current parsing position. + root: token_ptr; // Token representing the regular expression. + + cur_group_state: parse_context_group_state = (); + cur_branch_reset_state: parse_context_branch_reset_state = (); + + + public named_groups: std::map = (); + + error_out: error_func; // TODO: Declaring std::function fails for cpp2. + has_error: bool = false; + + operator=:(out this, r: std::string_view, e) = { + regex = r; + root = shared.new(""); + error_out = e; + } + + // State management functions + // + + // Returned group state needs to be stored and provided in `end_group`. + start_group: (inout this) -> parse_context_group_state = + { + old_state: parse_context_group_state = (); + old_state..swap(cur_group_state); + cur_group_state.modifiers = old_state.modifiers; + + return old_state; + } + + // `old_state` argument needs to be from start group. + end_group: (inout this, old_state: parse_context_group_state) -> token_ptr = + { + inner := cur_group_state..get_as_token(); + cur_group_state = old_state; + return inner; + } + + get_modifiers: (this) -> expression_flags = { + return cur_group_state.modifiers; + } + + set_modifiers: (inout this, mod: expression_flags) = { + cur_group_state.modifiers = mod; + } + + // Branch reset management functions + // + + branch_reset_new_state: (inout this) -> parse_context_branch_reset_state = + { + old_state: parse_context_branch_reset_state = (); + std::swap(old_state, cur_branch_reset_state); + + cur_branch_reset_state..set_active_reset(old_state.cur_group); + return old_state; + } + + branch_reset_restore_state: (inout this, old_state: parse_context_branch_reset_state) = + { + max_group := cur_branch_reset_state.max_group; + cur_branch_reset_state = old_state; + cur_branch_reset_state..set_next(max_group); + } + + next_alternative: (inout this) = + { + cur_group_state..next_alternative(); + cur_branch_reset_state..next_alternative(); + } + + // Regex token management + // + add_token: (inout this, token: token_ptr) = { + cur_group_state..add(token); + } + + has_token: (this) -> bool = { + return !cur_group_state..empty(); + } + + pop_token: (inout this) -> token_ptr = + { + r : token_ptr = nullptr; + if has_token() { + r = cur_group_state.cur_match_list..back(); + cur_group_state.cur_match_list..pop_back(); + } + + return r; + } + + get_as_token: (inout this) -> token_ptr = { + return root; + } + + // Group management + // + get_cur_group: (this) -> int = { + return cur_branch_reset_state.cur_group; + } + + next_group: (inout this) -> int = { + return cur_branch_reset_state..next(); + } + + set_named_group: (inout this, name: std::string, id: int) = + { + if !named_groups..contains(name) { // Redefinition of group name is not an error. The left most one is retained. + named_groups[name] = id; + } + } + + get_named_group: (this, name: std::string) -> int = + { + iter := named_groups..find(name); + if iter == named_groups..end() { + return -1; + } + else { + return iter*.second; + } + } + + // Position management functions + // + current: (this) -> char = { return regex[pos]; } + + // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers. + private get_next_position: (in this, in_class: bool, no_skip: bool) -> size_t = + { + perl_syntax := false; + if !no_skip { + if in_class { + perl_syntax = get_modifiers()..has(expression_flags::perl_code_syntax) && get_modifiers()..has(expression_flags::perl_code_syntax_in_classes); + } + else { + perl_syntax = get_modifiers()..has(expression_flags::perl_code_syntax); + } + } + cur := pos + 1; + if perl_syntax { + while cur < regex..size() next (cur += 1) { + n: = regex[cur]; + + if space_class::includes(n) { + continue; + } + else if !in_class && '#' == n { + cur = regex..find("\n", cur); + if std::string::npos == cur { + // No new line, comment runs until the end of the pattern + cur = regex..size(); + } + } + else { // None space none comment char + break; + } + } + } + + // Check for end of file. + if cur > regex..size() { + cur = regex..size(); + } + return cur; + } + + // Return true if next token is available. + private next_impl: (inout this, in_class: bool, no_skip: bool) -> bool = + { + pos = get_next_position(in_class, no_skip); + if pos != regex..size() { + return true; + } + else { + return false; + } + } + + next : (inout this) next_impl(false, false); + next_in_class: (inout this) next_impl( true, false); + next_no_skip : (inout this) next_impl(false, true); + + next_n: (inout this, n: int) -> bool = { + r := true; + cur := 0; + while r && cur < n next (r = next()) { + cur += 1; + } + return r; + } + + has_next: (this) -> bool = { return pos < regex..size(); } + + private grab_until_impl: (inout this, in e: std::string, out r: std::string, any: bool) -> bool = + { + end:= pos; + if any { + end = regex..find_first_of(e, pos); + } + else { + end = regex..find(e, pos); + } + + if end != std::string_view::npos { + r = regex..substr(pos, end - pos); + pos = end; + return true; + } + else { + r = ""; + return false; + } + } + + grab_until: (inout this, in e: std::string, out r: std::string) grab_until_impl(e, out r, false); + grab_until: (inout this, in e: char, out r: std::string) grab_until_impl(std::string(1, e), out r, false); + grab_until_one_of: (inout this, in e: std::string, out r: std::string) grab_until_impl(e, out r, true); + + grab_n: (inout this, in n: int, out r: std::string) -> bool = + { + if pos + n <= regex..size() { + r = regex..substr(pos, n); + pos += n - 1; + return true; + } + else { + r = ""; + return false; + } + } + + grab_number: (inout this) -> std::string = + { + start := pos; + start_search := pos; + if regex[start_search] == '-' { + start_search += 1; + } + end := regex..find_first_not_of("1234567890", start_search); + + r : std::string; + if end != std::string::npos { + r = regex..substr(start, end - start); + pos = end - 1; + } + else { + r = regex..substr(start); + pos = regex..size() - 1; + } + return r; + } + + private peek_impl: (in this, in_class: bool) -> char = { + next_pos := get_next_position(in_class, false); + if next_pos < regex..size() { + return regex[next_pos]; + } + else { + return '\0'; + } + } + + peek : (in this) peek_impl(false); + peek_in_class: (in this) peek_impl( true); + + + // Parsing functions + // + parser_group_modifiers: (inout this, change_str: std::string, inout parser_modifiers: expression_flags) -> bool = + { + is_negative := false; + is_reset := false; + + apply := :(flag: expression_flags) = { + if is_negative&$* { + parser_modifiers&$*..clear(flag); + } + else { + parser_modifiers&$*..set(flag); + } + }; + + iter := change_str..begin(); + while iter != change_str..end() next (iter++) + { + cur := iter*; + if cur == '^' { + is_reset = true; + parser_modifiers = expression_flags::none; + } + else if cur == '-' { + if is_reset { _= error("No negative modifier allowed."); return false; } + is_negative = true; + } + else if cur == 'i' { apply(expression_flags::case_insensitive); } + else if cur == 'm' { apply(expression_flags::multiple_lines); } + else if cur == 's' { apply(expression_flags::single_line); } + else if cur == 'n' { apply(expression_flags::no_group_captures); } + else if cur == 'x' { + if (iter + 1) == change_str..end() || (iter + 1)* != 'x' { + // x modifier + apply(expression_flags::perl_code_syntax); + + // Just x unsets xx and remove x also removes xx + parser_modifiers..clear(expression_flags::perl_code_syntax_in_classes); + } + else { // xx modifier + // xx also sets or unsets x + apply(expression_flags::perl_code_syntax); + apply(expression_flags::perl_code_syntax_in_classes); + + iter++; // Skip the second x + } + } + else { + _= error("Unknown modifier: (cur)$"); return false; + } + } + + return true; + } + + parse_until:(inout this, term: char) -> bool = { + cur_token: token_ptr = (); + + while valid() next _ = next() + { + if term == current() { break; } + + cur_token = nullptr; + + if !cur_token && valid() { cur_token = alternative_token::parse(this); } + if !cur_token && valid() { cur_token = any_token::parse(this); } + if !cur_token && valid() { cur_token = class_token::parse(this); } + if !cur_token && valid() { cur_token = escape_token_parse(this); } + if !cur_token && valid() { cur_token = global_group_reset_token_parse(this); } + if !cur_token && valid() { cur_token = group_ref_token::parse(this); } + if !cur_token && valid() { cur_token = group_token::parse(this); } + if !cur_token && valid() { cur_token = hexadecimal_token_parse(this); } + if !cur_token && valid() { cur_token = line_end_token_parse(this); } + if !cur_token && valid() { cur_token = line_start_token_parse(this); } + if !cur_token && valid() { cur_token = named_class_token_parse(this); } + if !cur_token && valid() { cur_token = octal_token_parse(this); } + if !cur_token && valid() { cur_token = range_token::parse(this); } + if !cur_token && valid() { cur_token = special_range_token::parse(this); } + if !cur_token && valid() { cur_token = word_boundary_token_parse(this); } + + // Everything else is matched as it is. + if !cur_token && valid() { cur_token = char_token::parse(this); } + + if cur_token && valid() { + add_token(cur_token); + } else { + return false; + } + } + + return true; + } + + parse: (inout this, modifiers: std::string) -> bool = + { + + flags : expression_flags = (); + if !parser_group_modifiers(modifiers, flags) { return false; } + set_modifiers(flags); + + r := parse_until('\0'); + if r { + root = cur_group_state..get_as_token(); + } + + return r; + } + + // Misc functions + + get_pos: (this) pos; + get_range: (this, start: size_t, end: size_t) std::string(regex..substr(start, end - start + 1)); + valid: (this) -> bool = { return has_next() && !has_error; } + + error: (inout this, err: std::string) -> token_ptr = { + has_error = true; + error_out("Error during parsing of regex '(regex)$' at position '(pos)$': (err)$"); + return nullptr; + } +} + + +// Context for one function generation. Generation of functions can be interleaved, +// therefore we buffer the code for one function here. +// +generation_function_context: @struct type = { + code: std::string = ""; + tabs: std::string = ""; + + add_tabs: (inout this, c: int) = { + i: int = 0; + while i < c next i += 1 { + tabs += " "; + } + } + + remove_tabs: (inout this, c: int) = { + tabs = tabs..substr(0, c * 2); + } +} + + +// Context for generating the state machine. +generation_context: type = +{ + gen_stack: std::vector = (1); // Element 0 contains all the code. + + matcher_func: int = 0; + reset_func: int = 0; + temp_name: int = 0; + entry_func: std::string = ""; + + // Generation helpers + // + match_parameters: (this) -> std::string = { return "r.pos, ctx"; } + + // Code generation. + + // Add code line. + add: (inout this, s: std::string) = { + cur := get_current(); + cur*.code += "(cur*.tabs)$(s)$\n"; + } + + // Add check for token. The check needs to be a function call that returns a boolean. + add_check: (inout this, check: std::string) = { + cur := get_current(); + cur*.code += "(cur*.tabs)$if !cpp2::regex::(check)$ { r.matched = false; break; }\n"; + } + + // Add a stateful check. The check needs to return a `match_return`. + add_statefull: (inout this, next_func: std::string, check: std::string) = + { + end_func_statefull(check); + + name := next_func..substr(0, next_func..size() - 2); + start_func_named(name); + } + + protected start_func_named: (inout this, name: std::string) = + { + cur := new_context(); + + cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n"; + cur*.code += "(cur*.tabs)$ operator(): (this, cur: Iter, inout ctx: context, other) -> cpp2::regex::match_return = {\n"; + cur*.code += "(cur*.tabs)$ r := ctx..pass(cur);\n"; + cur*.code += "(cur*.tabs)$ do {\n"; + cur*..add_tabs(3); + } + + protected start_func: (inout this) -> std::string = + { + name := gen_func_name(); + start_func_named(name); + return name + "()"; + } + + protected end_func_statefull: (inout this, s: std::string) = + { + cur := get_current(); + cur*..remove_tabs(3); + cur*.code += "\n"; + cur*.code += "(cur*.tabs)$ } while false;\n"; + cur*.code += "(cur*.tabs)$ if r.matched {\n"; + cur*.code += "(cur*.tabs)$ r = (s)$;\n"; + cur*.code += "(cur*.tabs)$ }\n"; + cur*.code += "(cur*.tabs)$ else {\n"; + cur*.code += "(cur*.tabs)$ r.pos = ctx.end;\n"; + cur*.code += "(cur*.tabs)$ }\n"; + cur*.code += "(cur*.tabs)$ return r;\n"; + cur*.code += "(cur*.tabs)$ }\n"; + cur*.code += "(cur*.tabs)$}\n"; + + finish_context(); + } + + // Generate the function for a token. + generate_func: (inout this, token: token_ptr) -> std::string = + { + name := start_func(); + token*..generate_code(this); + end_func_statefull("other((match_parameters())$)"); + + return name; + } + + // Generate the reset for a list of group identifiers. + generate_reset: (inout this, groups: std::set) -> std::string = + { + if groups..empty() { + return "cpp2::regex::no_reset()"; + } + + name := gen_reset_func_name(); + cur := new_context(); + + cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n"; + cur*.code += "(cur*.tabs)$ operator(): (this, inout ctx) = {\n"; + for groups do (g) { + cur*.code += "(cur*.tabs)$ ctx..set_group_invalid((g)$);\n"; + } + cur*.code += "(cur*.tabs)$ }\n"; + cur*.code += "(cur*.tabs)$}\n"; + + finish_context(); + + return name + "()"; + } + + // Name generation + // + protected gen_func_name: (inout this) -> std::string = { + cur_id : = matcher_func; + matcher_func += 1; + return "func_(cur_id)$"; + } + + next_func_name: (inout this) -> std::string = { + return gen_func_name() + "()"; + } + + protected gen_reset_func_name: (inout this) -> std::string = { + cur_id : = reset_func; + reset_func += 1; + return "reset_(cur_id)$"; + } + + gen_temp: (inout this) -> std::string = { + cur_id := temp_name; + temp_name += 1; + return "tmp_(cur_id)$"; + } + + // Context management + // + new_context: (inout this) -> *generation_function_context = { + gen_stack..push_back(generation_function_context()); + cur := get_current(); + cur*.tabs = " "; + + return cur; + } + + finish_context: (inout this) = { + cur := get_current(); + base := get_base(); + base*.code += cur*.code; + + gen_stack..pop_back(); + } + + // Misc functions + // + private get_current: (inout this) -> *generation_function_context = { + return gen_stack..back()&; + } + + private get_base: (inout this) -> *generation_function_context = { + return gen_stack[0]&; + } + + get_entry_func: (this) -> std::string = { + return entry_func; + } + + create_named_group_lookup: (this, named_groups: std::map) -> std::string = + { + res: std::string = "get_named_group_index: (name) -> int = {\n"; + + // Generate if selection. + sep: std::string = ""; + for named_groups do (cur) { + res += "(sep)$if name == \"(cur.first)$\" { return (cur.second)$; }"; + sep = "else "; + } + + // Generate else branch or return if list is empty. + if named_groups..empty() { + res += " _ = name;\n"; + res += " return -1;\n"; + } + else { + res += " else { return -1; }\n"; + } + res += "}\n"; + return res; + } + + + // Run the generation for the token. + run: (inout this, token: token_ptr) -> std::string = { + entry_func = generate_func(token); + + return get_base()*.code; + } +} + + +// Regex syntax: | Example: ab|ba +// +// Non greedy implementation. First alternative that matches is chosen. +// +alternative_token: @polymorphic_base type = +{ + this: regex_token_empty = (""); // No code gen here. alternative_token_gen is created in the parse_context + + operator=:(out this) = {} + + parse: (inout ctx: parse_context) -> token_ptr = { + if ctx..current() != '|' { return nullptr; } + + if !ctx..has_token() { return ctx..error("Alternative with no content."); } + ctx..next_alternative(); + return shared.new(); + } +} + +alternative_token_gen: @polymorphic_base type = +{ + this: regex_token; + + alternatives: token_vec; + + operator=: (out this, a: token_vec) = { + regex_token = gen_string(a); + alternatives = a; + } + + generate_code: (override this, inout ctx: generation_context) = + { + functions: std::string = ""; + + for alternatives do (cur) { + groups: std::set = (); + cur*..add_groups(groups); + + functions += ", " + ctx..generate_func(cur); + functions += ", " + ctx..generate_reset(groups); + } + + next_name := ctx..next_func_name(); + + ctx..add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match((ctx..match_parameters())$, other, (next_name)$ (functions)$)"); + } + + add_groups: (override this, inout groups: std::set) = + { + for alternatives do (cur) { + cur*..add_groups(groups); + } + } + + gen_string: (a: token_vec) -> std::string = + { + r: std::string = ""; + sep: std::string = ""; + + for a do (cur) { + r += sep + cur*..to_string(); + sep = "|"; + } + + return r; + } +} + + +alternative_token_matcher: type = +{ + match: (cur, inout ctx, end_func, tail, functions ...) -> _ = { + return match_first(cur, ctx, end_func, tail, functions...); + } + + private match_first: (cur, inout ctx, end_func, tail, cur_func, cur_reset, other ...: Other) -> _ = + { + inner_call := :(tail_cur, inout tail_ctx) -> _ == { + return (tail)$(tail_cur, tail_ctx, (end_func)$); + }; + r := cur_func(cur, ctx, inner_call); + if r.matched { + return r; + } else { + cur_reset(ctx); + + if constexpr 0 != sizeof...(Other) { + return match_first(cur, ctx, end_func, tail, other...); + } else { + return ctx..fail(); + } + } + } +} + + +// Regex syntax: . +// +any_token: @polymorphic_base type = +{ + this: regex_token_check = ("."); + + operator=:(out this, single_line: bool) = { + regex_token_check = (".", "any_token_matcher"); + } + + parse: (inout ctx: parse_context) -> token_ptr = { + if '.' != ctx..current() { return nullptr;} + + return shared.new(ctx..get_modifiers()..has(expression_flags::single_line)); + } +} + + +any_token_matcher: (inout cur, inout ctx) -> bool = +{ + if cur != ctx.end // any char except the end + && (single_line || cur* != '\n') // do not match new lines in multi line mode + { + cur += 1; + return true; + } + // Else + return false; +} + + +// Regex syntax: a +// +char_token: @polymorphic_base type = +{ + this: regex_token; + + token : std::string; + ignore_case: bool; + + operator=: (out this, t: char, ignore_case_: bool) = { + regex_token = (std::string(1, t)); + token = t; + ignore_case = ignore_case_; + } + + parse: (inout ctx: parse_context) -> token_ptr = { + return shared.new(ctx..current(), ctx..get_modifiers()..has(expression_flags::case_insensitive)); + } + + generate_code: (override this, inout ctx: generation_context) = + { + if ignore_case { + upper: std::string = token; + lower: std::string = token; + + (copy i: size_t = 0) while i < token..size() next i += 1 { + lower[i] = string_util::safe_tolower(token[i]); + upper[i] = string_util::safe_toupper(token[i]); + } + + if upper != lower { + gen_case_insensitive(lower, upper, ctx); + } + else { + gen_case_sensitive(ctx); + } + } + else { + gen_case_sensitive(ctx); + } + } + + gen_case_insensitive: (this, lower: std::string, upper: std::string, inout ctx: generation_context) = + { + name: std::string = "str_(ctx..gen_temp())$"; + lower_name: std::string = "lower_(name)$"; + upper_name: std::string = "upper_(name)$"; + size := token..size(); + ctx..add("(lower_name)$ : std::array = \"(add_escapes(lower))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved. + ctx..add("(upper_name)$ : std::array = \"(add_escapes(upper))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved. + ctx..add("if std::distance(r.pos, ctx.end) < (size)$ {"); + ctx..add(" r.matched = false;"); + ctx..add(" break;"); + ctx..add("}"); + ctx..add(""); + ctx..add("(copy i : int = 0) while i < (size)$ next (i += 1) {"); + ctx..add(" if !((lower_name)$[i] == r.pos[i] || (upper_name)$[i] == r.pos[i]) { r.matched = false; }"); + ctx..add("}"); + ctx..add(""); + ctx..add("if r.matched { r.pos += (size)$; }"); + ctx..add("else { break; }"); + } + + gen_case_sensitive: (this, inout ctx: generation_context) = + { + name: std::string = "str_(ctx..gen_temp())$"; + size := token..size(); + ctx..add("(name)$ : std::array = \"(add_escapes(token))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved. + ctx..add("if std::distance(r.pos, ctx.end) < (size)$ {"); + ctx..add(" r.matched = false;"); + ctx..add(" break;"); + ctx..add("}"); + ctx..add(""); + ctx..add("(copy i : int = 0) while i < (size)$ next (i += 1) {"); + ctx..add(" if (name)$[i] != r.pos[i] { r.matched = false; }"); + ctx..add("}"); + ctx..add(""); + ctx..add("if r.matched { r.pos += (size)$; }"); + ctx..add("else { break; }"); + } + + add_escapes: (this, copy str: std::string) -> std::string = + { + str = string_util::replace_all(str, "\\", "\\\\"); + str = string_util::replace_all(str, "\a", "\\a"); + str = string_util::replace_all(str, "\f", "\\f"); + str = string_util::replace_all(str, "\x1b", "\" \"\\x1b\" \""); // Generate a separated string. This prevents + // situations like `\x1bblub` from generating + // wrong hex characters. + str = string_util::replace_all(str, "\n", "\\n"); + str = string_util::replace_all(str, "\r", "\\r"); + str = string_util::replace_all(str, "\t", "\\t"); + + return str; + } + + append: (inout this, that) = { + this.token += that.token; + this.string_rep += that.string_rep; + } +} + + +// TODO: Check if vectorization works at some point with this implementation. +// char_token_matcher: (inout cur, inout ctx) -> bool = { +// if !(std::distance(cur, ctx.end) < tokens..size()) { +// return false; +// } +// matched : bool = true; +// (copy i: int = 0) while i < tokens..size() next i += 1 { +// if tokens..data()[i] != cur[i] { +// matched = false; // No break for performance optimization. Without break, the loop vectorizes. +// } +// } +// if matched { +// cur += tokens..size(); +// } +// return matched; +// } + +// char_token_case_insensitive_matcher: (inout cur, inout ctx) -> bool = { +// if !(std::distance(cur, ctx.end) < lower..size()) { +// return false; +// } +// matched : bool = true; +// (copy i : int = 0) while i < lower..size() next i += 1 { +// if !(lower..data()[i] == cur[i] || upper..data()[i] == cur[i]) { +// matched = false; // No break for performance optimization. Without break, the loop vectorizes. +// } +// } +// if matched { +// cur += lower..size(); +// } +// return matched; +// } + + +// Regex syntax: [] Example: [abcx-y[:digits:]] +// +class_token: @polymorphic_base type = +{ + this : regex_token = (); + + negate : bool; + case_insensitive: bool; + class_str : std::string; + + operator=: (out this, negate_: bool, case_insensitive_: bool, class_str_: std::string, str: std::string) = + { + regex_token = str; + negate = negate_; + case_insensitive = case_insensitive_; + class_str = class_str_; + } + + // TODO: Rework class generation: Generate check functions for classes. + parse: (inout ctx: parse_context) -> token_ptr = + { + if ctx..current() != '[' { return nullptr; } + + start_pos := ctx..get_pos(); + + supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", + "lower", "print", "punct", "space", "upper", "word", "xdigit"); + + classes: std::vector = (); + + // First step: parse until the end bracket and push single chars, ranges or groups on the class stack. + is_negate := false; + first := true; + range := false; + while ctx..next_in_class() && (ctx..current() != ']' || first) + { + if ctx..current() == '^' + { + is_negate = true; + continue; // Skip rest of the loop. Also the first update. + } + + if ctx..current() == '[' && ctx..peek_in_class() == ':' + { + // We have a character class. + _ = ctx..next_n(2); // Skip [: + + name: std::string = ""; + if !ctx..grab_until(":]", out name) { return ctx..error("Could not find end of character class."); } + if supported_classes..end() == std::find(supported_classes..begin(), supported_classes..end(), name) { + return ctx..error("Unsupported character class. Supported ones are: (string_util::join(supported_classes))$"); + } + + classes..push_back("[:(name)$:]"); + + _ = ctx..next(); // Skip ':' pointing to the ending ']'. + } + else if ctx..current() == '\\' + { + if ctx..next_no_skip() && (ctx..current() != ']') + { + if ' ' == ctx..current() + && ctx..get_modifiers()..has(expression_flags::perl_code_syntax) + && ctx..get_modifiers()..has(expression_flags::perl_code_syntax_in_classes) + { + classes..push_back(std::string(1, ctx..current())); + } + else { + name := ""; + if 'd' == ctx..current() { name = "short_digits"; } + else if 'D' == ctx..current() { name = "short_not_digits"; } + else if 'h' == ctx..current() { name = "short_hor_space"; } + else if 'H' == ctx..current() { name = "short_not_hor_space"; } + else if 's' == ctx..current() { name = "short_space"; } + else if 'S' == ctx..current() { name = "short_not_space"; } + else if 'v' == ctx..current() { name = "short_ver_space"; } + else if 'V' == ctx..current() { name = "short_not_ver_space"; } + else if 'w' == ctx..current() { name = "short_word"; } + else if 'W' == ctx..current() { name = "short_not_word"; } + else { + return ctx..error("Unknown group escape."); + } + classes..push_back("[:(name)$:]"); + } + } else { + return ctx..error("Escape without a following character."); + } + } + else if ctx..current() == '-' + { + if first { // Literal if first entry. + classes..push_back("(ctx..current())$"); + } else { + range = true; + } + } + else + { + if range { // Modify last element to be a range. + classes..back() += "-(ctx..current())$"; + range = false; + } + else { + classes..push_back("(ctx..current())$"); + } + } + + first = false; + } + + if ctx..current() != ']' { + return ctx..error("Error end of character class definition before terminating ']'."); + } + end_pos := ctx..get_pos(); + + if range { // If '-' is last entry treat it as a literal char. + classes..push_back("-"); + } + + // Second step: Wrap the item on the class stack with corresponding class implementation. + for classes do (inout cur) + { + if cur..starts_with("[:") { + name := cur..substr(2, cur..size() - 4); + cur = create_matcher("(name)$_class", ""); + } + else if 1 != cur..size() { + cur = create_matcher("range_class_entry", "'(cur[0])$', '(cur[2])$'"); + } + else { + cur = create_matcher("single_class_entry", "'(cur)$'"); + } + } + + inner := string_util::join(classes); + string_rep := ctx..get_range(start_pos, end_pos); + return shared.new( + is_negate, + ctx..get_modifiers()..has(expression_flags::case_insensitive), + inner, + string_rep + ); + } + + generate_code: (override this, inout ctx: generation_context) = + { + ctx..add_check("class_token_matcher::match((ctx..match_parameters())$)"); + } + + private create_matcher: (name: std::string, template_arguments: std::string) -> std::string = + { + sep := ", "; + if template_arguments..empty() { sep = ""; } + + return "::cpp2::regex::(name)$"; + } +} + + +class_token_matcher: type = +{ + match: (inout cur, inout ctx) -> bool = + { + if constexpr case_insensitive + { + if cur != ctx.end + && negate != ( + match_any(string_util::safe_tolower(cur*)) + || match_any(string_util::safe_toupper(cur*)) + ) + { + cur += 1; + return true; + } + else { + return false; + } + } + else + { + if cur != ctx.end && negate != match_any(cur*) { + cur += 1; + return true; + } + else { + return false; + } + } + } + + private match_any: (c: CharT) -> bool = + { + r: bool = First::includes(c); + + if !r { + if constexpr 0 != sizeof...(Other) { + r = match_any(c); + } + } + + return r; + } + + // TODO: Implement proper to string + // to_string: () -> bstring = { + // r: bstring = "["; + // if negate { + // r += "^"; + // } + // r += (bstring() + ... + List::to_string()); + // r += "]"; + + // return r; + // } +} + + +// Regex syntax: \a or \n or \[ +// +escape_token_parse: (inout ctx: parse_context) -> token_ptr = +{ + if ctx..current() != '\\' { return nullptr; } + + + if std::string::npos == std::string("afenrt^.[]()*{}?+|\\")..find(ctx..peek()) { + return nullptr; + } + + _ = ctx..next(); // Skip escape + + if std::string::npos != std::string("afenrt\\")..find(ctx..current()) + { + // Escape of string special char + t : char = '\0'; + if 'a' == ctx..current() { t = '\a'; } + else if 'f' == ctx..current() { t = '\f'; } + else if 'e' == ctx..current() { t = '\x1b'; } + else if 'n' == ctx..current() { t = '\n'; } + else if 'r' == ctx..current() { t = '\r'; } + else if 't' == ctx..current() { t = '\t'; } + else if '\\' == ctx..current() { t = '\\'; } + else { return ctx..error("Internal: missing switch case for special escape."); } + + r: = shared.new(t, false); + r*..set_string("\\(ctx..current())$"); + return r; + } + else + { + // Escape of regex special char + r := shared.new(ctx..current(), false); + r*..set_string("\\(ctx..current())$"); + return r; + } + +} + + +// Regex syntax: \K Example: ab\Kcd +// +global_group_reset_token_parse: (inout ctx: parse_context) -> token_ptr = +{ + if !(ctx..current() == '\\' && ctx..peek() == 'K') { return nullptr; } + + _ = ctx..next(); // Skip escape. + return shared.new("\\K", "ctx..set_group_start(0, r.pos);"); +} + + +// Regex syntax: \ Example: \1 +// \g{name_or_number} +// \k{name_or_number} +// \k +// \k'name_or_number' +// +group_ref_token: @polymorphic_base type = +{ + this : regex_token = (); + + id : int; + case_insensitive: bool; + + operator=:(out this, id_: int, case_insensitive_: bool, str: std::string) = + { + regex_token = str; + id = id_; + case_insensitive = case_insensitive_; + } + + parse: (inout ctx: parse_context) -> token_ptr = + { + if ctx..current() != '\\' { return nullptr; } + + str : std::string = "\\"; + group : std::string = ""; + + if '0' <= ctx..peek() <= '9' + { + _ = ctx..next(); // Skip escape + group = ctx..grab_number(); + + if group..size() >= 3 as size_t + { + // Octal syntax (\000) not a group ref matcher. + number := 0; + if !string_util::string_to_int(group, number, 8) { return ctx..error("Could not convert octal to int."); } + + number_as_char : char = unsafe_narrow(number); + + token := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive)); + token*..set_string("\\(string_util::int_to_string<8>(number_as_char as int))$"); + + return token; + } + + str += group; + // Regular group ref + } + else if 'g' == ctx..peek() + { + _ = ctx..next(); // Skip escape + if !ctx..next() { return ctx..error("Group escape without a following char."); } // Skip g + + str += "g"; + + if ctx..current() == '{' { + str += "{"; + if !(ctx..next() && ctx..grab_until('}', out group)) { return ctx..error("No ending bracket."); } + + str += group + "}"; + } + else { + group = ctx..grab_number(); + str += group; + } + } + else if 'k' == ctx..peek() + { + _ = ctx..next(); // Skip escape + if !ctx..next() { return ctx..error("Group escape without a following char."); } // Skip k + + str += "k"; + + term_char := '\0'; + if ctx..current() == '{' { term_char = '}'; } + else if ctx..current() == '<' { term_char = '>'; } + else if ctx..current() == '\'' { term_char = '\''; } + else { + return ctx..error("Group escape has wrong operator."); + } + + str += ctx..current(); + + if !(ctx..next() && ctx..grab_until(term_char, out group)) { return ctx..error("No ending bracket."); } + + str += group + term_char; + } + else + { + // No group ref matcher + return nullptr; + } + + // Parse the group + group = string_util::trim_copy(group); + group_id : int = 0; + if string_util::string_to_int(group, group_id) + { + if group_id < 0 { + group_id = ctx..get_cur_group() + group_id; + + if group_id < 1 { // Negative and zero are no valid groups. + return ctx..error("Relative group reference does not reference a valid group. (Would be (group_id)$.)"); + } + } + + if group_id >= ctx..get_cur_group() { + return ctx..error("Group reference is used before the group is declared."); + } + } + else + { + // Named group + group_id = ctx..get_named_group(group); + if -1 == group_id { return ctx..error("Group names does not exist. (Name is: (group)$)");} + } + + return shared.new(group_id, ctx..get_modifiers()..has(expression_flags::case_insensitive), str); + } + + generate_code: (override this, inout ctx: generation_context) = { + ctx..add_check("group_ref_token_matcher((ctx..match_parameters())$)"); + } +} + + +group_ref_token_matcher: (inout cur, inout ctx) -> bool = +{ + g := ctx..get_group(group); + + group_pos := g.start; + while + group_pos != g.end + && cur != ctx.end + next (group_pos++, cur++) + { + if constexpr case_insensitive { + if string_util::safe_tolower(group_pos*) != string_util::safe_tolower(cur*) { + return false; + } + } + else { + if group_pos* != cur* { + return false; + } + } + } + + if group_pos == g.end { + return true; + } + else { + return false; + } +} + + +// Regex syntax: () Example: (abc) +// (?:) (?i:abc) +// (?<>:) (?:abc) +// (?#) (#Step 1 finished) +// (?|) (?|(abc)|(cde)) +// (?=) (?=abc) +// (?!) (?!abc) +// (*: token_ptr = + { + _ = ctx..next(); // Skip last token defining the syntax + + r := shared.new(positive); + + old_state := ctx..start_group(); + if !ctx..parse_until(')') { return ctx..error("Lookahead without a closing bracket."); } + r*.inner = ctx..end_group(old_state); + r*..set_string("((syntax)$(r*.inner*..to_string())$)"); + + return r; + } + + parse: (inout ctx: parse_context) -> token_ptr = + { + if ctx..current() != '(' { return nullptr; } + + has_id := !ctx..get_modifiers()..has(expression_flags::no_group_captures); + has_pattern := true; + group_name : std::string = ""; + group_name_brackets := true; + modifiers : std::string = ""; + modifiers_change_to : = ctx..get_modifiers(); + + // Skip the '(' + if !ctx..next() { return ctx..error("Group without closing bracket."); } + + if ctx..current() == '?' + { + // Special group + if !ctx..next_no_skip() { return ctx..error("Missing character after group opening."); } + + if ctx..current() == '<' || ctx..current() == '\'' + { + // Named group + end_char := ctx..current(); + if end_char == '<' { + end_char = '>'; + } else { + group_name_brackets = false; + } + has_id = true; // Force id for named groups. + if !ctx..next() /* skip '<' */ { return ctx..error("Missing ending bracket for named group."); } + if !ctx..grab_until(end_char, out group_name) { return ctx..error("Missing ending bracket for named group."); } + if !ctx..next() { return ctx..error("Group without closing bracket."); } + } + else if ctx..current() == '#' + { + // Comment + comment_str : std::string = ""; + _ = ctx..next(); // Skip # + if !ctx..grab_until(")", out comment_str) { return ctx..error("Group without closing bracket."); } + // Do not add comment. Has problems with ranges. + + // Pop token and add a list. This fixes comments between a token and a range + if ctx..has_token() { + list : token_vec = (); + list..push_back(ctx..pop_token()); + list..push_back(shared.new("(?#(comment_str)$)")); + + return shared.new(list); + } + else { + return shared.new("(?#(comment_str)$)"); + } + } + else if ctx..current() == '|' + { + // Branch reset group + + if !ctx..next() /* skip '|' */ { return ctx..error("Missing ending bracket for named group."); } + + old_parser_state := ctx..start_group(); + old_branch_state := ctx..branch_reset_new_state(); + if !ctx..parse_until(')') { return nullptr; } + ctx..branch_reset_restore_state(old_branch_state); + inner_ := ctx..end_group(old_parser_state); + + list: token_vec = (shared.new("(?|"), inner_, shared.new(")")); + return shared.new(list); + } + else if ctx..current() == '=' || ctx..current() == '!' + { + return parse_lookahead(ctx, "?(ctx..current())$", ctx..current() == '='); + } + else + { + // Simple modifier + has_id = false; + if !ctx..grab_until_one_of("):", out modifiers) { return ctx..error("Missing ending bracket for group."); } + if !ctx..parser_group_modifiers(modifiers, modifiers_change_to) { + return nullptr; + } + + if ')' == ctx..current() { + has_pattern = false; + } + else { + if !ctx..next() /* skip ':' */ { return ctx..error("Missing ending bracket for group."); } + } + } + } + else if ctx..current() == '*' + { + // Named pattern + _ = ctx..next(); // Skip *. + name: std::string = ""; + if !ctx..grab_until(':', out name) { return ctx..error("Missing colon for named pattern."); } + + if name == "pla" || name == "positive_lookahead" { + return parse_lookahead(ctx, "*(name)$:", true); + } + else if name == "nla" || name == "negative_lookahead" { + return parse_lookahead(ctx, "*(name)$:", false); + } + else { + return ctx..error("Unknown named group pattern: '(name)$'"); + } + } + + if has_pattern + { + // Regular group + + r := shared.new(); + if has_id { + r*.number = ctx..next_group(); + + if 0 != group_name..size() { + ctx..set_named_group(group_name, r*.number); + } + } + + old_state := ctx..start_group(); + ctx..set_modifiers(modifiers_change_to); + if !ctx..parse_until(')') { return nullptr; } + r*.inner = ctx..end_group(old_state); + r*..set_string(gen_string(group_name, group_name_brackets, !has_id, modifiers, r*.inner)); + + return r; + } + else + { + // Only a modifier + ctx..set_modifiers(modifiers_change_to); + + return shared.new("(?(modifiers)$)"); + } + } + + gen_string: (name: std::string, name_brackets: bool, has_modifier: bool, modifiers: std::string, inner_: token_ptr) -> std::string = + { + start : std::string = "("; + if 0 != name..size() { + if name_brackets { + start += "?<(name..data())$>"; + } + else { + start += "?'(name..data())$'"; + } + } + else if has_modifier { + start += "?" + modifiers + ":"; + } + + return start + inner_*..to_string() + ")"; + } + + generate_code: (override this, inout ctx: generation_context) = + { + if -1 != number { + ctx..add("ctx..set_group_start((number)$, r.pos);"); + } + + inner*..generate_code(ctx); + if -1 != number { + ctx..add("ctx..set_group_end((number)$, r.pos);"); + tmp_name := ctx..gen_temp(); + ctx..add("(tmp_name)$_func := :() = {"); + ctx..add(" if !r&$*.matched {"); + ctx..add(" ctx&$*..set_group_invalid((number)$);"); + ctx..add(" }"); + ctx..add("};"); + ctx..add("(tmp_name)$ := cpp2::regex::make_on_return((tmp_name)$_func);"); + ctx..add("_ = (tmp_name)$;"); // Logic is done in the destructor. Same behavior as for guard objects. + } + } + + add_groups: (override this, inout groups: std::set) = + { + inner*..add_groups(groups); + if -1 != number { + _ = groups..insert(number); + } + } +} + + +// Regex syntax: \x or \x{} Example: \x{62} +// +hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = +{ + if !(ctx..current() == '\\' && ctx..peek() == 'x') { return nullptr; } + + _ = ctx..next(); // Skip escape. + + if !ctx..next() { return ctx..error("x escape without number.");} + + has_brackets := false; + number_str: std::string = ""; + if '{' == ctx..current() { + // Bracketed + has_brackets = true; + _ = ctx..next(); // Skip '{' + if !ctx..grab_until('}', out number_str) { return ctx..error("No ending bracket for \\x"); } + } + else { + // Grab two chars + if !ctx..grab_n(2, out number_str) { return ctx..error("Missing hexadecimal digits after \\x."); } + } + + number := 0; + if !string_util::string_to_int(number_str, number, 16) { return ctx..error("Could not convert hexadecimal to int."); } + + // TODO: Change for unicode. + number_as_char : char = unsafe_narrow(number); + + syntax: std::string = string_util::int_to_string<16>(number_as_char as int); + if has_brackets { + syntax = "{(syntax)$}"; + } + syntax = "\\x(syntax)$"; + + r := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive)); + r*..set_string(syntax); + return r; +} + + +// Regex syntax: $ Example: aa$ +// +line_end_token_parse: (inout ctx: parse_context) -> token_ptr = +{ + if ctx..current() == '$' || (ctx..current() == '\\' && ctx..peek() == '$') { + if (ctx..current() == '\\') { _ = ctx..next(); } // Skip escape + return shared.new("$", "line_end_token_matcher"); + } + else if ctx..current() == '\\' && (ctx..peek() == 'z' || ctx..peek() == 'Z') { + _ = ctx..next(); // Skip escape + + negate := ctx..current() == 'Z'; + return shared.new("\\(ctx..current())$", "line_end_token_matcher"); + } + else { + return nullptr; + } +} + +line_end_token_matcher: (cur, inout ctx) -> bool = +{ + if cur == ctx.end || (match_new_line && cur* == '\n') { + return true; + } + else if match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special case for new line at end. + return true; + } + else { + return false; + } +} + + +// Regex syntax: ^ Example: ^aa +// +line_start_token_parse: (inout ctx: parse_context) -> token_ptr = +{ + if ctx..current() != '^' && !(ctx..current() == '\\' && ctx..peek() == 'A') { return nullptr; } + + if ctx..current() == '\\' { + _ = ctx..next(); + return shared.new("\\A", "line_start_token_matcher"); + } + else { + return shared.new("^", "line_start_token_matcher"); + } +} + +line_start_token_matcher: (cur, inout ctx) -> bool = +{ + return cur == ctx.begin || // Start of string + (match_new_line && (cur - 1)* == '\n'); // Start of new line +} + + +// Regex syntax: (?=) or (?!) or (*pla), etc. Example: (?=AA) +// +// Parsed in group_token. +// +lookahead_token: @polymorphic_base type = +{ + this: regex_token = (""); + + protected positive: bool; + public inner : token_ptr = nullptr; + + operator=: (out this, positive_: bool) = { + positive = positive_; + } + + generate_code: (override this, inout ctx: generation_context) = { + inner_name := ctx..generate_func(inner); + + ctx..add_check("lookahead_token_matcher((ctx..match_parameters())$, (inner_name)$)"); + } + + add_groups: (override this, inout groups: std::set) = { + inner*..add_groups(groups); + } +} + +lookahead_token_matcher: (cur, inout ctx, func) -> bool = +{ + r := func(cur, ctx, true_end_func()); + if !positive { + r.matched = !r.matched; + } + + return r.matched; +} + + +// Named character classes +// +named_class_token_parse: (inout ctx: parse_context) -> token_ptr = +{ + if ctx..current() != '\\' { return nullptr; } + + name := ""; + c_next := ctx..peek(); + + if 'd' == c_next { name = "named_class_digits"; } + else if 'D' == c_next { name = "named_class_not_digits"; } + else if 'h' == c_next { name = "named_class_hor_space"; } + else if 'H' == c_next { name = "named_class_not_hor_space"; } + else if 'N' == c_next { name = "named_class_no_new_line"; } + else if 's' == c_next { name = "named_class_space"; } + else if 'S' == c_next { name = "named_class_not_space"; } + else if 'v' == c_next { name = "named_class_ver_space"; } + else if 'V' == c_next { name = "named_class_not_ver_space"; } + else if 'w' == c_next { name = "named_class_word"; } + else if 'W' == c_next { name = "named_class_not_word"; } + else { return nullptr; } + + _ = ctx..next(); // Skip escape + + return shared.new("\\(ctx..current())$", "(name)$::match"); +} + + +named_class_no_new_line : type == class_token_matcher>; +named_class_digits : type == class_token_matcher>; +named_class_hor_space : type == class_token_matcher>; +named_class_space : type == class_token_matcher>; +named_class_ver_space : type == class_token_matcher>; +named_class_word : type == class_token_matcher>; + +named_class_not_digits : type == class_token_matcher>; +named_class_not_hor_space : type == class_token_matcher>; +named_class_not_space : type == class_token_matcher>; +named_class_not_ver_space : type == class_token_matcher>; +named_class_not_word : type == class_token_matcher>; + + +// Regex syntax: \o{} Example: \o{142} +// +octal_token_parse: (inout ctx: parse_context) -> token_ptr = +{ + if !(ctx..current() == '\\' && ctx..peek() == 'o') { return nullptr; } + + _ = ctx..next(); // Skip escape. + + if !ctx..next() { return ctx..error("o escape without number.");} + if ctx..current() != '{' { return ctx..error("Missing opening bracket for \\o."); } + + number_str: std::string = ""; + _ = ctx..next(); // Skip '{' + if !ctx..grab_until('}', out number_str) { return ctx..error("No ending bracket for \\o"); } + + number := 0; + if !string_util::string_to_int(number_str, number, 8) { return ctx..error("Could not convert octal to int."); } + + // TODO: Change for unicode. + number_as_char : char = unsafe_narrow(number); + + syntax: std::string = "\\o{(string_util::int_to_string<8>(number_as_char as int))$}"; + r := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive)); + r*..set_string(syntax); + return r; +} + +// TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147 + + +// Options for range matching. +range_flags: type = { + not_greedy: int == 1; // Try to take as few as possible. + greedy: int == 2; // Try to take as many as possible. + possessive: int == 3; // Do not give back after a greedy match. No backtracking. +} + + +// Regex syntax: {min, max} Example: a{2,4} +// +range_token: @polymorphic_base type = +{ + this : regex_token = (""); + + protected min_count : int = -1; + protected max_count : int = -1; + protected kind : int = range_flags::greedy; + protected inner_token: token_ptr = nullptr; + + operator=: (out this) = {} + + parse: (inout ctx: parse_context) -> token_ptr = + { + r := shared.new(); + if ctx..current() == '{' + { + if !ctx..has_token() { return ctx..error("'{' without previous element."); } + + inner: std::string = ""; + if !ctx..grab_until('}', out inner) { return ctx..error("Missing closing bracket '}'."); } + + inner = string_util::trim_copy(inner..substr(1)); // Remove '{' and white spaces. + if inner..empty() { return ctx..error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } + + // Non-greedy or possessive + r*..parse_modifier(ctx); + + // Get range arguments + min_count_str: std::string = "-1"; + max_count_str: std::string = "-1"; + + sep: size_t = inner..find(","); + if sep == std::string::npos + { + min_count_str = inner; + max_count_str = inner; + if !string_util::string_to_int(inner, r*.min_count) { return ctx..error("Could not convert range to number."); } + r*.max_count = r*.min_count; + } + else + { + inner_first: std::string = string_util::trim_copy(inner..substr(0, sep)); + inner_last: std::string = string_util::trim_copy(inner..substr(sep + 1)); + + if (inner_first..empty() && inner_last..empty()) { + return ctx..error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); + } + + if !inner_first..empty() { + min_count_str = inner_first; + if !string_util::string_to_int(inner_first, r*.min_count) { return ctx..error("Could not convert range to number."); } + } + if !inner_last..empty() { + max_count_str = inner_last; + if !string_util::string_to_int(inner_last, r*.max_count) { return ctx..error("Could not convert range to number."); } + } + } + + // Check validity of the range. + if -1 != r*.min_count { + if !(0 <= r*.min_count) { + return ctx..error("Min value in range is negative. Have (r*.min_count)$)"); + } + } + if -1 != r*.max_count { + if !(0 <= r*.max_count) { + return ctx..error("Max value in range is negative. Have (r*.max_count)$)"); + } + if -1 != r*.min_count { + if !(r*.min_count <= r*.max_count) { + return ctx..error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= (r*.min_count)$ <= (r*.max_count)$"); + } + } + } + + r*.inner_token = ctx..pop_token(); + r*.string_rep = r*.inner_token*..to_string() + r*..gen_range_string() + r*..gen_mod_string(); + + return r; + } + + return nullptr; + } + + parse_modifier: (inout this, inout ctx: parse_context) = + { + if ctx..peek() == '?' { + kind = range_flags::not_greedy; + _ = ctx..next(); + } + else if ctx..peek() == '+' { + kind = range_flags::possessive; + _ = ctx..next(); + } + } + + gen_mod_string: (this) -> std::string = + { + if kind == range_flags::not_greedy { + return "?"; + } + else if kind == range_flags::possessive { + return "+"; + } + else { + return ""; + } + } + + gen_range_string: (this) -> std::string = + { + r : std::string = ""; + if min_count == max_count { + r += "{(min_count)$}"; + } + else if min_count == -1 { + r += "{,(max_count)$}"; + } + else if max_count == -1 { + r += "{(min_count)$,}"; + } + else { + r += "{(min_count)$,(max_count)$}"; + } + + return r; + } + + generate_code: (override this, inout ctx: generation_context) = + { + inner_name := ctx..generate_func(inner_token); + groups: std::set = (); + inner_token*..add_groups(groups); + reset_name := ctx..generate_reset(groups); + + next_name := ctx..next_func_name(); + ctx..add_statefull(next_name, "cpp2::regex::range_token_matcher::match((ctx..match_parameters())$, (inner_name)$, (reset_name)$, other, (next_name)$)"); + } + + add_groups: (override this, inout groups: std::set) = { + inner_token*..add_groups(groups); + } + +} + + +range_token_matcher: type = +{ + + match: (cur: Iter, inout ctx, inner, reset_func, end_func, tail) -> _ = + { + if range_flags::possessive == kind { + return match_possessive(cur, ctx, inner, end_func, tail); + } + else if range_flags::greedy == kind { + return match_greedy(0, cur, ctx.end, ctx, inner, reset_func, end_func, tail); + } + else { // range_flags::not_greedy == kind + return match_not_greedy(cur, ctx, inner, end_func, tail); + } + } + + private is_below_upper_bound: (count: int) -> bool = { + if -1 == max_count { return true; } + else { return count < max_count; } + } + + private is_below_lower_bound: (count: int) -> bool = { + if -1 == min_count { return false; } + else { return count < min_count; } + } + + private is_in_range: (count: int) -> bool = { + if -1 != min_count && count < min_count { return false; } + if -1 != max_count && count > max_count { return false; } + return true; + } + + private match_min_count: (cur: Iter, inout ctx, inner, end_func, inout count_r: int) -> _ = + { // TODO: count_r as out parameter introduces a performance loss. + res := ctx..pass(cur); + count := 0; + + while is_below_lower_bound(count) && res.matched { + res = inner(res.pos, ctx, end_func); + if res.matched { + count += 1; + } + } + + count_r = count; + return res; + } + + private match_greedy: (count: int, cur: Iter, last_valid: Iter, inout ctx, inner, reset_func, end_func, other) -> match_return = + { + inner_call := :(tail_cur, inout tail_ctx) -> _ == { + return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (inner)$, (reset_func)$, (end_func)$, (other)$); + }; + is_m_valid := true; + r := ctx..fail(); + if is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid) { + is_m_valid = false; // Group ranges in M are invalidated through the call. + r = inner(cur, ctx, inner_call); + } + + if !r.matched && is_in_range(count) + { + // The recursion did not yield a match try now the tail + r = other(cur, ctx, end_func); + + if r.matched && !is_m_valid{ + // We have a match rematch M if required + reset_func(ctx); + + if count > 0 { + _ = inner(last_valid, ctx, true_end_func()); + } + } + } + + return r; + } + + private match_possessive: (cur: Iter, inout ctx, inner, end_func, other) -> match_return = + { + count :=0; + r := match_min_count(cur, ctx, inner, end_func, count); + + if !r.matched { + return r; + } + + pos := r.pos; + while + r.matched + && is_below_upper_bound(count) + { + r = inner(pos, ctx, true_end_func()); + + if pos == r.pos { + break; // Break infinite loop. + } + if r.matched { + count += 1; + pos = r.pos; + } + } + + return other(pos, ctx, end_func); + } + + private match_not_greedy: (cur: Iter, inout ctx, inner, end_func, other) -> match_return = + { + count := 0; + start := match_min_count(cur, ctx, inner, end_func, count); + if !start.matched { + return start; + } + + pos := start.pos; + while is_below_upper_bound(count) + { + o:= other(pos, ctx, end_func); + if o.matched { + return o; + } + + r:= inner(pos, ctx, end_func); + if !r.matched { + return ctx..fail(); + } + count += 1; + pos = r.pos; + } + + return other(pos, ctx, end_func); // Upper bound reached. + } +} + + +// Regex syntax: *, +, or ? Example: aa* +// +special_range_token: @polymorphic_base type = +{ + this : range_token = (); + + parse: (inout ctx: parse_context) -> token_ptr = + { + r := shared.new(); + symbol: char = '\0'; + if ctx..current() == '*' { + r*.min_count = 0; + r*.max_count = -1; + symbol = '*'; + } + else if ctx..current() == '+' { + r*.min_count = 1; + r*.max_count = -1; + symbol = '+'; + } else if ctx..current() == '?' { + r*.min_count = 0; + r*.max_count = 1; + symbol = '?'; + } else { + return nullptr; + } + + if !ctx..has_token() { return ctx..error("'(ctx..current())$' without previous element."); } + + + r*..parse_modifier(ctx); + + r*.inner_token = ctx..pop_token(); + r*.string_rep = r*.inner_token*..to_string() + symbol + r*..gen_mod_string(); + return r; + } +} + + +// Regex syntax: \b or \B Example: \bword\b +// +// Matches the start end end of word boundaries. +// +word_boundary_token_parse: (inout ctx: parse_context) -> token_ptr = +{ + if ctx..current() != '\\' { return nullptr; } + + if ctx..peek() == 'b' { + _ = ctx..next(); + return shared.new("\\b", "word_boundary_token_matcher"); + } + else if ctx..peek() == 'B' { + _ = ctx..next(); + return shared.new("\\B", "word_boundary_token_matcher"); + } + else { + return nullptr; + } +} + +word_boundary_token_matcher: (inout cur, inout ctx) -> bool = +{ + words : word_class = (); + is_match := false; + if cur == ctx.begin { // String start + if cur != ctx.end { // No empty string + is_match = words..includes(cur*); + } + } + else if cur == ctx.end { // String end + is_match = words..includes((cur - 1)*); + } + else { // Middle of string + is_match = + (words..includes((cur - 1)*) && !words..includes(cur*)) // End of word: \w\W + || (!words..includes((cur - 1)*) && words..includes(cur*)); // Start of word: \W\w + } + if negate { + is_match = !is_match; + } + + return is_match; +} + + +//----------------------------------------------------------------------- +// +// Regular expression implementation. +// +//----------------------------------------------------------------------- +// + +// Regular expression implementation +regular_expression: type = +{ + matcher: type == matcher_wrapper_type; // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 + context: type == matcher_context_type>; // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727 + + search_return: type = + { + public matched: bool; + public ctx: context; + public pos: int; + + operator=:(out this, matched_: bool, ctx_: context, pos_: Iter) = { + matched = matched_; + ctx = ctx_; + pos = unsafe_narrow(std::distance(ctx_.begin, pos_)); + } + + group_number: (this) ctx..size(); + group: (this, g: int) ctx..get_group_string(g); + group_start: (this, g: int) ctx..get_group_start(g); + group_end: (this, g: int) ctx..get_group_end(g); + + group: (this, g: bstring) group(get_group_id(g)); + group_start: (this, g: bstring) group_start(get_group_id(g)); + group_end: (this, g: bstring) group_end(get_group_id(g)); + + private get_group_id: (this, g: bstring) -> _ = { + group_id := matcher::get_named_group_index(g); + if -1 == group_id { + // TODO: Throw error. + } + return group_id; + } + } + + match: (in this, str: bview) match(str..begin(), str..end()); + match: (in this, str: bview, start) match(get_iter(str, start), str..end()); + match: (in this, str: bview, start, length) match(get_iter(str, start), get_iter(str, start + length)); + match: (in this, start: Iter, end: Iter) -> search_return = + { + ctx: context = (start, end); + + r := matcher::entry(start, ctx); + return search_return(r.matched && r.pos == end, ctx, r.pos); + } + + search: (in this, str: bview) search(str..begin(), str..end()); + search: (in this, str: bview, start) search(get_iter(str, start), str..end()); + search: (in this, str: bview, start, length) search(get_iter(str, start), get_iter(str, start + length)); + search: (in this, start: Iter, end: Iter) -> search_return = + { + ctx: context = (start, end); + r := ctx..fail(); + + cur:= start; + while true next (cur++) { + r = matcher::entry(cur, ctx); + if r.matched { + break; + } + + if cur == ctx.end { + break; + } + } + + return search_return(r.matched, ctx, r.pos); + } + + to_string: (in this) matcher_wrapper::to_string(); + + // Helper functions + // + private get_iter: (str: bview, pos) -> _ = { + if pos < str..size() { + return str..begin() + pos; + } + else { + return str..end(); + } + } +} + + +//----------------------------------------------------------------------- +// +// Parser for regular expression. +// +//----------------------------------------------------------------------- +// + +// Parser and generator for regular expressions. +regex_generator: type = +{ + regex: std::string_view; + modifier: std::string = ""; + modifier_escape: std::string = ""; + + error_out: Error_out; + + source: std::string = ""; + + operator=: (out this, r: std::string_view, e: Error_out) = { + regex = r; + error_out = e; + } + + parse:(inout this) -> std::string = + { + // Extract modifiers and adapt regex. + extract_modifiers(); + + parse_ctx: parse_context = (regex, error_out); + if !parse_ctx..parse(modifier) { + return ""; + } + + source += "{\n"; + source += " wrap: type = {\n"; // TODO: Remove wrapper when template template parameters are available. + source += " context: type == cpp2::regex::match_context;"; + + gen_ctx: generation_context = (); + source += gen_ctx..run(parse_ctx..get_as_token()); + source += " entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n"; + source += " ctx..set_group_start(0, cur);\n"; + source += " r := (gen_ctx..get_entry_func())$(cur, ctx, cpp2::regex::true_end_func());\n"; + source += " if r.matched { ctx..set_group_end(0, r.pos); }\n"; + source += " return r;\n"; + source += " }\n"; + + source += gen_ctx..create_named_group_lookup(parse_ctx.named_groups); + source += "}\n"; + + string := parse_ctx..get_as_token()*..to_string(); + source += " to_string: () -> std::string = { return R\"((modifier_escape)$(string)$(modifier_escape)$(modifier)$)\"; }\n"; + source += "}\n"; + + _ = parse_ctx; + + return source; + } + + private extract_modifiers: (inout this) = + { + if regex..find_first_of("'/") == 0 { + mod_token: char = regex[0]; + + end_pos := regex..rfind(mod_token); + if end_pos != 0 { + // Found valid start end escape + modifier = regex..substr(end_pos + 1); + modifier_escape = mod_token; + regex = regex..substr(1, end_pos - 1); + } + } + } +} + +generate_regex: (regex: std::string_view, err: Err) -> std::string = +{ + parser: regex_generator = (regex, err); + r := parser..parse(); + _ = parser; + return r; +} + +} +} + + +#endif + diff --git a/include/cpp2util.h b/include/cpp2util.h index bd00817752..bed20cf762 100644 --- a/include/cpp2util.h +++ b/include/cpp2util.h @@ -36,10 +36,16 @@ // because it can't happen; using the name impl::deferred_init directly // from program code is not supported. // +// 3) Entities in other subnamespaces, such as cpp2::string_util +// +// These are typically metafunction "runtime-library" functions, +// implementation details called by metafunction-generated code. +// For example, @regex generates code that uses string_util:: functions. +// //=========================================================================== -#ifndef CPP2_UTIL_H -#define CPP2_UTIL_H +#ifndef CPP2_CPP2UTIL_H +#define CPP2_CPP2UTIL_H // If this implementation doesn't support source_location yet, disable it #include @@ -269,6 +275,7 @@ #include #include #include + #include #include #include #include @@ -276,7 +283,9 @@ #if defined(CPP2_USE_SOURCE_LOCATION) #include #endif + #include #include + #include #include #include #include @@ -320,7 +329,6 @@ #define CPP2_CONSTEXPR constexpr #endif - namespace cpp2 { @@ -360,6 +368,152 @@ using _schar = signed char; // normally use i8 instead using _uchar = unsigned char; // normally use u8 instead +//----------------------------------------------------------------------- +// +// String utilities +// + +namespace string_util { + +// From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring + +// Trim from start (in place) +inline void ltrim(std::string &s) { + s.erase( + s.begin(), + std::find_if(s.begin(), s.end(), [](unsigned char ch) { return !std::isspace(ch); }) + ); +} + +// Trim from end (in place) +inline void rtrim(std::string &s) { + s.erase( + std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { return !std::isspace(ch); }).base(), + s.end() + ); +} + +// Trim from both ends (in place) +inline void trim(std::string &s) { + rtrim(s); + ltrim(s); +} + +// Trim from both ends (copying) +inline std::string trim_copy(std::string_view s) { + std::string t(s); + trim(t); + return t; +} + +// From https://oleksandrkvl.github.io/2021/04/02/cpp-20-overview.html#nttp + +template +struct fixed_string { + constexpr fixed_string(const CharT (&s)[N+1]) { + std::copy_n(s, N + 1, c_str); + } + constexpr const CharT* data() const { + return c_str; + } + constexpr std::size_t size() const { + return N; + } + + constexpr auto str() const { + return std::basic_string(c_str); + } + + CharT c_str[N+1]; +}; + +template +fixed_string(const CharT (&)[N])->fixed_string; + +// Other string utility functions. + +inline bool is_escaped(std::string_view s) { + return + s.starts_with("\"") + && s.ends_with("\"") + ; +} + +inline bool string_to_int(std::string const& s, int& v, int base = 10) { + try { + v = stoi(s, nullptr, base); + return true; + } + catch (std::invalid_argument const&) + { + return false; + } + catch (std::out_of_range const&) + { + return false; + } +} + +template +inline std::string int_to_string(int i) { + if constexpr (8 == Base) { + std::ostringstream oss; + oss << std::oct << i; + return oss.str(); + } + else if constexpr (10 == Base) { + return std::to_string(i); + } + else if constexpr (16 == Base) { + std::ostringstream oss; + oss << std::hex << i; + return oss.str(); + } + else { + [] () { + static_assert(flag, "Unsupported int_to_string Base"); + }(); + } +} + +inline char safe_toupper(char ch) { + return static_cast(std::toupper(static_cast(ch))); +} + +inline char safe_tolower(char ch) { + return static_cast(std::tolower(static_cast(ch))); +} + +inline std::string replace_all( + std::string str, + const std::string& from, + const std::string& to +) +{ + size_t start_pos = 0; + while((start_pos = str.find(from, start_pos)) != std::string::npos) { + str.replace(start_pos, from.length(), to); + start_pos += to.length(); // safe also when 'to' is a substring of 'from' + } + return str; +} + +template +inline std::string join(List const& list) { + std::string r = ""; + std::string sep = ""; + + for (auto const& cur : list) { + r += sep + cur; + sep = ", "; + } + + return r; +} + +} // namespace string_util + + //----------------------------------------------------------------------- // // Conveniences for expressing Cpp1 references (rarely useful) @@ -2365,6 +2519,7 @@ inline constexpr auto as_() -> decltype(auto) } +#include "cpp2regex.h" using cpp2::cpp2_new; diff --git a/regression-tests/pure2-regex_01_char_matcher.cpp2 b/regression-tests/pure2-regex_01_char_matcher.cpp2 new file mode 100644 index 0000000000..0d965a40e0 --- /dev/null +++ b/regression-tests/pure2-regex_01_char_matcher.cpp2 @@ -0,0 +1,185 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_01_char_matcher: @regex type = { + regex_01 := R"(abc)"; + regex_02 := R"(abc)"; + regex_03 := R"(abc)"; + regex_04 := R"(abc)"; + regex_05 := R"(abc)"; + regex_06 := R"(abc)"; + regex_07 := R"(abc)"; + regex_08 := R"(abc)"; + regex_09 := R"(abc)"; + regex_10 := R"(abc)"; + regex_11 := R"(abc)"; + regex_12 := R"(abc)"; + run: (this) = { + std::cout << "Running tests_01_char_matcher:"<< std::endl; + test(regex_01, "01", R"(abc)", "abc", "y", R"($&)", "abc"); + test(regex_02, "02", R"(abc)", "abc", "y", R"($-[0])", "0"); + test(regex_03, "03", R"(abc)", "abc", "y", R"($+[0])", "3"); + test(regex_04, "04", R"(abc)", "xbc", "n", R"(-)", "-"); + test(regex_05, "05", R"(abc)", "axc", "n", R"(-)", "-"); + test(regex_06, "06", R"(abc)", "abx", "n", R"(-)", "-"); + test(regex_07, "07", R"(abc)", "xabcy", "y", R"($&)", "abc"); + test(regex_08, "08", R"(abc)", "xabcy", "y", R"($-[0])", "1"); + test(regex_09, "09", R"(abc)", "xabcy", "y", R"($+[0])", "4"); + test(regex_10, "10", R"(abc)", "ababc", "y", R"($&)", "abc"); + test(regex_11, "11", R"(abc)", "ababc", "y", R"($-[0])", "2"); + test(regex_12, "12", R"(abc)", "ababc", "y", R"($+[0])", "5"); + std::cout << std::endl; + } +} +main: () = { + test_tests_01_char_matcher().run(); +} diff --git a/regression-tests/pure2-regex_02_ranges.cpp2 b/regression-tests/pure2-regex_02_ranges.cpp2 new file mode 100644 index 0000000000..a122bdcf01 --- /dev/null +++ b/regression-tests/pure2-regex_02_ranges.cpp2 @@ -0,0 +1,241 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_02_ranges: @regex type = { + regex_01 := R"(ab*c)"; + regex_02 := R"(ab*c)"; + regex_03 := R"(ab*c)"; + regex_04 := R"(ab*bc)"; + regex_05 := R"(ab*bc)"; + regex_06 := R"(ab*bc)"; + regex_07 := R"(ab*bc)"; + regex_08 := R"(ab*bc)"; + regex_09 := R"(ab*bc)"; + regex_10 := R"(ab*bc)"; + regex_11 := R"(ab*bc)"; + regex_12 := R"(ab*bc)"; + regex_13 := R"(ab{0,}bc)"; + regex_14 := R"(ab{0,}bc)"; + regex_15 := R"(ab{0,}bc)"; + regex_16 := R"(ab+bc)"; + regex_17 := R"(ab+bc)"; + regex_18 := R"(ab+bc)"; + regex_19 := R"(ab+bc)"; + regex_20 := R"(ab+bc)"; + regex_21 := R"(ab{1,}bc)"; + regex_22 := R"(ab+bc)"; + regex_23 := R"(ab+bc)"; + regex_24 := R"(ab+bc)"; + regex_25 := R"(ab{1,}bc)"; + regex_26 := R"(ab{1,}bc)"; + regex_27 := R"(ab{1,}bc)"; + regex_28 := R"(ab{1,3}bc)"; + regex_29 := R"(ab{1,3}bc)"; + regex_30 := R"(ab{1,3}bc)"; + regex_31 := R"(ab{3,4}bc)"; + regex_32 := R"(ab{3,4}bc)"; + regex_33 := R"(ab{3,4}bc)"; + regex_34 := R"(ab{4,5}bc)"; + regex_35 := R"(ab?bc)"; + regex_36 := R"(ab?bc)"; + regex_37 := R"(ab{0,1}bc)"; + regex_38 := R"(ab?bc)"; + regex_39 := R"(ab?c)"; + regex_40 := R"(ab{0,1}c)"; + run: (this) = { + std::cout << "Running tests_02_ranges:"<< std::endl; + test(regex_01, "01", R"(ab*c)", "abc", "y", R"($&)", "abc"); + test(regex_02, "02", R"(ab*c)", "abc", "y", R"($-[0])", "0"); + test(regex_03, "03", R"(ab*c)", "abc", "y", R"($+[0])", "3"); + test(regex_04, "04", R"(ab*bc)", "abc", "y", R"($&)", "abc"); + test(regex_05, "05", R"(ab*bc)", "abc", "y", R"($-[0])", "0"); + test(regex_06, "06", R"(ab*bc)", "abc", "y", R"($+[0])", "3"); + test(regex_07, "07", R"(ab*bc)", "abbc", "y", R"($&)", "abbc"); + test(regex_08, "08", R"(ab*bc)", "abbc", "y", R"($-[0])", "0"); + test(regex_09, "09", R"(ab*bc)", "abbc", "y", R"($+[0])", "4"); + test(regex_10, "10", R"(ab*bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_11, "11", R"(ab*bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_12, "12", R"(ab*bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_13, "13", R"(ab{0,}bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_14, "14", R"(ab{0,}bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_15, "15", R"(ab{0,}bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_16, "16", R"(ab+bc)", "abbc", "y", R"($&)", "abbc"); + test(regex_17, "17", R"(ab+bc)", "abbc", "y", R"($-[0])", "0"); + test(regex_18, "18", R"(ab+bc)", "abbc", "y", R"($+[0])", "4"); + test(regex_19, "19", R"(ab+bc)", "abc", "n", R"(-)", "-"); + test(regex_20, "20", R"(ab+bc)", "abq", "n", R"(-)", "-"); + test(regex_21, "21", R"(ab{1,}bc)", "abq", "n", R"(-)", "-"); + test(regex_22, "22", R"(ab+bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_23, "23", R"(ab+bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_24, "24", R"(ab+bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_25, "25", R"(ab{1,}bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_26, "26", R"(ab{1,}bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_27, "27", R"(ab{1,}bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_28, "28", R"(ab{1,3}bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_29, "29", R"(ab{1,3}bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_30, "30", R"(ab{1,3}bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_31, "31", R"(ab{3,4}bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_32, "32", R"(ab{3,4}bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_33, "33", R"(ab{3,4}bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_34, "34", R"(ab{4,5}bc)", "abbbbc", "n", R"(-)", "-"); + test(regex_35, "35", R"(ab?bc)", "abbc", "y", R"($&)", "abbc"); + test(regex_36, "36", R"(ab?bc)", "abc", "y", R"($&)", "abc"); + test(regex_37, "37", R"(ab{0,1}bc)", "abc", "y", R"($&)", "abc"); + test(regex_38, "38", R"(ab?bc)", "abbbbc", "n", R"(-)", "-"); + test(regex_39, "39", R"(ab?c)", "abc", "y", R"($&)", "abc"); + test(regex_40, "40", R"(ab{0,1}c)", "abc", "y", R"($&)", "abc"); + std::cout << std::endl; + } +} +main: () = { + test_tests_02_ranges().run(); +} diff --git a/regression-tests/pure2-regex_03_wildcard.cpp2 b/regression-tests/pure2-regex_03_wildcard.cpp2 new file mode 100644 index 0000000000..6f5ec0236d --- /dev/null +++ b/regression-tests/pure2-regex_03_wildcard.cpp2 @@ -0,0 +1,201 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_03_wildcard: @regex type = { + regex_01 := R"(.{1})"; + regex_02 := R"(.{1})"; + regex_03 := R"(.{1})"; + regex_04 := R"(.{3,4})"; + regex_05 := R"(.{3,4})"; + regex_06 := R"(.{3,4})"; + regex_07 := R"(\N{1})"; + regex_08 := R"(\N{1})"; + regex_09 := R"(\N{1})"; + regex_10 := R"(\N{3,4})"; + regex_11 := R"(\N{3,4})"; + regex_12 := R"(\N{3,4})"; + regex_13 := R"(\N{ 3 , 4 })"; + regex_14 := R"(a.c)"; + regex_15 := R"(a.c)"; + regex_16 := R"(a\Nc)"; + regex_17 := R"(a.*c)"; + regex_18 := R"(a\N*c)"; + regex_19 := R"(a.*c)"; + regex_20 := R"(a\N*c)"; + run: (this) = { + std::cout << "Running tests_03_wildcard:"<< std::endl; + test(regex_01, "01", R"(.{1})", "abbbbc", "y", R"($&)", "a"); + test(regex_02, "02", R"(.{1})", "abbbbc", "y", R"($-[0])", "0"); + test(regex_03, "03", R"(.{1})", "abbbbc", "y", R"($+[0])", "1"); + test(regex_04, "04", R"(.{3,4})", "abbbbc", "y", R"($&)", "abbb"); + test(regex_05, "05", R"(.{3,4})", "abbbbc", "y", R"($-[0])", "0"); + test(regex_06, "06", R"(.{3,4})", "abbbbc", "y", R"($+[0])", "4"); + test(regex_07, "07", R"(\N{1})", "abbbbc", "y", R"($&)", "a"); + test(regex_08, "08", R"(\N{1})", "abbbbc", "y", R"($-[0])", "0"); + test(regex_09, "09", R"(\N{1})", "abbbbc", "y", R"($+[0])", "1"); + test(regex_10, "10", R"(\N{3,4})", "abbbbc", "y", R"($&)", "abbb"); + test(regex_11, "11", R"(\N{3,4})", "abbbbc", "y", R"($-[0])", "0"); + test(regex_12, "12", R"(\N{3,4})", "abbbbc", "y", R"($+[0])", "4"); + test(regex_13, "13", R"(\N{ 3 , 4 })", "abbbbc", "y", R"($+[0])", "4"); + test(regex_14, "14", R"(a.c)", "abc", "y", R"($&)", "abc"); + test(regex_15, "15", R"(a.c)", "axc", "y", R"($&)", "axc"); + test(regex_16, "16", R"(a\Nc)", "abc", "y", R"($&)", "abc"); + test(regex_17, "17", R"(a.*c)", "axyzc", "y", R"($&)", "axyzc"); + test(regex_18, "18", R"(a\N*c)", "axyzc", "y", R"($&)", "axyzc"); + test(regex_19, "19", R"(a.*c)", "axyzd", "n", R"(-)", "-"); + test(regex_20, "20", R"(a\N*c)", "axyzd", "n", R"(-)", "-"); + std::cout << std::endl; + } +} +main: () = { + test_tests_03_wildcard().run(); +} diff --git a/regression-tests/pure2-regex_04_start_end.cpp2 b/regression-tests/pure2-regex_04_start_end.cpp2 new file mode 100644 index 0000000000..31db32c85d --- /dev/null +++ b/regression-tests/pure2-regex_04_start_end.cpp2 @@ -0,0 +1,179 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_04_start_end: @regex type = { + regex_01 := R"(^abc$)"; + regex_02 := R"(^abc$)"; + regex_03 := R"(^abc)"; + regex_04 := R"(^abc$)"; + regex_05 := R"(abc$)"; + regex_06 := R"(abc$)"; + regex_07 := R"(^)"; + regex_08 := R"($)"; + regex_09 := R"($b)"; + run: (this) = { + std::cout << "Running tests_04_start_end:"<< std::endl; + test(regex_01, "01", R"(^abc$)", "abc", "y", R"($&)", "abc"); + test(regex_02, "02", R"(^abc$)", "abcc", "n", R"(-)", "-"); + test(regex_03, "03", R"(^abc)", "abcc", "y", R"($&)", "abc"); + test(regex_04, "04", R"(^abc$)", "aabc", "n", R"(-)", "-"); + test(regex_05, "05", R"(abc$)", "aabc", "y", R"($&)", "abc"); + test(regex_06, "06", R"(abc$)", "aabcd", "n", R"(-)", "-"); + test(regex_07, "07", R"(^)", "abc", "y", R"($&)", ""); + test(regex_08, "08", R"($)", "abc", "y", R"($&)", ""); + test(regex_09, "09", R"($b)", "b", "n", R"(-)", "-"); + std::cout << std::endl; + } +} +main: () = { + test_tests_04_start_end().run(); +} diff --git a/regression-tests/pure2-regex_05_classes.cpp2 b/regression-tests/pure2-regex_05_classes.cpp2 new file mode 100644 index 0000000000..8be092235a --- /dev/null +++ b/regression-tests/pure2-regex_05_classes.cpp2 @@ -0,0 +1,199 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_05_classes: @regex type = { + regex_01 := R"(a[bc]d)"; + regex_02 := R"(a[bc]d)"; + regex_03 := R"(a[b]d)"; + regex_04 := R"([a][b][d])"; + regex_05 := R"(.[b].)"; + regex_06 := R"(.[b].)"; + regex_07 := R"(a[b-d]e)"; + regex_08 := R"(a[b-d]e)"; + regex_09 := R"(a[b-d])"; + regex_10 := R"(a[-b])"; + regex_11 := R"(a[b-])"; + regex_12 := R"(a])"; + regex_13 := R"(a[]]b)"; + regex_14 := R"(a[^bc]d)"; + regex_15 := R"(a[^bc]d)"; + regex_16 := R"(a[^-b]c)"; + regex_17 := R"(a[^-b]c)"; + regex_18 := R"(a[^]b]c)"; + regex_19 := R"(a[^]b]c)"; + run: (this) = { + std::cout << "Running tests_05_classes:"<< std::endl; + test(regex_01, "01", R"(a[bc]d)", "abc", "n", R"(-)", "-"); + test(regex_02, "02", R"(a[bc]d)", "abd", "y", R"($&)", "abd"); + test(regex_03, "03", R"(a[b]d)", "abd", "y", R"($&)", "abd"); + test(regex_04, "04", R"([a][b][d])", "abd", "y", R"($&)", "abd"); + test(regex_05, "05", R"(.[b].)", "abd", "y", R"($&)", "abd"); + test(regex_06, "06", R"(.[b].)", "aBd", "n", R"(-)", "-"); + test(regex_07, "07", R"(a[b-d]e)", "abd", "n", R"(-)", "-"); + test(regex_08, "08", R"(a[b-d]e)", "ace", "y", R"($&)", "ace"); + test(regex_09, "09", R"(a[b-d])", "aac", "y", R"($&)", "ac"); + test(regex_10, "10", R"(a[-b])", "a-", "y", R"($&)", "a-"); + test(regex_11, "11", R"(a[b-])", "a-", "y", R"($&)", "a-"); + test(regex_12, "12", R"(a])", "a]", "y", R"($&)", "a]"); + test(regex_13, "13", R"(a[]]b)", "a]b", "y", R"($&)", "a]b"); + test(regex_14, "14", R"(a[^bc]d)", "aed", "y", R"($&)", "aed"); + test(regex_15, "15", R"(a[^bc]d)", "abd", "n", R"(-)", "-"); + test(regex_16, "16", R"(a[^-b]c)", "adc", "y", R"($&)", "adc"); + test(regex_17, "17", R"(a[^-b]c)", "a-c", "n", R"(-)", "-"); + test(regex_18, "18", R"(a[^]b]c)", "a]c", "n", R"(-)", "-"); + test(regex_19, "19", R"(a[^]b]c)", "adc", "y", R"($&)", "adc"); + std::cout << std::endl; + } +} +main: () = { + test_tests_05_classes().run(); +} diff --git a/regression-tests/pure2-regex_06_boundaries.cpp2 b/regression-tests/pure2-regex_06_boundaries.cpp2 new file mode 100644 index 0000000000..fdef8e1c32 --- /dev/null +++ b/regression-tests/pure2-regex_06_boundaries.cpp2 @@ -0,0 +1,195 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_06_boundaries: @regex type = { + regex_01 := R"(\ba\b)"; + regex_02 := R"(\ba\b)"; + regex_03 := R"(\ba\b)"; + regex_04 := R"(\by\b)"; + regex_05 := R"(\by\b)"; + regex_06 := R"(\by\b)"; + regex_07 := R"(\Ba\B)"; + regex_08 := R"(\Ba\B)"; + regex_09 := R"(\Ba\B)"; + regex_10 := R"(\By\b)"; + regex_11 := R"(\By\b)"; + regex_12 := R"(\By\b)"; + regex_13 := R"(\By\b)"; + regex_14 := R"(\by\B)"; + regex_15 := R"(\By\B)"; + regex_16 := R"(\b)"; + regex_17 := R"(\B)"; + run: (this) = { + std::cout << "Running tests_06_boundaries:"<< std::endl; + test(regex_01, "01", R"(\ba\b)", "a-", "y", R"(-)", "-"); + test(regex_02, "02", R"(\ba\b)", "-a", "y", R"(-)", "-"); + test(regex_03, "03", R"(\ba\b)", "-a-", "y", R"(-)", "-"); + test(regex_04, "04", R"(\by\b)", "xy", "n", R"(-)", "-"); + test(regex_05, "05", R"(\by\b)", "yz", "n", R"(-)", "-"); + test(regex_06, "06", R"(\by\b)", "xyz", "n", R"(-)", "-"); + test(regex_07, "07", R"(\Ba\B)", "a-", "n", R"(-)", "-"); + test(regex_08, "08", R"(\Ba\B)", "-a", "n", R"(-)", "-"); + test(regex_09, "09", R"(\Ba\B)", "-a-", "n", R"(-)", "-"); + test(regex_10, "10", R"(\By\b)", "xy", "y", R"(-)", "-"); + test(regex_11, "11", R"(\By\b)", "xy", "y", R"($-[0])", "1"); + test(regex_12, "12", R"(\By\b)", "xy", "y", R"($+[0])", "2"); + test(regex_13, "13", R"(\By\b)", "xy", "y", R"(-)", "-"); + test(regex_14, "14", R"(\by\B)", "yz", "y", R"(-)", "-"); + test(regex_15, "15", R"(\By\B)", "xyz", "y", R"(-)", "-"); + test(regex_16, "16", R"(\b)", "", "n", R"(-)", "-"); + test(regex_17, "17", R"(\B)", "", "y", R"(-)", "-"); + std::cout << std::endl; + } +} +main: () = { + test_tests_06_boundaries().run(); +} diff --git a/regression-tests/pure2-regex_07_short_classes.cpp2 b/regression-tests/pure2-regex_07_short_classes.cpp2 new file mode 100644 index 0000000000..8e9b5b0242 --- /dev/null +++ b/regression-tests/pure2-regex_07_short_classes.cpp2 @@ -0,0 +1,209 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_07_short_classes: @regex type = { + regex_01 := R"(\w)"; + regex_02 := R"(\w)"; + regex_03 := R"(\W)"; + regex_04 := R"(\W)"; + regex_05 := R"(a\sb)"; + regex_06 := R"(a\sb)"; + regex_07 := R"(a\Sb)"; + regex_08 := R"(a\Sb)"; + regex_09 := R"(\d)"; + regex_10 := R"(\d)"; + regex_11 := R"(\D)"; + regex_12 := R"(\D)"; + regex_13 := R"([\w])"; + regex_14 := R"([\w])"; + regex_15 := R"([\W])"; + regex_16 := R"([\W])"; + regex_17 := R"(a[\s]b)"; + regex_18 := R"(a[\s]b)"; + regex_19 := R"(a[\S]b)"; + regex_20 := R"(a[\S]b)"; + regex_21 := R"([\d])"; + regex_22 := R"([\d])"; + regex_23 := R"([\D])"; + regex_24 := R"([\D])"; + run: (this) = { + std::cout << "Running tests_07_short_classes:"<< std::endl; + test(regex_01, "01", R"(\w)", "a", "y", R"(-)", "-"); + test(regex_02, "02", R"(\w)", "-", "n", R"(-)", "-"); + test(regex_03, "03", R"(\W)", "a", "n", R"(-)", "-"); + test(regex_04, "04", R"(\W)", "-", "y", R"(-)", "-"); + test(regex_05, "05", R"(a\sb)", "a b", "y", R"(-)", "-"); + test(regex_06, "06", R"(a\sb)", "a-b", "n", R"(-)", "-"); + test(regex_07, "07", R"(a\Sb)", "a b", "n", R"(-)", "-"); + test(regex_08, "08", R"(a\Sb)", "a-b", "y", R"(-)", "-"); + test(regex_09, "09", R"(\d)", "1", "y", R"(-)", "-"); + test(regex_10, "10", R"(\d)", "-", "n", R"(-)", "-"); + test(regex_11, "11", R"(\D)", "1", "n", R"(-)", "-"); + test(regex_12, "12", R"(\D)", "-", "y", R"(-)", "-"); + test(regex_13, "13", R"([\w])", "a", "y", R"(-)", "-"); + test(regex_14, "14", R"([\w])", "-", "n", R"(-)", "-"); + test(regex_15, "15", R"([\W])", "a", "n", R"(-)", "-"); + test(regex_16, "16", R"([\W])", "-", "y", R"(-)", "-"); + test(regex_17, "17", R"(a[\s]b)", "a b", "y", R"(-)", "-"); + test(regex_18, "18", R"(a[\s]b)", "a-b", "n", R"(-)", "-"); + test(regex_19, "19", R"(a[\S]b)", "a b", "n", R"(-)", "-"); + test(regex_20, "20", R"(a[\S]b)", "a-b", "y", R"(-)", "-"); + test(regex_21, "21", R"([\d])", "1", "y", R"(-)", "-"); + test(regex_22, "22", R"([\d])", "-", "n", R"(-)", "-"); + test(regex_23, "23", R"([\D])", "1", "n", R"(-)", "-"); + test(regex_24, "24", R"([\D])", "-", "y", R"(-)", "-"); + std::cout << std::endl; + } +} +main: () = { + test_tests_07_short_classes().run(); +} diff --git a/regression-tests/pure2-regex_08_alternatives.cpp2 b/regression-tests/pure2-regex_08_alternatives.cpp2 new file mode 100644 index 0000000000..0ff9f7c67e --- /dev/null +++ b/regression-tests/pure2-regex_08_alternatives.cpp2 @@ -0,0 +1,165 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_08_alternatives: @regex type = { + regex_01 := R"(ab|cd)"; + regex_02 := R"(ab|cd)"; + run: (this) = { + std::cout << "Running tests_08_alternatives:"<< std::endl; + test(regex_01, "01", R"(ab|cd)", "abc", "y", R"($&)", "ab"); + test(regex_02, "02", R"(ab|cd)", "abcd", "y", R"($&)", "ab"); + std::cout << std::endl; + } +} +main: () = { + test_tests_08_alternatives().run(); +} diff --git a/regression-tests/pure2-regex_09_groups.cpp2 b/regression-tests/pure2-regex_09_groups.cpp2 new file mode 100644 index 0000000000..580391b51b --- /dev/null +++ b/regression-tests/pure2-regex_09_groups.cpp2 @@ -0,0 +1,183 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_09_groups: @regex type = { + regex_01 := R"(()ef)"; + regex_02 := R"(()ef)"; + regex_03 := R"(()ef)"; + regex_04 := R"(()ef)"; + regex_05 := R"(()ef)"; + regex_06 := R"(((a)))"; + regex_07 := R"(((a)))"; + regex_08 := R"(((a)))"; + regex_09 := R"((a)b(c))"; + regex_10 := R"((a)b(c))"; + regex_11 := R"((a)b(c))"; + run: (this) = { + std::cout << "Running tests_09_groups:"<< std::endl; + test(regex_01, "01", R"(()ef)", "def", "y", R"($&-$1)", "ef-"); + test(regex_02, "02", R"(()ef)", "def", "y", R"($-[0])", "1"); + test(regex_03, "03", R"(()ef)", "def", "y", R"($+[0])", "3"); + test(regex_04, "04", R"(()ef)", "def", "y", R"($-[1])", "1"); + test(regex_05, "05", R"(()ef)", "def", "y", R"($+[1])", "1"); + test(regex_06, "06", R"(((a)))", "abc", "y", R"($&-$1-$2)", "a-a-a"); + test(regex_07, "07", R"(((a)))", "abc", "y", R"($-[0]-$-[1]-$-[2])", "0-0-0"); + test(regex_08, "08", R"(((a)))", "abc", "y", R"($+[0]-$+[1]-$+[2])", "1-1-1"); + test(regex_09, "09", R"((a)b(c))", "abc", "y", R"($&-$1-$2)", "abc-a-c"); + test(regex_10, "10", R"((a)b(c))", "abc", "y", R"($-[0]-$-[1]-$-[2])", "0-0-2"); + test(regex_11, "11", R"((a)b(c))", "abc", "y", R"($+[0]-$+[1]-$+[2])", "3-1-3"); + std::cout << std::endl; + } +} +main: () = { + test_tests_09_groups().run(); +} diff --git a/regression-tests/pure2-regex_10_escapes.cpp2 b/regression-tests/pure2-regex_10_escapes.cpp2 new file mode 100644 index 0000000000..17d56a0c19 --- /dev/null +++ b/regression-tests/pure2-regex_10_escapes.cpp2 @@ -0,0 +1,201 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_10_escapes: @regex type = { + regex_01 := R"(a\(b)"; + regex_02 := R"(a\(*b)"; + regex_03 := R"(a\(*b)"; + regex_04 := R"(a\\b)"; + regex_05 := R"(foo(\h+)bar)"; + regex_06 := R"((\H+)(\h))"; + regex_07 := R"((\h+)(\H))"; + regex_08 := R"(foo(\h)bar)"; + regex_09 := R"((\H)(\h))"; + regex_10 := R"((\h)(\H))"; + regex_11 := R"(foo(\v+)bar)"; + regex_12 := R"((\V+)(\v))"; + regex_13 := R"((\v+)(\V))"; + regex_14 := R"(foo(\v)bar)"; + regex_15 := R"((\V)(\v))"; + regex_16 := R"((\v)(\V))"; + regex_17 := R"(foo\t\n\r\f\a\ebar)"; + regex_18 := R"(foo\Kbar)"; + regex_19 := R"(\x41\x42)"; + regex_20 := R"(\101\o{102})"; + run: (this) = { + std::cout << "Running tests_10_escapes:"<< std::endl; + test(regex_01, "01", R"(a\(b)", "a(b", "y", R"($&-$1)", "a(b-"); + test(regex_02, "02", R"(a\(*b)", "ab", "y", R"($&)", "ab"); + test(regex_03, "03", R"(a\(*b)", "a((b", "y", R"($&)", "a((b"); + test(regex_04, "04", R"(a\\b)", "a\\b", "y", R"($&)", "a\\b"); + test(regex_05, "05", R"(foo(\h+)bar)", "foo\tbar", "y", R"($1)", "\t"); + test(regex_06, "06", R"((\H+)(\h))", "foo\tbar", "y", R"($1-$2)", "foo-\t"); + test(regex_07, "07", R"((\h+)(\H))", "foo\tbar", "y", R"($1-$2)", "\t-b"); + test(regex_08, "08", R"(foo(\h)bar)", "foo\tbar", "y", R"($1)", "\t"); + test(regex_09, "09", R"((\H)(\h))", "foo\tbar", "y", R"($1-$2)", "o-\t"); + test(regex_10, "10", R"((\h)(\H))", "foo\tbar", "y", R"($1-$2)", "\t-b"); + test(regex_11, "11", R"(foo(\v+)bar)", "foo\r\n\r\n\nbar", "y", R"($1)", "\r\n\r\n\n"); + test(regex_12, "12", R"((\V+)(\v))", "foo\r\n\r\n\nbar", "y", R"($1-$2)", "foo-\r"); + test(regex_13, "13", R"((\v+)(\V))", "foo\r\n\r\n\nbar", "y", R"($1-$2)", "\r\n\r\n\n-b"); + test(regex_14, "14", R"(foo(\v)bar)", "foo\rbar", "y", R"($1)", "\r"); + test(regex_15, "15", R"((\V)(\v))", "foo\rbar", "y", R"($1-$2)", "o-\r"); + test(regex_16, "16", R"((\v)(\V))", "foo\rbar", "y", R"($1-$2)", "\r-b"); + test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\a" "\x1b" "bar", "y", R"($&)", "foo\t\n\r\f\a" "\x1b" "bar"); + test(regex_18, "18", R"(foo\Kbar)", "foobar", "y", R"($&)", "bar"); + test(regex_19, "19", R"(\x41\x42)", "AB", "y", R"($&)", "AB"); + test(regex_20, "20", R"(\101\o{102})", "AB", "y", R"($&)", "AB"); + std::cout << std::endl; + } +} +main: () = { + test_tests_10_escapes().run(); +} diff --git a/regression-tests/pure2-regex_11_group_references.cpp2 b/regression-tests/pure2-regex_11_group_references.cpp2 new file mode 100644 index 0000000000..076f98d773 --- /dev/null +++ b/regression-tests/pure2-regex_11_group_references.cpp2 @@ -0,0 +1,209 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_11_group_references: @regex type = { + regex_01 := R"((foo)(\g-2))"; + regex_02 := R"((foo)(\g-2)(foo)(\g-2))"; + regex_03 := R"((([abc]+) \g-1)(([abc]+) \g{-1}))"; + regex_04 := R"((a)(b)(c)\g1\g2\g3)"; + regex_05 := R"(/(?'n'foo) \g{n}/)"; + regex_06 := R"(/(?'n'foo) \g{ n }/)"; + regex_07 := R"(/(?'n'foo) \g{n}/)"; + regex_08 := R"(/(?foo) \g{n}/)"; + regex_09 := R"(/(?foo) \g{n}/)"; + regex_10 := R"(/(?as) (\w+) \g{as} (\w+)/)"; + regex_11 := R"(/(?'n'foo) \k/)"; + regex_12 := R"(/(?'n'foo) \k/)"; + regex_13 := R"(/(?foo) \k'n'/)"; + regex_14 := R"(/(?foo) \k'n'/)"; + regex_15 := R"(/(?'a1'foo) \k'a1'/)"; + regex_16 := R"(/(?foo) \k/)"; + regex_17 := R"(/(?'_'foo) \k'_'/)"; + regex_18 := R"(/(?<_>foo) \k<_>/)"; + regex_19 := R"(/(?'_0_'foo) \k'_0_'/)"; + regex_20 := R"(/(?<_0_>foo) \k<_0_>/)"; + regex_21 := R"(/(?as) (\w+) \k (\w+)/)"; + regex_22 := R"(/(?as) (\w+) \k{as} (\w+)/)"; + regex_23 := R"(/(?as) (\w+) \k'as' (\w+)/)"; + regex_24 := R"(/(?as) (\w+) \k{ as } (\w+)/)"; + run: (this) = { + std::cout << "Running tests_11_group_references:"<< std::endl; + test(regex_01, "01", R"((foo)(\g-2))", "foofoo", "y", R"($1-$2)", "foo-foo"); + test(regex_02, "02", R"((foo)(\g-2)(foo)(\g-2))", "foofoofoofoo", "y", R"($1-$2-$3-$4)", "foo-foo-foo-foo"); + test(regex_03, "03", R"((([abc]+) \g-1)(([abc]+) \g{-1}))", "abc abccba cba", "y", R"($2-$4)", "abc-cba"); + test(regex_04, "04", R"((a)(b)(c)\g1\g2\g3)", "abcabc", "y", R"($1$2$3)", "abc"); + test(regex_05, "05", R"(/(?'n'foo) \g{n}/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_06, "06", R"(/(?'n'foo) \g{ n }/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_07, "07", R"(/(?'n'foo) \g{n}/)", "..foo foo..", "yM", R"($+{n})", "foo"); + test(regex_08, "08", R"(/(?foo) \g{n}/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_09, "09", R"(/(?foo) \g{n}/)", "..foo foo..", "yM", R"($+{n})", "foo"); + test(regex_10, "10", R"(/(?as) (\w+) \g{as} (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + test(regex_11, "11", R"(/(?'n'foo) \k/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_12, "12", R"(/(?'n'foo) \k/)", "..foo foo..", "yM", R"($+{n})", "foo"); + test(regex_13, "13", R"(/(?foo) \k'n'/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_14, "14", R"(/(?foo) \k'n'/)", "..foo foo..", "yM", R"($+{n})", "foo"); + test(regex_15, "15", R"(/(?'a1'foo) \k'a1'/)", "..foo foo..", "yM", R"($+{a1})", "foo"); + test(regex_16, "16", R"(/(?foo) \k/)", "..foo foo..", "yM", R"($+{a1})", "foo"); + test(regex_17, "17", R"(/(?'_'foo) \k'_'/)", "..foo foo..", "yM", R"($+{_})", "foo"); + test(regex_18, "18", R"(/(?<_>foo) \k<_>/)", "..foo foo..", "yM", R"($+{_})", "foo"); + test(regex_19, "19", R"(/(?'_0_'foo) \k'_0_'/)", "..foo foo..", "yM", R"($+{_0_})", "foo"); + test(regex_20, "20", R"(/(?<_0_>foo) \k<_0_>/)", "..foo foo..", "yM", R"($+{_0_})", "foo"); + test(regex_21, "21", R"(/(?as) (\w+) \k (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + test(regex_22, "22", R"(/(?as) (\w+) \k{as} (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + test(regex_23, "23", R"(/(?as) (\w+) \k'as' (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + test(regex_24, "24", R"(/(?as) (\w+) \k{ as } (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + std::cout << std::endl; + } +} +main: () = { + test_tests_11_group_references().run(); +} diff --git a/regression-tests/pure2-regex_12_case_insensitive.cpp2 b/regression-tests/pure2-regex_12_case_insensitive.cpp2 new file mode 100644 index 0000000000..a6610b10ef --- /dev/null +++ b/regression-tests/pure2-regex_12_case_insensitive.cpp2 @@ -0,0 +1,399 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_12_case_insensitive: @regex type = { + regex_01 := R"('abc'i)"; + regex_02 := R"('abc'i)"; + regex_03 := R"('abc'i)"; + regex_04 := R"('abc'i)"; + regex_05 := R"('abc'i)"; + regex_06 := R"('abc'i)"; + regex_07 := R"('ab*c'i)"; + regex_08 := R"('ab*bc'i)"; + regex_09 := R"('ab*bc'i)"; + regex_10 := R"('ab*?bc'i)"; + regex_11 := R"('ab{0,}?bc'i)"; + regex_12 := R"('ab+?bc'i)"; + regex_13 := R"('ab+bc'i)"; + regex_14 := R"('ab+bc'i)"; + regex_15 := R"('ab{1,}bc'i)"; + regex_16 := R"('ab+bc'i)"; + regex_17 := R"('ab{1,}?bc'i)"; + regex_18 := R"('ab{1,3}?bc'i)"; + regex_19 := R"('ab{3,4}?bc'i)"; + regex_20 := R"('ab{4,5}?bc'i)"; + regex_21 := R"('ab??bc'i)"; + regex_22 := R"('ab??bc'i)"; + regex_23 := R"('ab{0,1}?bc'i)"; + regex_24 := R"('ab??bc'i)"; + regex_25 := R"('ab??c'i)"; + regex_26 := R"('ab{0,1}?c'i)"; + regex_27 := R"('^abc$'i)"; + regex_28 := R"('^abc$'i)"; + regex_29 := R"('^abc'i)"; + regex_30 := R"('^abc$'i)"; + regex_31 := R"('abc$'i)"; + regex_32 := R"('^'i)"; + regex_33 := R"('$'i)"; + regex_34 := R"('a.c'i)"; + regex_35 := R"('a.c'i)"; + regex_36 := R"('a\Nc'i)"; + regex_37 := R"('a.*?c'i)"; + regex_38 := R"('a.*c'i)"; + regex_39 := R"('a[bc]d'i)"; + regex_40 := R"('a[bc]d'i)"; + regex_41 := R"('a[b-d]e'i)"; + regex_42 := R"('a[b-d]e'i)"; + regex_43 := R"('a[b-d]'i)"; + regex_44 := R"('a[-b]'i)"; + regex_45 := R"('a[b-]'i)"; + regex_46 := R"('a]'i)"; + regex_47 := R"('a[]]b'i)"; + regex_48 := R"('a[^bc]d'i)"; + regex_49 := R"('a[^bc]d'i)"; + regex_50 := R"('a[^-b]c'i)"; + regex_51 := R"('a[^-b]c'i)"; + regex_52 := R"('a[^]b]c'i)"; + regex_53 := R"('a[^]b]c'i)"; + regex_54 := R"('ab|cd'i)"; + regex_55 := R"('ab|cd'i)"; + regex_56 := R"('()ef'i)"; + regex_57 := R"('$b'i)"; + regex_58 := R"('a\(b'i)"; + regex_59 := R"('a\(*b'i)"; + regex_60 := R"('a\(*b'i)"; + regex_61 := R"('a\\b'i)"; + regex_62 := R"('((a))'i)"; + regex_63 := R"('(a)b(c)'i)"; + regex_64 := R"('a+b+c'i)"; + regex_65 := R"('a{1,}b{1,}c'i)"; + regex_66 := R"('a.+?c'i)"; + regex_67 := R"('a.*?c'i)"; + regex_68 := R"('a.{0,5}?c'i)"; + regex_69 := R"('(a+|b)*'i)"; + regex_70 := R"('(a+|b){0,}'i)"; + regex_71 := R"('(a+|b)+'i)"; + regex_72 := R"('(a+|b){1,}'i)"; + regex_73 := R"('(a+|b)?'i)"; + regex_74 := R"('(a+|b){0,1}'i)"; + regex_75 := R"('(a+|b){0,1}?'i)"; + regex_76 := R"('[^ab]*'i)"; + regex_77 := R"('abc'i)"; + regex_78 := R"('a*'i)"; + regex_79 := R"('([abc])*d'i)"; + regex_80 := R"('([abc])*bcd'i)"; + regex_81 := R"('a|b|c|d|e'i)"; + regex_82 := R"('(a|b|c|d|e)f'i)"; + regex_83 := R"('abcd*efg'i)"; + regex_84 := R"('ab*'i)"; + regex_85 := R"('ab*'i)"; + regex_86 := R"('(ab|cd)e'i)"; + regex_87 := R"('[abhgefdc]ij'i)"; + regex_88 := R"('^(ab|cd)e'i)"; + regex_89 := R"('(abc|)ef'i)"; + regex_90 := R"('(a|b)c*d'i)"; + regex_91 := R"('(ab|ab*)bc'i)"; + regex_92 := R"('a([bc]*)c*'i)"; + regex_93 := R"('a([bc]*)(c*d)'i)"; + regex_94 := R"('a([bc]+)(c*d)'i)"; + regex_95 := R"('a([bc]*)(c+d)'i)"; + regex_96 := R"('a[bcd]*dcdcde'i)"; + regex_97 := R"('a[bcd]+dcdcde'i)"; + regex_98 := R"('(ab|a)b*c'i)"; + regex_99 := R"('((a)(b)c)(d)'i)"; + regex_100 := R"('[a-zA-Z_][a-zA-Z0-9_]*'i)"; + regex_101 := R"('^a(bc+|b[eh])g|.h$'i)"; + regex_102 := R"('(bc+d$|ef*g.|h?i(j|k))'i)"; + regex_103 := R"('(bc+d$|ef*g.|h?i(j|k))'i)"; + regex_104 := R"('(bc+d$|ef*g.|h?i(j|k))'i)"; + regex_105 := R"('(bc+d$|ef*g.|h?i(j|k))'i)"; + regex_106 := R"('(bc+d$|ef*g.|h?i(j|k))'i)"; + regex_107 := R"('((((((((((a))))))))))'i)"; + regex_108 := R"('((((((((((a))))))))))\10'i)"; + regex_109 := R"('(((((((((a)))))))))'i)"; + regex_110 := R"('multiple words of text'i)"; + regex_111 := R"('multiple words'i)"; + regex_112 := R"('(.*)c(.*)'i)"; + regex_113 := R"('\((.*), (.*)\)'i)"; + regex_114 := R"('[k]'i)"; + regex_115 := R"('abcd'i)"; + regex_116 := R"('a(bc)d'i)"; + regex_117 := R"('a[-]?c'i)"; + regex_118 := R"('(abc)\1'i)"; + regex_119 := R"('([a-c]*)\1'i)"; + run: (this) = { + std::cout << "Running tests_12_case_insensitive:"<< std::endl; + test(regex_01, "01", R"('abc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_02, "02", R"('abc'i)", "XBC", "n", R"(-)", "-"); + test(regex_03, "03", R"('abc'i)", "AXC", "n", R"(-)", "-"); + test(regex_04, "04", R"('abc'i)", "ABX", "n", R"(-)", "-"); + test(regex_05, "05", R"('abc'i)", "XABCY", "y", R"($&)", "ABC"); + test(regex_06, "06", R"('abc'i)", "ABABC", "y", R"($&)", "ABC"); + test(regex_07, "07", R"('ab*c'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_08, "08", R"('ab*bc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_09, "09", R"('ab*bc'i)", "ABBC", "y", R"($&)", "ABBC"); + test(regex_10, "10", R"('ab*?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_11, "11", R"('ab{0,}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_12, "12", R"('ab+?bc'i)", "ABBC", "y", R"($&)", "ABBC"); + test(regex_13, "13", R"('ab+bc'i)", "ABC", "n", R"(-)", "-"); + test(regex_14, "14", R"('ab+bc'i)", "ABQ", "n", R"(-)", "-"); + test(regex_15, "15", R"('ab{1,}bc'i)", "ABQ", "n", R"(-)", "-"); + test(regex_16, "16", R"('ab+bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_17, "17", R"('ab{1,}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_18, "18", R"('ab{1,3}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_19, "19", R"('ab{3,4}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_20, "20", R"('ab{4,5}?bc'i)", "ABBBBC", "n", R"(-)", "-"); + test(regex_21, "21", R"('ab??bc'i)", "ABBC", "y", R"($&)", "ABBC"); + test(regex_22, "22", R"('ab??bc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_23, "23", R"('ab{0,1}?bc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_24, "24", R"('ab??bc'i)", "ABBBBC", "n", R"(-)", "-"); + test(regex_25, "25", R"('ab??c'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_26, "26", R"('ab{0,1}?c'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_27, "27", R"('^abc$'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_28, "28", R"('^abc$'i)", "ABCC", "n", R"(-)", "-"); + test(regex_29, "29", R"('^abc'i)", "ABCC", "y", R"($&)", "ABC"); + test(regex_30, "30", R"('^abc$'i)", "AABC", "n", R"(-)", "-"); + test(regex_31, "31", R"('abc$'i)", "AABC", "y", R"($&)", "ABC"); + test(regex_32, "32", R"('^'i)", "ABC", "y", R"($&)", ""); + test(regex_33, "33", R"('$'i)", "ABC", "y", R"($&)", ""); + test(regex_34, "34", R"('a.c'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_35, "35", R"('a.c'i)", "AXC", "y", R"($&)", "AXC"); + test(regex_36, "36", R"('a\Nc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_37, "37", R"('a.*?c'i)", "AXYZC", "y", R"($&)", "AXYZC"); + test(regex_38, "38", R"('a.*c'i)", "AXYZD", "n", R"(-)", "-"); + test(regex_39, "39", R"('a[bc]d'i)", "ABC", "n", R"(-)", "-"); + test(regex_40, "40", R"('a[bc]d'i)", "ABD", "y", R"($&)", "ABD"); + test(regex_41, "41", R"('a[b-d]e'i)", "ABD", "n", R"(-)", "-"); + test(regex_42, "42", R"('a[b-d]e'i)", "ACE", "y", R"($&)", "ACE"); + test(regex_43, "43", R"('a[b-d]'i)", "AAC", "y", R"($&)", "AC"); + test(regex_44, "44", R"('a[-b]'i)", "A-", "y", R"($&)", "A-"); + test(regex_45, "45", R"('a[b-]'i)", "A-", "y", R"($&)", "A-"); + test(regex_46, "46", R"('a]'i)", "A]", "y", R"($&)", "A]"); + test(regex_47, "47", R"('a[]]b'i)", "A]B", "y", R"($&)", "A]B"); + test(regex_48, "48", R"('a[^bc]d'i)", "AED", "y", R"($&)", "AED"); + test(regex_49, "49", R"('a[^bc]d'i)", "ABD", "n", R"(-)", "-"); + test(regex_50, "50", R"('a[^-b]c'i)", "ADC", "y", R"($&)", "ADC"); + test(regex_51, "51", R"('a[^-b]c'i)", "A-C", "n", R"(-)", "-"); + test(regex_52, "52", R"('a[^]b]c'i)", "A]C", "n", R"(-)", "-"); + test(regex_53, "53", R"('a[^]b]c'i)", "ADC", "y", R"($&)", "ADC"); + test(regex_54, "54", R"('ab|cd'i)", "ABC", "y", R"($&)", "AB"); + test(regex_55, "55", R"('ab|cd'i)", "ABCD", "y", R"($&)", "AB"); + test(regex_56, "56", R"('()ef'i)", "DEF", "y", R"($&-$1)", "EF-"); + test(regex_57, "57", R"('$b'i)", "B", "n", R"(-)", "-"); + test(regex_58, "58", R"('a\(b'i)", "A(B", "y", R"($&-$1)", "A(B-"); + test(regex_59, "59", R"('a\(*b'i)", "AB", "y", R"($&)", "AB"); + test(regex_60, "60", R"('a\(*b'i)", "A((B", "y", R"($&)", "A((B"); + test(regex_61, "61", R"('a\\b'i)", "A\\B", "y", R"($&)", "A\\B"); + test(regex_62, "62", R"('((a))'i)", "ABC", "y", R"($&-$1-$2)", "A-A-A"); + test(regex_63, "63", R"('(a)b(c)'i)", "ABC", "y", R"($&-$1-$2)", "ABC-A-C"); + test(regex_64, "64", R"('a+b+c'i)", "AABBABC", "y", R"($&)", "ABC"); + test(regex_65, "65", R"('a{1,}b{1,}c'i)", "AABBABC", "y", R"($&)", "ABC"); + test(regex_66, "66", R"('a.+?c'i)", "ABCABC", "y", R"($&)", "ABC"); + test(regex_67, "67", R"('a.*?c'i)", "ABCABC", "y", R"($&)", "ABC"); + test(regex_68, "68", R"('a.{0,5}?c'i)", "ABCABC", "y", R"($&)", "ABC"); + test(regex_69, "69", R"('(a+|b)*'i)", "AB", "y", R"($&-$1)", "AB-B"); + test(regex_70, "70", R"('(a+|b){0,}'i)", "AB", "y", R"($&-$1)", "AB-B"); + test(regex_71, "71", R"('(a+|b)+'i)", "AB", "y", R"($&-$1)", "AB-B"); + test(regex_72, "72", R"('(a+|b){1,}'i)", "AB", "y", R"($&-$1)", "AB-B"); + test(regex_73, "73", R"('(a+|b)?'i)", "AB", "y", R"($&-$1)", "A-A"); + test(regex_74, "74", R"('(a+|b){0,1}'i)", "AB", "y", R"($&-$1)", "A-A"); + test(regex_75, "75", R"('(a+|b){0,1}?'i)", "AB", "y", R"($&-$1)", "-"); + test(regex_76, "76", R"('[^ab]*'i)", "CDE", "y", R"($&)", "CDE"); + test(regex_77, "77", R"('abc'i)", "", "n", R"(-)", "-"); + test(regex_78, "78", R"('a*'i)", "", "y", R"($&)", ""); + test(regex_79, "79", R"('([abc])*d'i)", "ABBBCD", "y", R"($&-$1)", "ABBBCD-C"); + test(regex_80, "80", R"('([abc])*bcd'i)", "ABCD", "y", R"($&-$1)", "ABCD-A"); + test(regex_81, "81", R"('a|b|c|d|e'i)", "E", "y", R"($&)", "E"); + test(regex_82, "82", R"('(a|b|c|d|e)f'i)", "EF", "y", R"($&-$1)", "EF-E"); + test(regex_83, "83", R"('abcd*efg'i)", "ABCDEFG", "y", R"($&)", "ABCDEFG"); + test(regex_84, "84", R"('ab*'i)", "XABYABBBZ", "y", R"($&)", "AB"); + test(regex_85, "85", R"('ab*'i)", "XAYABBBZ", "y", R"($&)", "A"); + test(regex_86, "86", R"('(ab|cd)e'i)", "ABCDE", "y", R"($&-$1)", "CDE-CD"); + test(regex_87, "87", R"('[abhgefdc]ij'i)", "HIJ", "y", R"($&)", "HIJ"); + test(regex_88, "88", R"('^(ab|cd)e'i)", "ABCDE", "n", R"(x$1y)", "XY"); + test(regex_89, "89", R"('(abc|)ef'i)", "ABCDEF", "y", R"($&-$1)", "EF-"); + test(regex_90, "90", R"('(a|b)c*d'i)", "ABCD", "y", R"($&-$1)", "BCD-B"); + test(regex_91, "91", R"('(ab|ab*)bc'i)", "ABC", "y", R"($&-$1)", "ABC-A"); + test(regex_92, "92", R"('a([bc]*)c*'i)", "ABC", "y", R"($&-$1)", "ABC-BC"); + test(regex_93, "93", R"('a([bc]*)(c*d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-BC-D"); + test(regex_94, "94", R"('a([bc]+)(c*d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-BC-D"); + test(regex_95, "95", R"('a([bc]*)(c+d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-B-CD"); + test(regex_96, "96", R"('a[bcd]*dcdcde'i)", "ADCDCDE", "y", R"($&)", "ADCDCDE"); + test(regex_97, "97", R"('a[bcd]+dcdcde'i)", "ADCDCDE", "n", R"(-)", "-"); + test(regex_98, "98", R"('(ab|a)b*c'i)", "ABC", "y", R"($&-$1)", "ABC-AB"); + test(regex_99, "99", R"('((a)(b)c)(d)'i)", "ABCD", "y", R"($1-$2-$3-$4)", "ABC-A-B-D"); + test(regex_100, "100", R"('[a-zA-Z_][a-zA-Z0-9_]*'i)", "ALPHA", "y", R"($&)", "ALPHA"); + test(regex_101, "101", R"('^a(bc+|b[eh])g|.h$'i)", "ABH", "y", R"($&-$1)", "BH-"); + test(regex_102, "102", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "EFFGZ", "y", R"($&-$1-$2)", "EFFGZ-EFFGZ-"); + test(regex_103, "103", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "IJ", "y", R"($&-$1-$2)", "IJ-IJ-J"); + test(regex_104, "104", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "EFFG", "n", R"(-)", "-"); + test(regex_105, "105", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "BCDD", "n", R"(-)", "-"); + test(regex_106, "106", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "REFFGZ", "y", R"($&-$1-$2)", "EFFGZ-EFFGZ-"); + test(regex_107, "107", R"('((((((((((a))))))))))'i)", "A", "y", R"($10)", "A"); + test(regex_108, "108", R"('((((((((((a))))))))))\10'i)", "AA", "y", R"($&)", "AA"); + test(regex_109, "109", R"('(((((((((a)))))))))'i)", "A", "y", R"($&)", "A"); + test(regex_110, "110", R"('multiple words of text'i)", "UH-UH", "n", R"(-)", "-"); + test(regex_111, "111", R"('multiple words'i)", "MULTIPLE WORDS, YEAH", "y", R"($&)", "MULTIPLE WORDS"); + test(regex_112, "112", R"('(.*)c(.*)'i)", "ABCDE", "y", R"($&-$1-$2)", "ABCDE-AB-DE"); + test(regex_113, "113", R"('\((.*), (.*)\)'i)", "(A, B)", "y", R"(($2, $1))", "(B, A)"); + test(regex_114, "114", R"('[k]'i)", "AB", "n", R"(-)", "-"); + test(regex_115, "115", R"('abcd'i)", "ABCD", "y", R"($&)", "ABCD"); + test(regex_116, "116", R"('a(bc)d'i)", "ABCD", "y", R"($1)", "BC"); + test(regex_117, "117", R"('a[-]?c'i)", "AC", "y", R"($&)", "AC"); + test(regex_118, "118", R"('(abc)\1'i)", "ABCABC", "y", R"($1)", "ABC"); + test(regex_119, "119", R"('([a-c]*)\1'i)", "ABCABC", "y", R"($1)", "ABC"); + std::cout << std::endl; + } +} +main: () = { + test_tests_12_case_insensitive().run(); +} diff --git a/regression-tests/pure2-regex_13_possessive_modifier.cpp2 b/regression-tests/pure2-regex_13_possessive_modifier.cpp2 new file mode 100644 index 0000000000..774cd79dc3 --- /dev/null +++ b/regression-tests/pure2-regex_13_possessive_modifier.cpp2 @@ -0,0 +1,257 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_13_possessive_modifier: @regex type = { + regex_01 := R"(a++a)"; + regex_02 := R"(a*+a)"; + regex_03 := R"(a{1,5}+a)"; + regex_04 := R"(a?+a)"; + regex_05 := R"(a++b)"; + regex_06 := R"(a*+b)"; + regex_07 := R"(a{1,5}+b)"; + regex_08 := R"(a?+b)"; + regex_09 := R"(fooa++a)"; + regex_10 := R"(fooa*+a)"; + regex_11 := R"(fooa{1,5}+a)"; + regex_12 := R"(fooa?+a)"; + regex_13 := R"(fooa++b)"; + regex_14 := R"(fooa*+b)"; + regex_15 := R"(fooa{1,5}+b)"; + regex_16 := R"(fooa?+b)"; + regex_17 := R"((aA)++(aA))"; + regex_18 := R"((aA|bB)++(aA|bB))"; + regex_19 := R"((aA)*+(aA))"; + regex_20 := R"((aA|bB)*+(aA|bB))"; + regex_21 := R"((aA){1,5}+(aA))"; + regex_22 := R"((aA|bB){1,5}+(aA|bB))"; + regex_23 := R"((aA)?+(aA))"; + regex_24 := R"((aA|bB)?+(aA|bB))"; + regex_25 := R"((aA)++b)"; + regex_26 := R"((aA|bB)++b)"; + regex_27 := R"((aA)*+b)"; + regex_28 := R"((aA|bB)*+b)"; + regex_29 := R"((aA){1,5}+b)"; + regex_30 := R"((aA|bB){1,5}+b)"; + regex_31 := R"((aA)?+b)"; + regex_32 := R"((aA|bB)?+b)"; + regex_33 := R"(foo(aA)++(aA))"; + regex_34 := R"(foo(aA|bB)++(aA|bB))"; + regex_35 := R"(foo(aA)*+(aA))"; + regex_36 := R"(foo(aA|bB)*+(aA|bB))"; + regex_37 := R"(foo(aA){1,5}+(aA))"; + regex_38 := R"(foo(aA|bB){1,5}+(aA|bB))"; + regex_39 := R"(foo(aA)?+(aA))"; + regex_40 := R"(foo(aA|bB)?+(aA|bB))"; + regex_41 := R"(foo(aA)++b)"; + regex_42 := R"(foo(aA|bB)++b)"; + regex_43 := R"(foo(aA)*+b)"; + regex_44 := R"(foo(aA|bB)*+b)"; + regex_45 := R"(foo(aA){1,5}+b)"; + regex_46 := R"(foo(aA|bB){1,5}+b)"; + regex_47 := R"(foo(aA)?+b)"; + regex_48 := R"(foo(aA|bB)?+b)"; + run: (this) = { + std::cout << "Running tests_13_possessive_modifier:"<< std::endl; + test(regex_01, "01", R"(a++a)", "aaaaa", "n", R"(-)", "-"); + test(regex_02, "02", R"(a*+a)", "aaaaa", "n", R"(-)", "-"); + test(regex_03, "03", R"(a{1,5}+a)", "aaaaa", "n", R"(-)", "-"); + test(regex_04, "04", R"(a?+a)", "ab", "n", R"(-)", "-"); + test(regex_05, "05", R"(a++b)", "aaaaab", "y", R"($&)", "aaaaab"); + test(regex_06, "06", R"(a*+b)", "aaaaab", "y", R"($&)", "aaaaab"); + test(regex_07, "07", R"(a{1,5}+b)", "aaaaab", "y", R"($&)", "aaaaab"); + test(regex_08, "08", R"(a?+b)", "ab", "y", R"($&)", "ab"); + test(regex_09, "09", R"(fooa++a)", "fooaaaaa", "n", R"(-)", "-"); + test(regex_10, "10", R"(fooa*+a)", "fooaaaaa", "n", R"(-)", "-"); + test(regex_11, "11", R"(fooa{1,5}+a)", "fooaaaaa", "n", R"(-)", "-"); + test(regex_12, "12", R"(fooa?+a)", "fooab", "n", R"(-)", "-"); + test(regex_13, "13", R"(fooa++b)", "fooaaaaab", "y", R"($&)", "fooaaaaab"); + test(regex_14, "14", R"(fooa*+b)", "fooaaaaab", "y", R"($&)", "fooaaaaab"); + test(regex_15, "15", R"(fooa{1,5}+b)", "fooaaaaab", "y", R"($&)", "fooaaaaab"); + test(regex_16, "16", R"(fooa?+b)", "fooab", "y", R"($&)", "fooab"); + test(regex_17, "17", R"((aA)++(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA"); + test(regex_18, "18", R"((aA|bB)++(aA|bB))", "aAaAbBaAbB", "n", R"(-)", "aAaAbBaAbB"); + test(regex_19, "19", R"((aA)*+(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA"); + test(regex_20, "20", R"((aA|bB)*+(aA|bB))", "aAaAbBaAaA", "n", R"(-)", "aAaAbBaAaA"); + test(regex_21, "21", R"((aA){1,5}+(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA"); + test(regex_22, "22", R"((aA|bB){1,5}+(aA|bB))", "aAaAbBaAaA", "n", R"(-)", "aAaAbBaAaA"); + test(regex_23, "23", R"((aA)?+(aA))", "aAb", "n", R"(-)", "aAb"); + test(regex_24, "24", R"((aA|bB)?+(aA|bB))", "bBb", "n", R"(-)", "bBb"); + test(regex_25, "25", R"((aA)++b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb"); + test(regex_26, "26", R"((aA|bB)++b)", "aAbBaAaAbBb", "y", R"($&)", "aAbBaAaAbBb"); + test(regex_27, "27", R"((aA)*+b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb"); + test(regex_28, "28", R"((aA|bB)*+b)", "bBbBbBbBbBb", "y", R"($&)", "bBbBbBbBbBb"); + test(regex_29, "29", R"((aA){1,5}+b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb"); + test(regex_30, "30", R"((aA|bB){1,5}+b)", "bBaAbBaAbBb", "y", R"($&)", "bBaAbBaAbBb"); + test(regex_31, "31", R"((aA)?+b)", "aAb", "y", R"($&)", "aAb"); + test(regex_32, "32", R"((aA|bB)?+b)", "bBb", "y", R"($&)", "bBb"); + test(regex_33, "33", R"(foo(aA)++(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA"); + test(regex_34, "34", R"(foo(aA|bB)++(aA|bB))", "foobBbBbBaAaA", "n", R"(-)", "foobBbBbBaAaA"); + test(regex_35, "35", R"(foo(aA)*+(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA"); + test(regex_36, "36", R"(foo(aA|bB)*+(aA|bB))", "foobBaAbBaAaA", "n", R"(-)", "foobBaAbBaAaA"); + test(regex_37, "37", R"(foo(aA){1,5}+(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA"); + test(regex_38, "38", R"(foo(aA|bB){1,5}+(aA|bB))", "fooaAbBbBaAaA", "n", R"(-)", "fooaAbBbBaAaA"); + test(regex_39, "39", R"(foo(aA)?+(aA))", "fooaAb", "n", R"(-)", "fooaAb"); + test(regex_40, "40", R"(foo(aA|bB)?+(aA|bB))", "foobBb", "n", R"(-)", "foobBb"); + test(regex_41, "41", R"(foo(aA)++b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb"); + test(regex_42, "42", R"(foo(aA|bB)++b)", "foobBaAbBaAbBb", "y", R"($&)", "foobBaAbBaAbBb"); + test(regex_43, "43", R"(foo(aA)*+b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb"); + test(regex_44, "44", R"(foo(aA|bB)*+b)", "foobBbBaAaAaAb", "y", R"($&)", "foobBbBaAaAaAb"); + test(regex_45, "45", R"(foo(aA){1,5}+b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb"); + test(regex_46, "46", R"(foo(aA|bB){1,5}+b)", "foobBaAaAaAaAb", "y", R"($&)", "foobBaAaAaAaAb"); + test(regex_47, "47", R"(foo(aA)?+b)", "fooaAb", "y", R"($&)", "fooaAb"); + test(regex_48, "48", R"(foo(aA|bB)?+b)", "foobBb", "y", R"($&)", "foobBb"); + std::cout << std::endl; + } +} +main: () = { + test_tests_13_possessive_modifier().run(); +} diff --git a/regression-tests/pure2-regex_14_multiline_modifier.cpp2 b/regression-tests/pure2-regex_14_multiline_modifier.cpp2 new file mode 100644 index 0000000000..a48e3e4d53 --- /dev/null +++ b/regression-tests/pure2-regex_14_multiline_modifier.cpp2 @@ -0,0 +1,559 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_14_multiline_modifier: @regex type = { + regex_01 := R"(\Z)"; + regex_02 := R"(\z)"; + regex_03 := R"($)"; + regex_04 := R"(\Z)"; + regex_05 := R"(\z)"; + regex_06 := R"($)"; + regex_07 := R"(\Z)"; + regex_08 := R"(\z)"; + regex_09 := R"($)"; + regex_10 := R"('\Z'm)"; + regex_11 := R"('\z'm)"; + regex_12 := R"('$'m)"; + regex_13 := R"('\Z'm)"; + regex_14 := R"('\z'm)"; + regex_15 := R"('$'m)"; + regex_16 := R"('\Z'm)"; + regex_17 := R"('\z'm)"; + regex_18 := R"('$'m)"; + regex_19 := R"(a\Z)"; + regex_20 := R"(a\z)"; + regex_21 := R"(a$)"; + regex_22 := R"(a\Z)"; + regex_23 := R"(a\z)"; + regex_24 := R"(a$)"; + regex_25 := R"(a\Z)"; + regex_26 := R"(a\z)"; + regex_27 := R"(a$)"; + regex_28 := R"('a\Z'm)"; + regex_29 := R"('a\z'm)"; + regex_30 := R"('a$'m)"; + regex_31 := R"('a\Z'm)"; + regex_32 := R"('a\z'm)"; + regex_33 := R"('a$'m)"; + regex_34 := R"('a\Z'm)"; + regex_35 := R"('a\z'm)"; + regex_36 := R"('a$'m)"; + regex_37 := R"(aa\Z)"; + regex_38 := R"(aa\z)"; + regex_39 := R"(aa$)"; + regex_40 := R"(aa\Z)"; + regex_41 := R"(aa\z)"; + regex_42 := R"(aa$)"; + regex_43 := R"(aa\Z)"; + regex_44 := R"(aa\z)"; + regex_45 := R"(aa$)"; + regex_46 := R"('aa\Z'm)"; + regex_47 := R"('aa\z'm)"; + regex_48 := R"('aa$'m)"; + regex_49 := R"('aa\Z'm)"; + regex_50 := R"('aa\z'm)"; + regex_51 := R"('aa$'m)"; + regex_52 := R"('aa\Z'm)"; + regex_53 := R"('aa\z'm)"; + regex_54 := R"('aa$'m)"; + regex_55 := R"(aa\Z)"; + regex_56 := R"(aa\z)"; + regex_57 := R"(aa$)"; + regex_58 := R"(aa\Z)"; + regex_59 := R"(aa\z)"; + regex_60 := R"(aa$)"; + regex_61 := R"(aa\Z)"; + regex_62 := R"(aa\z)"; + regex_63 := R"(aa$)"; + regex_64 := R"('aa\Z'm)"; + regex_65 := R"('aa\z'm)"; + regex_66 := R"('aa$'m)"; + regex_67 := R"('aa\Z'm)"; + regex_68 := R"('aa\z'm)"; + regex_69 := R"('aa$'m)"; + regex_70 := R"('aa\Z'm)"; + regex_71 := R"('aa\z'm)"; + regex_72 := R"('aa$'m)"; + regex_73 := R"(aa\Z)"; + regex_74 := R"(aa\z)"; + regex_75 := R"(aa$)"; + regex_76 := R"(aa\Z)"; + regex_77 := R"(aa\z)"; + regex_78 := R"(aa$)"; + regex_79 := R"(aa\Z)"; + regex_80 := R"(aa\z)"; + regex_81 := R"(aa$)"; + regex_82 := R"('aa\Z'm)"; + regex_83 := R"('aa\z'm)"; + regex_84 := R"('aa$'m)"; + regex_85 := R"('aa\Z'm)"; + regex_86 := R"('aa\z'm)"; + regex_87 := R"('aa$'m)"; + regex_88 := R"('aa\Z'm)"; + regex_89 := R"('aa\z'm)"; + regex_90 := R"('aa$'m)"; + regex_91 := R"(ab\Z)"; + regex_92 := R"(ab\z)"; + regex_93 := R"(ab$)"; + regex_94 := R"(ab\Z)"; + regex_95 := R"(ab\z)"; + regex_96 := R"(ab$)"; + regex_97 := R"(ab\Z)"; + regex_98 := R"(ab\z)"; + regex_99 := R"(ab$)"; + regex_100 := R"('ab\Z'm)"; + regex_101 := R"('ab\z'm)"; + regex_102 := R"('ab$'m)"; + regex_103 := R"('ab\Z'm)"; + regex_104 := R"('ab\z'm)"; + regex_105 := R"('ab$'m)"; + regex_106 := R"('ab\Z'm)"; + regex_107 := R"('ab\z'm)"; + regex_108 := R"('ab$'m)"; + regex_109 := R"(ab\Z)"; + regex_110 := R"(ab\z)"; + regex_111 := R"(ab$)"; + regex_112 := R"(ab\Z)"; + regex_113 := R"(ab\z)"; + regex_114 := R"(ab$)"; + regex_115 := R"(ab\Z)"; + regex_116 := R"(ab\z)"; + regex_117 := R"(ab$)"; + regex_118 := R"('ab\Z'm)"; + regex_119 := R"('ab\z'm)"; + regex_120 := R"('ab$'m)"; + regex_121 := R"('ab\Z'm)"; + regex_122 := R"('ab\z'm)"; + regex_123 := R"('ab$'m)"; + regex_124 := R"('ab\Z'm)"; + regex_125 := R"('ab\z'm)"; + regex_126 := R"('ab$'m)"; + regex_127 := R"(ab\Z)"; + regex_128 := R"(ab\z)"; + regex_129 := R"(ab$)"; + regex_130 := R"(ab\Z)"; + regex_131 := R"(ab\z)"; + regex_132 := R"(ab$)"; + regex_133 := R"(ab\Z)"; + regex_134 := R"(ab\z)"; + regex_135 := R"(ab$)"; + regex_136 := R"('ab\Z'm)"; + regex_137 := R"('ab\z'm)"; + regex_138 := R"('ab$'m)"; + regex_139 := R"('ab\Z'm)"; + regex_140 := R"('ab\z'm)"; + regex_141 := R"('ab$'m)"; + regex_142 := R"('ab\Z'm)"; + regex_143 := R"('ab\z'm)"; + regex_144 := R"('ab$'m)"; + regex_145 := R"(abb\Z)"; + regex_146 := R"(abb\z)"; + regex_147 := R"(abb$)"; + regex_148 := R"(abb\Z)"; + regex_149 := R"(abb\z)"; + regex_150 := R"(abb$)"; + regex_151 := R"(abb\Z)"; + regex_152 := R"(abb\z)"; + regex_153 := R"(abb$)"; + regex_154 := R"('abb\Z'm)"; + regex_155 := R"('abb\z'm)"; + regex_156 := R"('abb$'m)"; + regex_157 := R"('abb\Z'm)"; + regex_158 := R"('abb\z'm)"; + regex_159 := R"('abb$'m)"; + regex_160 := R"('abb\Z'm)"; + regex_161 := R"('abb\z'm)"; + regex_162 := R"('abb$'m)"; + regex_163 := R"(abb\Z)"; + regex_164 := R"(abb\z)"; + regex_165 := R"(abb$)"; + regex_166 := R"(abb\Z)"; + regex_167 := R"(abb\z)"; + regex_168 := R"(abb$)"; + regex_169 := R"(abb\Z)"; + regex_170 := R"(abb\z)"; + regex_171 := R"(abb$)"; + regex_172 := R"('abb\Z'm)"; + regex_173 := R"('abb\z'm)"; + regex_174 := R"('abb$'m)"; + regex_175 := R"('abb\Z'm)"; + regex_176 := R"('abb\z'm)"; + regex_177 := R"('abb$'m)"; + regex_178 := R"('abb\Z'm)"; + regex_179 := R"('abb\z'm)"; + regex_180 := R"('abb$'m)"; + regex_181 := R"(abb\Z)"; + regex_182 := R"(abb\z)"; + regex_183 := R"(abb$)"; + regex_184 := R"(abb\Z)"; + regex_185 := R"(abb\z)"; + regex_186 := R"(abb$)"; + regex_187 := R"(abb\Z)"; + regex_188 := R"(abb\z)"; + regex_189 := R"(abb$)"; + regex_190 := R"('abb\Z'm)"; + regex_191 := R"('abb\z'm)"; + regex_192 := R"('abb$'m)"; + regex_193 := R"('abb\Z'm)"; + regex_194 := R"('abb\z'm)"; + regex_195 := R"('abb$'m)"; + regex_196 := R"('abb\Z'm)"; + regex_197 := R"('abb\z'm)"; + regex_198 := R"('abb$'m)"; + regex_199 := R"('\Aa$'m)"; + run: (this) = { + std::cout << "Running tests_14_multiline_modifier:"<< std::endl; + test(regex_01, "01", R"(\Z)", "a\nb\n", "y", R"($-[0])", "3"); + test(regex_02, "02", R"(\z)", "a\nb\n", "y", R"($-[0])", "4"); + test(regex_03, "03", R"($)", "a\nb\n", "y", R"($-[0])", "3"); + test(regex_04, "04", R"(\Z)", "b\na\n", "y", R"($-[0])", "3"); + test(regex_05, "05", R"(\z)", "b\na\n", "y", R"($-[0])", "4"); + test(regex_06, "06", R"($)", "b\na\n", "y", R"($-[0])", "3"); + test(regex_07, "07", R"(\Z)", "b\na", "y", R"($-[0])", "3"); + test(regex_08, "08", R"(\z)", "b\na", "y", R"($-[0])", "3"); + test(regex_09, "09", R"($)", "b\na", "y", R"($-[0])", "3"); + test(regex_10, "10", R"('\Z'm)", "a\nb\n", "y", R"($-[0])", "3"); + test(regex_11, "11", R"('\z'm)", "a\nb\n", "y", R"($-[0])", "4"); + test(regex_12, "12", R"('$'m)", "a\nb\n", "y", R"($-[0])", "1"); + test(regex_13, "13", R"('\Z'm)", "b\na\n", "y", R"($-[0])", "3"); + test(regex_14, "14", R"('\z'm)", "b\na\n", "y", R"($-[0])", "4"); + test(regex_15, "15", R"('$'m)", "b\na\n", "y", R"($-[0])", "1"); + test(regex_16, "16", R"('\Z'm)", "b\na", "y", R"($-[0])", "3"); + test(regex_17, "17", R"('\z'm)", "b\na", "y", R"($-[0])", "3"); + test(regex_18, "18", R"('$'m)", "b\na", "y", R"($-[0])", "1"); + test(regex_19, "19", R"(a\Z)", "a\nb\n", "n", R"(-)", "-"); + test(regex_20, "20", R"(a\z)", "a\nb\n", "n", R"(-)", "-"); + test(regex_21, "21", R"(a$)", "a\nb\n", "n", R"(-)", "-"); + test(regex_22, "22", R"(a\Z)", "b\na\n", "y", R"($-[0])", "2"); + test(regex_23, "23", R"(a\z)", "b\na\n", "n", R"(-)", "-"); + test(regex_24, "24", R"(a$)", "b\na\n", "y", R"($-[0])", "2"); + test(regex_25, "25", R"(a\Z)", "b\na", "y", R"($-[0])", "2"); + test(regex_26, "26", R"(a\z)", "b\na", "y", R"($-[0])", "2"); + test(regex_27, "27", R"(a$)", "b\na", "y", R"($-[0])", "2"); + test(regex_28, "28", R"('a\Z'm)", "a\nb\n", "n", R"(-)", "-"); + test(regex_29, "29", R"('a\z'm)", "a\nb\n", "n", R"(-)", "-"); + test(regex_30, "30", R"('a$'m)", "a\nb\n", "y", R"($-[0])", "0"); + test(regex_31, "31", R"('a\Z'm)", "b\na\n", "y", R"($-[0])", "2"); + test(regex_32, "32", R"('a\z'm)", "b\na\n", "n", R"(-)", "-"); + test(regex_33, "33", R"('a$'m)", "b\na\n", "y", R"($-[0])", "2"); + test(regex_34, "34", R"('a\Z'm)", "b\na", "y", R"($-[0])", "2"); + test(regex_35, "35", R"('a\z'm)", "b\na", "y", R"($-[0])", "2"); + test(regex_36, "36", R"('a$'m)", "b\na", "y", R"($-[0])", "2"); + test(regex_37, "37", R"(aa\Z)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_38, "38", R"(aa\z)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_39, "39", R"(aa$)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_40, "40", R"(aa\Z)", "b\naa\n", "y", R"($-[0])", "2"); + test(regex_41, "41", R"(aa\z)", "b\naa\n", "n", R"(-)", "-"); + test(regex_42, "42", R"(aa$)", "b\naa\n", "y", R"($-[0])", "2"); + test(regex_43, "43", R"(aa\Z)", "b\naa", "y", R"($-[0])", "2"); + test(regex_44, "44", R"(aa\z)", "b\naa", "y", R"($-[0])", "2"); + test(regex_45, "45", R"(aa$)", "b\naa", "y", R"($-[0])", "2"); + test(regex_46, "46", R"('aa\Z'm)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_47, "47", R"('aa\z'm)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_48, "48", R"('aa$'m)", "aa\nb\n", "y", R"($-[0])", "0"); + test(regex_49, "49", R"('aa\Z'm)", "b\naa\n", "y", R"($-[0])", "2"); + test(regex_50, "50", R"('aa\z'm)", "b\naa\n", "n", R"(-)", "-"); + test(regex_51, "51", R"('aa$'m)", "b\naa\n", "y", R"($-[0])", "2"); + test(regex_52, "52", R"('aa\Z'm)", "b\naa", "y", R"($-[0])", "2"); + test(regex_53, "53", R"('aa\z'm)", "b\naa", "y", R"($-[0])", "2"); + test(regex_54, "54", R"('aa$'m)", "b\naa", "y", R"($-[0])", "2"); + test(regex_55, "55", R"(aa\Z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_56, "56", R"(aa\z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_57, "57", R"(aa$)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_58, "58", R"(aa\Z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_59, "59", R"(aa\z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_60, "60", R"(aa$)", "b\nac\n", "n", R"(-)", "-"); + test(regex_61, "61", R"(aa\Z)", "b\nac", "n", R"(-)", "-"); + test(regex_62, "62", R"(aa\z)", "b\nac", "n", R"(-)", "-"); + test(regex_63, "63", R"(aa$)", "b\nac", "n", R"(-)", "-"); + test(regex_64, "64", R"('aa\Z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_65, "65", R"('aa\z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_66, "66", R"('aa$'m)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_67, "67", R"('aa\Z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_68, "68", R"('aa\z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_69, "69", R"('aa$'m)", "b\nac\n", "n", R"(-)", "-"); + test(regex_70, "70", R"('aa\Z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_71, "71", R"('aa\z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_72, "72", R"('aa$'m)", "b\nac", "n", R"(-)", "-"); + test(regex_73, "73", R"(aa\Z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_74, "74", R"(aa\z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_75, "75", R"(aa$)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_76, "76", R"(aa\Z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_77, "77", R"(aa\z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_78, "78", R"(aa$)", "b\nca\n", "n", R"(-)", "-"); + test(regex_79, "79", R"(aa\Z)", "b\nca", "n", R"(-)", "-"); + test(regex_80, "80", R"(aa\z)", "b\nca", "n", R"(-)", "-"); + test(regex_81, "81", R"(aa$)", "b\nca", "n", R"(-)", "-"); + test(regex_82, "82", R"('aa\Z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_83, "83", R"('aa\z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_84, "84", R"('aa$'m)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_85, "85", R"('aa\Z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_86, "86", R"('aa\z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_87, "87", R"('aa$'m)", "b\nca\n", "n", R"(-)", "-"); + test(regex_88, "88", R"('aa\Z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_89, "89", R"('aa\z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_90, "90", R"('aa$'m)", "b\nca", "n", R"(-)", "-"); + test(regex_91, "91", R"(ab\Z)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_92, "92", R"(ab\z)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_93, "93", R"(ab$)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_94, "94", R"(ab\Z)", "b\nab\n", "y", R"($-[0])", "2"); + test(regex_95, "95", R"(ab\z)", "b\nab\n", "n", R"(-)", "-"); + test(regex_96, "96", R"(ab$)", "b\nab\n", "y", R"($-[0])", "2"); + test(regex_97, "97", R"(ab\Z)", "b\nab", "y", R"($-[0])", "2"); + test(regex_98, "98", R"(ab\z)", "b\nab", "y", R"($-[0])", "2"); + test(regex_99, "99", R"(ab$)", "b\nab", "y", R"($-[0])", "2"); + test(regex_100, "100", R"('ab\Z'm)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_101, "101", R"('ab\z'm)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_102, "102", R"('ab$'m)", "ab\nb\n", "y", R"($-[0])", "0"); + test(regex_103, "103", R"('ab\Z'm)", "b\nab\n", "y", R"($-[0])", "2"); + test(regex_104, "104", R"('ab\z'm)", "b\nab\n", "n", R"(-)", "-"); + test(regex_105, "105", R"('ab$'m)", "b\nab\n", "y", R"($-[0])", "2"); + test(regex_106, "106", R"('ab\Z'm)", "b\nab", "y", R"($-[0])", "2"); + test(regex_107, "107", R"('ab\z'm)", "b\nab", "y", R"($-[0])", "2"); + test(regex_108, "108", R"('ab$'m)", "b\nab", "y", R"($-[0])", "2"); + test(regex_109, "109", R"(ab\Z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_110, "110", R"(ab\z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_111, "111", R"(ab$)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_112, "112", R"(ab\Z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_113, "113", R"(ab\z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_114, "114", R"(ab$)", "b\nac\n", "n", R"(-)", "-"); + test(regex_115, "115", R"(ab\Z)", "b\nac", "n", R"(-)", "-"); + test(regex_116, "116", R"(ab\z)", "b\nac", "n", R"(-)", "-"); + test(regex_117, "117", R"(ab$)", "b\nac", "n", R"(-)", "-"); + test(regex_118, "118", R"('ab\Z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_119, "119", R"('ab\z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_120, "120", R"('ab$'m)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_121, "121", R"('ab\Z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_122, "122", R"('ab\z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_123, "123", R"('ab$'m)", "b\nac\n", "n", R"(-)", "-"); + test(regex_124, "124", R"('ab\Z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_125, "125", R"('ab\z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_126, "126", R"('ab$'m)", "b\nac", "n", R"(-)", "-"); + test(regex_127, "127", R"(ab\Z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_128, "128", R"(ab\z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_129, "129", R"(ab$)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_130, "130", R"(ab\Z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_131, "131", R"(ab\z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_132, "132", R"(ab$)", "b\nca\n", "n", R"(-)", "-"); + test(regex_133, "133", R"(ab\Z)", "b\nca", "n", R"(-)", "-"); + test(regex_134, "134", R"(ab\z)", "b\nca", "n", R"(-)", "-"); + test(regex_135, "135", R"(ab$)", "b\nca", "n", R"(-)", "-"); + test(regex_136, "136", R"('ab\Z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_137, "137", R"('ab\z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_138, "138", R"('ab$'m)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_139, "139", R"('ab\Z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_140, "140", R"('ab\z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_141, "141", R"('ab$'m)", "b\nca\n", "n", R"(-)", "-"); + test(regex_142, "142", R"('ab\Z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_143, "143", R"('ab\z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_144, "144", R"('ab$'m)", "b\nca", "n", R"(-)", "-"); + test(regex_145, "145", R"(abb\Z)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_146, "146", R"(abb\z)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_147, "147", R"(abb$)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_148, "148", R"(abb\Z)", "b\nabb\n", "y", R"($-[0])", "2"); + test(regex_149, "149", R"(abb\z)", "b\nabb\n", "n", R"(-)", "-"); + test(regex_150, "150", R"(abb$)", "b\nabb\n", "y", R"($-[0])", "2"); + test(regex_151, "151", R"(abb\Z)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_152, "152", R"(abb\z)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_153, "153", R"(abb$)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_154, "154", R"('abb\Z'm)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_155, "155", R"('abb\z'm)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_156, "156", R"('abb$'m)", "abb\nb\n", "y", R"($-[0])", "0"); + test(regex_157, "157", R"('abb\Z'm)", "b\nabb\n", "y", R"($-[0])", "2"); + test(regex_158, "158", R"('abb\z'm)", "b\nabb\n", "n", R"(-)", "-"); + test(regex_159, "159", R"('abb$'m)", "b\nabb\n", "y", R"($-[0])", "2"); + test(regex_160, "160", R"('abb\Z'm)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_161, "161", R"('abb\z'm)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_162, "162", R"('abb$'m)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_163, "163", R"(abb\Z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_164, "164", R"(abb\z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_165, "165", R"(abb$)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_166, "166", R"(abb\Z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_167, "167", R"(abb\z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_168, "168", R"(abb$)", "b\nac\n", "n", R"(-)", "-"); + test(regex_169, "169", R"(abb\Z)", "b\nac", "n", R"(-)", "-"); + test(regex_170, "170", R"(abb\z)", "b\nac", "n", R"(-)", "-"); + test(regex_171, "171", R"(abb$)", "b\nac", "n", R"(-)", "-"); + test(regex_172, "172", R"('abb\Z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_173, "173", R"('abb\z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_174, "174", R"('abb$'m)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_175, "175", R"('abb\Z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_176, "176", R"('abb\z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_177, "177", R"('abb$'m)", "b\nac\n", "n", R"(-)", "-"); + test(regex_178, "178", R"('abb\Z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_179, "179", R"('abb\z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_180, "180", R"('abb$'m)", "b\nac", "n", R"(-)", "-"); + test(regex_181, "181", R"(abb\Z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_182, "182", R"(abb\z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_183, "183", R"(abb$)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_184, "184", R"(abb\Z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_185, "185", R"(abb\z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_186, "186", R"(abb$)", "b\nca\n", "n", R"(-)", "-"); + test(regex_187, "187", R"(abb\Z)", "b\nca", "n", R"(-)", "-"); + test(regex_188, "188", R"(abb\z)", "b\nca", "n", R"(-)", "-"); + test(regex_189, "189", R"(abb$)", "b\nca", "n", R"(-)", "-"); + test(regex_190, "190", R"('abb\Z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_191, "191", R"('abb\z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_192, "192", R"('abb$'m)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_193, "193", R"('abb\Z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_194, "194", R"('abb\z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_195, "195", R"('abb$'m)", "b\nca\n", "n", R"(-)", "-"); + test(regex_196, "196", R"('abb\Z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_197, "197", R"('abb\z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_198, "198", R"('abb$'m)", "b\nca", "n", R"(-)", "-"); + test(regex_199, "199", R"('\Aa$'m)", "a\n\n", "y", R"($&)", "a"); + std::cout << std::endl; + } +} +main: () = { + test_tests_14_multiline_modifier().run(); +} diff --git a/regression-tests/pure2-regex_15_group_modifiers.cpp2 b/regression-tests/pure2-regex_15_group_modifiers.cpp2 new file mode 100644 index 0000000000..d0db986c9f --- /dev/null +++ b/regression-tests/pure2-regex_15_group_modifiers.cpp2 @@ -0,0 +1,267 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_15_group_modifiers: @regex type = { + regex_01 := R"((?:(?i)a)b)"; + regex_02 := R"(((?i)a)b)"; + regex_03 := R"((?:(?i)a)b)"; + regex_04 := R"(((?i)a)b)"; + regex_05 := R"((?:(?i)a)b)"; + regex_06 := R"(((?i)a)b)"; + regex_07 := R"((?i:a)b)"; + regex_08 := R"(((?i:a))b)"; + regex_09 := R"((?i:a)b)"; + regex_10 := R"(((?i:a))b)"; + regex_11 := R"((?i:a)b)"; + regex_12 := R"(((?i:a))b)"; + regex_13 := R"('(?:(?-i)a)b'i)"; + regex_14 := R"('((?-i)a)b'i)"; + regex_15 := R"('(?:(?-i)a)b'i)"; + regex_16 := R"('((?-i)a)b'i)"; + regex_17 := R"('(?:(?-i)a)b'i)"; + regex_18 := R"('((?-i)a)b'i)"; + regex_19 := R"('(?:(?-i)a)b'i)"; + regex_20 := R"('((?-i)a)b'i)"; + regex_21 := R"('(?:(?-i)a)b'i)"; + regex_22 := R"('((?-i)a)b'i)"; + regex_23 := R"('(?-i:a)b'i)"; + regex_24 := R"('((?-i:a))b'i)"; + regex_25 := R"('(?-i:a)b'i)"; + regex_26 := R"('((?-i:a))b'i)"; + regex_27 := R"('(?-i:a)b'i)"; + regex_28 := R"('((?-i:a))b'i)"; + regex_29 := R"('(?-i:a)b'i)"; + regex_30 := R"('((?-i:a))b'i)"; + regex_31 := R"('(?-i:a)b'i)"; + regex_32 := R"('((?-i:a))b'i)"; + regex_33 := R"('((?-i:a.))b'i)"; + regex_34 := R"('((?-i:a\N))b'i)"; + regex_35 := R"('((?s-i:a.))b'i)"; + regex_36 := R"('((?s-i:a\N))b'i)"; + regex_37 := R"('((?s-i:a.))b'i)"; + regex_38 := R"('((?s-i:a\N))b'i)"; + regex_39 := R"((?i:.[b].))"; + regex_40 := R"((?i:\N[b]\N))"; + regex_41 := R"(^(?:a?b?)*$)"; + regex_42 := R"(((?s)^a(.))((?m)^b$))"; + regex_43 := R"(((?m)^b$))"; + regex_44 := R"((?m)^b)"; + regex_45 := R"((?m)^(b))"; + regex_46 := R"(((?m)^b))"; + regex_47 := R"(\n((?m)^b))"; + regex_48 := R"(^b)"; + regex_49 := R"(()^b)"; + regex_50 := R"(((?m)^b))"; + regex_51 := R"('(foo)'n)"; + regex_52 := R"('(?-n)(foo)(?n)(bar)'n)"; + regex_53 := R"('(?-n:(foo)(?n:(bar)))'n)"; + run: (this) = { + std::cout << "Running tests_15_group_modifiers:"<< std::endl; + test(regex_01, "01", R"((?:(?i)a)b)", "ab", "y", R"($&)", "ab"); + test(regex_02, "02", R"(((?i)a)b)", "ab", "y", R"($&:$1)", "ab:a"); + test(regex_03, "03", R"((?:(?i)a)b)", "Ab", "y", R"($&)", "Ab"); + test(regex_04, "04", R"(((?i)a)b)", "Ab", "y", R"($&:$1)", "Ab:A"); + test(regex_05, "05", R"((?:(?i)a)b)", "aB", "n", R"(-)", "-"); + test(regex_06, "06", R"(((?i)a)b)", "aB", "n", R"(-)", "-"); + test(regex_07, "07", R"((?i:a)b)", "ab", "y", R"($&)", "ab"); + test(regex_08, "08", R"(((?i:a))b)", "ab", "y", R"($&:$1)", "ab:a"); + test(regex_09, "09", R"((?i:a)b)", "Ab", "y", R"($&)", "Ab"); + test(regex_10, "10", R"(((?i:a))b)", "Ab", "y", R"($&:$1)", "Ab:A"); + test(regex_11, "11", R"((?i:a)b)", "aB", "n", R"(-)", "-"); + test(regex_12, "12", R"(((?i:a))b)", "aB", "n", R"(-)", "-"); + test(regex_13, "13", R"('(?:(?-i)a)b'i)", "ab", "y", R"($&)", "ab"); + test(regex_14, "14", R"('((?-i)a)b'i)", "ab", "y", R"($&:$1)", "ab:a"); + test(regex_15, "15", R"('(?:(?-i)a)b'i)", "aB", "y", R"($&)", "aB"); + test(regex_16, "16", R"('((?-i)a)b'i)", "aB", "y", R"($&:$1)", "aB:a"); + test(regex_17, "17", R"('(?:(?-i)a)b'i)", "Ab", "n", R"(-)", "-"); + test(regex_18, "18", R"('((?-i)a)b'i)", "Ab", "n", R"(-)", "-"); + test(regex_19, "19", R"('(?:(?-i)a)b'i)", "aB", "y", R"($&)", "aB"); + test(regex_20, "20", R"('((?-i)a)b'i)", "aB", "y", R"($1)", "a"); + test(regex_21, "21", R"('(?:(?-i)a)b'i)", "AB", "n", R"(-)", "-"); + test(regex_22, "22", R"('((?-i)a)b'i)", "AB", "n", R"(-)", "-"); + test(regex_23, "23", R"('(?-i:a)b'i)", "ab", "y", R"($&)", "ab"); + test(regex_24, "24", R"('((?-i:a))b'i)", "ab", "y", R"($&:$1)", "ab:a"); + test(regex_25, "25", R"('(?-i:a)b'i)", "aB", "y", R"($&)", "aB"); + test(regex_26, "26", R"('((?-i:a))b'i)", "aB", "y", R"($&:$1)", "aB:a"); + test(regex_27, "27", R"('(?-i:a)b'i)", "Ab", "n", R"(-)", "-"); + test(regex_28, "28", R"('((?-i:a))b'i)", "Ab", "n", R"(-)", "-"); + test(regex_29, "29", R"('(?-i:a)b'i)", "aB", "y", R"($&)", "aB"); + test(regex_30, "30", R"('((?-i:a))b'i)", "aB", "y", R"($1)", "a"); + test(regex_31, "31", R"('(?-i:a)b'i)", "AB", "n", R"(-)", "-"); + test(regex_32, "32", R"('((?-i:a))b'i)", "AB", "n", R"(-)", "-"); + test(regex_33, "33", R"('((?-i:a.))b'i)", "a\nB", "n", R"(-)", "-"); + test(regex_34, "34", R"('((?-i:a\N))b'i)", "a\nB", "n", R"(-)", "-"); + test(regex_35, "35", R"('((?s-i:a.))b'i)", "a\nB", "y", R"($1)", "a\n"); + test(regex_36, "36", R"('((?s-i:a\N))b'i)", "a\nB", "n", R"(-)", "-"); + test(regex_37, "37", R"('((?s-i:a.))b'i)", "B\nB", "n", R"(-)", "-"); + test(regex_38, "38", R"('((?s-i:a\N))b'i)", "B\nB", "n", R"(-)", "-"); + test(regex_39, "39", R"((?i:.[b].))", "abd", "y", R"($&)", "abd"); + test(regex_40, "40", R"((?i:\N[b]\N))", "abd", "y", R"($&)", "abd"); + test(regex_41, "41", R"(^(?:a?b?)*$)", "a--", "n", R"(-)", "-"); + test(regex_42, "42", R"(((?s)^a(.))((?m)^b$))", "a\nb\nc\n", "y", R"($1;$2;$3)", "a\n;\n;b"); + test(regex_43, "43", R"(((?m)^b$))", "a\nb\nc\n", "y", R"($1)", "b"); + test(regex_44, "44", R"((?m)^b)", "a\nb\n", "y", R"($&)", "b"); + test(regex_45, "45", R"((?m)^(b))", "a\nb\n", "y", R"($1)", "b"); + test(regex_46, "46", R"(((?m)^b))", "a\nb\n", "y", R"($1)", "b"); + test(regex_47, "47", R"(\n((?m)^b))", "a\nb\n", "y", R"($1)", "b"); + test(regex_48, "48", R"(^b)", "a\nb\nc\n", "n", R"(-)", "-"); + test(regex_49, "49", R"(()^b)", "a\nb\nc\n", "n", R"(-)", "-"); + test(regex_50, "50", R"(((?m)^b))", "a\nb\nc\n", "y", R"($1)", "b"); + test(regex_51, "51", R"('(foo)'n)", "foobar", "y", R"($&-$1)", "foo-"); + test(regex_52, "52", R"('(?-n)(foo)(?n)(bar)'n)", "foobar", "y", R"($&-$1-$2)", "foobar-foo-"); + test(regex_53, "53", R"('(?-n:(foo)(?n:(bar)))'n)", "foobar", "y", R"($&-$1-$2)", "foobar-foo-"); + std::cout << std::endl; + } +} +main: () = { + test_tests_15_group_modifiers().run(); +} diff --git a/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2 b/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2 new file mode 100644 index 0000000000..c586d1fc01 --- /dev/null +++ b/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2 @@ -0,0 +1,227 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_16_perl_syntax_modifier: @regex type = { + regex_01 := R"(/\N {1}/x)"; + regex_02 := R"(/\N {1}/x)"; + regex_03 := R"(/\N {1}/x)"; + regex_04 := R"(/\N {3,4}/x)"; + regex_05 := R"(/\N {3,4}/x)"; + regex_06 := R"(/\N {3,4}/x)"; + regex_07 := R"(/a\N c/x)"; + regex_08 := R"(/a\N *c/x)"; + regex_09 := R"(/a\N *c/x)"; + regex_10 := R"(/[a b]/x)"; + regex_11 := R"(/[a b]/xx)"; + regex_12 := R"(/[a\ b]/xx)"; + regex_13 := R"(/[ ^ a b ]/xx)"; + regex_14 := R"(/[ ^ a b ]/xx)"; + regex_15 := R"(/[ ^ a b ]/xx)"; + regex_16 := R"(/(?x:[a b])/xx)"; + regex_17 := R"(/(?xx:[a b])/x)"; + regex_18 := R"(/(?x)[a b]/xx)"; + regex_19 := R"(/(?xx)[a b]/x)"; + regex_20 := R"(/(?-x:[a b])/xx)"; + regex_21 := R"(/\N {1}/x)"; + regex_22 := R"(/\N {1}/x)"; + regex_23 := R"(/\N {1}/x)"; + regex_24 := R"(/\N {3,4}/x)"; + regex_25 := R"(/\N {3,4}/x)"; + regex_26 := R"(/\N {3,4}/x)"; + regex_27 := R"(/a\N c/x)"; + regex_28 := R"(/a\N *c/x)"; + regex_29 := R"(/a\N *c/x)"; + regex_30 := R"(/[#]/)"; + regex_31 := R"(/[#]b/)"; + regex_32 := R"(/[#]/x)"; + regex_33 := R"(/[#]b/x)"; + run: (this) = { + std::cout << "Running tests_16_perl_syntax_modifier:"<< std::endl; + test(regex_01, "01", R"(/\N {1}/x)", "abbbbc", "y", R"($&)", "a"); + test(regex_02, "02", R"(/\N {1}/x)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_03, "03", R"(/\N {1}/x)", "abbbbc", "y", R"($+[0])", "1"); + test(regex_04, "04", R"(/\N {3,4}/x)", "abbbbc", "y", R"($&)", "abbb"); + test(regex_05, "05", R"(/\N {3,4}/x)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_06, "06", R"(/\N {3,4}/x)", "abbbbc", "y", R"($+[0])", "4"); + test(regex_07, "07", R"(/a\N c/x)", "abc", "y", R"($&)", "abc"); + test(regex_08, "08", R"(/a\N *c/x)", "axyzc", "y", R"($&)", "axyzc"); + test(regex_09, "09", R"(/a\N *c/x)", "axyzd", "n", R"(-)", "-"); + test(regex_10, "10", R"(/[a b]/x)", " ", "yS", R"($&)", " "); + test(regex_11, "11", R"(/[a b]/xx)", " ", "n", R"(-)", "-"); + test(regex_12, "12", R"(/[a\ b]/xx)", " ", "y", R"($&)", " "); + test(regex_13, "13", R"(/[ ^ a b ]/xx)", "a", "n", R"(-)", "-"); + test(regex_14, "14", R"(/[ ^ a b ]/xx)", "b", "n", R"(-)", "-"); + test(regex_15, "15", R"(/[ ^ a b ]/xx)", "A", "y", R"($&)", "A"); + test(regex_16, "16", R"(/(?x:[a b])/xx)", " ", "yS", R"($&)", " "); + test(regex_17, "17", R"(/(?xx:[a b])/x)", " ", "n", R"(-)", "-"); + test(regex_18, "18", R"(/(?x)[a b]/xx)", " ", "yS", R"($&)", " "); + test(regex_19, "19", R"(/(?xx)[a b]/x)", " ", "n", R"(-)", "-"); + test(regex_20, "20", R"(/(?-x:[a b])/xx)", " ", "yS", R"($&)", " "); + test(regex_21, "21", R"(/\N {1}/x)", "abbbbc", "y", R"($&)", "a"); + test(regex_22, "22", R"(/\N {1}/x)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_23, "23", R"(/\N {1}/x)", "abbbbc", "y", R"($+[0])", "1"); + test(regex_24, "24", R"(/\N {3,4}/x)", "abbbbc", "y", R"($&)", "abbb"); + test(regex_25, "25", R"(/\N {3,4}/x)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_26, "26", R"(/\N {3,4}/x)", "abbbbc", "y", R"($+[0])", "4"); + test(regex_27, "27", R"(/a\N c/x)", "abc", "y", R"($&)", "abc"); + test(regex_28, "28", R"(/a\N *c/x)", "axyzc", "y", R"($&)", "axyzc"); + test(regex_29, "29", R"(/a\N *c/x)", "axyzd", "n", R"(-)", "-"); + test(regex_30, "30", R"(/[#]/)", "a#b", "y", R"($&)", "#"); + test(regex_31, "31", R"(/[#]b/)", "a#b", "y", R"($&)", "#b"); + test(regex_32, "32", R"(/[#]/x)", "a#b", "y", R"($&)", "#"); + test(regex_33, "33", R"(/[#]b/x)", "a#b", "y", R"($&)", "#b"); + std::cout << std::endl; + } +} +main: () = { + test_tests_16_perl_syntax_modifier().run(); +} diff --git a/regression-tests/pure2-regex_17_comments.cpp2 b/regression-tests/pure2-regex_17_comments.cpp2 new file mode 100644 index 0000000000..00c3c96a9d --- /dev/null +++ b/regression-tests/pure2-regex_17_comments.cpp2 @@ -0,0 +1,167 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_17_comments: @regex type = { + regex_01 := R"(^a(?#xxx){3}c)"; + regex_02 := R"('^a (?#xxx) (?#yyy) {3}c'x)"; + regex_03 := R"('foo # Match foo'x)"; + run: (this) = { + std::cout << "Running tests_17_comments:"<< std::endl; + test(regex_01, "01", R"(^a(?#xxx){3}c)", "aaac", "y", R"($&)", "aaac"); + test(regex_02, "02", R"('^a (?#xxx) (?#yyy) {3}c'x)", "aaac", "y", R"($&)", "aaac"); + test(regex_03, "03", R"('foo # Match foo'x)", "foobar", "y", R"($&)", "foo"); + std::cout << std::endl; + } +} +main: () = { + test_tests_17_comments().run(); +} diff --git a/regression-tests/pure2-regex_18_branch_reset.cpp2 b/regression-tests/pure2-regex_18_branch_reset.cpp2 new file mode 100644 index 0000000000..7d79aec1a6 --- /dev/null +++ b/regression-tests/pure2-regex_18_branch_reset.cpp2 @@ -0,0 +1,191 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_18_branch_reset: @regex type = { + regex_01 := R"((?|(a)))"; + regex_02 := R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; + regex_03 := R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; + regex_04 := R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; + regex_05 := R"((?|(?|(a)|(b))|(?|(c)|(d))))"; + regex_06 := R"((?|(?|(a)|(b))|(?|(c)|(d))))"; + regex_07 := R"((?|(?|(a)|(b))|(?|(c)|(d))))"; + regex_08 := R"((?|(?|(a)|(b))|(?|(c)|(d))))"; + regex_09 := R"((.)(?|(.)(.)x|(.)d)(.))"; + regex_10 := R"((\N)(?|(\N)(\N)x|(\N)d)(\N))"; + regex_11 := R"((?|(?x)))"; + regex_12 := R"((?|(?x)|(?y)))"; + regex_13 := R"((?|(?y)|(?x)))"; + regex_14 := R"((?)(?|(?x)))"; + regex_15 := R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))"; + run: (this) = { + std::cout << "Running tests_18_branch_reset:"<< std::endl; + test(regex_01, "01", R"((?|(a)))", "a", "y", R"($1-$+)", "a-a"); + test(regex_02, "02", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "d!o!da", "y", R"($1-$2-$3)", "!o!-o-a"); + test(regex_03, "03", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "aabc", "y", R"($1-$2-$3)", "a--c"); + test(regex_04, "04", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "ixyjp", "y", R"($1-$2-$3)", "x-y-p"); + test(regex_05, "05", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "a", "y", R"($1)", "a"); + test(regex_06, "06", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "b", "y", R"($1)", "b"); + test(regex_07, "07", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "c", "y", R"($1)", "c"); + test(regex_08, "08", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "d", "y", R"($1)", "d"); + test(regex_09, "09", R"((.)(?|(.)(.)x|(.)d)(.))", "abcde", "y", R"($1-$2-$3-$4-$5-)", "b-c--e--"); + test(regex_10, "10", R"((\N)(?|(\N)(\N)x|(\N)d)(\N))", "abcde", "y", R"($1-$2-$3-$4-$5-)", "b-c--e--"); + test(regex_11, "11", R"((?|(?x)))", "x", "yM", R"($+{foo})", "x"); + test(regex_12, "12", R"((?|(?x)|(?y)))", "x", "yM", R"($+{foo})", "x"); + test(regex_13, "13", R"((?|(?y)|(?x)))", "x", "yM", R"($+{foo})", "x"); + test(regex_14, "14", R"((?)(?|(?x)))", "x", "yM", R"($+{foo})", "x"); + test(regex_15, "15", R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))", "a", "y", R"($&)", "a"); + std::cout << std::endl; + } +} +main: () = { + test_tests_18_branch_reset().run(); +} diff --git a/regression-tests/pure2-regex_19_lookahead.cpp2 b/regression-tests/pure2-regex_19_lookahead.cpp2 new file mode 100644 index 0000000000..209d0eb8d4 --- /dev/null +++ b/regression-tests/pure2-regex_19_lookahead.cpp2 @@ -0,0 +1,251 @@ +create_result: (resultExpr: std::string, r) -> std::string = { + result: std::string = ""; + + get_next := :(iter) -> _ = { + start := std::distance(resultExpr&$*.cbegin(), iter); + firstDollar := resultExpr&$*.find("$", start); + firstAt := resultExpr&$*.find("@", start); + + end := std::min(firstDollar, firstAt); + if end != std::string::npos { + return resultExpr&$*.cbegin() + end; + } + else { + return resultExpr&$*.cend(); + } + }; + extract_group_and_advance := :(inout iter) -> _ = { + start := iter; + + while std::isdigit(iter*) next iter++ {} + + return std::stoi(std::string(start, iter)); + }; + extract_until := :(inout iter, to: char) -> _ = { + start := iter; + + while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(start, iter); + }; + + iter := resultExpr.begin(); + + while iter != resultExpr.end() { + next := get_next(iter); + + if next != iter { + result += std::string(iter, next); + } + if next != resultExpr.end() { + if next* == '$' { + next++; + + if next* == '&' { + next++; + result += r.group(0); + } + else if next* == '-' || next* == '+' { + is_start := next* == '-'; + next++; + if next* == '{' { + next++; // Skip { + group := extract_until(next, '}'); + next++; // Skip } + result += r.group(group); + } + else if next* == '[' { + next++; // Skip [ + group := extract_group_and_advance(next); + next++; // Skip ] + + if is_start { + result += std::to_string(r.group_start(group)); + } + else { + result += std::to_string(r.group_end(group)); + } + } + else { + // Return max group + result += r.group(r.group_number() - 1); + } + } + else if std::isdigit(next*) { + group := extract_group_and_advance(next); + result += r.group(group); + } + else { + std::cerr << "Not implemented"; + } + } + else if next* == '@' { + next++; + + if next* == '-' || next* == '+' { + i := 0; + while i < cpp2::unsafe_narrow(r.group_number()) next i++ { + pos := 0; + if next* == '-' { + pos = r.group_start(i); + } + else { + pos = r.group_end(i); + } + result += std::to_string(pos); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + } + } + iter = next; + } + + return result; +} + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string, + resultExpected: std::string) = { + + warning: std::string = ""; + if regex.to_string() != regex_str { + warning = "Warning: Parsed regex does not match."; + } + + status: std::string = "OK"; + + r := regex.search(str); + + if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind { + if !r.matched { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + result := create_result(resultExpr, r); + + if result != resultExpected { + status = "Failure: Result is wrong. (is: (result)$)"; + } + } + } + else if "n" == kind { + if r.matched { + status = "Failure: Regex should not apply. Result is '(r.group(0))$'"; + } + } else { + status = "Unknown kind '(kind)$'"; + } + + if !warning.empty() { + warning += " "; + } + std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl; +} + + +test_tests_19_lookahead: @regex type = { + regex_01 := R"(a(?!b).)"; + regex_02 := R"((?=)a)"; + regex_03 := R"(a(?=d).)"; + regex_04 := R"(a(?=c|d).)"; + regex_05 := R"(^(?:b|a(?=(.)))*\1)"; + regex_06 := R"((?=(a+?))(\1ab))"; + regex_07 := R"(^(?=(a+?))\1ab)"; + regex_08 := R"((?=(a+?))(\1ab))"; + regex_09 := R"(^(?=(a+?))\1ab)"; + regex_10 := R"((.*)(?=c))"; + regex_11 := R"((.*)(?=c)c)"; + regex_12 := R"((.*)(?=b|c))"; + regex_13 := R"((.*)(?=b|c)c)"; + regex_14 := R"((.*)(?=c|b))"; + regex_15 := R"((.*)(?=c|b)c)"; + regex_16 := R"((.*)(?=[bc]))"; + regex_17 := R"((.*)(?=[bc])c)"; + regex_18 := R"((.*?)(?=c))"; + regex_19 := R"((.*?)(?=c)c)"; + regex_20 := R"((.*?)(?=b|c))"; + regex_21 := R"((.*?)(?=b|c)c)"; + regex_22 := R"((.*?)(?=c|b))"; + regex_23 := R"((.*?)(?=c|b)c)"; + regex_24 := R"((.*?)(?=[bc]))"; + regex_25 := R"((.*?)(?=[bc])c)"; + regex_26 := R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))"; + regex_27 := R"(a(?!b(?!c))(..))"; + regex_28 := R"(a(?!b(?=a))(..))"; + regex_37 := R"(X(\w+)(?=\s)|X(\w+))"; + regex_38 := R"(^a*(?=b)b)"; + regex_39 := R"('(?!\A)x'm)"; + regex_40 := R"('^(o)(?!.*\1)'i)"; + regex_41 := R"(.*a(?!(b|cd)*e).*f)"; + regex_42 := R"(^(a*?)(?!(aa|aaaa)*$))"; + regex_43 := R"((?!)+?|(.{2,4}))"; + regex_44 := R"(^(a*?)(?!(a{6}|a{5})*$))"; + regex_45 := R"(a(?!b(?!c(?!d(?!e))))...(.))"; + regex_46 := R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)"; + regex_47 := R"(((?s).)c(?!.))"; + regex_48 := R"(((?s).)c(?!.))"; + regex_49 := R"(((?s)b.)c(?!.))"; + regex_50 := R"(((?s)b.)c(?!.))"; + regex_51 := R"(((?s)b.)c(?!\N))"; + regex_52 := R"('(b.)c(?!\N)'s)"; + regex_53 := R"(a*(?!))"; + run: (this) = { + std::cout << "Running tests_19_lookahead:"<< std::endl; + test(regex_01, "01", R"(a(?!b).)", "abad", "y", R"($&)", "ad"); + test(regex_02, "02", R"((?=)a)", "a", "y", R"($&)", "a"); + test(regex_03, "03", R"(a(?=d).)", "abad", "y", R"($&)", "ad"); + test(regex_04, "04", R"(a(?=c|d).)", "abad", "y", R"($&)", "ad"); + test(regex_05, "05", R"(^(?:b|a(?=(.)))*\1)", "abc", "y", R"($&)", "ab"); + test(regex_06, "06", R"((?=(a+?))(\1ab))", "aaab", "y", R"($2)", "aab"); + test(regex_07, "07", R"(^(?=(a+?))\1ab)", "aaab", "n", R"(-)", "-"); + test(regex_08, "08", R"((?=(a+?))(\1ab))", "aaab", "y", R"($2)", "aab"); + test(regex_09, "09", R"(^(?=(a+?))\1ab)", "aaab", "n", R"(-)", "-"); + test(regex_10, "10", R"((.*)(?=c))", "abcd", "y", R"($1)", "ab"); + test(regex_11, "11", R"((.*)(?=c)c)", "abcd", "yB", R"($1)", "ab"); + test(regex_12, "12", R"((.*)(?=b|c))", "abcd", "y", R"($1)", "ab"); + test(regex_13, "13", R"((.*)(?=b|c)c)", "abcd", "y", R"($1)", "ab"); + test(regex_14, "14", R"((.*)(?=c|b))", "abcd", "y", R"($1)", "ab"); + test(regex_15, "15", R"((.*)(?=c|b)c)", "abcd", "y", R"($1)", "ab"); + test(regex_16, "16", R"((.*)(?=[bc]))", "abcd", "y", R"($1)", "ab"); + test(regex_17, "17", R"((.*)(?=[bc])c)", "abcd", "yB", R"($1)", "ab"); + test(regex_18, "18", R"((.*?)(?=c))", "abcd", "y", R"($1)", "ab"); + test(regex_19, "19", R"((.*?)(?=c)c)", "abcd", "yB", R"($1)", "ab"); + test(regex_20, "20", R"((.*?)(?=b|c))", "abcd", "y", R"($1)", "a"); + test(regex_21, "21", R"((.*?)(?=b|c)c)", "abcd", "y", R"($1)", "ab"); + test(regex_22, "22", R"((.*?)(?=c|b))", "abcd", "y", R"($1)", "a"); + test(regex_23, "23", R"((.*?)(?=c|b)c)", "abcd", "y", R"($1)", "ab"); + test(regex_24, "24", R"((.*?)(?=[bc]))", "abcd", "y", R"($1)", "a"); + test(regex_25, "25", R"((.*?)(?=[bc])c)", "abcd", "yB", R"($1)", "ab"); + test(regex_26, "26", R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))", "aaaaaaaa", "y", R"($1)", "aaaaaaa"); + test(regex_27, "27", R"(a(?!b(?!c))(..))", "abababc", "y", R"($1)", "bc"); + test(regex_28, "28", R"(a(?!b(?=a))(..))", "abababc", "y", R"($1)", "bc"); + test(regex_37, "37", R"(X(\w+)(?=\s)|X(\w+))", "Xab", "y", R"([$1-$2])", "[-ab]"); + test(regex_38, "38", R"(^a*(?=b)b)", "ab", "y", R"($&)", "ab"); + test(regex_39, "39", R"('(?!\A)x'm)", "a\nxb\n", "y", R"(-)", "-"); + test(regex_40, "40", R"('^(o)(?!.*\1)'i)", "Oo", "n", R"(-)", "-"); + test(regex_41, "41", R"(.*a(?!(b|cd)*e).*f)", "......abef", "n", R"(-)", "-"); + test(regex_42, "42", R"(^(a*?)(?!(aa|aaaa)*$))", "aaaaaaaaaaaaaaaaaaaa", "y", R"($1)", "a"); + test(regex_43, "43", R"((?!)+?|(.{2,4}))", "abcde", "y", R"($1)", "abcd"); + test(regex_44, "44", R"(^(a*?)(?!(a{6}|a{5})*$))", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", R"($+[1])", "12"); + test(regex_45, "45", R"(a(?!b(?!c(?!d(?!e))))...(.))", "abxabcdxabcde", "y", R"($1)", "e"); + test(regex_46, "46", R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)", "aXbbbbbbbcccccccccccccaaaX", "y", R"(-)", "-"); + test(regex_47, "47", R"(((?s).)c(?!.))", "a\nb\nc\n", "y", R"($1)", "\n"); + test(regex_48, "48", R"(((?s).)c(?!.))", "a\nb\nc\n", "y", R"($1:$&)", "\n:\nc"); + test(regex_49, "49", R"(((?s)b.)c(?!.))", "a\nb\nc\n", "y", R"($1)", "b\n"); + test(regex_50, "50", R"(((?s)b.)c(?!.))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); + test(regex_51, "51", R"(((?s)b.)c(?!\N))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); + test(regex_52, "52", R"('(b.)c(?!\N)'s)", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); + test(regex_53, "53", R"(a*(?!))", "aaaab", "n", R"(-)", "-"); + std::cout << std::endl; + } +} +main: () = { + test_tests_19_lookahead().run(); +} diff --git a/regression-tests/run-tests.sh b/regression-tests/run-tests.sh index df8030e8d4..fa630c5610 100644 --- a/regression-tests/run-tests.sh +++ b/regression-tests/run-tests.sh @@ -93,7 +93,7 @@ while getopts ${optstring} arg; do ;; t) # Replace commas with spaces - chosen_tests=${OPTARG/,/ } + chosen_tests=${OPTARG//,/ } ;; \?) echo "Invalid option: -${OPTARG}." diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution new file mode 100644 index 0000000000..916d1a084b --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_posessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution index 33edef59f9..a1c13402c3 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(729) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] +../../../include/cpp2util.h(733) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution index 351026bdaf..8332298aed 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(590) : Bounds safety violation +../../../include/cpp2util.h(594) : Bounds safety violation diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution index 7af70a4022..4663ae3aa1 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(590) : Contract violation: fill: value must contain at least count elements +../../../include/cpp2util.h(594) : Contract violation: fill: value must contain at least count elements diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution index 7ef489217b..b854d58b61 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected]: Null safety violation: std::expected has an unexpected value +../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected]: Null safety violation: std::expected has an unexpected value diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution index a7efa13281..99f33cd437 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value +../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution index 92ea0d4062..006eaebf1b 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty +../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution index 6d94ee858b..aafd8b647a 100644 --- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty +../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.execution new file mode 100644 index 0000000000..916d1a084b --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_posessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.execution new file mode 100644 index 0000000000..3eaf91fed1 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_possessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.execution new file mode 100644 index 0000000000..916d1a084b --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_posessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution index 33edef59f9..a1c13402c3 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(729) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] +../../../include/cpp2util.h(733) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4] diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution index 351026bdaf..8332298aed 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(590) : Bounds safety violation +../../../include/cpp2util.h(594) : Bounds safety violation diff --git a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution index 7af70a4022..4663ae3aa1 100644 --- a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(590) : Contract violation: fill: value must contain at least count elements +../../../include/cpp2util.h(594) : Contract violation: fill: value must contain at least count elements diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution index a7efa13281..99f33cd437 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value +../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution index 92ea0d4062..006eaebf1b 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty +../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution index 6d94ee858b..aafd8b647a 100644 --- a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution +++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution @@ -1 +1 @@ -../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty +../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.execution new file mode 100644 index 0000000000..916d1a084b --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_posessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.execution new file mode 100644 index 0000000000..916d1a084b --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_posessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.orig b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.orig new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.rej b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.rej new file mode 100644 index 0000000000..1dd32b2bae --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.rej @@ -0,0 +1,64 @@ +--- test-results/clang-18-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output ++++ test-results/clang-18-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output +@@ -1,41 +1,41 @@ + In file included from mixed-bugfix-for-ufcs-non-local.cpp:6: +-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type +- 1135 | [LAMBDADEFCAPT]< \ ++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type ++ 1136 | [LAMBDADEFCAPT]< \ + | ^ +-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’ +- 1172 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’ ++ 1173 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) + | ^~~~~~~~~~ + mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ + mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid +-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type +- 1135 | [LAMBDADEFCAPT]< \ ++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type ++ 1136 | [LAMBDADEFCAPT]< \ + | ^ +-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’ +- 1172 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’ ++ 1173 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) + | ^~~~~~~~~~ + mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ + mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid +-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type +- 1135 | [LAMBDADEFCAPT]< \ ++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type ++ 1136 | [LAMBDADEFCAPT]< \ + | ^ +-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’ +- 1172 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’ ++ 1173 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) + | ^~~~~~~~~~ + mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ + mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid +-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type +- 1135 | [LAMBDADEFCAPT]< \ ++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type ++ 1136 | [LAMBDADEFCAPT]< \ + | ^ +-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’ +- 1172 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’ ++ 1173 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) + | ^~~~~~~~~~ + mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ + mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid +-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type +- 1135 | [LAMBDADEFCAPT]< \ ++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type ++ 1136 | [LAMBDADEFCAPT]< \ + | ^ +-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’ +- 1172 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) ++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’ ++ 1173 | #define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__) + | ^~~~~~~~~~ + mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ + mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution new file mode 100644 index 0000000000..916d1a084b --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_posessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output index 1613a380eb..605533b8b0 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output @@ -6,12 +6,12 @@ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:46: error: expect In file included from pure2-bugfix-for-requires-clause-in-forward-declaration.cpp:7: ../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10. pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:4:1: note: in expansion of macro ‘CPP2_REQUIRES_’ -pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:3: error: no declaration matches ‘element::element(auto:93&&) requires is_same_v::type>::type>’ +pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:3: error: no declaration matches ‘element::element(auto:259&&) requires is_same_v::type>::type>’ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:5:11: note: candidates are: ‘element::element(const element&)’ -pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:20: note: ‘template element::element(auto:91&&)’ +pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:20: note: ‘template element::element(auto:257&&)’ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:1:7: note: ‘class element’ defined here pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:5:78: error: expected unqualified-id before ‘{’ token -pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:8: error: no declaration matches ‘element& element::operator=(auto:94&&) requires is_same_v::type>::type>’ +pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:8: error: no declaration matches ‘element& element::operator=(auto:260&&) requires is_same_v::type>::type>’ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:6:16: note: candidates are: ‘void element::operator=(const element&)’ -pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:16: note: ‘template element& element::operator=(auto:92&&)’ +pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:16: note: ‘template element& element::operator=(auto:258&&)’ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:1:7: note: ‘class element’ defined here diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output index bfb12c17e9..72475aa8be 100644 --- a/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output +++ b/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output @@ -9,8 +9,8 @@ pure2-print.cpp2:68:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-print.cpp2:97:1: note: in expansion of macro ‘CPP2_REQUIRES_’ pure2-print.cpp2:9:41: error: ‘constexpr const T outer::object_alias’ is not a static data member of ‘class outer’ pure2-print.cpp2:9:48: error: template definition of non-template ‘constexpr const T outer::object_alias’ -pure2-print.cpp2:67:14: error: no declaration matches ‘void outer::mytype::variadic(const auto:92& ...) requires (is_convertible_v::type>::type, int> && ...)’ -pure2-print.cpp2:67:29: note: candidate is: ‘template static void outer::mytype::variadic(const auto:91& ...)’ +pure2-print.cpp2:67:14: error: no declaration matches ‘void outer::mytype::variadic(const auto:258& ...) requires (is_convertible_v::type>::type, int> && ...)’ +pure2-print.cpp2:67:29: note: candidate is: ‘template static void outer::mytype::variadic(const auto:257& ...)’ pure2-print.cpp2:10:19: note: ‘class outer::mytype’ defined here pure2-print.cpp2:96:37: error: no declaration matches ‘void outer::print(std::ostream&, const Args& ...) requires cpp2::impl::cmp_greater_eq(sizeof ... (Args ...), 0)’ pure2-print.cpp2:96:37: note: no functions named ‘void outer::print(std::ostream&, const Args& ...) requires cpp2::impl::cmp_greater_eq(sizeof ... (Args ...), 0)’ diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.execution new file mode 100644 index 0000000000..3eaf91fed1 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_possessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution index df39b9060b..d7550af325 100644 --- a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:95&, cpp2::impl::in, cpp2::impl::in) [with auto:95 = std::vector; cpp2::impl::in = const int]: Bounds safety violation +mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:261&, cpp2::impl::in, cpp2::impl::in) [with auto:261 = std::vector; cpp2::impl::in = const int]: Bounds safety violation diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output index 2ae5e2ce89..0a52324652 100644 --- a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output +++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output @@ -1,41 +1,41 @@ In file included from mixed-bugfix-for-ufcs-non-local.cpp:6: ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | char** argv = nullptr; | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | | ^ mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | char** argv = nullptr; | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | | ^ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | char** argv = nullptr; | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | | ^ mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | char** argv = nullptr; | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | | ^ mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | char** argv = nullptr; | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | | ^ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.execution new file mode 100644 index 0000000000..916d1a084b --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_posessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution index 01a4b2e1a2..e74faf8ba2 100644 --- a/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution +++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution @@ -1 +1 @@ -mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:89&, cpp2::impl::in, cpp2::impl::in) [with auto:89 = std::vector; cpp2::impl::in = const int]: Bounds safety violation +mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:255&, cpp2::impl::in, cpp2::impl::in) [with auto:255 = std::vector; cpp2::impl::in = const int]: Bounds safety violation diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output index 2ae5e2ce89..4ba9bb6e19 100644 --- a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output +++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output @@ -1,41 +1,41 @@ In file included from mixed-bugfix-for-ufcs-non-local.cpp:6: ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | class finally_success | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | finally(finally&& that) noexcept | ^ mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | class finally_success | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | finally(finally&& that) noexcept | ^ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | class finally_success | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | finally(finally&& that) noexcept | ^ mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | class finally_success | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | finally(finally&& that) noexcept | ^ mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type - 2100 | { + 2100 | class finally_success | ^ ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’ - 2137 | // Speculative: RAII wrapping for the C standard library + 2137 | finally(finally&& that) noexcept | ^ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.execution new file mode 100644 index 0000000000..3eaf91fed1 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_possessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output index 86ab24cc95..77c19b3a1e 100644 --- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output @@ -6,7 +6,7 @@ pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' b pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}' pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found -..\..\..\include\cpp2util.h(669): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' +D:\a\cppfront\cppfront\include\cpp2util.h(673): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std' predefined C++ types (compiler internal)(347): note: see declaration of 'std' pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected @@ -19,4 +19,4 @@ pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argumen pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}' pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found -..\..\..\include\cpp2util.h(669): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' +D:\a\cppfront\cppfront\include\cpp2util.h(673): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)' diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e74374d8c2 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output @@ -0,0 +1 @@ +pure2-regex_01_char_matcher.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..00bf2644df --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output @@ -0,0 +1 @@ +pure2-regex_02_ranges.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..6d0365664b --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output @@ -0,0 +1 @@ +pure2-regex_03_wildcard.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 new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e11a6a873f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output @@ -0,0 +1 @@ +pure2-regex_04_start_end.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..eb300bda69 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output @@ -0,0 +1 @@ +pure2-regex_05_classes.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..150c67dd34 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output @@ -0,0 +1 @@ +pure2-regex_06_boundaries.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..97988771cd --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output @@ -0,0 +1 @@ +pure2-regex_07_short_classes.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..7a45b0c187 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output @@ -0,0 +1 @@ +pure2-regex_08_alternatives.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..047bb5f087 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output @@ -0,0 +1 @@ +pure2-regex_09_groups.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..fe6e6efc96 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..2c8998cc5d --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output @@ -0,0 +1 @@ +pure2-regex_10_escapes.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..61446dad64 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output @@ -0,0 +1 @@ +pure2-regex_11_group_references.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..1c860cd486 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output @@ -0,0 +1 @@ +pure2-regex_12_case_insensitive.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.execution new file mode 100644 index 0000000000..916d1a084b --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_posessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output new file mode 100644 index 0000000000..c2f6f5644f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output @@ -0,0 +1 @@ +pure2-regex_13_posessive_modifier.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..9fe1dd849e --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output @@ -0,0 +1 @@ +pure2-regex_14_multiline_modifier.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..25bda92737 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output @@ -0,0 +1 @@ +pure2-regex_15_group_modifiers.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..3df3a04bf6 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output @@ -0,0 +1 @@ +pure2-regex_16_perl_syntax_modifier.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..7cd5b672db --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output @@ -0,0 +1 @@ +pure2-regex_17_comments.cpp diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..dac6ef8e58 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output @@ -0,0 +1 @@ +pure2-regex_18_branch_reset.cpp 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 new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..005c8d5dc1 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output @@ -0,0 +1 @@ +pure2-regex_19_lookahead.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.execution new file mode 100644 index 0000000000..af124736ec --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.execution @@ -0,0 +1,14 @@ +Running tests_01_char_matcher: +01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc +02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3 +04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results - +05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results - +06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results - +07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc +08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1 +09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4 +10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc +11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2 +12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5 + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output new file mode 100644 index 0000000000..e74374d8c2 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output @@ -0,0 +1 @@ +pure2-regex_01_char_matcher.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.execution new file mode 100644 index 0000000000..dc0b360024 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.execution @@ -0,0 +1,42 @@ +Running tests_02_ranges: +01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc +02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0 +03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3 +04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc +05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0 +06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3 +07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc +08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0 +09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4 +10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc +11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6 +13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc +14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0 +15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6 +16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc +17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0 +18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4 +19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results - +20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results - +21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results - +22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc +23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0 +24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6 +25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc +26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0 +27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6 +28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc +29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0 +30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6 +31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc +32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0 +33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6 +34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results - +35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc +36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc +37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc +38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results - +39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc +40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output new file mode 100644 index 0000000000..00bf2644df --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output @@ -0,0 +1 @@ +pure2-regex_02_ranges.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.execution new file mode 100644 index 0000000000..f3f0ea9cce --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.execution @@ -0,0 +1,22 @@ +Running tests_03_wildcard: +01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a +02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb +05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a +08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0 +09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1 +10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb +11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0 +12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4 +14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc +15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc +16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc +17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc +18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc +19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results - +20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results - + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output new file mode 100644 index 0000000000..6d0365664b --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output @@ -0,0 +1 @@ +pure2-regex_03_wildcard.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 new file mode 100644 index 0000000000..6fef36434a --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution @@ -0,0 +1,11 @@ +Running tests_04_start_end: +01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc +02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results - +03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc +04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results - +05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc +06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results - +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 - + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output new file mode 100644 index 0000000000..e11a6a873f --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output @@ -0,0 +1 @@ +pure2-regex_04_start_end.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.execution new file mode 100644 index 0000000000..306bf33955 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.execution @@ -0,0 +1,21 @@ +Running tests_05_classes: +01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results - +02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd +03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd +04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd +05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd +06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results - +07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results - +08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace +09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac +10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a- +11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a- +12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a] +13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b +14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed +15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results - +16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc +17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results - +18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results - +19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output new file mode 100644 index 0000000000..eb300bda69 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output @@ -0,0 +1 @@ +pure2-regex_05_classes.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.execution new file mode 100644 index 0000000000..420a4c5876 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.execution @@ -0,0 +1,19 @@ +Running tests_06_boundaries: +01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results - +02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results - +03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results - +04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results - +05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results - +06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results - +07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results - +08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results - +09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results - +10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1 +12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2 +13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results - +14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results - +15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results - +16_n: OK regex: \b parsed_regex: \b str: result_expr: - expected_results - +17_y: OK regex: \B parsed_regex: \B str: result_expr: - expected_results - + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output new file mode 100644 index 0000000000..150c67dd34 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output @@ -0,0 +1 @@ +pure2-regex_06_boundaries.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.execution new file mode 100644 index 0000000000..519c05f921 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.execution @@ -0,0 +1,26 @@ +Running tests_07_short_classes: +01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results - +02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results - +03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results - +04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results - +05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results - +06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results - +07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results - +08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results - +09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results - +10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results - +11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results - +12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results - +13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results - +14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results - +15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results - +16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results - +17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results - +18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results - +19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results - +20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results - +21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results - +22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results - +23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results - +24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results - + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output new file mode 100644 index 0000000000..97988771cd --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output @@ -0,0 +1 @@ +pure2-regex_07_short_classes.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.execution new file mode 100644 index 0000000000..c12fd2afe3 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.execution @@ -0,0 +1,4 @@ +Running tests_08_alternatives: +01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab +02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output new file mode 100644 index 0000000000..7a45b0c187 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output @@ -0,0 +1 @@ +pure2-regex_08_alternatives.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.execution new file mode 100644 index 0000000000..05df860f9e --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.execution @@ -0,0 +1,13 @@ +Running tests_09_groups: +01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef- +02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1 +03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3 +04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1 +05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1 +06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a +07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0 +08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1 +09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c +10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2 +11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3 + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output new file mode 100644 index 0000000000..047bb5f087 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output @@ -0,0 +1 @@ +pure2-regex_09_groups.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution new file mode 100644 index 0000000000..14d06c270a --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution @@ -0,0 +1,39 @@ +Running tests_10_escapes: +01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b- +02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab +03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b +04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b +05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo bar result_expr: $1 expected_results +06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo bar result_expr: $1-$2 expected_results foo- +07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo bar result_expr: $1-$2 expected_results -b +08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo bar result_expr: $1 expected_results +09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo bar result_expr: $1-$2 expected_results o- +10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo bar result_expr: $1-$2 expected_results -b +11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo + + +bar result_expr: $1 expected_results + + + +12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo + + +bar result_expr: $1-$2 expected_results foo- +13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo + + +bar result_expr: $1-$2 expected_results + + +-b +14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo bar result_expr: $1 expected_results +15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo bar result_expr: $1-$2 expected_results o- +16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo bar result_expr: $1-$2 expected_results -b +17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo + bar result_expr: $& expected_results foo + bar +18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar +19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB +20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output new file mode 100644 index 0000000000..2c8998cc5d --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output @@ -0,0 +1 @@ +pure2-regex_10_escapes.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.execution new file mode 100644 index 0000000000..724d0085a6 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.execution @@ -0,0 +1,26 @@ +Running tests_11_group_references: +01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo +02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo +03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba +04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc +05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo +07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo +09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo +10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo +12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo +13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo +14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo +15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo +17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo +18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo +19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo +21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie +24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output new file mode 100644 index 0000000000..61446dad64 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output @@ -0,0 +1 @@ +pure2-regex_11_group_references.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.execution new file mode 100644 index 0000000000..4939deb24e --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.execution @@ -0,0 +1,121 @@ +Running tests_12_case_insensitive: +01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC +02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results - +03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results - +04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results - +05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC +06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC +07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC +08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC +09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC +10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC +13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results - +14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results - +15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results - +16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC +20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results - +21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC +22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC +23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC +24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results - +25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC +26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC +27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC +28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results - +29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC +30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results - +31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC +32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results +33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results +34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC +35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC +36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC +37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC +38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results - +39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results - +40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD +41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results - +42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE +43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC +44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A- +45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A- +46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A] +47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B +48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED +49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results - +50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC +51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results - +52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results - +53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC +54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB +55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB +56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF- +57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results - +58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B- +59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB +60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B +61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B +62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A +63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C +64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC +65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC +66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC +67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC +68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC +69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B +70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B +71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B +72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B +73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A +74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A +75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results - +76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE +77_n: OK regex: 'abc'i parsed_regex: 'abc'i str: result_expr: - expected_results - +78_y: OK regex: 'a*'i parsed_regex: 'a*'i str: result_expr: $& expected_results +79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C +80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A +81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E +82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E +83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG +84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB +85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A +86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD +87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ +88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY +89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF- +90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B +91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A +92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC +93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D +95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD +96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE +97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results - +98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB +99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D +100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA +101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH- +102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J +104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results - +105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results - +106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ- +107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A +108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA +109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A +110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results - +111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS +112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE +113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A) +114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results - +115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD +116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC +117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC +118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC +119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output new file mode 100644 index 0000000000..1c860cd486 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output @@ -0,0 +1 @@ +pure2-regex_12_case_insensitive.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.execution new file mode 100644 index 0000000000..3eaf91fed1 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.execution @@ -0,0 +1,50 @@ +Running tests_13_possessive_modifier: +01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results - +02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results - +03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results - +04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results - +05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab +06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab +07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab +08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab +09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results - +10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results - +11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results - +12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results - +13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab +14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab +16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab +17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB +19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA +22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA +23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb +24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb +25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb +27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb +29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb +30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb +31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb +32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb +33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA +35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA +37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA +38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA +39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb +40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb +41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb +43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb +45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb +46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb +47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb +48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.output new file mode 100644 index 0000000000..540ae00635 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.output @@ -0,0 +1 @@ +pure2-regex_13_possessive_modifier.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.execution new file mode 100644 index 0000000000..9a12081acc --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.execution @@ -0,0 +1,533 @@ +Running tests_14_multiline_modifier: +01_y: OK regex: \Z parsed_regex: \Z str: a +b + result_expr: $-[0] expected_results 3 +02_y: OK regex: \z parsed_regex: \z str: a +b + result_expr: $-[0] expected_results 4 +03_y: OK regex: $ parsed_regex: $ str: a +b + result_expr: $-[0] expected_results 3 +04_y: OK regex: \Z parsed_regex: \Z str: b +a + result_expr: $-[0] expected_results 3 +05_y: OK regex: \z parsed_regex: \z str: b +a + result_expr: $-[0] expected_results 4 +06_y: OK regex: $ parsed_regex: $ str: b +a + result_expr: $-[0] expected_results 3 +07_y: OK regex: \Z parsed_regex: \Z str: b +a result_expr: $-[0] expected_results 3 +08_y: OK regex: \z parsed_regex: \z str: b +a result_expr: $-[0] expected_results 3 +09_y: OK regex: $ parsed_regex: $ str: b +a result_expr: $-[0] expected_results 3 +10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a +b + result_expr: $-[0] expected_results 3 +11_y: OK regex: '\z'm parsed_regex: '\z'm str: a +b + result_expr: $-[0] expected_results 4 +12_y: OK regex: '$'m parsed_regex: '$'m str: a +b + result_expr: $-[0] expected_results 1 +13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a + result_expr: $-[0] expected_results 3 +14_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a + result_expr: $-[0] expected_results 4 +15_y: OK regex: '$'m parsed_regex: '$'m str: b +a + result_expr: $-[0] expected_results 1 +16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b +a result_expr: $-[0] expected_results 3 +17_y: OK regex: '\z'm parsed_regex: '\z'm str: b +a result_expr: $-[0] expected_results 3 +18_y: OK regex: '$'m parsed_regex: '$'m str: b +a result_expr: $-[0] expected_results 1 +19_n: OK regex: a\Z parsed_regex: a\Z str: a +b + result_expr: - expected_results - +20_n: OK regex: a\z parsed_regex: a\z str: a +b + result_expr: - expected_results - +21_n: OK regex: a$ parsed_regex: a$ str: a +b + result_expr: - expected_results - +22_y: OK regex: a\Z parsed_regex: a\Z str: b +a + result_expr: $-[0] expected_results 2 +23_n: OK regex: a\z parsed_regex: a\z str: b +a + result_expr: - expected_results - +24_y: OK regex: a$ parsed_regex: a$ str: b +a + result_expr: $-[0] expected_results 2 +25_y: OK regex: a\Z parsed_regex: a\Z str: b +a result_expr: $-[0] expected_results 2 +26_y: OK regex: a\z parsed_regex: a\z str: b +a result_expr: $-[0] expected_results 2 +27_y: OK regex: a$ parsed_regex: a$ str: b +a result_expr: $-[0] expected_results 2 +28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a +b + result_expr: - expected_results - +29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a +b + result_expr: - expected_results - +30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a +b + result_expr: $-[0] expected_results 0 +31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a + result_expr: $-[0] expected_results 2 +32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a + result_expr: - expected_results - +33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a + result_expr: $-[0] expected_results 2 +34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b +a result_expr: $-[0] expected_results 2 +35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b +a result_expr: $-[0] expected_results 2 +36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b +a result_expr: $-[0] expected_results 2 +37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa +b + result_expr: - expected_results - +38_n: OK regex: aa\z parsed_regex: aa\z str: aa +b + result_expr: - expected_results - +39_n: OK regex: aa$ parsed_regex: aa$ str: aa +b + result_expr: - expected_results - +40_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa + result_expr: $-[0] expected_results 2 +41_n: OK regex: aa\z parsed_regex: aa\z str: b +aa + result_expr: - expected_results - +42_y: OK regex: aa$ parsed_regex: aa$ str: b +aa + result_expr: $-[0] expected_results 2 +43_y: OK regex: aa\Z parsed_regex: aa\Z str: b +aa result_expr: $-[0] expected_results 2 +44_y: OK regex: aa\z parsed_regex: aa\z str: b +aa result_expr: $-[0] expected_results 2 +45_y: OK regex: aa$ parsed_regex: aa$ str: b +aa result_expr: $-[0] expected_results 2 +46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa +b + result_expr: - expected_results - +47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa +b + result_expr: - expected_results - +48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa +b + result_expr: $-[0] expected_results 0 +49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa + result_expr: $-[0] expected_results 2 +50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa + result_expr: - expected_results - +51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa + result_expr: $-[0] expected_results 2 +52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +aa result_expr: $-[0] expected_results 2 +53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +aa result_expr: $-[0] expected_results 2 +54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +aa result_expr: $-[0] expected_results 2 +55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac +b + result_expr: - expected_results - +56_n: OK regex: aa\z parsed_regex: aa\z str: ac +b + result_expr: - expected_results - +57_n: OK regex: aa$ parsed_regex: aa$ str: ac +b + result_expr: - expected_results - +58_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac + result_expr: - expected_results - +59_n: OK regex: aa\z parsed_regex: aa\z str: b +ac + result_expr: - expected_results - +60_n: OK regex: aa$ parsed_regex: aa$ str: b +ac + result_expr: - expected_results - +61_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ac result_expr: - expected_results - +62_n: OK regex: aa\z parsed_regex: aa\z str: b +ac result_expr: - expected_results - +63_n: OK regex: aa$ parsed_regex: aa$ str: b +ac result_expr: - expected_results - +64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac +b + result_expr: - expected_results - +65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac +b + result_expr: - expected_results - +66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac +b + result_expr: - expected_results - +67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac + result_expr: - expected_results - +68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac + result_expr: - expected_results - +69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac + result_expr: - expected_results - +70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ac result_expr: - expected_results - +71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ac result_expr: - expected_results - +72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ac result_expr: - expected_results - +73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca +b + result_expr: - expected_results - +74_n: OK regex: aa\z parsed_regex: aa\z str: ca +b + result_expr: - expected_results - +75_n: OK regex: aa$ parsed_regex: aa$ str: ca +b + result_expr: - expected_results - +76_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca + result_expr: - expected_results - +77_n: OK regex: aa\z parsed_regex: aa\z str: b +ca + result_expr: - expected_results - +78_n: OK regex: aa$ parsed_regex: aa$ str: b +ca + result_expr: - expected_results - +79_n: OK regex: aa\Z parsed_regex: aa\Z str: b +ca result_expr: - expected_results - +80_n: OK regex: aa\z parsed_regex: aa\z str: b +ca result_expr: - expected_results - +81_n: OK regex: aa$ parsed_regex: aa$ str: b +ca result_expr: - expected_results - +82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca +b + result_expr: - expected_results - +83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca +b + result_expr: - expected_results - +84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca +b + result_expr: - expected_results - +85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca + result_expr: - expected_results - +86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca + result_expr: - expected_results - +87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca + result_expr: - expected_results - +88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b +ca result_expr: - expected_results - +89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b +ca result_expr: - expected_results - +90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b +ca result_expr: - expected_results - +91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab +b + result_expr: - expected_results - +92_n: OK regex: ab\z parsed_regex: ab\z str: ab +b + result_expr: - expected_results - +93_n: OK regex: ab$ parsed_regex: ab$ str: ab +b + result_expr: - expected_results - +94_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab + result_expr: $-[0] expected_results 2 +95_n: OK regex: ab\z parsed_regex: ab\z str: b +ab + result_expr: - expected_results - +96_y: OK regex: ab$ parsed_regex: ab$ str: b +ab + result_expr: $-[0] expected_results 2 +97_y: OK regex: ab\Z parsed_regex: ab\Z str: b +ab result_expr: $-[0] expected_results 2 +98_y: OK regex: ab\z parsed_regex: ab\z str: b +ab result_expr: $-[0] expected_results 2 +99_y: OK regex: ab$ parsed_regex: ab$ str: b +ab result_expr: $-[0] expected_results 2 +100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab +b + result_expr: - expected_results - +101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab +b + result_expr: - expected_results - +102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab +b + result_expr: $-[0] expected_results 0 +103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab + result_expr: $-[0] expected_results 2 +104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab + result_expr: - expected_results - +105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab + result_expr: $-[0] expected_results 2 +106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ab result_expr: $-[0] expected_results 2 +107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ab result_expr: $-[0] expected_results 2 +108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ab result_expr: $-[0] expected_results 2 +109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac +b + result_expr: - expected_results - +110_n: OK regex: ab\z parsed_regex: ab\z str: ac +b + result_expr: - expected_results - +111_n: OK regex: ab$ parsed_regex: ab$ str: ac +b + result_expr: - expected_results - +112_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac + result_expr: - expected_results - +113_n: OK regex: ab\z parsed_regex: ab\z str: b +ac + result_expr: - expected_results - +114_n: OK regex: ab$ parsed_regex: ab$ str: b +ac + result_expr: - expected_results - +115_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ac result_expr: - expected_results - +116_n: OK regex: ab\z parsed_regex: ab\z str: b +ac result_expr: - expected_results - +117_n: OK regex: ab$ parsed_regex: ab$ str: b +ac result_expr: - expected_results - +118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac +b + result_expr: - expected_results - +119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac +b + result_expr: - expected_results - +120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac +b + result_expr: - expected_results - +121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac + result_expr: - expected_results - +122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac + result_expr: - expected_results - +123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac + result_expr: - expected_results - +124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ac result_expr: - expected_results - +125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ac result_expr: - expected_results - +126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ac result_expr: - expected_results - +127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca +b + result_expr: - expected_results - +128_n: OK regex: ab\z parsed_regex: ab\z str: ca +b + result_expr: - expected_results - +129_n: OK regex: ab$ parsed_regex: ab$ str: ca +b + result_expr: - expected_results - +130_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca + result_expr: - expected_results - +131_n: OK regex: ab\z parsed_regex: ab\z str: b +ca + result_expr: - expected_results - +132_n: OK regex: ab$ parsed_regex: ab$ str: b +ca + result_expr: - expected_results - +133_n: OK regex: ab\Z parsed_regex: ab\Z str: b +ca result_expr: - expected_results - +134_n: OK regex: ab\z parsed_regex: ab\z str: b +ca result_expr: - expected_results - +135_n: OK regex: ab$ parsed_regex: ab$ str: b +ca result_expr: - expected_results - +136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca +b + result_expr: - expected_results - +137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca +b + result_expr: - expected_results - +138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca +b + result_expr: - expected_results - +139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca + result_expr: - expected_results - +140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca + result_expr: - expected_results - +141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca + result_expr: - expected_results - +142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b +ca result_expr: - expected_results - +143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b +ca result_expr: - expected_results - +144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b +ca result_expr: - expected_results - +145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb +b + result_expr: - expected_results - +146_n: OK regex: abb\z parsed_regex: abb\z str: abb +b + result_expr: - expected_results - +147_n: OK regex: abb$ parsed_regex: abb$ str: abb +b + result_expr: - expected_results - +148_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb + result_expr: $-[0] expected_results 2 +149_n: OK regex: abb\z parsed_regex: abb\z str: b +abb + result_expr: - expected_results - +150_y: OK regex: abb$ parsed_regex: abb$ str: b +abb + result_expr: $-[0] expected_results 2 +151_y: OK regex: abb\Z parsed_regex: abb\Z str: b +abb result_expr: $-[0] expected_results 2 +152_y: OK regex: abb\z parsed_regex: abb\z str: b +abb result_expr: $-[0] expected_results 2 +153_y: OK regex: abb$ parsed_regex: abb$ str: b +abb result_expr: $-[0] expected_results 2 +154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb +b + result_expr: - expected_results - +155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb +b + result_expr: - expected_results - +156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb +b + result_expr: $-[0] expected_results 0 +157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb + result_expr: $-[0] expected_results 2 +158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb + result_expr: - expected_results - +159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb + result_expr: $-[0] expected_results 2 +160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +abb result_expr: $-[0] expected_results 2 +161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +abb result_expr: $-[0] expected_results 2 +162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +abb result_expr: $-[0] expected_results 2 +163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac +b + result_expr: - expected_results - +164_n: OK regex: abb\z parsed_regex: abb\z str: ac +b + result_expr: - expected_results - +165_n: OK regex: abb$ parsed_regex: abb$ str: ac +b + result_expr: - expected_results - +166_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac + result_expr: - expected_results - +167_n: OK regex: abb\z parsed_regex: abb\z str: b +ac + result_expr: - expected_results - +168_n: OK regex: abb$ parsed_regex: abb$ str: b +ac + result_expr: - expected_results - +169_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ac result_expr: - expected_results - +170_n: OK regex: abb\z parsed_regex: abb\z str: b +ac result_expr: - expected_results - +171_n: OK regex: abb$ parsed_regex: abb$ str: b +ac result_expr: - expected_results - +172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac +b + result_expr: - expected_results - +173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac +b + result_expr: - expected_results - +174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac +b + result_expr: - expected_results - +175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac + result_expr: - expected_results - +176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac + result_expr: - expected_results - +177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac + result_expr: - expected_results - +178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ac result_expr: - expected_results - +179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ac result_expr: - expected_results - +180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ac result_expr: - expected_results - +181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca +b + result_expr: - expected_results - +182_n: OK regex: abb\z parsed_regex: abb\z str: ca +b + result_expr: - expected_results - +183_n: OK regex: abb$ parsed_regex: abb$ str: ca +b + result_expr: - expected_results - +184_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca + result_expr: - expected_results - +185_n: OK regex: abb\z parsed_regex: abb\z str: b +ca + result_expr: - expected_results - +186_n: OK regex: abb$ parsed_regex: abb$ str: b +ca + result_expr: - expected_results - +187_n: OK regex: abb\Z parsed_regex: abb\Z str: b +ca result_expr: - expected_results - +188_n: OK regex: abb\z parsed_regex: abb\z str: b +ca result_expr: - expected_results - +189_n: OK regex: abb$ parsed_regex: abb$ str: b +ca result_expr: - expected_results - +190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca +b + result_expr: - expected_results - +191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca +b + result_expr: - expected_results - +192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca +b + result_expr: - expected_results - +193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca + result_expr: - expected_results - +194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca + result_expr: - expected_results - +195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca + result_expr: - expected_results - +196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b +ca result_expr: - expected_results - +197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b +ca result_expr: - expected_results - +198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b +ca result_expr: - expected_results - +199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a + + result_expr: $& expected_results a + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output new file mode 100644 index 0000000000..9fe1dd849e --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output @@ -0,0 +1 @@ +pure2-regex_14_multiline_modifier.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.execution new file mode 100644 index 0000000000..de92abc48a --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.execution @@ -0,0 +1,87 @@ +Running tests_15_group_modifiers: +01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab +02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a +03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab +04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A +05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results - +06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results - +07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab +08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a +09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab +10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A +11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results - +12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results - +13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab +14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a +15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a +17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results - +18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results - +19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB +20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a +21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results - +22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results - +23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab +24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a +25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a +27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results - +28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results - +29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB +30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a +31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results - +32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results - +33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a +B result_expr: - expected_results - +34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a +B result_expr: - expected_results - +35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a +B result_expr: $1 expected_results a + +36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a +B result_expr: - expected_results - +37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B +B result_expr: - expected_results - +38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B +B result_expr: - expected_results - +39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd +40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd +41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results - +42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a +b +c + result_expr: $1;$2;$3 expected_results a +; +;b +43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a +b +c + result_expr: $1 expected_results b +44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a +b + result_expr: $& expected_results b +45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a +b + result_expr: $1 expected_results b +46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b + result_expr: $1 expected_results b +47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a +b + result_expr: $1 expected_results b +48_n: OK regex: ^b parsed_regex: ^b str: a +b +c + result_expr: - expected_results - +49_n: OK regex: ()^b parsed_regex: ()^b str: a +b +c + result_expr: - expected_results - +50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a +b +c + result_expr: $1 expected_results b +51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo- +52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- +53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo- + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output new file mode 100644 index 0000000000..25bda92737 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output @@ -0,0 +1 @@ +pure2-regex_15_group_modifiers.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.execution new file mode 100644 index 0000000000..7617200078 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.execution @@ -0,0 +1,35 @@ +Running tests_16_perl_syntax_modifier: +01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str: result_expr: $& expected_results +11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str: result_expr: - expected_results - +12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str: result_expr: $& expected_results +13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results - +14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results - +15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A +16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str: result_expr: $& expected_results +17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str: result_expr: - expected_results - +18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str: result_expr: $& expected_results +19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str: result_expr: - expected_results - +20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str: result_expr: $& expected_results +21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a +22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0 +23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1 +24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb +25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0 +26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4 +27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc +28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc +29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results - +30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results # +31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b +32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results # +33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output new file mode 100644 index 0000000000..3df3a04bf6 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output @@ -0,0 +1 @@ +pure2-regex_16_perl_syntax_modifier.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.execution new file mode 100644 index 0000000000..17c9a5d55b --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.execution @@ -0,0 +1,5 @@ +Running tests_17_comments: +01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac +02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac +03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output new file mode 100644 index 0000000000..7cd5b672db --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output @@ -0,0 +1 @@ +pure2-regex_17_comments.cpp diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.execution new file mode 100644 index 0000000000..1d088ce311 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.execution @@ -0,0 +1,17 @@ +Running tests_18_branch_reset: +01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a +02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a +03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c +04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p +05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a +06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b +07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c +08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d +09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e-- +11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x +12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x +13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x +14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x +15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output new file mode 100644 index 0000000000..dac6ef8e58 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output @@ -0,0 +1 @@ +pure2-regex_18_branch_reset.cpp 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 new file mode 100644 index 0000000000..7b34914b12 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution @@ -0,0 +1,77 @@ +Running tests_19_lookahead: +01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad +02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a +03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad +04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad +05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab +06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab +09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results - +10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab +11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab +12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab +13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab +14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab +15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab +16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab +17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab +18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab +19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab +20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a +21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab +22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a +23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab +24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a +25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab +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 +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 +xb + result_expr: - expected_results - +40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results - +41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results - +42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a +43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd +44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12 +45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e +46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results - +47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1 expected_results + +48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a +b +c + result_expr: $1:$& expected_results +: +c +49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1 expected_results b + +50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a +b +c + result_expr: $1:$& expected_results b +:b +c +52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a +b +c + result_expr: $1:$& expected_results b +:b +c +53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results - + diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output new file mode 100644 index 0000000000..005c8d5dc1 --- /dev/null +++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output @@ -0,0 +1 @@ +pure2-regex_19_lookahead.cpp diff --git a/regression-tests/test-results/pure2-regex_01_char_matcher.cpp b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp new file mode 100644 index 0000000000..ae3ff7ee42 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp @@ -0,0 +1,1141 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_01_char_matcher.cpp2" + +#line 153 "pure2-regex_01_char_matcher.cpp2" +class test_tests_01_char_matcher; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_01_char_matcher.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_01_char_matcher.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_01_char_matcher.cpp2" +class test_tests_01_char_matcher { + +#line 166 "pure2-regex_01_char_matcher.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; + public: test_tests_01_char_matcher() = default; + public: test_tests_01_char_matcher(test_tests_01_char_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_01_char_matcher const&) -> void = delete; + + +#line 182 "pure2-regex_01_char_matcher.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_01_char_matcher.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_01_char_matcher.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_01_char_matcher.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 166 "pure2-regex_01_char_matcher.cpp2" + auto test_tests_01_char_matcher::run() const& -> void{ + std::cout << "Running tests_01_char_matcher:" << std::endl; + test(regex_01, "01", R"(abc)", "abc", "y", R"($&)", "abc"); + test(regex_02, "02", R"(abc)", "abc", "y", R"($-[0])", "0"); + test(regex_03, "03", R"(abc)", "abc", "y", R"($+[0])", "3"); + test(regex_04, "04", R"(abc)", "xbc", "n", R"(-)", "-"); + test(regex_05, "05", R"(abc)", "axc", "n", R"(-)", "-"); + test(regex_06, "06", R"(abc)", "abx", "n", R"(-)", "-"); + test(regex_07, "07", R"(abc)", "xabcy", "y", R"($&)", "abc"); + test(regex_08, "08", R"(abc)", "xabcy", "y", R"($-[0])", "1"); + test(regex_09, "09", R"(abc)", "xabcy", "y", R"($+[0])", "4"); + test(regex_10, "10", R"(abc)", "ababc", "y", R"($&)", "abc"); + test(regex_11, "11", R"(abc)", "ababc", "y", R"($-[0])", "2"); + test(regex_12, "12", R"(abc)", "ababc", "y", R"($+[0])", "5"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::to_string() -> std::string{return R"(abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::to_string() -> std::string{return R"(abc)"; } + + +#line 183 "pure2-regex_01_char_matcher.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_01_char_matcher()); +} + diff --git a/regression-tests/test-results/pure2-regex_01_char_matcher.cpp2.output b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp2.output new file mode 100644 index 0000000000..70fcbf8671 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_01_char_matcher.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_02_ranges.cpp b/regression-tests/test-results/pure2-regex_02_ranges.cpp new file mode 100644 index 0000000000..fb632c0370 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_02_ranges.cpp @@ -0,0 +1,6285 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_02_ranges.cpp2" + +#line 153 "pure2-regex_02_ranges.cpp2" +class test_tests_02_ranges; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_02_ranges.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_02_ranges.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_02_ranges.cpp2" +class test_tests_02_ranges { + +#line 194 "pure2-regex_02_ranges.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_25_matcher() = default; + public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_25_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_26_matcher() = default; + public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_26_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_27_matcher() = default; + public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_27_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_28_matcher() = default; + public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_28_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_29_matcher() = default; + public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_29_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_30_matcher() = default; + public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_30_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_31_matcher() = default; + public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_31_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_32_matcher() = default; + public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_32_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_33_matcher() = default; + public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_33_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_34_matcher() = default; + public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_34_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_35_matcher() = default; + public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_35_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_36_matcher() = default; + public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_36_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_37_matcher() = default; + public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_37_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_38_matcher() = default; + public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_38_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_39_matcher() = default; + public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_39_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_40_matcher() = default; + public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_40_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_40 {}; + public: test_tests_02_ranges() = default; + public: test_tests_02_ranges(test_tests_02_ranges const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_02_ranges const&) -> void = delete; + + +#line 238 "pure2-regex_02_ranges.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_02_ranges.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_02_ranges.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_02_ranges.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 194 "pure2-regex_02_ranges.cpp2" + auto test_tests_02_ranges::run() const& -> void{ + std::cout << "Running tests_02_ranges:" << std::endl; + test(regex_01, "01", R"(ab*c)", "abc", "y", R"($&)", "abc"); + test(regex_02, "02", R"(ab*c)", "abc", "y", R"($-[0])", "0"); + test(regex_03, "03", R"(ab*c)", "abc", "y", R"($+[0])", "3"); + test(regex_04, "04", R"(ab*bc)", "abc", "y", R"($&)", "abc"); + test(regex_05, "05", R"(ab*bc)", "abc", "y", R"($-[0])", "0"); + test(regex_06, "06", R"(ab*bc)", "abc", "y", R"($+[0])", "3"); + test(regex_07, "07", R"(ab*bc)", "abbc", "y", R"($&)", "abbc"); + test(regex_08, "08", R"(ab*bc)", "abbc", "y", R"($-[0])", "0"); + test(regex_09, "09", R"(ab*bc)", "abbc", "y", R"($+[0])", "4"); + test(regex_10, "10", R"(ab*bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_11, "11", R"(ab*bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_12, "12", R"(ab*bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_13, "13", R"(ab{0,}bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_14, "14", R"(ab{0,}bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_15, "15", R"(ab{0,}bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_16, "16", R"(ab+bc)", "abbc", "y", R"($&)", "abbc"); + test(regex_17, "17", R"(ab+bc)", "abbc", "y", R"($-[0])", "0"); + test(regex_18, "18", R"(ab+bc)", "abbc", "y", R"($+[0])", "4"); + test(regex_19, "19", R"(ab+bc)", "abc", "n", R"(-)", "-"); + test(regex_20, "20", R"(ab+bc)", "abq", "n", R"(-)", "-"); + test(regex_21, "21", R"(ab{1,}bc)", "abq", "n", R"(-)", "-"); + test(regex_22, "22", R"(ab+bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_23, "23", R"(ab+bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_24, "24", R"(ab+bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_25, "25", R"(ab{1,}bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_26, "26", R"(ab{1,}bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_27, "27", R"(ab{1,}bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_28, "28", R"(ab{1,3}bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_29, "29", R"(ab{1,3}bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_30, "30", R"(ab{1,3}bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_31, "31", R"(ab{3,4}bc)", "abbbbc", "y", R"($&)", "abbbbc"); + test(regex_32, "32", R"(ab{3,4}bc)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_33, "33", R"(ab{3,4}bc)", "abbbbc", "y", R"($+[0])", "6"); + test(regex_34, "34", R"(ab{4,5}bc)", "abbbbc", "n", R"(-)", "-"); + test(regex_35, "35", R"(ab?bc)", "abbc", "y", R"($&)", "abbc"); + test(regex_36, "36", R"(ab?bc)", "abc", "y", R"($&)", "abc"); + test(regex_37, "37", R"(ab{0,1}bc)", "abc", "y", R"($&)", "abc"); + test(regex_38, "38", R"(ab?bc)", "abbbbc", "n", R"(-)", "-"); + test(regex_39, "39", R"(ab?c)", "abc", "y", R"($&)", "abc"); + test(regex_40, "40", R"(ab{0,1}c)", "abc", "y", R"($&)", "abc"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::to_string() -> std::string{return R"(ab*c)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::to_string() -> std::string{return R"(ab*c)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::to_string() -> std::string{return R"(ab*c)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::to_string() -> std::string{return R"(ab*bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::to_string() -> std::string{return R"(ab*bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::to_string() -> std::string{return R"(ab*bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::to_string() -> std::string{return R"(ab*bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::to_string() -> std::string{return R"(ab*bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::to_string() -> std::string{return R"(ab*bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::to_string() -> std::string{return R"(ab*bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::to_string() -> std::string{return R"(ab*bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::to_string() -> std::string{return R"(ab*bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::to_string() -> std::string{return R"(ab+bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::to_string() -> std::string{return R"(ab+bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::to_string() -> std::string{return R"(ab+bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::to_string() -> std::string{return R"(ab+bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::to_string() -> std::string{return R"(ab+bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::to_string() -> std::string{return R"(ab+bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::to_string() -> std::string{return R"(ab+bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::to_string() -> std::string{return R"(ab+bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::to_string() -> std::string{return R"(ab{4,5}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::to_string() -> std::string{return R"(ab?bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::to_string() -> std::string{return R"(ab?bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::to_string() -> std::string{return R"(ab{0,1}bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::to_string() -> std::string{return R"(ab?bc)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::to_string() -> std::string{return R"(ab?c)"; } + + + + + + + template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::to_string() -> std::string{return R"(ab{0,1}c)"; } + + +#line 239 "pure2-regex_02_ranges.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_02_ranges()); +} + diff --git a/regression-tests/test-results/pure2-regex_02_ranges.cpp2.output b/regression-tests/test-results/pure2-regex_02_ranges.cpp2.output new file mode 100644 index 0000000000..b69863f7e3 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_02_ranges.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_02_ranges.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_03_wildcard.cpp b/regression-tests/test-results/pure2-regex_03_wildcard.cpp new file mode 100644 index 0000000000..e6924b841e --- /dev/null +++ b/regression-tests/test-results/pure2-regex_03_wildcard.cpp @@ -0,0 +1,2483 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_03_wildcard.cpp2" + +#line 153 "pure2-regex_03_wildcard.cpp2" +class test_tests_03_wildcard; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_03_wildcard.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_03_wildcard.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_03_wildcard.cpp2" +class test_tests_03_wildcard { + +#line 174 "pure2-regex_03_wildcard.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; + public: test_tests_03_wildcard() = default; + public: test_tests_03_wildcard(test_tests_03_wildcard const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_03_wildcard const&) -> void = delete; + + +#line 198 "pure2-regex_03_wildcard.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_03_wildcard.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_03_wildcard.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_03_wildcard.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 174 "pure2-regex_03_wildcard.cpp2" + auto test_tests_03_wildcard::run() const& -> void{ + std::cout << "Running tests_03_wildcard:" << std::endl; + test(regex_01, "01", R"(.{1})", "abbbbc", "y", R"($&)", "a"); + test(regex_02, "02", R"(.{1})", "abbbbc", "y", R"($-[0])", "0"); + test(regex_03, "03", R"(.{1})", "abbbbc", "y", R"($+[0])", "1"); + test(regex_04, "04", R"(.{3,4})", "abbbbc", "y", R"($&)", "abbb"); + test(regex_05, "05", R"(.{3,4})", "abbbbc", "y", R"($-[0])", "0"); + test(regex_06, "06", R"(.{3,4})", "abbbbc", "y", R"($+[0])", "4"); + test(regex_07, "07", R"(\N{1})", "abbbbc", "y", R"($&)", "a"); + test(regex_08, "08", R"(\N{1})", "abbbbc", "y", R"($-[0])", "0"); + test(regex_09, "09", R"(\N{1})", "abbbbc", "y", R"($+[0])", "1"); + test(regex_10, "10", R"(\N{3,4})", "abbbbc", "y", R"($&)", "abbb"); + test(regex_11, "11", R"(\N{3,4})", "abbbbc", "y", R"($-[0])", "0"); + test(regex_12, "12", R"(\N{3,4})", "abbbbc", "y", R"($+[0])", "4"); + test(regex_13, "13", R"(\N{ 3 , 4 })", "abbbbc", "y", R"($+[0])", "4"); + test(regex_14, "14", R"(a.c)", "abc", "y", R"($&)", "abc"); + test(regex_15, "15", R"(a.c)", "axc", "y", R"($&)", "axc"); + test(regex_16, "16", R"(a\Nc)", "abc", "y", R"($&)", "abc"); + test(regex_17, "17", R"(a.*c)", "axyzc", "y", R"($&)", "axyzc"); + test(regex_18, "18", R"(a\N*c)", "axyzc", "y", R"($&)", "axyzc"); + test(regex_19, "19", R"(a.*c)", "axyzd", "n", R"(-)", "-"); + test(regex_20, "20", R"(a\N*c)", "axyzd", "n", R"(-)", "-"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::to_string() -> std::string{return R"(.{1})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::to_string() -> std::string{return R"(.{1})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::to_string() -> std::string{return R"(.{1})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::to_string() -> std::string{return R"(.{3,4})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::to_string() -> std::string{return R"(.{3,4})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::to_string() -> std::string{return R"(.{3,4})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::to_string() -> std::string{return R"(\N{1})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::to_string() -> std::string{return R"(\N{1})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::to_string() -> std::string{return R"(\N{1})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::to_string() -> std::string{return R"(\N{3,4})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::to_string() -> std::string{return R"(\N{3,4})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::to_string() -> std::string{return R"(\N{3,4})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::to_string() -> std::string{return R"(\N{3,4})"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::to_string() -> std::string{return R"(a.c)"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::to_string() -> std::string{return R"(a.c)"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::to_string() -> std::string{return R"(a\Nc)"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::to_string() -> std::string{return R"(a.*c)"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::to_string() -> std::string{return R"(a\N*c)"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::to_string() -> std::string{return R"(a.*c)"; } + + + + + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::to_string() -> std::string{return R"(a\N*c)"; } + + +#line 199 "pure2-regex_03_wildcard.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_03_wildcard()); +} + diff --git a/regression-tests/test-results/pure2-regex_03_wildcard.cpp2.output b/regression-tests/test-results/pure2-regex_03_wildcard.cpp2.output new file mode 100644 index 0000000000..198e65816c --- /dev/null +++ b/regression-tests/test-results/pure2-regex_03_wildcard.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_03_wildcard.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_04_start_end.cpp b/regression-tests/test-results/pure2-regex_04_start_end.cpp new file mode 100644 index 0000000000..9d53200484 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_04_start_end.cpp @@ -0,0 +1,891 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_04_start_end.cpp2" + +#line 153 "pure2-regex_04_start_end.cpp2" +class test_tests_04_start_end; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_04_start_end.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_04_start_end.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_04_start_end.cpp2" +class test_tests_04_start_end { + +#line 163 "pure2-regex_04_start_end.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; + public: test_tests_04_start_end() = default; + public: test_tests_04_start_end(test_tests_04_start_end const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_04_start_end const&) -> void = delete; + + +#line 176 "pure2-regex_04_start_end.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_04_start_end.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_04_start_end.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_04_start_end.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 163 "pure2-regex_04_start_end.cpp2" + auto test_tests_04_start_end::run() const& -> void{ + std::cout << "Running tests_04_start_end:" << std::endl; + test(regex_01, "01", R"(^abc$)", "abc", "y", R"($&)", "abc"); + test(regex_02, "02", R"(^abc$)", "abcc", "n", R"(-)", "-"); + test(regex_03, "03", R"(^abc)", "abcc", "y", R"($&)", "abc"); + test(regex_04, "04", R"(^abc$)", "aabc", "n", R"(-)", "-"); + test(regex_05, "05", R"(abc$)", "aabc", "y", R"($&)", "abc"); + test(regex_06, "06", R"(abc$)", "aabcd", "n", R"(-)", "-"); + test(regex_07, "07", R"(^)", "abc", "y", R"($&)", ""); + test(regex_08, "08", R"($)", "abc", "y", R"($&)", ""); + test(regex_09, "09", R"($b)", "b", "n", R"(-)", "-"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::to_string() -> std::string{return R"(^abc$)"; } + + + + + + + template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::to_string() -> std::string{return R"(^abc$)"; } + + + + + + + template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::to_string() -> std::string{return R"(^abc)"; } + + + + + + + template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::to_string() -> std::string{return R"(^abc$)"; } + + + + + + + template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::to_string() -> std::string{return R"(abc$)"; } + + + + + + + template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abc"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::to_string() -> std::string{return R"(abc$)"; } + + + + + + + template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::to_string() -> std::string{return R"(^)"; } + + + + + + + template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::to_string() -> std::string{return R"($)"; } + + + + + + + template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::to_string() -> std::string{return R"($b)"; } + + +#line 177 "pure2-regex_04_start_end.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_04_start_end()); +} + diff --git a/regression-tests/test-results/pure2-regex_04_start_end.cpp2.output b/regression-tests/test-results/pure2-regex_04_start_end.cpp2.output new file mode 100644 index 0000000000..56a887248a --- /dev/null +++ b/regression-tests/test-results/pure2-regex_04_start_end.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_04_start_end.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_05_classes.cpp b/regression-tests/test-results/pure2-regex_05_classes.cpp new file mode 100644 index 0000000000..7ec65ccbda --- /dev/null +++ b/regression-tests/test-results/pure2-regex_05_classes.cpp @@ -0,0 +1,1837 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_05_classes.cpp2" + +#line 153 "pure2-regex_05_classes.cpp2" +class test_tests_05_classes; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_05_classes.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_05_classes.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_05_classes.cpp2" +class test_tests_05_classes { + +#line 173 "pure2-regex_05_classes.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; + public: test_tests_05_classes() = default; + public: test_tests_05_classes(test_tests_05_classes const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_05_classes const&) -> void = delete; + + +#line 196 "pure2-regex_05_classes.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_05_classes.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_05_classes.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_05_classes.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 173 "pure2-regex_05_classes.cpp2" + auto test_tests_05_classes::run() const& -> void{ + std::cout << "Running tests_05_classes:" << std::endl; + test(regex_01, "01", R"(a[bc]d)", "abc", "n", R"(-)", "-"); + test(regex_02, "02", R"(a[bc]d)", "abd", "y", R"($&)", "abd"); + test(regex_03, "03", R"(a[b]d)", "abd", "y", R"($&)", "abd"); + test(regex_04, "04", R"([a][b][d])", "abd", "y", R"($&)", "abd"); + test(regex_05, "05", R"(.[b].)", "abd", "y", R"($&)", "abd"); + test(regex_06, "06", R"(.[b].)", "aBd", "n", R"(-)", "-"); + test(regex_07, "07", R"(a[b-d]e)", "abd", "n", R"(-)", "-"); + test(regex_08, "08", R"(a[b-d]e)", "ace", "y", R"($&)", "ace"); + test(regex_09, "09", R"(a[b-d])", "aac", "y", R"($&)", "ac"); + test(regex_10, "10", R"(a[-b])", "a-", "y", R"($&)", "a-"); + test(regex_11, "11", R"(a[b-])", "a-", "y", R"($&)", "a-"); + test(regex_12, "12", R"(a])", "a]", "y", R"($&)", "a]"); + test(regex_13, "13", R"(a[]]b)", "a]b", "y", R"($&)", "a]b"); + test(regex_14, "14", R"(a[^bc]d)", "aed", "y", R"($&)", "aed"); + test(regex_15, "15", R"(a[^bc]d)", "abd", "n", R"(-)", "-"); + test(regex_16, "16", R"(a[^-b]c)", "adc", "y", R"($&)", "adc"); + test(regex_17, "17", R"(a[^-b]c)", "a-c", "n", R"(-)", "-"); + test(regex_18, "18", R"(a[^]b]c)", "a]c", "n", R"(-)", "-"); + test(regex_19, "19", R"(a[^]b]c)", "adc", "y", R"($&)", "adc"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::to_string() -> std::string{return R"(a[bc]d)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::to_string() -> std::string{return R"(a[bc]d)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::to_string() -> std::string{return R"(a[b]d)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::to_string() -> std::string{return R"([a][b][d])"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::to_string() -> std::string{return R"(.[b].)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::to_string() -> std::string{return R"(.[b].)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"e"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::to_string() -> std::string{return R"(a[b-d]e)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"e"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::to_string() -> std::string{return R"(a[b-d]e)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::to_string() -> std::string{return R"(a[b-d])"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::to_string() -> std::string{return R"(a[-b])"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::to_string() -> std::string{return R"(a[b-])"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a]"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::to_string() -> std::string{return R"(a])"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::to_string() -> std::string{return R"(a[]]b)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::to_string() -> std::string{return R"(a[^bc]d)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::to_string() -> std::string{return R"(a[^bc]d)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::to_string() -> std::string{return R"(a[^-b]c)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::to_string() -> std::string{return R"(a[^-b]c)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::to_string() -> std::string{return R"(a[^]b]c)"; } + + + + + + + template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::to_string() -> std::string{return R"(a[^]b]c)"; } + + +#line 197 "pure2-regex_05_classes.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_05_classes()); +} + diff --git a/regression-tests/test-results/pure2-regex_05_classes.cpp2.output b/regression-tests/test-results/pure2-regex_05_classes.cpp2.output new file mode 100644 index 0000000000..acd844b5e4 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_05_classes.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_05_classes.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_06_boundaries.cpp b/regression-tests/test-results/pure2-regex_06_boundaries.cpp new file mode 100644 index 0000000000..2f750e0815 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_06_boundaries.cpp @@ -0,0 +1,1535 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_06_boundaries.cpp2" + +#line 153 "pure2-regex_06_boundaries.cpp2" +class test_tests_06_boundaries; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_06_boundaries.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_06_boundaries.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_06_boundaries.cpp2" +class test_tests_06_boundaries { + +#line 171 "pure2-regex_06_boundaries.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; + public: test_tests_06_boundaries() = default; + public: test_tests_06_boundaries(test_tests_06_boundaries const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_06_boundaries const&) -> void = delete; + + +#line 192 "pure2-regex_06_boundaries.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_06_boundaries.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_06_boundaries.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_06_boundaries.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 171 "pure2-regex_06_boundaries.cpp2" + auto test_tests_06_boundaries::run() const& -> void{ + std::cout << "Running tests_06_boundaries:" << std::endl; + test(regex_01, "01", R"(\ba\b)", "a-", "y", R"(-)", "-"); + test(regex_02, "02", R"(\ba\b)", "-a", "y", R"(-)", "-"); + test(regex_03, "03", R"(\ba\b)", "-a-", "y", R"(-)", "-"); + test(regex_04, "04", R"(\by\b)", "xy", "n", R"(-)", "-"); + test(regex_05, "05", R"(\by\b)", "yz", "n", R"(-)", "-"); + test(regex_06, "06", R"(\by\b)", "xyz", "n", R"(-)", "-"); + test(regex_07, "07", R"(\Ba\B)", "a-", "n", R"(-)", "-"); + test(regex_08, "08", R"(\Ba\B)", "-a", "n", R"(-)", "-"); + test(regex_09, "09", R"(\Ba\B)", "-a-", "n", R"(-)", "-"); + test(regex_10, "10", R"(\By\b)", "xy", "y", R"(-)", "-"); + test(regex_11, "11", R"(\By\b)", "xy", "y", R"($-[0])", "1"); + test(regex_12, "12", R"(\By\b)", "xy", "y", R"($+[0])", "2"); + test(regex_13, "13", R"(\By\b)", "xy", "y", R"(-)", "-"); + test(regex_14, "14", R"(\by\B)", "yz", "y", R"(-)", "-"); + test(regex_15, "15", R"(\By\B)", "xyz", "y", R"(-)", "-"); + test(regex_16, "16", R"(\b)", "", "n", R"(-)", "-"); + test(regex_17, "17", R"(\B)", "", "y", R"(-)", "-"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::to_string() -> std::string{return R"(\ba\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::to_string() -> std::string{return R"(\ba\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::to_string() -> std::string{return R"(\ba\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::to_string() -> std::string{return R"(\by\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::to_string() -> std::string{return R"(\by\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::to_string() -> std::string{return R"(\by\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::to_string() -> std::string{return R"(\Ba\B)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::to_string() -> std::string{return R"(\Ba\B)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::to_string() -> std::string{return R"(\Ba\B)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::to_string() -> std::string{return R"(\By\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::to_string() -> std::string{return R"(\By\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::to_string() -> std::string{return R"(\By\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::to_string() -> std::string{return R"(\By\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::to_string() -> std::string{return R"(\by\B)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::to_string() -> std::string{return R"(\By\B)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::to_string() -> std::string{return R"(\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::to_string() -> std::string{return R"(\B)"; } + + +#line 193 "pure2-regex_06_boundaries.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_06_boundaries()); +} + diff --git a/regression-tests/test-results/pure2-regex_06_boundaries.cpp2.output b/regression-tests/test-results/pure2-regex_06_boundaries.cpp2.output new file mode 100644 index 0000000000..ae9e61c9a4 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_06_boundaries.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_06_boundaries.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_07_short_classes.cpp b/regression-tests/test-results/pure2-regex_07_short_classes.cpp new file mode 100644 index 0000000000..5ae55bacd5 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_07_short_classes.cpp @@ -0,0 +1,1989 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_07_short_classes.cpp2" + +#line 153 "pure2-regex_07_short_classes.cpp2" +class test_tests_07_short_classes; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_07_short_classes.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_07_short_classes.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_07_short_classes.cpp2" +class test_tests_07_short_classes { + +#line 178 "pure2-regex_07_short_classes.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_24 {}; + public: test_tests_07_short_classes() = default; + public: test_tests_07_short_classes(test_tests_07_short_classes const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_07_short_classes const&) -> void = delete; + + +#line 206 "pure2-regex_07_short_classes.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_07_short_classes.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_07_short_classes.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_07_short_classes.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 178 "pure2-regex_07_short_classes.cpp2" + auto test_tests_07_short_classes::run() const& -> void{ + std::cout << "Running tests_07_short_classes:" << std::endl; + test(regex_01, "01", R"(\w)", "a", "y", R"(-)", "-"); + test(regex_02, "02", R"(\w)", "-", "n", R"(-)", "-"); + test(regex_03, "03", R"(\W)", "a", "n", R"(-)", "-"); + test(regex_04, "04", R"(\W)", "-", "y", R"(-)", "-"); + test(regex_05, "05", R"(a\sb)", "a b", "y", R"(-)", "-"); + test(regex_06, "06", R"(a\sb)", "a-b", "n", R"(-)", "-"); + test(regex_07, "07", R"(a\Sb)", "a b", "n", R"(-)", "-"); + test(regex_08, "08", R"(a\Sb)", "a-b", "y", R"(-)", "-"); + test(regex_09, "09", R"(\d)", "1", "y", R"(-)", "-"); + test(regex_10, "10", R"(\d)", "-", "n", R"(-)", "-"); + test(regex_11, "11", R"(\D)", "1", "n", R"(-)", "-"); + test(regex_12, "12", R"(\D)", "-", "y", R"(-)", "-"); + test(regex_13, "13", R"([\w])", "a", "y", R"(-)", "-"); + test(regex_14, "14", R"([\w])", "-", "n", R"(-)", "-"); + test(regex_15, "15", R"([\W])", "a", "n", R"(-)", "-"); + test(regex_16, "16", R"([\W])", "-", "y", R"(-)", "-"); + test(regex_17, "17", R"(a[\s]b)", "a b", "y", R"(-)", "-"); + test(regex_18, "18", R"(a[\s]b)", "a-b", "n", R"(-)", "-"); + test(regex_19, "19", R"(a[\S]b)", "a b", "n", R"(-)", "-"); + test(regex_20, "20", R"(a[\S]b)", "a-b", "y", R"(-)", "-"); + test(regex_21, "21", R"([\d])", "1", "y", R"(-)", "-"); + test(regex_22, "22", R"([\d])", "-", "n", R"(-)", "-"); + test(regex_23, "23", R"([\D])", "1", "n", R"(-)", "-"); + test(regex_24, "24", R"([\D])", "-", "y", R"(-)", "-"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::to_string() -> std::string{return R"(\w)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::to_string() -> std::string{return R"(\w)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_not_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::to_string() -> std::string{return R"(\W)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_not_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::to_string() -> std::string{return R"(\W)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_space::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::to_string() -> std::string{return R"(a\sb)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_space::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::to_string() -> std::string{return R"(a\sb)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_not_space::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::to_string() -> std::string{return R"(a\Sb)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_not_space::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::to_string() -> std::string{return R"(a\Sb)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_digits::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::to_string() -> std::string{return R"(\d)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_digits::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::to_string() -> std::string{return R"(\d)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_not_digits::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::to_string() -> std::string{return R"(\D)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_not_digits::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::to_string() -> std::string{return R"(\D)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::to_string() -> std::string{return R"([\w])"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::to_string() -> std::string{return R"([\w])"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::to_string() -> std::string{return R"([\W])"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::to_string() -> std::string{return R"([\W])"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::to_string() -> std::string{return R"(a[\s]b)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::to_string() -> std::string{return R"(a[\s]b)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::to_string() -> std::string{return R"(a[\S]b)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::to_string() -> std::string{return R"(a[\S]b)"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::to_string() -> std::string{return R"([\d])"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::to_string() -> std::string{return R"([\d])"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::to_string() -> std::string{return R"([\D])"; } + + + + + + + template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::to_string() -> std::string{return R"([\D])"; } + + +#line 207 "pure2-regex_07_short_classes.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_07_short_classes()); +} + diff --git a/regression-tests/test-results/pure2-regex_07_short_classes.cpp2.output b/regression-tests/test-results/pure2-regex_07_short_classes.cpp2.output new file mode 100644 index 0000000000..c36206ae41 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_07_short_classes.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_07_short_classes.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_08_alternatives.cpp b/regression-tests/test-results/pure2-regex_08_alternatives.cpp new file mode 100644 index 0000000000..543190ff2d --- /dev/null +++ b/regression-tests/test-results/pure2-regex_08_alternatives.cpp @@ -0,0 +1,527 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_08_alternatives.cpp2" + +#line 153 "pure2-regex_08_alternatives.cpp2" +class test_tests_08_alternatives; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_08_alternatives.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_08_alternatives.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_08_alternatives.cpp2" +class test_tests_08_alternatives { + +#line 156 "pure2-regex_08_alternatives.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; + public: test_tests_08_alternatives() = default; + public: test_tests_08_alternatives(test_tests_08_alternatives const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_08_alternatives const&) -> void = delete; + + +#line 162 "pure2-regex_08_alternatives.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_08_alternatives.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_08_alternatives.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_08_alternatives.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 156 "pure2-regex_08_alternatives.cpp2" + auto test_tests_08_alternatives::run() const& -> void{ + std::cout << "Running tests_08_alternatives:" << std::endl; + test(regex_01, "01", R"(ab|cd)", "abc", "y", R"($&)", "ab"); + test(regex_02, "02", R"(ab|cd)", "abcd", "y", R"($&)", "ab"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"cd"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::to_string() -> std::string{return R"(ab|cd)"; } + + + + + + + template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"cd"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::to_string() -> std::string{return R"(ab|cd)"; } + + +#line 163 "pure2-regex_08_alternatives.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_08_alternatives()); +} + diff --git a/regression-tests/test-results/pure2-regex_08_alternatives.cpp2.output b/regression-tests/test-results/pure2-regex_08_alternatives.cpp2.output new file mode 100644 index 0000000000..30ab664bd4 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_08_alternatives.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_08_alternatives.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_09_groups.cpp b/regression-tests/test-results/pure2-regex_09_groups.cpp new file mode 100644 index 0000000000..a37dda119e --- /dev/null +++ b/regression-tests/test-results/pure2-regex_09_groups.cpp @@ -0,0 +1,1368 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_09_groups.cpp2" + +#line 153 "pure2-regex_09_groups.cpp2" +class test_tests_09_groups; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_09_groups.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_09_groups.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_09_groups.cpp2" +class test_tests_09_groups { + +#line 165 "pure2-regex_09_groups.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; + public: test_tests_09_groups() = default; + public: test_tests_09_groups(test_tests_09_groups const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_09_groups const&) -> void = delete; + + +#line 180 "pure2-regex_09_groups.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_09_groups.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_09_groups.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_09_groups.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 165 "pure2-regex_09_groups.cpp2" + auto test_tests_09_groups::run() const& -> void{ + std::cout << "Running tests_09_groups:" << std::endl; + test(regex_01, "01", R"(()ef)", "def", "y", R"($&-$1)", "ef-"); + test(regex_02, "02", R"(()ef)", "def", "y", R"($-[0])", "1"); + test(regex_03, "03", R"(()ef)", "def", "y", R"($+[0])", "3"); + test(regex_04, "04", R"(()ef)", "def", "y", R"($-[1])", "1"); + test(regex_05, "05", R"(()ef)", "def", "y", R"($+[1])", "1"); + test(regex_06, "06", R"(((a)))", "abc", "y", R"($&-$1-$2)", "a-a-a"); + test(regex_07, "07", R"(((a)))", "abc", "y", R"($-[0]-$-[1]-$-[2])", "0-0-0"); + test(regex_08, "08", R"(((a)))", "abc", "y", R"($+[0]-$+[1]-$+[2])", "1-1-1"); + test(regex_09, "09", R"((a)b(c))", "abc", "y", R"($&-$1-$2)", "abc-a-c"); + test(regex_10, "10", R"((a)b(c))", "abc", "y", R"($-[0]-$-[1]-$-[2])", "0-0-2"); + test(regex_11, "11", R"((a)b(c))", "abc", "y", R"($+[0]-$+[1]-$+[2])", "3-1-3"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"ef"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::to_string() -> std::string{return R"(()ef)"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"ef"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::to_string() -> std::string{return R"(()ef)"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"ef"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::to_string() -> std::string{return R"(()ef)"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"ef"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::to_string() -> std::string{return R"(()ef)"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"ef"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::to_string() -> std::string{return R"(()ef)"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_start(2, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::to_string() -> std::string{return R"(((a)))"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_start(2, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::to_string() -> std::string{return R"(((a)))"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_start(2, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::to_string() -> std::string{return R"(((a)))"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::to_string() -> std::string{return R"((a)b(c))"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::to_string() -> std::string{return R"((a)b(c))"; } + + + + + + + template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::to_string() -> std::string{return R"((a)b(c))"; } + + +#line 181 "pure2-regex_09_groups.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_09_groups()); +} + diff --git a/regression-tests/test-results/pure2-regex_09_groups.cpp2.output b/regression-tests/test-results/pure2-regex_09_groups.cpp2.output new file mode 100644 index 0000000000..582d280e31 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_09_groups.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_09_groups.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_10_escapes.cpp b/regression-tests/test-results/pure2-regex_10_escapes.cpp new file mode 100644 index 0000000000..f879aebdf9 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_10_escapes.cpp @@ -0,0 +1,2428 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_10_escapes.cpp2" + +#line 153 "pure2-regex_10_escapes.cpp2" +class test_tests_10_escapes; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_10_escapes.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_10_escapes.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_10_escapes.cpp2" +class test_tests_10_escapes { + +#line 174 "pure2-regex_10_escapes.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; + public: test_tests_10_escapes() = default; + public: test_tests_10_escapes(test_tests_10_escapes const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_10_escapes const&) -> void = delete; + + +#line 198 "pure2-regex_10_escapes.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_10_escapes.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_10_escapes.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_10_escapes.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 174 "pure2-regex_10_escapes.cpp2" + auto test_tests_10_escapes::run() const& -> void{ + std::cout << "Running tests_10_escapes:" << std::endl; + test(regex_01, "01", R"(a\(b)", "a(b", "y", R"($&-$1)", "a(b-"); + test(regex_02, "02", R"(a\(*b)", "ab", "y", R"($&)", "ab"); + test(regex_03, "03", R"(a\(*b)", "a((b", "y", R"($&)", "a((b"); + test(regex_04, "04", R"(a\\b)", "a\\b", "y", R"($&)", "a\\b"); + test(regex_05, "05", R"(foo(\h+)bar)", "foo\tbar", "y", R"($1)", "\t"); + test(regex_06, "06", R"((\H+)(\h))", "foo\tbar", "y", R"($1-$2)", "foo-\t"); + test(regex_07, "07", R"((\h+)(\H))", "foo\tbar", "y", R"($1-$2)", "\t-b"); + test(regex_08, "08", R"(foo(\h)bar)", "foo\tbar", "y", R"($1)", "\t"); + test(regex_09, "09", R"((\H)(\h))", "foo\tbar", "y", R"($1-$2)", "o-\t"); + test(regex_10, "10", R"((\h)(\H))", "foo\tbar", "y", R"($1-$2)", "\t-b"); + test(regex_11, "11", R"(foo(\v+)bar)", "foo\r\n\r\n\nbar", "y", R"($1)", "\r\n\r\n\n"); + test(regex_12, "12", R"((\V+)(\v))", "foo\r\n\r\n\nbar", "y", R"($1-$2)", "foo-\r"); + test(regex_13, "13", R"((\v+)(\V))", "foo\r\n\r\n\nbar", "y", R"($1-$2)", "\r\n\r\n\n-b"); + test(regex_14, "14", R"(foo(\v)bar)", "foo\rbar", "y", R"($1)", "\r"); + test(regex_15, "15", R"((\V)(\v))", "foo\rbar", "y", R"($1-$2)", "o-\r"); + test(regex_16, "16", R"((\v)(\V))", "foo\rbar", "y", R"($1-$2)", "\r-b"); + test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\a""\x1b""bar", "y", R"($&)", "foo\t\n\r\f\a""\x1b""bar"); + test(regex_18, "18", R"(foo\Kbar)", "foobar", "y", R"($&)", "bar"); + test(regex_19, "19", R"(\x41\x42)", "AB", "y", R"($&)", "AB"); + test(regex_20, "20", R"(\101\o{102})", "AB", "y", R"($&)", "AB"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a(b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::to_string() -> std::string{return R"(a\(b)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"("}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::to_string() -> std::string{return R"(a\(*b)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"("}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::to_string() -> std::string{return R"(a\(*b)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a\\b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::to_string() -> std::string{return R"(a\\b)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"bar"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::to_string() -> std::string{return R"(foo(\h+)bar)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_not_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::to_string() -> std::string{return R"((\H+)(\h))"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_not_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::to_string() -> std::string{return R"((\h+)(\H))"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"bar"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::to_string() -> std::string{return R"(foo(\h)bar)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::named_class_not_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::to_string() -> std::string{return R"((\H)(\h))"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_not_hor_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::to_string() -> std::string{return R"((\h)(\H))"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"bar"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::to_string() -> std::string{return R"(foo(\v+)bar)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_not_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::to_string() -> std::string{return R"((\V+)(\v))"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_not_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::to_string() -> std::string{return R"((\v+)(\V))"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"bar"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::to_string() -> std::string{return R"(foo(\v)bar)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::named_class_not_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::to_string() -> std::string{return R"((\V)(\v))"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_not_ver_space::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::to_string() -> std::string{return R"((\v)(\V))"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo\t\n\r\f\a""\x1b""bar"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),12)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,12); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 12;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::to_string() -> std::string{return R"(foo\t\n\r\f\a\ebar)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_start(0, r.pos); + + std::array str_tmp_1 {"bar"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::to_string() -> std::string{return R"(foo\Kbar)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"AB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::to_string() -> std::string{return R"(\x41\x42)"; } + + + + + + + template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"AB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::to_string() -> std::string{return R"(\101\o{102})"; } + + +#line 199 "pure2-regex_10_escapes.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_10_escapes()); +} + diff --git a/regression-tests/test-results/pure2-regex_10_escapes.cpp2.output b/regression-tests/test-results/pure2-regex_10_escapes.cpp2.output new file mode 100644 index 0000000000..936931a8c1 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_10_escapes.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_10_escapes.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_11_group_references.cpp b/regression-tests/test-results/pure2-regex_11_group_references.cpp new file mode 100644 index 0000000000..3161c25782 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_11_group_references.cpp @@ -0,0 +1,3684 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_11_group_references.cpp2" + +#line 153 "pure2-regex_11_group_references.cpp2" +class test_tests_11_group_references; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_11_group_references.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_11_group_references.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_11_group_references.cpp2" +class test_tests_11_group_references { + +#line 178 "pure2-regex_11_group_references.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_24 {}; + public: test_tests_11_group_references() = default; + public: test_tests_11_group_references(test_tests_11_group_references const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_11_group_references const&) -> void = delete; + + +#line 206 "pure2-regex_11_group_references.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_11_group_references.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_11_group_references.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_11_group_references.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 178 "pure2-regex_11_group_references.cpp2" + auto test_tests_11_group_references::run() const& -> void{ + std::cout << "Running tests_11_group_references:" << std::endl; + test(regex_01, "01", R"((foo)(\g-2))", "foofoo", "y", R"($1-$2)", "foo-foo"); + test(regex_02, "02", R"((foo)(\g-2)(foo)(\g-2))", "foofoofoofoo", "y", R"($1-$2-$3-$4)", "foo-foo-foo-foo"); + test(regex_03, "03", R"((([abc]+) \g-1)(([abc]+) \g{-1}))", "abc abccba cba", "y", R"($2-$4)", "abc-cba"); + test(regex_04, "04", R"((a)(b)(c)\g1\g2\g3)", "abcabc", "y", R"($1$2$3)", "abc"); + test(regex_05, "05", R"(/(?'n'foo) \g{n}/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_06, "06", R"(/(?'n'foo) \g{ n }/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_07, "07", R"(/(?'n'foo) \g{n}/)", "..foo foo..", "yM", R"($+{n})", "foo"); + test(regex_08, "08", R"(/(?foo) \g{n}/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_09, "09", R"(/(?foo) \g{n}/)", "..foo foo..", "yM", R"($+{n})", "foo"); + test(regex_10, "10", R"(/(?as) (\w+) \g{as} (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + test(regex_11, "11", R"(/(?'n'foo) \k/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_12, "12", R"(/(?'n'foo) \k/)", "..foo foo..", "yM", R"($+{n})", "foo"); + test(regex_13, "13", R"(/(?foo) \k'n'/)", "..foo foo..", "y", R"($1)", "foo"); + test(regex_14, "14", R"(/(?foo) \k'n'/)", "..foo foo..", "yM", R"($+{n})", "foo"); + test(regex_15, "15", R"(/(?'a1'foo) \k'a1'/)", "..foo foo..", "yM", R"($+{a1})", "foo"); + test(regex_16, "16", R"(/(?foo) \k/)", "..foo foo..", "yM", R"($+{a1})", "foo"); + test(regex_17, "17", R"(/(?'_'foo) \k'_'/)", "..foo foo..", "yM", R"($+{_})", "foo"); + test(regex_18, "18", R"(/(?<_>foo) \k<_>/)", "..foo foo..", "yM", R"($+{_})", "foo"); + test(regex_19, "19", R"(/(?'_0_'foo) \k'_0_'/)", "..foo foo..", "yM", R"($+{_0_})", "foo"); + test(regex_20, "20", R"(/(?<_0_>foo) \k<_0_>/)", "..foo foo..", "yM", R"($+{_0_})", "foo"); + test(regex_21, "21", R"(/(?as) (\w+) \k (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + test(regex_22, "22", R"(/(?as) (\w+) \k{as} (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + test(regex_23, "23", R"(/(?as) (\w+) \k'as' (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + test(regex_24, "24", R"(/(?as) (\w+) \k{ as } (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::to_string() -> std::string{return R"((foo)(\g-2))"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + ctx.set_group_start(3, r.pos); + + std::array str_tmp_3 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(3, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + ctx.set_group_start(4, r.pos); + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(4, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::to_string() -> std::string{return R"((foo)(\g-2)(foo)(\g-2))"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + ctx.set_group_start(3, r.pos); + ctx.set_group_start(4, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(4, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + + std::array str_tmp_4 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(3, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::to_string() -> std::string{return R"((([abc]+) \g-1)(([abc]+) \g{-1}))"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_start(2, r.pos); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + ctx.set_group_start(3, r.pos); + + std::array str_tmp_4 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(3, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::to_string() -> std::string{return R"((a)(b)(c)\g1\g2\g3)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "n") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{n}/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "n") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{ n }/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "n") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{n}/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "n") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::to_string() -> std::string{return R"(/(?foo) \g{n}/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "n") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::to_string() -> std::string{return R"(/(?foo) \g{n}/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"as"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + + std::array str_tmp_4 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_5 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(3, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(3, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "as") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \g{as} (\w+)/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "n") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::to_string() -> std::string{return R"(/(?'n'foo) \k/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "n") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::to_string() -> std::string{return R"(/(?'n'foo) \k/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "n") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::to_string() -> std::string{return R"(/(?foo) \k'n'/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "n") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::to_string() -> std::string{return R"(/(?foo) \k'n'/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "a1") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::to_string() -> std::string{return R"(/(?'a1'foo) \k'a1'/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "a1") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::to_string() -> std::string{return R"(/(?foo) \k/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "_") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::to_string() -> std::string{return R"(/(?'_'foo) \k'_'/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "_") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::to_string() -> std::string{return R"(/(?<_>foo) \k<_>/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "_0_") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::to_string() -> std::string{return R"(/(?'_0_'foo) \k'_0_'/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "_0_") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::to_string() -> std::string{return R"(/(?<_0_>foo) \k<_0_>/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"as"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + + std::array str_tmp_4 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_5 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(3, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(3, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "as") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k (\w+)/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"as"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + + std::array str_tmp_4 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_5 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(3, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(3, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "as") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k{as} (\w+)/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"as"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + + std::array str_tmp_4 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_5 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(3, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(3, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "as") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k'as' (\w+)/)"; } + + + + + + + template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"as"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + + std::array str_tmp_4 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_5 {" "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(3, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(3, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "as") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k{ as } (\w+)/)"; } + + +#line 207 "pure2-regex_11_group_references.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_11_group_references()); +} + diff --git a/regression-tests/test-results/pure2-regex_11_group_references.cpp2.output b/regression-tests/test-results/pure2-regex_11_group_references.cpp2.output new file mode 100644 index 0000000000..c6220a4e25 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_11_group_references.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_11_group_references.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp new file mode 100644 index 0000000000..5fa4130efe --- /dev/null +++ b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp @@ -0,0 +1,19920 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_12_case_insensitive.cpp2" + +#line 153 "pure2-regex_12_case_insensitive.cpp2" +class test_tests_12_case_insensitive; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_12_case_insensitive.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_12_case_insensitive.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_12_case_insensitive.cpp2" +class test_tests_12_case_insensitive { + +#line 273 "pure2-regex_12_case_insensitive.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_100_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_100_matcher() = default; + public: regex_100_matcher(regex_100_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_100_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_100 {}; public: class regex_101_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_101_matcher() = default; + public: regex_101_matcher(regex_101_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_101_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_101 {}; public: class regex_102_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_10 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_11 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_12 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_13 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_102_matcher() = default; + public: regex_102_matcher(regex_102_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_102_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_102 {}; public: class regex_103_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_10 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_11 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_12 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_13 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_103_matcher() = default; + public: regex_103_matcher(regex_103_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_103_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_103 {}; public: class regex_104_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_10 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_11 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_12 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_13 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_104_matcher() = default; + public: regex_104_matcher(regex_104_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_104_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_104 {}; public: class regex_105_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_10 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_11 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_12 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_13 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_105_matcher() = default; + public: regex_105_matcher(regex_105_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_105_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_105 {}; public: class regex_106_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_10 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_11 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_12 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_13 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_106_matcher() = default; + public: regex_106_matcher(regex_106_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_106_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_106 {}; public: class regex_107_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_107_matcher() = default; + public: regex_107_matcher(regex_107_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_107_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_107 {}; public: class regex_108_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_108_matcher() = default; + public: regex_108_matcher(regex_108_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_108_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_108 {}; public: class regex_109_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_109_matcher() = default; + public: regex_109_matcher(regex_109_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_109_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_109 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_110_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_110_matcher() = default; + public: regex_110_matcher(regex_110_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_110_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_110 {}; public: class regex_111_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_111_matcher() = default; + public: regex_111_matcher(regex_111_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_111_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_111 {}; public: class regex_112_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_112_matcher() = default; + public: regex_112_matcher(regex_112_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_112_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_112 {}; public: class regex_113_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_113_matcher() = default; + public: regex_113_matcher(regex_113_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_113_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_113 {}; public: class regex_114_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_114_matcher() = default; + public: regex_114_matcher(regex_114_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_114_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_114 {}; public: class regex_115_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_115_matcher() = default; + public: regex_115_matcher(regex_115_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_115_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_115 {}; public: class regex_116_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_116_matcher() = default; + public: regex_116_matcher(regex_116_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_116_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_116 {}; public: class regex_117_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_117_matcher() = default; + public: regex_117_matcher(regex_117_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_117_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_117 {}; public: class regex_118_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_118_matcher() = default; + public: regex_118_matcher(regex_118_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_118_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_118 {}; public: class regex_119_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_119_matcher() = default; + public: regex_119_matcher(regex_119_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_119_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_119 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_25_matcher() = default; + public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_25_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_26_matcher() = default; + public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_26_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_27_matcher() = default; + public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_27_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_28_matcher() = default; + public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_28_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_29_matcher() = default; + public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_29_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_30_matcher() = default; + public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_30_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_31_matcher() = default; + public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_31_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_32_matcher() = default; + public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_32_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_33_matcher() = default; + public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_33_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_34_matcher() = default; + public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_34_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_35_matcher() = default; + public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_35_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_36_matcher() = default; + public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_36_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_37_matcher() = default; + public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_37_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_38_matcher() = default; + public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_38_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_39_matcher() = default; + public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_39_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_40_matcher() = default; + public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_40_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_41_matcher() = default; + public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_41_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_42_matcher() = default; + public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_42_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_43_matcher() = default; + public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_43_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_44_matcher() = default; + public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_44_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_45_matcher() = default; + public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_45_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_46_matcher() = default; + public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_46_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_47_matcher() = default; + public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_47_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_48_matcher() = default; + public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_48_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_49_matcher() = default; + public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_49_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_50_matcher() = default; + public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_50_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_51_matcher() = default; + public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_51_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_52_matcher() = default; + public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_52_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_53_matcher() = default; + public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_53_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_53 {}; public: class regex_54_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_54_matcher() = default; + public: regex_54_matcher(regex_54_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_54_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_54 {}; public: class regex_55_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_55_matcher() = default; + public: regex_55_matcher(regex_55_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_55_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_55 {}; public: class regex_56_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_56_matcher() = default; + public: regex_56_matcher(regex_56_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_56_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_56 {}; public: class regex_57_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_57_matcher() = default; + public: regex_57_matcher(regex_57_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_57_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_57 {}; public: class regex_58_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_58_matcher() = default; + public: regex_58_matcher(regex_58_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_58_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_58 {}; public: class regex_59_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_59_matcher() = default; + public: regex_59_matcher(regex_59_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_59_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_59 {}; public: class regex_60_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_60_matcher() = default; + public: regex_60_matcher(regex_60_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_60_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_60 {}; public: class regex_61_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_61_matcher() = default; + public: regex_61_matcher(regex_61_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_61_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_61 {}; public: class regex_62_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_62_matcher() = default; + public: regex_62_matcher(regex_62_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_62_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_62 {}; public: class regex_63_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_63_matcher() = default; + public: regex_63_matcher(regex_63_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_63_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_63 {}; public: class regex_64_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_64_matcher() = default; + public: regex_64_matcher(regex_64_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_64_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_64 {}; public: class regex_65_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_65_matcher() = default; + public: regex_65_matcher(regex_65_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_65_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_65 {}; public: class regex_66_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_66_matcher() = default; + public: regex_66_matcher(regex_66_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_66_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_66 {}; public: class regex_67_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_67_matcher() = default; + public: regex_67_matcher(regex_67_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_67_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_67 {}; public: class regex_68_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_68_matcher() = default; + public: regex_68_matcher(regex_68_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_68_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_68 {}; public: class regex_69_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_69_matcher() = default; + public: regex_69_matcher(regex_69_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_69_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_69 {}; public: class regex_70_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_70_matcher() = default; + public: regex_70_matcher(regex_70_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_70_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_70 {}; public: class regex_71_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_71_matcher() = default; + public: regex_71_matcher(regex_71_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_71_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_71 {}; public: class regex_72_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_72_matcher() = default; + public: regex_72_matcher(regex_72_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_72_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_72 {}; public: class regex_73_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_73_matcher() = default; + public: regex_73_matcher(regex_73_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_73_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_73 {}; public: class regex_74_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_74_matcher() = default; + public: regex_74_matcher(regex_74_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_74_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_74 {}; public: class regex_75_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_75_matcher() = default; + public: regex_75_matcher(regex_75_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_75_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_75 {}; public: class regex_76_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_76_matcher() = default; + public: regex_76_matcher(regex_76_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_76_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_76 {}; public: class regex_77_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_77_matcher() = default; + public: regex_77_matcher(regex_77_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_77_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_77 {}; public: class regex_78_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_78_matcher() = default; + public: regex_78_matcher(regex_78_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_78_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_78 {}; public: class regex_79_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_79_matcher() = default; + public: regex_79_matcher(regex_79_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_79_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_79 {}; public: class regex_80_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_80_matcher() = default; + public: regex_80_matcher(regex_80_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_80_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_80 {}; public: class regex_81_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_81_matcher() = default; + public: regex_81_matcher(regex_81_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_81_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_81 {}; public: class regex_82_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_82_matcher() = default; + public: regex_82_matcher(regex_82_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_82_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_82 {}; public: class regex_83_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_83_matcher() = default; + public: regex_83_matcher(regex_83_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_83_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_83 {}; public: class regex_84_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_84_matcher() = default; + public: regex_84_matcher(regex_84_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_84_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_84 {}; public: class regex_85_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_85_matcher() = default; + public: regex_85_matcher(regex_85_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_85_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_85 {}; public: class regex_86_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_86_matcher() = default; + public: regex_86_matcher(regex_86_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_86_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_86 {}; public: class regex_87_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_87_matcher() = default; + public: regex_87_matcher(regex_87_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_87_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_87 {}; public: class regex_88_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_88_matcher() = default; + public: regex_88_matcher(regex_88_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_88_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_88 {}; public: class regex_89_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_89_matcher() = default; + public: regex_89_matcher(regex_89_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_89_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_89 {}; public: class regex_90_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_90_matcher() = default; + public: regex_90_matcher(regex_90_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_90_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_90 {}; public: class regex_91_matcher { + public: template class wrap { + public: 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: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_91_matcher() = default; + public: regex_91_matcher(regex_91_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_91_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_91 {}; public: class regex_92_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_92_matcher() = default; + public: regex_92_matcher(regex_92_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_92_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_92 {}; public: class regex_93_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_93_matcher() = default; + public: regex_93_matcher(regex_93_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_93_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_93 {}; public: class regex_94_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_94_matcher() = default; + public: regex_94_matcher(regex_94_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_94_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_94 {}; public: class regex_95_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_95_matcher() = default; + public: regex_95_matcher(regex_95_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_95_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_95 {}; public: class regex_96_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_96_matcher() = default; + public: regex_96_matcher(regex_96_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_96_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_96 {}; public: class regex_97_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_97_matcher() = default; + public: regex_97_matcher(regex_97_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_97_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_97 {}; public: class regex_98_matcher { + public: template class wrap { + public: 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: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_98_matcher() = default; + public: regex_98_matcher(regex_98_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_98_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_98 {}; public: class regex_99_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_99_matcher() = default; + public: regex_99_matcher(regex_99_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_99_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_99 {}; + public: test_tests_12_case_insensitive() = default; + public: test_tests_12_case_insensitive(test_tests_12_case_insensitive const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_12_case_insensitive const&) -> void = delete; + + +#line 396 "pure2-regex_12_case_insensitive.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_12_case_insensitive.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_12_case_insensitive.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_12_case_insensitive.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 273 "pure2-regex_12_case_insensitive.cpp2" + auto test_tests_12_case_insensitive::run() const& -> void{ + std::cout << "Running tests_12_case_insensitive:" << std::endl; + test(regex_01, "01", R"('abc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_02, "02", R"('abc'i)", "XBC", "n", R"(-)", "-"); + test(regex_03, "03", R"('abc'i)", "AXC", "n", R"(-)", "-"); + test(regex_04, "04", R"('abc'i)", "ABX", "n", R"(-)", "-"); + test(regex_05, "05", R"('abc'i)", "XABCY", "y", R"($&)", "ABC"); + test(regex_06, "06", R"('abc'i)", "ABABC", "y", R"($&)", "ABC"); + test(regex_07, "07", R"('ab*c'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_08, "08", R"('ab*bc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_09, "09", R"('ab*bc'i)", "ABBC", "y", R"($&)", "ABBC"); + test(regex_10, "10", R"('ab*?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_11, "11", R"('ab{0,}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_12, "12", R"('ab+?bc'i)", "ABBC", "y", R"($&)", "ABBC"); + test(regex_13, "13", R"('ab+bc'i)", "ABC", "n", R"(-)", "-"); + test(regex_14, "14", R"('ab+bc'i)", "ABQ", "n", R"(-)", "-"); + test(regex_15, "15", R"('ab{1,}bc'i)", "ABQ", "n", R"(-)", "-"); + test(regex_16, "16", R"('ab+bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_17, "17", R"('ab{1,}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_18, "18", R"('ab{1,3}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_19, "19", R"('ab{3,4}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC"); + test(regex_20, "20", R"('ab{4,5}?bc'i)", "ABBBBC", "n", R"(-)", "-"); + test(regex_21, "21", R"('ab??bc'i)", "ABBC", "y", R"($&)", "ABBC"); + test(regex_22, "22", R"('ab??bc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_23, "23", R"('ab{0,1}?bc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_24, "24", R"('ab??bc'i)", "ABBBBC", "n", R"(-)", "-"); + test(regex_25, "25", R"('ab??c'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_26, "26", R"('ab{0,1}?c'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_27, "27", R"('^abc$'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_28, "28", R"('^abc$'i)", "ABCC", "n", R"(-)", "-"); + test(regex_29, "29", R"('^abc'i)", "ABCC", "y", R"($&)", "ABC"); + test(regex_30, "30", R"('^abc$'i)", "AABC", "n", R"(-)", "-"); + test(regex_31, "31", R"('abc$'i)", "AABC", "y", R"($&)", "ABC"); + test(regex_32, "32", R"('^'i)", "ABC", "y", R"($&)", ""); + test(regex_33, "33", R"('$'i)", "ABC", "y", R"($&)", ""); + test(regex_34, "34", R"('a.c'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_35, "35", R"('a.c'i)", "AXC", "y", R"($&)", "AXC"); + test(regex_36, "36", R"('a\Nc'i)", "ABC", "y", R"($&)", "ABC"); + test(regex_37, "37", R"('a.*?c'i)", "AXYZC", "y", R"($&)", "AXYZC"); + test(regex_38, "38", R"('a.*c'i)", "AXYZD", "n", R"(-)", "-"); + test(regex_39, "39", R"('a[bc]d'i)", "ABC", "n", R"(-)", "-"); + test(regex_40, "40", R"('a[bc]d'i)", "ABD", "y", R"($&)", "ABD"); + test(regex_41, "41", R"('a[b-d]e'i)", "ABD", "n", R"(-)", "-"); + test(regex_42, "42", R"('a[b-d]e'i)", "ACE", "y", R"($&)", "ACE"); + test(regex_43, "43", R"('a[b-d]'i)", "AAC", "y", R"($&)", "AC"); + test(regex_44, "44", R"('a[-b]'i)", "A-", "y", R"($&)", "A-"); + test(regex_45, "45", R"('a[b-]'i)", "A-", "y", R"($&)", "A-"); + test(regex_46, "46", R"('a]'i)", "A]", "y", R"($&)", "A]"); + test(regex_47, "47", R"('a[]]b'i)", "A]B", "y", R"($&)", "A]B"); + test(regex_48, "48", R"('a[^bc]d'i)", "AED", "y", R"($&)", "AED"); + test(regex_49, "49", R"('a[^bc]d'i)", "ABD", "n", R"(-)", "-"); + test(regex_50, "50", R"('a[^-b]c'i)", "ADC", "y", R"($&)", "ADC"); + test(regex_51, "51", R"('a[^-b]c'i)", "A-C", "n", R"(-)", "-"); + test(regex_52, "52", R"('a[^]b]c'i)", "A]C", "n", R"(-)", "-"); + test(regex_53, "53", R"('a[^]b]c'i)", "ADC", "y", R"($&)", "ADC"); + test(regex_54, "54", R"('ab|cd'i)", "ABC", "y", R"($&)", "AB"); + test(regex_55, "55", R"('ab|cd'i)", "ABCD", "y", R"($&)", "AB"); + test(regex_56, "56", R"('()ef'i)", "DEF", "y", R"($&-$1)", "EF-"); + test(regex_57, "57", R"('$b'i)", "B", "n", R"(-)", "-"); + test(regex_58, "58", R"('a\(b'i)", "A(B", "y", R"($&-$1)", "A(B-"); + test(regex_59, "59", R"('a\(*b'i)", "AB", "y", R"($&)", "AB"); + test(regex_60, "60", R"('a\(*b'i)", "A((B", "y", R"($&)", "A((B"); + test(regex_61, "61", R"('a\\b'i)", "A\\B", "y", R"($&)", "A\\B"); + test(regex_62, "62", R"('((a))'i)", "ABC", "y", R"($&-$1-$2)", "A-A-A"); + test(regex_63, "63", R"('(a)b(c)'i)", "ABC", "y", R"($&-$1-$2)", "ABC-A-C"); + test(regex_64, "64", R"('a+b+c'i)", "AABBABC", "y", R"($&)", "ABC"); + test(regex_65, "65", R"('a{1,}b{1,}c'i)", "AABBABC", "y", R"($&)", "ABC"); + test(regex_66, "66", R"('a.+?c'i)", "ABCABC", "y", R"($&)", "ABC"); + test(regex_67, "67", R"('a.*?c'i)", "ABCABC", "y", R"($&)", "ABC"); + test(regex_68, "68", R"('a.{0,5}?c'i)", "ABCABC", "y", R"($&)", "ABC"); + test(regex_69, "69", R"('(a+|b)*'i)", "AB", "y", R"($&-$1)", "AB-B"); + test(regex_70, "70", R"('(a+|b){0,}'i)", "AB", "y", R"($&-$1)", "AB-B"); + test(regex_71, "71", R"('(a+|b)+'i)", "AB", "y", R"($&-$1)", "AB-B"); + test(regex_72, "72", R"('(a+|b){1,}'i)", "AB", "y", R"($&-$1)", "AB-B"); + test(regex_73, "73", R"('(a+|b)?'i)", "AB", "y", R"($&-$1)", "A-A"); + test(regex_74, "74", R"('(a+|b){0,1}'i)", "AB", "y", R"($&-$1)", "A-A"); + test(regex_75, "75", R"('(a+|b){0,1}?'i)", "AB", "y", R"($&-$1)", "-"); + test(regex_76, "76", R"('[^ab]*'i)", "CDE", "y", R"($&)", "CDE"); + test(regex_77, "77", R"('abc'i)", "", "n", R"(-)", "-"); + test(regex_78, "78", R"('a*'i)", "", "y", R"($&)", ""); + test(regex_79, "79", R"('([abc])*d'i)", "ABBBCD", "y", R"($&-$1)", "ABBBCD-C"); + test(regex_80, "80", R"('([abc])*bcd'i)", "ABCD", "y", R"($&-$1)", "ABCD-A"); + test(regex_81, "81", R"('a|b|c|d|e'i)", "E", "y", R"($&)", "E"); + test(regex_82, "82", R"('(a|b|c|d|e)f'i)", "EF", "y", R"($&-$1)", "EF-E"); + test(regex_83, "83", R"('abcd*efg'i)", "ABCDEFG", "y", R"($&)", "ABCDEFG"); + test(regex_84, "84", R"('ab*'i)", "XABYABBBZ", "y", R"($&)", "AB"); + test(regex_85, "85", R"('ab*'i)", "XAYABBBZ", "y", R"($&)", "A"); + test(regex_86, "86", R"('(ab|cd)e'i)", "ABCDE", "y", R"($&-$1)", "CDE-CD"); + test(regex_87, "87", R"('[abhgefdc]ij'i)", "HIJ", "y", R"($&)", "HIJ"); + test(regex_88, "88", R"('^(ab|cd)e'i)", "ABCDE", "n", R"(x$1y)", "XY"); + test(regex_89, "89", R"('(abc|)ef'i)", "ABCDEF", "y", R"($&-$1)", "EF-"); + test(regex_90, "90", R"('(a|b)c*d'i)", "ABCD", "y", R"($&-$1)", "BCD-B"); + test(regex_91, "91", R"('(ab|ab*)bc'i)", "ABC", "y", R"($&-$1)", "ABC-A"); + test(regex_92, "92", R"('a([bc]*)c*'i)", "ABC", "y", R"($&-$1)", "ABC-BC"); + test(regex_93, "93", R"('a([bc]*)(c*d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-BC-D"); + test(regex_94, "94", R"('a([bc]+)(c*d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-BC-D"); + test(regex_95, "95", R"('a([bc]*)(c+d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-B-CD"); + test(regex_96, "96", R"('a[bcd]*dcdcde'i)", "ADCDCDE", "y", R"($&)", "ADCDCDE"); + test(regex_97, "97", R"('a[bcd]+dcdcde'i)", "ADCDCDE", "n", R"(-)", "-"); + test(regex_98, "98", R"('(ab|a)b*c'i)", "ABC", "y", R"($&-$1)", "ABC-AB"); + test(regex_99, "99", R"('((a)(b)c)(d)'i)", "ABCD", "y", R"($1-$2-$3-$4)", "ABC-A-B-D"); + test(regex_100, "100", R"('[a-zA-Z_][a-zA-Z0-9_]*'i)", "ALPHA", "y", R"($&)", "ALPHA"); + test(regex_101, "101", R"('^a(bc+|b[eh])g|.h$'i)", "ABH", "y", R"($&-$1)", "BH-"); + test(regex_102, "102", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "EFFGZ", "y", R"($&-$1-$2)", "EFFGZ-EFFGZ-"); + test(regex_103, "103", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "IJ", "y", R"($&-$1-$2)", "IJ-IJ-J"); + test(regex_104, "104", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "EFFG", "n", R"(-)", "-"); + test(regex_105, "105", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "BCDD", "n", R"(-)", "-"); + test(regex_106, "106", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "REFFGZ", "y", R"($&-$1-$2)", "EFFGZ-EFFGZ-"); + test(regex_107, "107", R"('((((((((((a))))))))))'i)", "A", "y", R"($10)", "A"); + test(regex_108, "108", R"('((((((((((a))))))))))\10'i)", "AA", "y", R"($&)", "AA"); + test(regex_109, "109", R"('(((((((((a)))))))))'i)", "A", "y", R"($&)", "A"); + test(regex_110, "110", R"('multiple words of text'i)", "UH-UH", "n", R"(-)", "-"); + test(regex_111, "111", R"('multiple words'i)", "MULTIPLE WORDS, YEAH", "y", R"($&)", "MULTIPLE WORDS"); + test(regex_112, "112", R"('(.*)c(.*)'i)", "ABCDE", "y", R"($&-$1-$2)", "ABCDE-AB-DE"); + test(regex_113, "113", R"('\((.*), (.*)\)'i)", "(A, B)", "y", R"(($2, $1))", "(B, A)"); + test(regex_114, "114", R"('[k]'i)", "AB", "n", R"(-)", "-"); + test(regex_115, "115", R"('abcd'i)", "ABCD", "y", R"($&)", "ABCD"); + test(regex_116, "116", R"('a(bc)d'i)", "ABCD", "y", R"($1)", "BC"); + test(regex_117, "117", R"('a[-]?c'i)", "AC", "y", R"($&)", "AC"); + test(regex_118, "118", R"('(abc)\1'i)", "ABCABC", "y", R"($1)", "ABC"); + test(regex_119, "119", R"('([a-c]*)\1'i)", "ABCABC", "y", R"($1)", "ABC"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::to_string() -> std::string{return R"('abc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::to_string() -> std::string{return R"('abc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::to_string() -> std::string{return R"('abc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::to_string() -> std::string{return R"('abc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::to_string() -> std::string{return R"('abc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::to_string() -> std::string{return R"('abc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::to_string() -> std::string{return R"('ab*c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::to_string() -> std::string{return R"('ab*bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::to_string() -> std::string{return R"('ab*bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::to_string() -> std::string{return R"('ab*?bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::to_string() -> std::string{return R"('[a-zA-Z_][a-zA-Z0-9_]*'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"b"}; + + std::array upper_str_tmp_3 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + + std::array lower_str_tmp_5 {"g"}; + + std::array upper_str_tmp_5 {"G"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_101_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_6 {"h"}; + + std::array upper_str_tmp_6 {"H"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_1(), reset_0(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::to_string() -> std::string{return R"('^a(bc+|b[eh])g|.h$'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"b"}; + + std::array upper_str_tmp_0 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"d"}; + + std::array upper_str_tmp_2 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_4 {"f"}; + + std::array upper_str_tmp_4 {"F"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"e"}; + + std::array upper_str_tmp_3 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_5 {"g"}; + + std::array upper_str_tmp_5 {"G"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_6 {"h"}; + + std::array upper_str_tmp_6 {"H"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_8 {"j"}; + + std::array upper_str_tmp_8 {"J"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_9 {"k"}; + + std::array upper_str_tmp_9 {"K"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_7 {"i"}; + + std::array upper_str_tmp_7 {"I"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_102_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_11_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; + static_cast(cpp2::move(tmp_11)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"b"}; + + std::array upper_str_tmp_0 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"d"}; + + std::array upper_str_tmp_2 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_4 {"f"}; + + std::array upper_str_tmp_4 {"F"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"e"}; + + std::array upper_str_tmp_3 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_5 {"g"}; + + std::array upper_str_tmp_5 {"G"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_6 {"h"}; + + std::array upper_str_tmp_6 {"H"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_8 {"j"}; + + std::array upper_str_tmp_8 {"J"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_9 {"k"}; + + std::array upper_str_tmp_9 {"K"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_7 {"i"}; + + std::array upper_str_tmp_7 {"I"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_103_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_11_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; + static_cast(cpp2::move(tmp_11)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"b"}; + + std::array upper_str_tmp_0 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"d"}; + + std::array upper_str_tmp_2 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_4 {"f"}; + + std::array upper_str_tmp_4 {"F"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"e"}; + + std::array upper_str_tmp_3 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_5 {"g"}; + + std::array upper_str_tmp_5 {"G"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_6 {"h"}; + + std::array upper_str_tmp_6 {"H"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_8 {"j"}; + + std::array upper_str_tmp_8 {"J"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_9 {"k"}; + + std::array upper_str_tmp_9 {"K"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_7 {"i"}; + + std::array upper_str_tmp_7 {"I"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_104_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_11_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; + static_cast(cpp2::move(tmp_11)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"b"}; + + std::array upper_str_tmp_0 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"d"}; + + std::array upper_str_tmp_2 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_4 {"f"}; + + std::array upper_str_tmp_4 {"F"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"e"}; + + std::array upper_str_tmp_3 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_5 {"g"}; + + std::array upper_str_tmp_5 {"G"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_6 {"h"}; + + std::array upper_str_tmp_6 {"H"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_8 {"j"}; + + std::array upper_str_tmp_8 {"J"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_9 {"k"}; + + std::array upper_str_tmp_9 {"K"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_7 {"i"}; + + std::array upper_str_tmp_7 {"I"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_105_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_11_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; + static_cast(cpp2::move(tmp_11)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"b"}; + + std::array upper_str_tmp_0 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"d"}; + + std::array upper_str_tmp_2 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_4 {"f"}; + + std::array upper_str_tmp_4 {"F"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"e"}; + + std::array upper_str_tmp_3 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_5 {"g"}; + + std::array upper_str_tmp_5 {"G"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_6 {"h"}; + + std::array upper_str_tmp_6 {"H"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_8 {"j"}; + + std::array upper_str_tmp_8 {"J"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_9 {"k"}; + + std::array upper_str_tmp_9 {"K"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_7 {"i"}; + + std::array upper_str_tmp_7 {"I"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_106_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_11_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; + static_cast(cpp2::move(tmp_11)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_start(2, r.pos); + ctx.set_group_start(3, r.pos); + ctx.set_group_start(4, r.pos); + ctx.set_group_start(5, r.pos); + ctx.set_group_start(6, r.pos); + ctx.set_group_start(7, r.pos); + ctx.set_group_start(8, r.pos); + ctx.set_group_start(9, r.pos); + ctx.set_group_start(10, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(10, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(10); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_end(9, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(9); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + ctx.set_group_end(8, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(8); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + ctx.set_group_end(7, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(7); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + ctx.set_group_end(6, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(6); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + ctx.set_group_end(5, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(5); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + ctx.set_group_end(4, r.pos); + + auto tmp_7_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4); + } + } + }; + + auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; + static_cast(cpp2::move(tmp_7)); + ctx.set_group_end(3, r.pos); + + auto tmp_8_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_8 {cpp2::regex::make_on_return(cpp2::move(tmp_8_func))}; + static_cast(cpp2::move(tmp_8)); + ctx.set_group_end(2, r.pos); + + auto tmp_9_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; + static_cast(cpp2::move(tmp_9)); + ctx.set_group_end(1, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::to_string() -> std::string{return R"('((((((((((a))))))))))'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_start(2, r.pos); + ctx.set_group_start(3, r.pos); + ctx.set_group_start(4, r.pos); + ctx.set_group_start(5, r.pos); + ctx.set_group_start(6, r.pos); + ctx.set_group_start(7, r.pos); + ctx.set_group_start(8, r.pos); + ctx.set_group_start(9, r.pos); + ctx.set_group_start(10, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(10, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(10); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_end(9, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(9); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + ctx.set_group_end(8, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(8); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + ctx.set_group_end(7, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(7); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + ctx.set_group_end(6, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(6); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + ctx.set_group_end(5, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(5); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + ctx.set_group_end(4, r.pos); + + auto tmp_7_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4); + } + } + }; + + auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; + static_cast(cpp2::move(tmp_7)); + ctx.set_group_end(3, r.pos); + + auto tmp_8_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_8 {cpp2::regex::make_on_return(cpp2::move(tmp_8_func))}; + static_cast(cpp2::move(tmp_8)); + ctx.set_group_end(2, r.pos); + + auto tmp_9_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; + static_cast(cpp2::move(tmp_9)); + ctx.set_group_end(1, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::to_string() -> std::string{return R"('((((((((((a))))))))))\10'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_start(2, r.pos); + ctx.set_group_start(3, r.pos); + ctx.set_group_start(4, r.pos); + ctx.set_group_start(5, r.pos); + ctx.set_group_start(6, r.pos); + ctx.set_group_start(7, r.pos); + ctx.set_group_start(8, r.pos); + ctx.set_group_start(9, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(9, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(9); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_end(8, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(8); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + ctx.set_group_end(7, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(7); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + ctx.set_group_end(6, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(6); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + ctx.set_group_end(5, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(5); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + ctx.set_group_end(4, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + ctx.set_group_end(3, r.pos); + + auto tmp_7_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; + static_cast(cpp2::move(tmp_7)); + ctx.set_group_end(2, r.pos); + + auto tmp_8_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_8 {cpp2::regex::make_on_return(cpp2::move(tmp_8_func))}; + static_cast(cpp2::move(tmp_8)); + ctx.set_group_end(1, r.pos); + + auto tmp_9_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; + static_cast(cpp2::move(tmp_9)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::to_string() -> std::string{return R"('(((((((((a)))))))))'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::to_string() -> std::string{return R"('ab{0,}?bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"multiple words of text"}; + + std::array upper_str_tmp_0 {"MULTIPLE WORDS OF TEXT"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),22)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,22); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 22;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::to_string() -> std::string{return R"('multiple words of text'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"multiple words"}; + + std::array upper_str_tmp_0 {"MULTIPLE WORDS"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),14)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,14); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 14;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::to_string() -> std::string{return R"('multiple words'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::to_string() -> std::string{return R"('(.*)c(.*)'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"("}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {", "}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + + std::array str_tmp_4 {")"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::to_string() -> std::string{return R"('\((.*), (.*)\)'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::to_string() -> std::string{return R"('[k]'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abcd"}; + + std::array upper_str_tmp_0 {"ABCD"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::to_string() -> std::string{return R"('abcd'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_1 {"bc"}; + + std::array upper_str_tmp_1 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + + std::array lower_str_tmp_3 {"d"}; + + std::array upper_str_tmp_3 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::to_string() -> std::string{return R"('a(bc)d'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::to_string() -> std::string{return R"('a[-]?c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::to_string() -> std::string{return R"('(abc)\1'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::to_string() -> std::string{return R"('([a-c]*)\1'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::to_string() -> std::string{return R"('ab+?bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::to_string() -> std::string{return R"('ab+bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::to_string() -> std::string{return R"('ab+bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::to_string() -> std::string{return R"('ab{1,}bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::to_string() -> std::string{return R"('ab+bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::to_string() -> std::string{return R"('ab{1,}?bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::to_string() -> std::string{return R"('ab{1,3}?bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::to_string() -> std::string{return R"('ab{3,4}?bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::to_string() -> std::string{return R"('ab{4,5}?bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::to_string() -> std::string{return R"('ab??bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::to_string() -> std::string{return R"('ab??bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::to_string() -> std::string{return R"('ab{0,1}?bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"bc"}; + + std::array upper_str_tmp_2 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::to_string() -> std::string{return R"('ab??bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::to_string() -> std::string{return R"('ab??c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::to_string() -> std::string{return R"('ab{0,1}?c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::to_string() -> std::string{return R"('^abc$'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::to_string() -> std::string{return R"('^abc$'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::to_string() -> std::string{return R"('^abc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::to_string() -> std::string{return R"('^abc$'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::to_string() -> std::string{return R"('abc$'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::to_string() -> std::string{return R"('^'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::to_string() -> std::string{return R"('$'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::to_string() -> std::string{return R"('a.c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::to_string() -> std::string{return R"('a.c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::to_string() -> std::string{return R"('a\Nc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::to_string() -> std::string{return R"('a.*?c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::to_string() -> std::string{return R"('a.*c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"d"}; + + std::array upper_str_tmp_1 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::to_string() -> std::string{return R"('a[bc]d'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"d"}; + + std::array upper_str_tmp_1 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::to_string() -> std::string{return R"('a[bc]d'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"e"}; + + std::array upper_str_tmp_1 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::to_string() -> std::string{return R"('a[b-d]e'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"e"}; + + std::array upper_str_tmp_1 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::to_string() -> std::string{return R"('a[b-d]e'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::to_string() -> std::string{return R"('a[b-d]'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::to_string() -> std::string{return R"('a[-b]'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::to_string() -> std::string{return R"('a[b-]'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a]"}; + + std::array upper_str_tmp_0 {"A]"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::to_string() -> std::string{return R"('a]'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::to_string() -> std::string{return R"('a[]]b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"d"}; + + std::array upper_str_tmp_1 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::to_string() -> std::string{return R"('a[^bc]d'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"d"}; + + std::array upper_str_tmp_1 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::to_string() -> std::string{return R"('a[^bc]d'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::to_string() -> std::string{return R"('a[^-b]c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::to_string() -> std::string{return R"('a[^-b]c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::to_string() -> std::string{return R"('a[^]b]c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::to_string() -> std::string{return R"('a[^]b]c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"ab"}; + + std::array upper_str_tmp_0 {"AB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"cd"}; + + std::array upper_str_tmp_1 {"CD"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::to_string() -> std::string{return R"('ab|cd'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"ab"}; + + std::array upper_str_tmp_0 {"AB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"cd"}; + + std::array upper_str_tmp_1 {"CD"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::to_string() -> std::string{return R"('ab|cd'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array lower_str_tmp_1 {"ef"}; + + std::array upper_str_tmp_1 {"EF"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::to_string() -> std::string{return R"('()ef'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_0 {"b"}; + + std::array upper_str_tmp_0 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::to_string() -> std::string{return R"('$b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a(b"}; + + std::array upper_str_tmp_0 {"A(B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::to_string() -> std::string{return R"('a\(b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"("}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::to_string() -> std::string{return R"('a\(*b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"("}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::to_string() -> std::string{return R"('a\(*b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a\\b"}; + + std::array upper_str_tmp_0 {"A\\B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::to_string() -> std::string{return R"('a\\b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_start(2, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::to_string() -> std::string{return R"('((a))'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + + std::array lower_str_tmp_3 {"c"}; + + std::array upper_str_tmp_3 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::to_string() -> std::string{return R"('(a)b(c)'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::to_string() -> std::string{return R"('a+b+c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::to_string() -> std::string{return R"('a{1,}b{1,}c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::to_string() -> std::string{return R"('a.+?c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::to_string() -> std::string{return R"('a.*?c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"c"}; + + std::array upper_str_tmp_1 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::to_string() -> std::string{return R"('a.{0,5}?c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_69_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::to_string() -> std::string{return R"('(a+|b)*'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_70_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::to_string() -> std::string{return R"('(a+|b){0,}'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_71_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::to_string() -> std::string{return R"('(a+|b)+'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_72_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::to_string() -> std::string{return R"('(a+|b){1,}'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_73_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::to_string() -> std::string{return R"('(a+|b)?'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_74_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::to_string() -> std::string{return R"('(a+|b){0,1}'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_75_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::to_string() -> std::string{return R"('(a+|b){0,1}?'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::to_string() -> std::string{return R"('[^ab]*'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::to_string() -> std::string{return R"('abc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::to_string() -> std::string{return R"('a*'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_79_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"d"}; + + std::array upper_str_tmp_1 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::to_string() -> std::string{return R"('([abc])*d'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_12_case_insensitive::regex_80_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"bcd"}; + + std::array upper_str_tmp_1 {"BCD"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::to_string() -> std::string{return R"('([abc])*bcd'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"d"}; + + std::array upper_str_tmp_3 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_4 {"e"}; + + std::array upper_str_tmp_4 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::to_string() -> std::string{return R"('a|b|c|d|e'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"d"}; + + std::array upper_str_tmp_3 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_4 {"e"}; + + std::array upper_str_tmp_4 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + + std::array lower_str_tmp_6 {"f"}; + + std::array upper_str_tmp_6 {"F"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::to_string() -> std::string{return R"('(a|b|c|d|e)f'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"d"}; + + std::array upper_str_tmp_1 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"efg"}; + + std::array upper_str_tmp_2 {"EFG"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::to_string() -> std::string{return R"('abcd*efg'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::to_string() -> std::string{return R"('ab*'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::to_string() -> std::string{return R"('ab*'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"ab"}; + + std::array upper_str_tmp_0 {"AB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"cd"}; + + std::array upper_str_tmp_1 {"CD"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + + std::array lower_str_tmp_3 {"e"}; + + std::array upper_str_tmp_3 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::to_string() -> std::string{return R"('(ab|cd)e'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array lower_str_tmp_0 {"ij"}; + + std::array upper_str_tmp_0 {"IJ"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::to_string() -> std::string{return R"('[abhgefdc]ij'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"ab"}; + + std::array upper_str_tmp_0 {"AB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"cd"}; + + std::array upper_str_tmp_1 {"CD"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + + std::array lower_str_tmp_3 {"e"}; + + std::array upper_str_tmp_3 {"E"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::to_string() -> std::string{return R"('^(ab|cd)e'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"abc"}; + + std::array upper_str_tmp_0 {"ABC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"ef"}; + + std::array upper_str_tmp_2 {"EF"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::to_string() -> std::string{return R"('(abc|)ef'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"c"}; + + std::array upper_str_tmp_3 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), cpp2::regex::no_reset(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_4 {"d"}; + + std::array upper_str_tmp_4 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::to_string() -> std::string{return R"('(a|b)c*d'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"ab"}; + + std::array upper_str_tmp_0 {"AB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"a"}; + + std::array upper_str_tmp_1 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_5(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + + std::array lower_str_tmp_4 {"bc"}; + + std::array upper_str_tmp_4 {"BC"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::to_string() -> std::string{return R"('(ab|ab*)bc'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::to_string() -> std::string{return R"('a([bc]*)c*'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"d"}; + + std::array upper_str_tmp_3 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::to_string() -> std::string{return R"('a([bc]*)(c*d)'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"d"}; + + std::array upper_str_tmp_3 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::to_string() -> std::string{return R"('a([bc]+)(c*d)'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_2 {"c"}; + + std::array upper_str_tmp_2 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"d"}; + + std::array upper_str_tmp_3 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::to_string() -> std::string{return R"('a([bc]*)(c+d)'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"dcdcde"}; + + std::array upper_str_tmp_1 {"DCDCDE"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),6)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,6); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 6;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::to_string() -> std::string{return R"('a[bcd]*dcdcde'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"dcdcde"}; + + std::array upper_str_tmp_1 {"DCDCDE"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),6)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,6); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 6;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::to_string() -> std::string{return R"('a[bcd]+dcdcde'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"ab"}; + + std::array upper_str_tmp_0 {"AB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_1 {"a"}; + + std::array upper_str_tmp_1 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_3 {"b"}; + + std::array upper_str_tmp_3 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), cpp2::regex::no_reset(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_4 {"c"}; + + std::array upper_str_tmp_4 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::to_string() -> std::string{return R"('(ab|a)b*c'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_start(2, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_start(3, r.pos); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(3, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + + std::array lower_str_tmp_4 {"c"}; + + std::array upper_str_tmp_4 {"C"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + ctx.set_group_start(4, r.pos); + + std::array lower_str_tmp_6 {"d"}; + + std::array upper_str_tmp_6 {"D"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(4, r.pos); + + auto tmp_7_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4); + } + } + }; + + auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; + static_cast(cpp2::move(tmp_7)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::to_string() -> std::string{return R"('((a)(b)c)(d)'i)"; } + + +#line 397 "pure2-regex_12_case_insensitive.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_12_case_insensitive()); +} + diff --git a/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp2.output b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp2.output new file mode 100644 index 0000000000..583aee46c3 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_12_case_insensitive.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp new file mode 100644 index 0000000000..f64ec7b70f --- /dev/null +++ b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp @@ -0,0 +1,10101 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_13_possessive_modifier.cpp2" + +#line 153 "pure2-regex_13_possessive_modifier.cpp2" +class test_tests_13_possessive_modifier; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_13_possessive_modifier.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_13_possessive_modifier.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_13_possessive_modifier.cpp2" +class test_tests_13_possessive_modifier { + +#line 202 "pure2-regex_13_possessive_modifier.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_25_matcher() = default; + public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_25_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_26_matcher() = default; + public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_26_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_27_matcher() = default; + public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_27_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_28_matcher() = default; + public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_28_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_29_matcher() = default; + public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_29_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_30_matcher() = default; + public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_30_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_31_matcher() = default; + public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_31_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_32_matcher() = default; + public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_32_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_33_matcher() = default; + public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_33_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_34_matcher() = default; + public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_34_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_35_matcher() = default; + public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_35_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_36_matcher() = default; + public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_36_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_37_matcher() = default; + public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_37_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_38_matcher() = default; + public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_38_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_39_matcher() = default; + public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_39_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_40_matcher() = default; + public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_40_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_41_matcher() = default; + public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_41_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_42_matcher() = default; + public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_42_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_43_matcher() = default; + public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_43_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_44_matcher() = default; + public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_44_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_45_matcher() = default; + public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_45_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_46_matcher() = default; + public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_46_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_47_matcher() = default; + public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_47_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_48_matcher() = default; + public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_48_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_48 {}; + public: test_tests_13_possessive_modifier() = default; + public: test_tests_13_possessive_modifier(test_tests_13_possessive_modifier const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_13_possessive_modifier const&) -> void = delete; + + +#line 254 "pure2-regex_13_possessive_modifier.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_13_possessive_modifier.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_13_possessive_modifier.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_13_possessive_modifier.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 202 "pure2-regex_13_possessive_modifier.cpp2" + auto test_tests_13_possessive_modifier::run() const& -> void{ + std::cout << "Running tests_13_possessive_modifier:" << std::endl; + test(regex_01, "01", R"(a++a)", "aaaaa", "n", R"(-)", "-"); + test(regex_02, "02", R"(a*+a)", "aaaaa", "n", R"(-)", "-"); + test(regex_03, "03", R"(a{1,5}+a)", "aaaaa", "n", R"(-)", "-"); + test(regex_04, "04", R"(a?+a)", "ab", "n", R"(-)", "-"); + test(regex_05, "05", R"(a++b)", "aaaaab", "y", R"($&)", "aaaaab"); + test(regex_06, "06", R"(a*+b)", "aaaaab", "y", R"($&)", "aaaaab"); + test(regex_07, "07", R"(a{1,5}+b)", "aaaaab", "y", R"($&)", "aaaaab"); + test(regex_08, "08", R"(a?+b)", "ab", "y", R"($&)", "ab"); + test(regex_09, "09", R"(fooa++a)", "fooaaaaa", "n", R"(-)", "-"); + test(regex_10, "10", R"(fooa*+a)", "fooaaaaa", "n", R"(-)", "-"); + test(regex_11, "11", R"(fooa{1,5}+a)", "fooaaaaa", "n", R"(-)", "-"); + test(regex_12, "12", R"(fooa?+a)", "fooab", "n", R"(-)", "-"); + test(regex_13, "13", R"(fooa++b)", "fooaaaaab", "y", R"($&)", "fooaaaaab"); + test(regex_14, "14", R"(fooa*+b)", "fooaaaaab", "y", R"($&)", "fooaaaaab"); + test(regex_15, "15", R"(fooa{1,5}+b)", "fooaaaaab", "y", R"($&)", "fooaaaaab"); + test(regex_16, "16", R"(fooa?+b)", "fooab", "y", R"($&)", "fooab"); + test(regex_17, "17", R"((aA)++(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA"); + test(regex_18, "18", R"((aA|bB)++(aA|bB))", "aAaAbBaAbB", "n", R"(-)", "aAaAbBaAbB"); + test(regex_19, "19", R"((aA)*+(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA"); + test(regex_20, "20", R"((aA|bB)*+(aA|bB))", "aAaAbBaAaA", "n", R"(-)", "aAaAbBaAaA"); + test(regex_21, "21", R"((aA){1,5}+(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA"); + test(regex_22, "22", R"((aA|bB){1,5}+(aA|bB))", "aAaAbBaAaA", "n", R"(-)", "aAaAbBaAaA"); + test(regex_23, "23", R"((aA)?+(aA))", "aAb", "n", R"(-)", "aAb"); + test(regex_24, "24", R"((aA|bB)?+(aA|bB))", "bBb", "n", R"(-)", "bBb"); + test(regex_25, "25", R"((aA)++b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb"); + test(regex_26, "26", R"((aA|bB)++b)", "aAbBaAaAbBb", "y", R"($&)", "aAbBaAaAbBb"); + test(regex_27, "27", R"((aA)*+b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb"); + test(regex_28, "28", R"((aA|bB)*+b)", "bBbBbBbBbBb", "y", R"($&)", "bBbBbBbBbBb"); + test(regex_29, "29", R"((aA){1,5}+b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb"); + test(regex_30, "30", R"((aA|bB){1,5}+b)", "bBaAbBaAbBb", "y", R"($&)", "bBaAbBaAbBb"); + test(regex_31, "31", R"((aA)?+b)", "aAb", "y", R"($&)", "aAb"); + test(regex_32, "32", R"((aA|bB)?+b)", "bBb", "y", R"($&)", "bBb"); + test(regex_33, "33", R"(foo(aA)++(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA"); + test(regex_34, "34", R"(foo(aA|bB)++(aA|bB))", "foobBbBbBaAaA", "n", R"(-)", "foobBbBbBaAaA"); + test(regex_35, "35", R"(foo(aA)*+(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA"); + test(regex_36, "36", R"(foo(aA|bB)*+(aA|bB))", "foobBaAbBaAaA", "n", R"(-)", "foobBaAbBaAaA"); + test(regex_37, "37", R"(foo(aA){1,5}+(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA"); + test(regex_38, "38", R"(foo(aA|bB){1,5}+(aA|bB))", "fooaAbBbBaAaA", "n", R"(-)", "fooaAbBbBaAaA"); + test(regex_39, "39", R"(foo(aA)?+(aA))", "fooaAb", "n", R"(-)", "fooaAb"); + test(regex_40, "40", R"(foo(aA|bB)?+(aA|bB))", "foobBb", "n", R"(-)", "foobBb"); + test(regex_41, "41", R"(foo(aA)++b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb"); + test(regex_42, "42", R"(foo(aA|bB)++b)", "foobBaAbBaAbBb", "y", R"($&)", "foobBaAbBaAbBb"); + test(regex_43, "43", R"(foo(aA)*+b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb"); + test(regex_44, "44", R"(foo(aA|bB)*+b)", "foobBbBaAaAaAb", "y", R"($&)", "foobBbBaAaAaAb"); + test(regex_45, "45", R"(foo(aA){1,5}+b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb"); + test(regex_46, "46", R"(foo(aA|bB){1,5}+b)", "foobBaAaAaAaAb", "y", R"($&)", "foobBaAaAaAaAb"); + test(regex_47, "47", R"(foo(aA)?+b)", "fooaAb", "y", R"($&)", "fooaAb"); + test(regex_48, "48", R"(foo(aA|bB)?+b)", "foobBb", "y", R"($&)", "foobBb"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::to_string() -> std::string{return R"(a++a)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::to_string() -> std::string{return R"(a*+a)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::to_string() -> std::string{return R"(a{1,5}+a)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::to_string() -> std::string{return R"(a?+a)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::to_string() -> std::string{return R"(a++b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::to_string() -> std::string{return R"(a*+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::to_string() -> std::string{return R"(a{1,5}+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::to_string() -> std::string{return R"(a?+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::to_string() -> std::string{return R"(fooa++a)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::to_string() -> std::string{return R"(fooa*+a)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::to_string() -> std::string{return R"(fooa{1,5}+a)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::to_string() -> std::string{return R"(fooa?+a)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::to_string() -> std::string{return R"(fooa++b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::to_string() -> std::string{return R"(fooa*+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::to_string() -> std::string{return R"(fooa{1,5}+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::to_string() -> std::string{return R"(fooa?+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + + std::array str_tmp_2 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::to_string() -> std::string{return R"((aA)++(aA))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::to_string() -> std::string{return R"((aA|bB)++(aA|bB))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + + std::array str_tmp_2 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::to_string() -> std::string{return R"((aA)*+(aA))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::to_string() -> std::string{return R"((aA|bB)*+(aA|bB))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + + std::array str_tmp_2 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::to_string() -> std::string{return R"((aA){1,5}+(aA))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+(aA|bB))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + + std::array str_tmp_2 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::to_string() -> std::string{return R"((aA)?+(aA))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::to_string() -> std::string{return R"((aA|bB)?+(aA|bB))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::to_string() -> std::string{return R"((aA)++b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::to_string() -> std::string{return R"((aA|bB)++b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::to_string() -> std::string{return R"((aA)*+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::to_string() -> std::string{return R"((aA|bB)*+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::to_string() -> std::string{return R"((aA){1,5}+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::to_string() -> std::string{return R"((aA)?+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::to_string() -> std::string{return R"((aA|bB)?+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + + std::array str_tmp_3 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::to_string() -> std::string{return R"(foo(aA)++(aA))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_5 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::to_string() -> std::string{return R"(foo(aA|bB)++(aA|bB))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + + std::array str_tmp_3 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::to_string() -> std::string{return R"(foo(aA)*+(aA))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_5 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+(aA|bB))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + + std::array str_tmp_3 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+(aA))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_5 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+(aA|bB))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + + std::array str_tmp_3 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::to_string() -> std::string{return R"(foo(aA)?+(aA))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_5 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+(aA|bB))"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::to_string() -> std::string{return R"(foo(aA)++b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::to_string() -> std::string{return R"(foo(aA|bB)++b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::to_string() -> std::string{return R"(foo(aA)*+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::to_string() -> std::string{return R"(foo(aA)?+b)"; } + + + + + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"aA"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"bB"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+b)"; } + + +#line 255 "pure2-regex_13_possessive_modifier.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_13_possessive_modifier()); +} + diff --git a/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp2.output b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp2.output new file mode 100644 index 0000000000..5d9e987288 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_13_possessive_modifier.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp new file mode 100644 index 0000000000..ed4eb5dfc6 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp @@ -0,0 +1,15675 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_14_multiline_modifier.cpp2" + +#line 153 "pure2-regex_14_multiline_modifier.cpp2" +class test_tests_14_multiline_modifier; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_14_multiline_modifier.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_14_multiline_modifier.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_14_multiline_modifier.cpp2" +class test_tests_14_multiline_modifier { + +#line 353 "pure2-regex_14_multiline_modifier.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_100_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_100_matcher() = default; + public: regex_100_matcher(regex_100_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_100_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_100 {}; public: class regex_101_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_101_matcher() = default; + public: regex_101_matcher(regex_101_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_101_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_101 {}; public: class regex_102_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_102_matcher() = default; + public: regex_102_matcher(regex_102_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_102_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_102 {}; public: class regex_103_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_103_matcher() = default; + public: regex_103_matcher(regex_103_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_103_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_103 {}; public: class regex_104_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_104_matcher() = default; + public: regex_104_matcher(regex_104_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_104_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_104 {}; public: class regex_105_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_105_matcher() = default; + public: regex_105_matcher(regex_105_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_105_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_105 {}; public: class regex_106_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_106_matcher() = default; + public: regex_106_matcher(regex_106_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_106_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_106 {}; public: class regex_107_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_107_matcher() = default; + public: regex_107_matcher(regex_107_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_107_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_107 {}; public: class regex_108_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_108_matcher() = default; + public: regex_108_matcher(regex_108_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_108_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_108 {}; public: class regex_109_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_109_matcher() = default; + public: regex_109_matcher(regex_109_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_109_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_109 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_110_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_110_matcher() = default; + public: regex_110_matcher(regex_110_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_110_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_110 {}; public: class regex_111_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_111_matcher() = default; + public: regex_111_matcher(regex_111_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_111_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_111 {}; public: class regex_112_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_112_matcher() = default; + public: regex_112_matcher(regex_112_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_112_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_112 {}; public: class regex_113_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_113_matcher() = default; + public: regex_113_matcher(regex_113_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_113_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_113 {}; public: class regex_114_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_114_matcher() = default; + public: regex_114_matcher(regex_114_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_114_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_114 {}; public: class regex_115_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_115_matcher() = default; + public: regex_115_matcher(regex_115_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_115_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_115 {}; public: class regex_116_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_116_matcher() = default; + public: regex_116_matcher(regex_116_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_116_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_116 {}; public: class regex_117_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_117_matcher() = default; + public: regex_117_matcher(regex_117_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_117_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_117 {}; public: class regex_118_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_118_matcher() = default; + public: regex_118_matcher(regex_118_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_118_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_118 {}; public: class regex_119_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_119_matcher() = default; + public: regex_119_matcher(regex_119_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_119_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_119 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_120_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_120_matcher() = default; + public: regex_120_matcher(regex_120_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_120_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_120 {}; public: class regex_121_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_121_matcher() = default; + public: regex_121_matcher(regex_121_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_121_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_121 {}; public: class regex_122_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_122_matcher() = default; + public: regex_122_matcher(regex_122_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_122_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_122 {}; public: class regex_123_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_123_matcher() = default; + public: regex_123_matcher(regex_123_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_123_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_123 {}; public: class regex_124_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_124_matcher() = default; + public: regex_124_matcher(regex_124_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_124_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_124 {}; public: class regex_125_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_125_matcher() = default; + public: regex_125_matcher(regex_125_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_125_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_125 {}; public: class regex_126_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_126_matcher() = default; + public: regex_126_matcher(regex_126_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_126_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_126 {}; public: class regex_127_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_127_matcher() = default; + public: regex_127_matcher(regex_127_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_127_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_127 {}; public: class regex_128_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_128_matcher() = default; + public: regex_128_matcher(regex_128_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_128_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_128 {}; public: class regex_129_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_129_matcher() = default; + public: regex_129_matcher(regex_129_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_129_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_129 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_130_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_130_matcher() = default; + public: regex_130_matcher(regex_130_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_130_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_130 {}; public: class regex_131_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_131_matcher() = default; + public: regex_131_matcher(regex_131_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_131_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_131 {}; public: class regex_132_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_132_matcher() = default; + public: regex_132_matcher(regex_132_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_132_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_132 {}; public: class regex_133_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_133_matcher() = default; + public: regex_133_matcher(regex_133_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_133_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_133 {}; public: class regex_134_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_134_matcher() = default; + public: regex_134_matcher(regex_134_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_134_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_134 {}; public: class regex_135_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_135_matcher() = default; + public: regex_135_matcher(regex_135_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_135_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_135 {}; public: class regex_136_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_136_matcher() = default; + public: regex_136_matcher(regex_136_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_136_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_136 {}; public: class regex_137_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_137_matcher() = default; + public: regex_137_matcher(regex_137_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_137_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_137 {}; public: class regex_138_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_138_matcher() = default; + public: regex_138_matcher(regex_138_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_138_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_138 {}; public: class regex_139_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_139_matcher() = default; + public: regex_139_matcher(regex_139_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_139_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_139 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_140_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_140_matcher() = default; + public: regex_140_matcher(regex_140_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_140_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_140 {}; public: class regex_141_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_141_matcher() = default; + public: regex_141_matcher(regex_141_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_141_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_141 {}; public: class regex_142_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_142_matcher() = default; + public: regex_142_matcher(regex_142_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_142_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_142 {}; public: class regex_143_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_143_matcher() = default; + public: regex_143_matcher(regex_143_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_143_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_143 {}; public: class regex_144_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_144_matcher() = default; + public: regex_144_matcher(regex_144_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_144_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_144 {}; public: class regex_145_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_145_matcher() = default; + public: regex_145_matcher(regex_145_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_145_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_145 {}; public: class regex_146_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_146_matcher() = default; + public: regex_146_matcher(regex_146_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_146_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_146 {}; public: class regex_147_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_147_matcher() = default; + public: regex_147_matcher(regex_147_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_147_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_147 {}; public: class regex_148_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_148_matcher() = default; + public: regex_148_matcher(regex_148_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_148_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_148 {}; public: class regex_149_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_149_matcher() = default; + public: regex_149_matcher(regex_149_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_149_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_149 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_150_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_150_matcher() = default; + public: regex_150_matcher(regex_150_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_150_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_150 {}; public: class regex_151_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_151_matcher() = default; + public: regex_151_matcher(regex_151_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_151_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_151 {}; public: class regex_152_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_152_matcher() = default; + public: regex_152_matcher(regex_152_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_152_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_152 {}; public: class regex_153_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_153_matcher() = default; + public: regex_153_matcher(regex_153_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_153_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_153 {}; public: class regex_154_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_154_matcher() = default; + public: regex_154_matcher(regex_154_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_154_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_154 {}; public: class regex_155_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_155_matcher() = default; + public: regex_155_matcher(regex_155_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_155_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_155 {}; public: class regex_156_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_156_matcher() = default; + public: regex_156_matcher(regex_156_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_156_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_156 {}; public: class regex_157_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_157_matcher() = default; + public: regex_157_matcher(regex_157_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_157_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_157 {}; public: class regex_158_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_158_matcher() = default; + public: regex_158_matcher(regex_158_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_158_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_158 {}; public: class regex_159_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_159_matcher() = default; + public: regex_159_matcher(regex_159_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_159_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_159 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_160_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_160_matcher() = default; + public: regex_160_matcher(regex_160_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_160_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_160 {}; public: class regex_161_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_161_matcher() = default; + public: regex_161_matcher(regex_161_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_161_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_161 {}; public: class regex_162_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_162_matcher() = default; + public: regex_162_matcher(regex_162_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_162_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_162 {}; public: class regex_163_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_163_matcher() = default; + public: regex_163_matcher(regex_163_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_163_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_163 {}; public: class regex_164_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_164_matcher() = default; + public: regex_164_matcher(regex_164_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_164_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_164 {}; public: class regex_165_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_165_matcher() = default; + public: regex_165_matcher(regex_165_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_165_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_165 {}; public: class regex_166_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_166_matcher() = default; + public: regex_166_matcher(regex_166_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_166_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_166 {}; public: class regex_167_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_167_matcher() = default; + public: regex_167_matcher(regex_167_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_167_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_167 {}; public: class regex_168_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_168_matcher() = default; + public: regex_168_matcher(regex_168_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_168_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_168 {}; public: class regex_169_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_169_matcher() = default; + public: regex_169_matcher(regex_169_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_169_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_169 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_170_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_170_matcher() = default; + public: regex_170_matcher(regex_170_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_170_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_170 {}; public: class regex_171_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_171_matcher() = default; + public: regex_171_matcher(regex_171_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_171_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_171 {}; public: class regex_172_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_172_matcher() = default; + public: regex_172_matcher(regex_172_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_172_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_172 {}; public: class regex_173_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_173_matcher() = default; + public: regex_173_matcher(regex_173_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_173_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_173 {}; public: class regex_174_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_174_matcher() = default; + public: regex_174_matcher(regex_174_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_174_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_174 {}; public: class regex_175_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_175_matcher() = default; + public: regex_175_matcher(regex_175_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_175_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_175 {}; public: class regex_176_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_176_matcher() = default; + public: regex_176_matcher(regex_176_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_176_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_176 {}; public: class regex_177_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_177_matcher() = default; + public: regex_177_matcher(regex_177_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_177_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_177 {}; public: class regex_178_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_178_matcher() = default; + public: regex_178_matcher(regex_178_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_178_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_178 {}; public: class regex_179_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_179_matcher() = default; + public: regex_179_matcher(regex_179_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_179_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_179 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_180_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_180_matcher() = default; + public: regex_180_matcher(regex_180_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_180_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_180 {}; public: class regex_181_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_181_matcher() = default; + public: regex_181_matcher(regex_181_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_181_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_181 {}; public: class regex_182_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_182_matcher() = default; + public: regex_182_matcher(regex_182_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_182_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_182 {}; public: class regex_183_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_183_matcher() = default; + public: regex_183_matcher(regex_183_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_183_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_183 {}; public: class regex_184_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_184_matcher() = default; + public: regex_184_matcher(regex_184_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_184_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_184 {}; public: class regex_185_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_185_matcher() = default; + public: regex_185_matcher(regex_185_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_185_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_185 {}; public: class regex_186_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_186_matcher() = default; + public: regex_186_matcher(regex_186_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_186_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_186 {}; public: class regex_187_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_187_matcher() = default; + public: regex_187_matcher(regex_187_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_187_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_187 {}; public: class regex_188_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_188_matcher() = default; + public: regex_188_matcher(regex_188_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_188_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_188 {}; public: class regex_189_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_189_matcher() = default; + public: regex_189_matcher(regex_189_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_189_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_189 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_190_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_190_matcher() = default; + public: regex_190_matcher(regex_190_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_190_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_190 {}; public: class regex_191_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_191_matcher() = default; + public: regex_191_matcher(regex_191_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_191_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_191 {}; public: class regex_192_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_192_matcher() = default; + public: regex_192_matcher(regex_192_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_192_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_192 {}; public: class regex_193_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_193_matcher() = default; + public: regex_193_matcher(regex_193_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_193_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_193 {}; public: class regex_194_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_194_matcher() = default; + public: regex_194_matcher(regex_194_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_194_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_194 {}; public: class regex_195_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_195_matcher() = default; + public: regex_195_matcher(regex_195_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_195_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_195 {}; public: class regex_196_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_196_matcher() = default; + public: regex_196_matcher(regex_196_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_196_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_196 {}; public: class regex_197_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_197_matcher() = default; + public: regex_197_matcher(regex_197_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_197_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_197 {}; public: class regex_198_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_198_matcher() = default; + public: regex_198_matcher(regex_198_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_198_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_198 {}; public: class regex_199_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_199_matcher() = default; + public: regex_199_matcher(regex_199_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_199_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_199 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_25_matcher() = default; + public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_25_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_26_matcher() = default; + public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_26_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_27_matcher() = default; + public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_27_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_28_matcher() = default; + public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_28_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_29_matcher() = default; + public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_29_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_30_matcher() = default; + public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_30_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_31_matcher() = default; + public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_31_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_32_matcher() = default; + public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_32_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_33_matcher() = default; + public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_33_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_34_matcher() = default; + public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_34_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_35_matcher() = default; + public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_35_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_36_matcher() = default; + public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_36_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_37_matcher() = default; + public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_37_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_38_matcher() = default; + public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_38_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_39_matcher() = default; + public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_39_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_40_matcher() = default; + public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_40_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_41_matcher() = default; + public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_41_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_42_matcher() = default; + public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_42_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_43_matcher() = default; + public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_43_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_44_matcher() = default; + public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_44_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_45_matcher() = default; + public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_45_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_46_matcher() = default; + public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_46_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_47_matcher() = default; + public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_47_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_48_matcher() = default; + public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_48_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_49_matcher() = default; + public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_49_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_50_matcher() = default; + public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_50_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_51_matcher() = default; + public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_51_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_52_matcher() = default; + public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_52_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_53_matcher() = default; + public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_53_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_53 {}; public: class regex_54_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_54_matcher() = default; + public: regex_54_matcher(regex_54_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_54_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_54 {}; public: class regex_55_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_55_matcher() = default; + public: regex_55_matcher(regex_55_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_55_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_55 {}; public: class regex_56_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_56_matcher() = default; + public: regex_56_matcher(regex_56_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_56_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_56 {}; public: class regex_57_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_57_matcher() = default; + public: regex_57_matcher(regex_57_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_57_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_57 {}; public: class regex_58_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_58_matcher() = default; + public: regex_58_matcher(regex_58_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_58_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_58 {}; public: class regex_59_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_59_matcher() = default; + public: regex_59_matcher(regex_59_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_59_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_59 {}; public: class regex_60_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_60_matcher() = default; + public: regex_60_matcher(regex_60_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_60_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_60 {}; public: class regex_61_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_61_matcher() = default; + public: regex_61_matcher(regex_61_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_61_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_61 {}; public: class regex_62_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_62_matcher() = default; + public: regex_62_matcher(regex_62_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_62_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_62 {}; public: class regex_63_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_63_matcher() = default; + public: regex_63_matcher(regex_63_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_63_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_63 {}; public: class regex_64_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_64_matcher() = default; + public: regex_64_matcher(regex_64_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_64_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_64 {}; public: class regex_65_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_65_matcher() = default; + public: regex_65_matcher(regex_65_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_65_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_65 {}; public: class regex_66_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_66_matcher() = default; + public: regex_66_matcher(regex_66_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_66_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_66 {}; public: class regex_67_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_67_matcher() = default; + public: regex_67_matcher(regex_67_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_67_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_67 {}; public: class regex_68_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_68_matcher() = default; + public: regex_68_matcher(regex_68_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_68_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_68 {}; public: class regex_69_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_69_matcher() = default; + public: regex_69_matcher(regex_69_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_69_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_69 {}; public: class regex_70_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_70_matcher() = default; + public: regex_70_matcher(regex_70_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_70_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_70 {}; public: class regex_71_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_71_matcher() = default; + public: regex_71_matcher(regex_71_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_71_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_71 {}; public: class regex_72_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_72_matcher() = default; + public: regex_72_matcher(regex_72_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_72_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_72 {}; public: class regex_73_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_73_matcher() = default; + public: regex_73_matcher(regex_73_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_73_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_73 {}; public: class regex_74_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_74_matcher() = default; + public: regex_74_matcher(regex_74_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_74_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_74 {}; public: class regex_75_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_75_matcher() = default; + public: regex_75_matcher(regex_75_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_75_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_75 {}; public: class regex_76_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_76_matcher() = default; + public: regex_76_matcher(regex_76_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_76_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_76 {}; public: class regex_77_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_77_matcher() = default; + public: regex_77_matcher(regex_77_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_77_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_77 {}; public: class regex_78_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_78_matcher() = default; + public: regex_78_matcher(regex_78_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_78_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_78 {}; public: class regex_79_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_79_matcher() = default; + public: regex_79_matcher(regex_79_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_79_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_79 {}; public: class regex_80_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_80_matcher() = default; + public: regex_80_matcher(regex_80_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_80_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_80 {}; public: class regex_81_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_81_matcher() = default; + public: regex_81_matcher(regex_81_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_81_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_81 {}; public: class regex_82_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_82_matcher() = default; + public: regex_82_matcher(regex_82_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_82_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_82 {}; public: class regex_83_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_83_matcher() = default; + public: regex_83_matcher(regex_83_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_83_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_83 {}; public: class regex_84_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_84_matcher() = default; + public: regex_84_matcher(regex_84_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_84_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_84 {}; public: class regex_85_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_85_matcher() = default; + public: regex_85_matcher(regex_85_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_85_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_85 {}; public: class regex_86_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_86_matcher() = default; + public: regex_86_matcher(regex_86_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_86_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_86 {}; public: class regex_87_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_87_matcher() = default; + public: regex_87_matcher(regex_87_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_87_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_87 {}; public: class regex_88_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_88_matcher() = default; + public: regex_88_matcher(regex_88_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_88_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_88 {}; public: class regex_89_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_89_matcher() = default; + public: regex_89_matcher(regex_89_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_89_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_89 {}; public: class regex_90_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_90_matcher() = default; + public: regex_90_matcher(regex_90_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_90_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_90 {}; public: class regex_91_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_91_matcher() = default; + public: regex_91_matcher(regex_91_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_91_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_91 {}; public: class regex_92_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_92_matcher() = default; + public: regex_92_matcher(regex_92_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_92_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_92 {}; public: class regex_93_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_93_matcher() = default; + public: regex_93_matcher(regex_93_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_93_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_93 {}; public: class regex_94_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_94_matcher() = default; + public: regex_94_matcher(regex_94_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_94_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_94 {}; public: class regex_95_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_95_matcher() = default; + public: regex_95_matcher(regex_95_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_95_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_95 {}; public: class regex_96_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_96_matcher() = default; + public: regex_96_matcher(regex_96_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_96_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_96 {}; public: class regex_97_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_97_matcher() = default; + public: regex_97_matcher(regex_97_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_97_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_97 {}; public: class regex_98_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_98_matcher() = default; + public: regex_98_matcher(regex_98_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_98_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_98 {}; public: class regex_99_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_99_matcher() = default; + public: regex_99_matcher(regex_99_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_99_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_99 {}; + public: test_tests_14_multiline_modifier() = default; + public: test_tests_14_multiline_modifier(test_tests_14_multiline_modifier const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_14_multiline_modifier const&) -> void = delete; + + +#line 556 "pure2-regex_14_multiline_modifier.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_14_multiline_modifier.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_14_multiline_modifier.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_14_multiline_modifier.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 353 "pure2-regex_14_multiline_modifier.cpp2" + auto test_tests_14_multiline_modifier::run() const& -> void{ + std::cout << "Running tests_14_multiline_modifier:" << std::endl; + test(regex_01, "01", R"(\Z)", "a\nb\n", "y", R"($-[0])", "3"); + test(regex_02, "02", R"(\z)", "a\nb\n", "y", R"($-[0])", "4"); + test(regex_03, "03", R"($)", "a\nb\n", "y", R"($-[0])", "3"); + test(regex_04, "04", R"(\Z)", "b\na\n", "y", R"($-[0])", "3"); + test(regex_05, "05", R"(\z)", "b\na\n", "y", R"($-[0])", "4"); + test(regex_06, "06", R"($)", "b\na\n", "y", R"($-[0])", "3"); + test(regex_07, "07", R"(\Z)", "b\na", "y", R"($-[0])", "3"); + test(regex_08, "08", R"(\z)", "b\na", "y", R"($-[0])", "3"); + test(regex_09, "09", R"($)", "b\na", "y", R"($-[0])", "3"); + test(regex_10, "10", R"('\Z'm)", "a\nb\n", "y", R"($-[0])", "3"); + test(regex_11, "11", R"('\z'm)", "a\nb\n", "y", R"($-[0])", "4"); + test(regex_12, "12", R"('$'m)", "a\nb\n", "y", R"($-[0])", "1"); + test(regex_13, "13", R"('\Z'm)", "b\na\n", "y", R"($-[0])", "3"); + test(regex_14, "14", R"('\z'm)", "b\na\n", "y", R"($-[0])", "4"); + test(regex_15, "15", R"('$'m)", "b\na\n", "y", R"($-[0])", "1"); + test(regex_16, "16", R"('\Z'm)", "b\na", "y", R"($-[0])", "3"); + test(regex_17, "17", R"('\z'm)", "b\na", "y", R"($-[0])", "3"); + test(regex_18, "18", R"('$'m)", "b\na", "y", R"($-[0])", "1"); + test(regex_19, "19", R"(a\Z)", "a\nb\n", "n", R"(-)", "-"); + test(regex_20, "20", R"(a\z)", "a\nb\n", "n", R"(-)", "-"); + test(regex_21, "21", R"(a$)", "a\nb\n", "n", R"(-)", "-"); + test(regex_22, "22", R"(a\Z)", "b\na\n", "y", R"($-[0])", "2"); + test(regex_23, "23", R"(a\z)", "b\na\n", "n", R"(-)", "-"); + test(regex_24, "24", R"(a$)", "b\na\n", "y", R"($-[0])", "2"); + test(regex_25, "25", R"(a\Z)", "b\na", "y", R"($-[0])", "2"); + test(regex_26, "26", R"(a\z)", "b\na", "y", R"($-[0])", "2"); + test(regex_27, "27", R"(a$)", "b\na", "y", R"($-[0])", "2"); + test(regex_28, "28", R"('a\Z'm)", "a\nb\n", "n", R"(-)", "-"); + test(regex_29, "29", R"('a\z'm)", "a\nb\n", "n", R"(-)", "-"); + test(regex_30, "30", R"('a$'m)", "a\nb\n", "y", R"($-[0])", "0"); + test(regex_31, "31", R"('a\Z'm)", "b\na\n", "y", R"($-[0])", "2"); + test(regex_32, "32", R"('a\z'm)", "b\na\n", "n", R"(-)", "-"); + test(regex_33, "33", R"('a$'m)", "b\na\n", "y", R"($-[0])", "2"); + test(regex_34, "34", R"('a\Z'm)", "b\na", "y", R"($-[0])", "2"); + test(regex_35, "35", R"('a\z'm)", "b\na", "y", R"($-[0])", "2"); + test(regex_36, "36", R"('a$'m)", "b\na", "y", R"($-[0])", "2"); + test(regex_37, "37", R"(aa\Z)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_38, "38", R"(aa\z)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_39, "39", R"(aa$)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_40, "40", R"(aa\Z)", "b\naa\n", "y", R"($-[0])", "2"); + test(regex_41, "41", R"(aa\z)", "b\naa\n", "n", R"(-)", "-"); + test(regex_42, "42", R"(aa$)", "b\naa\n", "y", R"($-[0])", "2"); + test(regex_43, "43", R"(aa\Z)", "b\naa", "y", R"($-[0])", "2"); + test(regex_44, "44", R"(aa\z)", "b\naa", "y", R"($-[0])", "2"); + test(regex_45, "45", R"(aa$)", "b\naa", "y", R"($-[0])", "2"); + test(regex_46, "46", R"('aa\Z'm)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_47, "47", R"('aa\z'm)", "aa\nb\n", "n", R"(-)", "-"); + test(regex_48, "48", R"('aa$'m)", "aa\nb\n", "y", R"($-[0])", "0"); + test(regex_49, "49", R"('aa\Z'm)", "b\naa\n", "y", R"($-[0])", "2"); + test(regex_50, "50", R"('aa\z'm)", "b\naa\n", "n", R"(-)", "-"); + test(regex_51, "51", R"('aa$'m)", "b\naa\n", "y", R"($-[0])", "2"); + test(regex_52, "52", R"('aa\Z'm)", "b\naa", "y", R"($-[0])", "2"); + test(regex_53, "53", R"('aa\z'm)", "b\naa", "y", R"($-[0])", "2"); + test(regex_54, "54", R"('aa$'m)", "b\naa", "y", R"($-[0])", "2"); + test(regex_55, "55", R"(aa\Z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_56, "56", R"(aa\z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_57, "57", R"(aa$)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_58, "58", R"(aa\Z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_59, "59", R"(aa\z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_60, "60", R"(aa$)", "b\nac\n", "n", R"(-)", "-"); + test(regex_61, "61", R"(aa\Z)", "b\nac", "n", R"(-)", "-"); + test(regex_62, "62", R"(aa\z)", "b\nac", "n", R"(-)", "-"); + test(regex_63, "63", R"(aa$)", "b\nac", "n", R"(-)", "-"); + test(regex_64, "64", R"('aa\Z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_65, "65", R"('aa\z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_66, "66", R"('aa$'m)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_67, "67", R"('aa\Z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_68, "68", R"('aa\z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_69, "69", R"('aa$'m)", "b\nac\n", "n", R"(-)", "-"); + test(regex_70, "70", R"('aa\Z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_71, "71", R"('aa\z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_72, "72", R"('aa$'m)", "b\nac", "n", R"(-)", "-"); + test(regex_73, "73", R"(aa\Z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_74, "74", R"(aa\z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_75, "75", R"(aa$)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_76, "76", R"(aa\Z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_77, "77", R"(aa\z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_78, "78", R"(aa$)", "b\nca\n", "n", R"(-)", "-"); + test(regex_79, "79", R"(aa\Z)", "b\nca", "n", R"(-)", "-"); + test(regex_80, "80", R"(aa\z)", "b\nca", "n", R"(-)", "-"); + test(regex_81, "81", R"(aa$)", "b\nca", "n", R"(-)", "-"); + test(regex_82, "82", R"('aa\Z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_83, "83", R"('aa\z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_84, "84", R"('aa$'m)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_85, "85", R"('aa\Z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_86, "86", R"('aa\z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_87, "87", R"('aa$'m)", "b\nca\n", "n", R"(-)", "-"); + test(regex_88, "88", R"('aa\Z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_89, "89", R"('aa\z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_90, "90", R"('aa$'m)", "b\nca", "n", R"(-)", "-"); + test(regex_91, "91", R"(ab\Z)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_92, "92", R"(ab\z)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_93, "93", R"(ab$)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_94, "94", R"(ab\Z)", "b\nab\n", "y", R"($-[0])", "2"); + test(regex_95, "95", R"(ab\z)", "b\nab\n", "n", R"(-)", "-"); + test(regex_96, "96", R"(ab$)", "b\nab\n", "y", R"($-[0])", "2"); + test(regex_97, "97", R"(ab\Z)", "b\nab", "y", R"($-[0])", "2"); + test(regex_98, "98", R"(ab\z)", "b\nab", "y", R"($-[0])", "2"); + test(regex_99, "99", R"(ab$)", "b\nab", "y", R"($-[0])", "2"); + test(regex_100, "100", R"('ab\Z'm)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_101, "101", R"('ab\z'm)", "ab\nb\n", "n", R"(-)", "-"); + test(regex_102, "102", R"('ab$'m)", "ab\nb\n", "y", R"($-[0])", "0"); + test(regex_103, "103", R"('ab\Z'm)", "b\nab\n", "y", R"($-[0])", "2"); + test(regex_104, "104", R"('ab\z'm)", "b\nab\n", "n", R"(-)", "-"); + test(regex_105, "105", R"('ab$'m)", "b\nab\n", "y", R"($-[0])", "2"); + test(regex_106, "106", R"('ab\Z'm)", "b\nab", "y", R"($-[0])", "2"); + test(regex_107, "107", R"('ab\z'm)", "b\nab", "y", R"($-[0])", "2"); + test(regex_108, "108", R"('ab$'m)", "b\nab", "y", R"($-[0])", "2"); + test(regex_109, "109", R"(ab\Z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_110, "110", R"(ab\z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_111, "111", R"(ab$)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_112, "112", R"(ab\Z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_113, "113", R"(ab\z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_114, "114", R"(ab$)", "b\nac\n", "n", R"(-)", "-"); + test(regex_115, "115", R"(ab\Z)", "b\nac", "n", R"(-)", "-"); + test(regex_116, "116", R"(ab\z)", "b\nac", "n", R"(-)", "-"); + test(regex_117, "117", R"(ab$)", "b\nac", "n", R"(-)", "-"); + test(regex_118, "118", R"('ab\Z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_119, "119", R"('ab\z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_120, "120", R"('ab$'m)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_121, "121", R"('ab\Z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_122, "122", R"('ab\z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_123, "123", R"('ab$'m)", "b\nac\n", "n", R"(-)", "-"); + test(regex_124, "124", R"('ab\Z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_125, "125", R"('ab\z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_126, "126", R"('ab$'m)", "b\nac", "n", R"(-)", "-"); + test(regex_127, "127", R"(ab\Z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_128, "128", R"(ab\z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_129, "129", R"(ab$)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_130, "130", R"(ab\Z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_131, "131", R"(ab\z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_132, "132", R"(ab$)", "b\nca\n", "n", R"(-)", "-"); + test(regex_133, "133", R"(ab\Z)", "b\nca", "n", R"(-)", "-"); + test(regex_134, "134", R"(ab\z)", "b\nca", "n", R"(-)", "-"); + test(regex_135, "135", R"(ab$)", "b\nca", "n", R"(-)", "-"); + test(regex_136, "136", R"('ab\Z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_137, "137", R"('ab\z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_138, "138", R"('ab$'m)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_139, "139", R"('ab\Z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_140, "140", R"('ab\z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_141, "141", R"('ab$'m)", "b\nca\n", "n", R"(-)", "-"); + test(regex_142, "142", R"('ab\Z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_143, "143", R"('ab\z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_144, "144", R"('ab$'m)", "b\nca", "n", R"(-)", "-"); + test(regex_145, "145", R"(abb\Z)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_146, "146", R"(abb\z)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_147, "147", R"(abb$)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_148, "148", R"(abb\Z)", "b\nabb\n", "y", R"($-[0])", "2"); + test(regex_149, "149", R"(abb\z)", "b\nabb\n", "n", R"(-)", "-"); + test(regex_150, "150", R"(abb$)", "b\nabb\n", "y", R"($-[0])", "2"); + test(regex_151, "151", R"(abb\Z)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_152, "152", R"(abb\z)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_153, "153", R"(abb$)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_154, "154", R"('abb\Z'm)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_155, "155", R"('abb\z'm)", "abb\nb\n", "n", R"(-)", "-"); + test(regex_156, "156", R"('abb$'m)", "abb\nb\n", "y", R"($-[0])", "0"); + test(regex_157, "157", R"('abb\Z'm)", "b\nabb\n", "y", R"($-[0])", "2"); + test(regex_158, "158", R"('abb\z'm)", "b\nabb\n", "n", R"(-)", "-"); + test(regex_159, "159", R"('abb$'m)", "b\nabb\n", "y", R"($-[0])", "2"); + test(regex_160, "160", R"('abb\Z'm)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_161, "161", R"('abb\z'm)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_162, "162", R"('abb$'m)", "b\nabb", "y", R"($-[0])", "2"); + test(regex_163, "163", R"(abb\Z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_164, "164", R"(abb\z)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_165, "165", R"(abb$)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_166, "166", R"(abb\Z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_167, "167", R"(abb\z)", "b\nac\n", "n", R"(-)", "-"); + test(regex_168, "168", R"(abb$)", "b\nac\n", "n", R"(-)", "-"); + test(regex_169, "169", R"(abb\Z)", "b\nac", "n", R"(-)", "-"); + test(regex_170, "170", R"(abb\z)", "b\nac", "n", R"(-)", "-"); + test(regex_171, "171", R"(abb$)", "b\nac", "n", R"(-)", "-"); + test(regex_172, "172", R"('abb\Z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_173, "173", R"('abb\z'm)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_174, "174", R"('abb$'m)", "ac\nb\n", "n", R"(-)", "-"); + test(regex_175, "175", R"('abb\Z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_176, "176", R"('abb\z'm)", "b\nac\n", "n", R"(-)", "-"); + test(regex_177, "177", R"('abb$'m)", "b\nac\n", "n", R"(-)", "-"); + test(regex_178, "178", R"('abb\Z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_179, "179", R"('abb\z'm)", "b\nac", "n", R"(-)", "-"); + test(regex_180, "180", R"('abb$'m)", "b\nac", "n", R"(-)", "-"); + test(regex_181, "181", R"(abb\Z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_182, "182", R"(abb\z)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_183, "183", R"(abb$)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_184, "184", R"(abb\Z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_185, "185", R"(abb\z)", "b\nca\n", "n", R"(-)", "-"); + test(regex_186, "186", R"(abb$)", "b\nca\n", "n", R"(-)", "-"); + test(regex_187, "187", R"(abb\Z)", "b\nca", "n", R"(-)", "-"); + test(regex_188, "188", R"(abb\z)", "b\nca", "n", R"(-)", "-"); + test(regex_189, "189", R"(abb$)", "b\nca", "n", R"(-)", "-"); + test(regex_190, "190", R"('abb\Z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_191, "191", R"('abb\z'm)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_192, "192", R"('abb$'m)", "ca\nb\n", "n", R"(-)", "-"); + test(regex_193, "193", R"('abb\Z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_194, "194", R"('abb\z'm)", "b\nca\n", "n", R"(-)", "-"); + test(regex_195, "195", R"('abb$'m)", "b\nca\n", "n", R"(-)", "-"); + test(regex_196, "196", R"('abb\Z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_197, "197", R"('abb\z'm)", "b\nca", "n", R"(-)", "-"); + test(regex_198, "198", R"('abb$'m)", "b\nca", "n", R"(-)", "-"); + test(regex_199, "199", R"('\Aa$'m)", "a\n\n", "y", R"($&)", "a"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::to_string() -> std::string{return R"(\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::to_string() -> std::string{return R"(\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::to_string() -> std::string{return R"($)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::to_string() -> std::string{return R"(\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::to_string() -> std::string{return R"(\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::to_string() -> std::string{return R"($)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::to_string() -> std::string{return R"(\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::to_string() -> std::string{return R"(\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::to_string() -> std::string{return R"($)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::to_string() -> std::string{return R"('\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::to_string() -> std::string{return R"('ab$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::to_string() -> std::string{return R"('ab$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::to_string() -> std::string{return R"('ab$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::to_string() -> std::string{return R"(ab\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::to_string() -> std::string{return R"('\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::to_string() -> std::string{return R"(ab\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::to_string() -> std::string{return R"(ab$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::to_string() -> std::string{return R"(ab\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::to_string() -> std::string{return R"(ab\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::to_string() -> std::string{return R"(ab$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::to_string() -> std::string{return R"(ab\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::to_string() -> std::string{return R"(ab\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::to_string() -> std::string{return R"(ab$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::to_string() -> std::string{return R"('$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::to_string() -> std::string{return R"('ab$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::to_string() -> std::string{return R"('ab$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::to_string() -> std::string{return R"('ab$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::to_string() -> std::string{return R"(ab\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::to_string() -> std::string{return R"(ab\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::to_string() -> std::string{return R"(ab$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::to_string() -> std::string{return R"('\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::to_string() -> std::string{return R"(ab\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::to_string() -> std::string{return R"(ab\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::to_string() -> std::string{return R"(ab$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::to_string() -> std::string{return R"(ab\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::to_string() -> std::string{return R"(ab\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::to_string() -> std::string{return R"(ab$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::to_string() -> std::string{return R"('ab$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::to_string() -> std::string{return R"('\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::to_string() -> std::string{return R"('ab$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::to_string() -> std::string{return R"('ab\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::to_string() -> std::string{return R"('ab\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::to_string() -> std::string{return R"('ab$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::to_string() -> std::string{return R"(abb\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::to_string() -> std::string{return R"(abb\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::to_string() -> std::string{return R"(abb$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::to_string() -> std::string{return R"(abb\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::to_string() -> std::string{return R"(abb\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::to_string() -> std::string{return R"('$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::to_string() -> std::string{return R"(abb$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::to_string() -> std::string{return R"(abb\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::to_string() -> std::string{return R"(abb\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::to_string() -> std::string{return R"(abb$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::to_string() -> std::string{return R"('abb$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::to_string() -> std::string{return R"('abb$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::to_string() -> std::string{return R"('\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::to_string() -> std::string{return R"('abb$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::to_string() -> std::string{return R"(abb\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::to_string() -> std::string{return R"(abb\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::to_string() -> std::string{return R"(abb$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::to_string() -> std::string{return R"(abb\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::to_string() -> std::string{return R"(abb\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::to_string() -> std::string{return R"(abb$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::to_string() -> std::string{return R"(abb\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::to_string() -> std::string{return R"('\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::to_string() -> std::string{return R"(abb\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::to_string() -> std::string{return R"(abb$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::to_string() -> std::string{return R"('abb$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::to_string() -> std::string{return R"('abb$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::to_string() -> std::string{return R"('$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::to_string() -> std::string{return R"('abb$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::to_string() -> std::string{return R"(abb\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::to_string() -> std::string{return R"(abb\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::to_string() -> std::string{return R"(abb$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::to_string() -> std::string{return R"(abb\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::to_string() -> std::string{return R"(abb\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::to_string() -> std::string{return R"(abb$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::to_string() -> std::string{return R"(abb\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::to_string() -> std::string{return R"(abb\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::to_string() -> std::string{return R"(abb$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::to_string() -> std::string{return R"(a\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::to_string() -> std::string{return R"('abb$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::to_string() -> std::string{return R"('abb$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::to_string() -> std::string{return R"('abb\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::to_string() -> std::string{return R"('abb\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"abb"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::to_string() -> std::string{return R"('abb$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::to_string() -> std::string{return R"('\Aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::to_string() -> std::string{return R"(a\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::to_string() -> std::string{return R"(a$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::to_string() -> std::string{return R"(a\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::to_string() -> std::string{return R"(a\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::to_string() -> std::string{return R"(a$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::to_string() -> std::string{return R"(a\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::to_string() -> std::string{return R"(a\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::to_string() -> std::string{return R"(a$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::to_string() -> std::string{return R"('a\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::to_string() -> std::string{return R"('a\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::to_string() -> std::string{return R"('a$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::to_string() -> std::string{return R"('a\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::to_string() -> std::string{return R"('a\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::to_string() -> std::string{return R"('a$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::to_string() -> std::string{return R"('a\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::to_string() -> std::string{return R"('a\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::to_string() -> std::string{return R"('a$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::to_string() -> std::string{return R"(aa\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::to_string() -> std::string{return R"(aa\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::to_string() -> std::string{return R"(aa$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::to_string() -> std::string{return R"(aa\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::to_string() -> std::string{return R"(aa\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::to_string() -> std::string{return R"(aa$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::to_string() -> std::string{return R"(aa\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::to_string() -> std::string{return R"(aa\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::to_string() -> std::string{return R"(aa$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::to_string() -> std::string{return R"('aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::to_string() -> std::string{return R"('aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::to_string() -> std::string{return R"('aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::to_string() -> std::string{return R"(aa\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::to_string() -> std::string{return R"(aa\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::to_string() -> std::string{return R"(aa$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::to_string() -> std::string{return R"(aa\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::to_string() -> std::string{return R"(aa\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::to_string() -> std::string{return R"(aa$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::to_string() -> std::string{return R"(aa\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::to_string() -> std::string{return R"(aa\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::to_string() -> std::string{return R"(aa$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::to_string() -> std::string{return R"('aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::to_string() -> std::string{return R"('aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::to_string() -> std::string{return R"('aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::to_string() -> std::string{return R"(aa\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::to_string() -> std::string{return R"(aa\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::to_string() -> std::string{return R"(aa$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::to_string() -> std::string{return R"(aa\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::to_string() -> std::string{return R"(aa\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::to_string() -> std::string{return R"(aa$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::to_string() -> std::string{return R"(aa\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::to_string() -> std::string{return R"(aa\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::to_string() -> std::string{return R"(aa$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::to_string() -> std::string{return R"('aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::to_string() -> std::string{return R"('aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::to_string() -> std::string{return R"('aa\Z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::to_string() -> std::string{return R"('aa\z'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::to_string() -> std::string{return R"('aa$'m)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::to_string() -> std::string{return R"(ab\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::to_string() -> std::string{return R"(ab\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::to_string() -> std::string{return R"(ab$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::to_string() -> std::string{return R"(ab\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::to_string() -> std::string{return R"(ab\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::to_string() -> std::string{return R"(ab$)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::to_string() -> std::string{return R"(ab\Z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::to_string() -> std::string{return R"(ab\z)"; } + + + + + + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::to_string() -> std::string{return R"(ab$)"; } + + +#line 557 "pure2-regex_14_multiline_modifier.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_14_multiline_modifier()); +} + diff --git a/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp2.output b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp2.output new file mode 100644 index 0000000000..665dffd1e2 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_14_multiline_modifier.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp new file mode 100644 index 0000000000..d8b4cf6910 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp @@ -0,0 +1,5583 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_15_group_modifiers.cpp2" + +#line 153 "pure2-regex_15_group_modifiers.cpp2" +class test_tests_15_group_modifiers; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_15_group_modifiers.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_15_group_modifiers.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_15_group_modifiers.cpp2" +class test_tests_15_group_modifiers { + +#line 207 "pure2-regex_15_group_modifiers.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_25_matcher() = default; + public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_25_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_26_matcher() = default; + public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_26_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_27_matcher() = default; + public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_27_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_28_matcher() = default; + public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_28_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_29_matcher() = default; + public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_29_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_30_matcher() = default; + public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_30_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_31_matcher() = default; + public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_31_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_32_matcher() = default; + public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_32_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_33_matcher() = default; + public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_33_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_34_matcher() = default; + public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_34_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_35_matcher() = default; + public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_35_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_36_matcher() = default; + public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_36_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_37_matcher() = default; + public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_37_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_38_matcher() = default; + public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_38_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_39_matcher() = default; + public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_39_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_40_matcher() = default; + public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_40_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_41_matcher() = default; + public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_41_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_42_matcher() = default; + public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_42_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_43_matcher() = default; + public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_43_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_44_matcher() = default; + public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_44_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_45_matcher() = default; + public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_45_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_46_matcher() = default; + public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_46_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_47_matcher() = default; + public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_47_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_48_matcher() = default; + public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_48_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_49_matcher() = default; + public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_49_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_50_matcher() = default; + public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_50_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_51_matcher() = default; + public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_51_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_52_matcher() = default; + public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_52_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_53_matcher() = default; + public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_53_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_53 {}; + public: test_tests_15_group_modifiers() = default; + public: test_tests_15_group_modifiers(test_tests_15_group_modifiers const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_15_group_modifiers const&) -> void = delete; + + +#line 264 "pure2-regex_15_group_modifiers.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_15_group_modifiers.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_15_group_modifiers.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_15_group_modifiers.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 207 "pure2-regex_15_group_modifiers.cpp2" + auto test_tests_15_group_modifiers::run() const& -> void{ + std::cout << "Running tests_15_group_modifiers:" << std::endl; + test(regex_01, "01", R"((?:(?i)a)b)", "ab", "y", R"($&)", "ab"); + test(regex_02, "02", R"(((?i)a)b)", "ab", "y", R"($&:$1)", "ab:a"); + test(regex_03, "03", R"((?:(?i)a)b)", "Ab", "y", R"($&)", "Ab"); + test(regex_04, "04", R"(((?i)a)b)", "Ab", "y", R"($&:$1)", "Ab:A"); + test(regex_05, "05", R"((?:(?i)a)b)", "aB", "n", R"(-)", "-"); + test(regex_06, "06", R"(((?i)a)b)", "aB", "n", R"(-)", "-"); + test(regex_07, "07", R"((?i:a)b)", "ab", "y", R"($&)", "ab"); + test(regex_08, "08", R"(((?i:a))b)", "ab", "y", R"($&:$1)", "ab:a"); + test(regex_09, "09", R"((?i:a)b)", "Ab", "y", R"($&)", "Ab"); + test(regex_10, "10", R"(((?i:a))b)", "Ab", "y", R"($&:$1)", "Ab:A"); + test(regex_11, "11", R"((?i:a)b)", "aB", "n", R"(-)", "-"); + test(regex_12, "12", R"(((?i:a))b)", "aB", "n", R"(-)", "-"); + test(regex_13, "13", R"('(?:(?-i)a)b'i)", "ab", "y", R"($&)", "ab"); + test(regex_14, "14", R"('((?-i)a)b'i)", "ab", "y", R"($&:$1)", "ab:a"); + test(regex_15, "15", R"('(?:(?-i)a)b'i)", "aB", "y", R"($&)", "aB"); + test(regex_16, "16", R"('((?-i)a)b'i)", "aB", "y", R"($&:$1)", "aB:a"); + test(regex_17, "17", R"('(?:(?-i)a)b'i)", "Ab", "n", R"(-)", "-"); + test(regex_18, "18", R"('((?-i)a)b'i)", "Ab", "n", R"(-)", "-"); + test(regex_19, "19", R"('(?:(?-i)a)b'i)", "aB", "y", R"($&)", "aB"); + test(regex_20, "20", R"('((?-i)a)b'i)", "aB", "y", R"($1)", "a"); + test(regex_21, "21", R"('(?:(?-i)a)b'i)", "AB", "n", R"(-)", "-"); + test(regex_22, "22", R"('((?-i)a)b'i)", "AB", "n", R"(-)", "-"); + test(regex_23, "23", R"('(?-i:a)b'i)", "ab", "y", R"($&)", "ab"); + test(regex_24, "24", R"('((?-i:a))b'i)", "ab", "y", R"($&:$1)", "ab:a"); + test(regex_25, "25", R"('(?-i:a)b'i)", "aB", "y", R"($&)", "aB"); + test(regex_26, "26", R"('((?-i:a))b'i)", "aB", "y", R"($&:$1)", "aB:a"); + test(regex_27, "27", R"('(?-i:a)b'i)", "Ab", "n", R"(-)", "-"); + test(regex_28, "28", R"('((?-i:a))b'i)", "Ab", "n", R"(-)", "-"); + test(regex_29, "29", R"('(?-i:a)b'i)", "aB", "y", R"($&)", "aB"); + test(regex_30, "30", R"('((?-i:a))b'i)", "aB", "y", R"($1)", "a"); + test(regex_31, "31", R"('(?-i:a)b'i)", "AB", "n", R"(-)", "-"); + test(regex_32, "32", R"('((?-i:a))b'i)", "AB", "n", R"(-)", "-"); + test(regex_33, "33", R"('((?-i:a.))b'i)", "a\nB", "n", R"(-)", "-"); + test(regex_34, "34", R"('((?-i:a\N))b'i)", "a\nB", "n", R"(-)", "-"); + test(regex_35, "35", R"('((?s-i:a.))b'i)", "a\nB", "y", R"($1)", "a\n"); + test(regex_36, "36", R"('((?s-i:a\N))b'i)", "a\nB", "n", R"(-)", "-"); + test(regex_37, "37", R"('((?s-i:a.))b'i)", "B\nB", "n", R"(-)", "-"); + test(regex_38, "38", R"('((?s-i:a\N))b'i)", "B\nB", "n", R"(-)", "-"); + test(regex_39, "39", R"((?i:.[b].))", "abd", "y", R"($&)", "abd"); + test(regex_40, "40", R"((?i:\N[b]\N))", "abd", "y", R"($&)", "abd"); + test(regex_41, "41", R"(^(?:a?b?)*$)", "a--", "n", R"(-)", "-"); + test(regex_42, "42", R"(((?s)^a(.))((?m)^b$))", "a\nb\nc\n", "y", R"($1;$2;$3)", "a\n;\n;b"); + test(regex_43, "43", R"(((?m)^b$))", "a\nb\nc\n", "y", R"($1)", "b"); + test(regex_44, "44", R"((?m)^b)", "a\nb\n", "y", R"($&)", "b"); + test(regex_45, "45", R"((?m)^(b))", "a\nb\n", "y", R"($1)", "b"); + test(regex_46, "46", R"(((?m)^b))", "a\nb\n", "y", R"($1)", "b"); + test(regex_47, "47", R"(\n((?m)^b))", "a\nb\n", "y", R"($1)", "b"); + test(regex_48, "48", R"(^b)", "a\nb\nc\n", "n", R"(-)", "-"); + test(regex_49, "49", R"(()^b)", "a\nb\nc\n", "n", R"(-)", "-"); + test(regex_50, "50", R"(((?m)^b))", "a\nb\nc\n", "y", R"($1)", "b"); + test(regex_51, "51", R"('(foo)'n)", "foobar", "y", R"($&-$1)", "foo-"); + test(regex_52, "52", R"('(?-n)(foo)(?n)(bar)'n)", "foobar", "y", R"($&-$1-$2)", "foobar-foo-"); + test(regex_53, "53", R"('(?-n:(foo)(?n:(bar)))'n)", "foobar", "y", R"($&-$1-$2)", "foobar-foo-"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::to_string() -> std::string{return R"(((?i)a)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::to_string() -> std::string{return R"(((?i)a)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::to_string() -> std::string{return R"(((?i)a)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::to_string() -> std::string{return R"((?i:a)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::to_string() -> std::string{return R"(((?i:a))b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::to_string() -> std::string{return R"((?i:a)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::to_string() -> std::string{return R"(((?i:a))b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::to_string() -> std::string{return R"((?i:a)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_0 {"a"}; + + std::array upper_str_tmp_0 {"A"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::to_string() -> std::string{return R"(((?i:a))b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + + std::array lower_str_tmp_1 {"b"}; + + std::array upper_str_tmp_1 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::to_string() -> std::string{return R"('((?-i:a.))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::to_string() -> std::string{return R"('((?-i:a\N))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::to_string() -> std::string{return R"('((?s-i:a.))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::to_string() -> std::string{return R"('((?s-i:a\N))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::to_string() -> std::string{return R"('((?s-i:a.))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array lower_str_tmp_2 {"b"}; + + std::array upper_str_tmp_2 {"B"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::to_string() -> std::string{return R"('((?s-i:a\N))b'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::to_string() -> std::string{return R"((?i:.[b].))"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::to_string() -> std::string{return R"((?i:\N[b]\N))"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), cpp2::regex::no_reset(), other, func_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_6()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::to_string() -> std::string{return R"(^(?:a?b?)*$)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + ctx.set_group_start(3, r.pos); + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_3 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(3, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::to_string() -> std::string{return R"(((?s)^a(.))((?m)^b$))"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::to_string() -> std::string{return R"(((?m)^b$))"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::to_string() -> std::string{return R"((?m)^b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::to_string() -> std::string{return R"((?m)^(b))"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::to_string() -> std::string{return R"(((?m)^b))"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"\n"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::to_string() -> std::string{return R"(\n((?m)^b))"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::to_string() -> std::string{return R"(^b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::to_string() -> std::string{return R"(()^b)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::to_string() -> std::string{return R"(((?m)^b))"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::to_string() -> std::string{return R"('(?:foo)'n)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"bar"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::to_string() -> std::string{return R"('(?-n)(foo)(?n)(?:bar)'n)"; } + + + + + + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"bar"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::to_string() -> std::string{return R"('(?-n:(foo)(?n:(?:bar)))'n)"; } + + +#line 265 "pure2-regex_15_group_modifiers.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_15_group_modifiers()); +} + diff --git a/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp2.output b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp2.output new file mode 100644 index 0000000000..04c99ceee7 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_15_group_modifiers.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp new file mode 100644 index 0000000000..f35365f506 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp @@ -0,0 +1,3282 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_16_perl_syntax_modifier.cpp2" + +#line 153 "pure2-regex_16_perl_syntax_modifier.cpp2" +class test_tests_16_perl_syntax_modifier; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_16_perl_syntax_modifier.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_16_perl_syntax_modifier.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_16_perl_syntax_modifier.cpp2" +class test_tests_16_perl_syntax_modifier { + +#line 187 "pure2-regex_16_perl_syntax_modifier.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_25_matcher() = default; + public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_25_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_26_matcher() = default; + public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_26_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_27_matcher() = default; + public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_27_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_28_matcher() = default; + public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_28_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_29_matcher() = default; + public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_29_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_30_matcher() = default; + public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_30_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_31_matcher() = default; + public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_31_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_32_matcher() = default; + public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_32_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_33_matcher() = default; + public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_33_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_33 {}; + public: test_tests_16_perl_syntax_modifier() = default; + public: test_tests_16_perl_syntax_modifier(test_tests_16_perl_syntax_modifier const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_16_perl_syntax_modifier const&) -> void = delete; + + +#line 224 "pure2-regex_16_perl_syntax_modifier.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_16_perl_syntax_modifier.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_16_perl_syntax_modifier.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_16_perl_syntax_modifier.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 187 "pure2-regex_16_perl_syntax_modifier.cpp2" + auto test_tests_16_perl_syntax_modifier::run() const& -> void{ + std::cout << "Running tests_16_perl_syntax_modifier:" << std::endl; + test(regex_01, "01", R"(/\N {1}/x)", "abbbbc", "y", R"($&)", "a"); + test(regex_02, "02", R"(/\N {1}/x)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_03, "03", R"(/\N {1}/x)", "abbbbc", "y", R"($+[0])", "1"); + test(regex_04, "04", R"(/\N {3,4}/x)", "abbbbc", "y", R"($&)", "abbb"); + test(regex_05, "05", R"(/\N {3,4}/x)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_06, "06", R"(/\N {3,4}/x)", "abbbbc", "y", R"($+[0])", "4"); + test(regex_07, "07", R"(/a\N c/x)", "abc", "y", R"($&)", "abc"); + test(regex_08, "08", R"(/a\N *c/x)", "axyzc", "y", R"($&)", "axyzc"); + test(regex_09, "09", R"(/a\N *c/x)", "axyzd", "n", R"(-)", "-"); + test(regex_10, "10", R"(/[a b]/x)", " ", "yS", R"($&)", " "); + test(regex_11, "11", R"(/[a b]/xx)", " ", "n", R"(-)", "-"); + test(regex_12, "12", R"(/[a\ b]/xx)", " ", "y", R"($&)", " "); + test(regex_13, "13", R"(/[ ^ a b ]/xx)", "a", "n", R"(-)", "-"); + test(regex_14, "14", R"(/[ ^ a b ]/xx)", "b", "n", R"(-)", "-"); + test(regex_15, "15", R"(/[ ^ a b ]/xx)", "A", "y", R"($&)", "A"); + test(regex_16, "16", R"(/(?x:[a b])/xx)", " ", "yS", R"($&)", " "); + test(regex_17, "17", R"(/(?xx:[a b])/x)", " ", "n", R"(-)", "-"); + test(regex_18, "18", R"(/(?x)[a b]/xx)", " ", "yS", R"($&)", " "); + test(regex_19, "19", R"(/(?xx)[a b]/x)", " ", "n", R"(-)", "-"); + test(regex_20, "20", R"(/(?-x:[a b])/xx)", " ", "yS", R"($&)", " "); + test(regex_21, "21", R"(/\N {1}/x)", "abbbbc", "y", R"($&)", "a"); + test(regex_22, "22", R"(/\N {1}/x)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_23, "23", R"(/\N {1}/x)", "abbbbc", "y", R"($+[0])", "1"); + test(regex_24, "24", R"(/\N {3,4}/x)", "abbbbc", "y", R"($&)", "abbb"); + test(regex_25, "25", R"(/\N {3,4}/x)", "abbbbc", "y", R"($-[0])", "0"); + test(regex_26, "26", R"(/\N {3,4}/x)", "abbbbc", "y", R"($+[0])", "4"); + test(regex_27, "27", R"(/a\N c/x)", "abc", "y", R"($&)", "abc"); + test(regex_28, "28", R"(/a\N *c/x)", "axyzc", "y", R"($&)", "axyzc"); + test(regex_29, "29", R"(/a\N *c/x)", "axyzd", "n", R"(-)", "-"); + test(regex_30, "30", R"(/[#]/)", "a#b", "y", R"($&)", "#"); + test(regex_31, "31", R"(/[#]b/)", "a#b", "y", R"($&)", "#b"); + test(regex_32, "32", R"(/[#]/x)", "a#b", "y", R"($&)", "#"); + test(regex_33, "33", R"(/[#]b/x)", "a#b", "y", R"($&)", "#b"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::to_string() -> std::string{return R"(/a\Nc/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::to_string() -> std::string{return R"(/[a b]/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::to_string() -> std::string{return R"(/[a b]/xx)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::to_string() -> std::string{return R"(/[a\ b]/xx)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::to_string() -> std::string{return R"(/(?x:[a b])/xx)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::to_string() -> std::string{return R"(/(?xx:[a b])/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::to_string() -> std::string{return R"(/(?x)[a b]/xx)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::to_string() -> std::string{return R"(/(?xx)[a b]/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::to_string() -> std::string{return R"(/(?-x:[a b])/xx)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::to_string() -> std::string{return R"(/a\Nc/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::to_string() -> std::string{return R"(/[#]/)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::to_string() -> std::string{return R"(/[#]b/)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::to_string() -> std::string{return R"(/[#]/x)"; } + + + + + + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::to_string() -> std::string{return R"(/[#]b/x)"; } + + +#line 225 "pure2-regex_16_perl_syntax_modifier.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_16_perl_syntax_modifier()); +} + diff --git a/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp2.output b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp2.output new file mode 100644 index 0000000000..441e743cae --- /dev/null +++ b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_16_perl_syntax_modifier.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_17_comments.cpp b/regression-tests/test-results/pure2-regex_17_comments.cpp new file mode 100644 index 0000000000..2e772618ab --- /dev/null +++ b/regression-tests/test-results/pure2-regex_17_comments.cpp @@ -0,0 +1,561 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_17_comments.cpp2" + +#line 153 "pure2-regex_17_comments.cpp2" +class test_tests_17_comments; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_17_comments.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_17_comments.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_17_comments.cpp2" +class test_tests_17_comments { + +#line 157 "pure2-regex_17_comments.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; + public: test_tests_17_comments() = default; + public: test_tests_17_comments(test_tests_17_comments const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_17_comments const&) -> void = delete; + + +#line 164 "pure2-regex_17_comments.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_17_comments.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_17_comments.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_17_comments.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 157 "pure2-regex_17_comments.cpp2" + auto test_tests_17_comments::run() const& -> void{ + std::cout << "Running tests_17_comments:" << std::endl; + test(regex_01, "01", R"(^a(?#xxx){3}c)", "aaac", "y", R"($&)", "aaac"); + test(regex_02, "02", R"('^a (?#xxx) (?#yyy) {3}c'x)", "aaac", "y", R"($&)", "aaac"); + test(regex_03, "03", R"('foo # Match foo'x)", "foobar", "y", R"($&)", "foo"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::to_string() -> std::string{return R"(^a(?#xxx){3}c)"; } + + + + + + + template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::to_string() -> std::string{return R"('^a(?#xxx)(?#yyy){3}c'x)"; } + + + + + + + template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"foo"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 3;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::to_string() -> std::string{return R"('foo'x)"; } + + +#line 165 "pure2-regex_17_comments.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_17_comments()); +} + diff --git a/regression-tests/test-results/pure2-regex_17_comments.cpp2.output b/regression-tests/test-results/pure2-regex_17_comments.cpp2.output new file mode 100644 index 0000000000..aab828b8cd --- /dev/null +++ b/regression-tests/test-results/pure2-regex_17_comments.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_17_comments.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_18_branch_reset.cpp b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp new file mode 100644 index 0000000000..1e6e056785 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp @@ -0,0 +1,7000 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_18_branch_reset.cpp2" + +#line 153 "pure2-regex_18_branch_reset.cpp2" +class test_tests_18_branch_reset; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_18_branch_reset.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_18_branch_reset.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_18_branch_reset.cpp2" +class test_tests_18_branch_reset { + +#line 169 "pure2-regex_18_branch_reset.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_2 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_2 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_2 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_2 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_3 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_4 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_5 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_2 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_3 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_4 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_5 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_2 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_3 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_4 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_5 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_2 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_3 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_4 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_5 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; + public: test_tests_18_branch_reset() = default; + public: test_tests_18_branch_reset(test_tests_18_branch_reset const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_18_branch_reset const&) -> void = delete; + + +#line 188 "pure2-regex_18_branch_reset.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_18_branch_reset.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_18_branch_reset.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_18_branch_reset.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 169 "pure2-regex_18_branch_reset.cpp2" + auto test_tests_18_branch_reset::run() const& -> void{ + std::cout << "Running tests_18_branch_reset:" << std::endl; + test(regex_01, "01", R"((?|(a)))", "a", "y", R"($1-$+)", "a-a"); + test(regex_02, "02", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "d!o!da", "y", R"($1-$2-$3)", "!o!-o-a"); + test(regex_03, "03", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "aabc", "y", R"($1-$2-$3)", "a--c"); + test(regex_04, "04", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "ixyjp", "y", R"($1-$2-$3)", "x-y-p"); + test(regex_05, "05", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "a", "y", R"($1)", "a"); + test(regex_06, "06", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "b", "y", R"($1)", "b"); + test(regex_07, "07", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "c", "y", R"($1)", "c"); + test(regex_08, "08", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "d", "y", R"($1)", "d"); + test(regex_09, "09", R"((.)(?|(.)(.)x|(.)d)(.))", "abcde", "y", R"($1-$2-$3-$4-$5-)", "b-c--e--"); + test(regex_10, "10", R"((\N)(?|(\N)(\N)x|(\N)d)(\N))", "abcde", "y", R"($1-$2-$3-$4-$5-)", "b-c--e--"); + test(regex_11, "11", R"((?|(?x)))", "x", "yM", R"($+{foo})", "x"); + test(regex_12, "12", R"((?|(?x)|(?y)))", "x", "yM", R"($+{foo})", "x"); + test(regex_13, "13", R"((?|(?y)|(?x)))", "x", "yM", R"($+{foo})", "x"); + test(regex_14, "14", R"((?)(?|(?x)))", "x", "yM", R"($+{foo})", "x"); + test(regex_15, "15", R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))", "a", "y", R"($&)", "a"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::to_string() -> std::string{return R"((?|(a)))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_02_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(2, r.pos); + + std::array str_tmp_4 {"o"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + + std::array str_tmp_7 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_7, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_02_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_8 {"i"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_8, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_9_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; + static_cast(cpp2::move(tmp_9)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + + std::array str_tmp_11 {"j"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_11, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_02_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_1(), reset_0(), func_2(), reset_1(), func_3(), reset_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(3, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(3, r.pos); + + auto tmp_12_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_12 {cpp2::regex::make_on_return(cpp2::move(tmp_12_func))}; + static_cast(cpp2::move(tmp_12)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_03_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(2, r.pos); + + std::array str_tmp_4 {"o"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + + std::array str_tmp_7 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_7, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_03_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_8 {"i"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_8, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_9_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; + static_cast(cpp2::move(tmp_9)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + + std::array str_tmp_11 {"j"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_11, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_03_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_1(), reset_0(), func_2(), reset_1(), func_3(), reset_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(3, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(3, r.pos); + + auto tmp_12_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_12 {cpp2::regex::make_on_return(cpp2::move(tmp_12_func))}; + static_cast(cpp2::move(tmp_12)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_04_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(2, r.pos); + + std::array str_tmp_4 {"o"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + + std::array str_tmp_7 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_7, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_04_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_8 {"i"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_8, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_9_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; + static_cast(cpp2::move(tmp_9)); + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; + static_cast(cpp2::move(tmp_10)); + + std::array str_tmp_11 {"j"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_11, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_04_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_1(), reset_0(), func_2(), reset_1(), func_3(), reset_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(3, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(3, r.pos); + + auto tmp_12_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_12 {cpp2::regex::make_on_return(cpp2::move(tmp_12_func))}; + static_cast(cpp2::move(tmp_12)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), reset_0(), func_3(), reset_1()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_4 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_6 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_7_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; + static_cast(cpp2::move(tmp_7)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), reset_3(), func_7(), reset_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_9(), func_1(), reset_2(), func_5(), reset_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), reset_0(), func_3(), reset_1()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_4 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_6 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_7_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; + static_cast(cpp2::move(tmp_7)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), reset_3(), func_7(), reset_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_9(), func_1(), reset_2(), func_5(), reset_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), reset_0(), func_3(), reset_1()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_4 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_6 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_7_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; + static_cast(cpp2::move(tmp_7)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), reset_3(), func_7(), reset_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_9(), func_1(), reset_2(), func_5(), reset_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), reset_0(), func_3(), reset_1()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_4 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_6 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_7_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; + static_cast(cpp2::move(tmp_7)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), reset_3(), func_7(), reset_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_9(), func_1(), reset_2(), func_5(), reset_5()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_start(3, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(3, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + + std::array str_tmp_3 {"x"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_09_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + ctx.set_group_invalid(3); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + + std::array str_tmp_5 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_09_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(4, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(4, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::to_string() -> std::string{return R"((.)(?|(.)(.)x|(.)d)(.))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + ctx.set_group_start(3, r.pos); + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(3, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + + std::array str_tmp_3 {"x"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_10_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + ctx.set_group_invalid(3); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + + std::array str_tmp_5 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_10_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(4, r.pos); + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(4, r.pos); + + auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4); + } + } + }; + + auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; + static_cast(cpp2::move(tmp_6)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::to_string() -> std::string{return R"((\N)(?|(\N)(\N)x|(\N)d)(\N))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"x"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "foo") {return 1; }else {return -1; } + } + + [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::to_string() -> std::string{return R"((?|(?x)))"; } + + + + + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"x"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_12_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_2 {"y"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_18_branch_reset::regex_12_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + if (name == "bar") {return 1; }else {if (name == "foo") {return 1; }else {return -1; } +#line 1 "pure2-regex_18_branch_reset.cpp2" +} +} + +[[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::to_string() -> std::string{return R"((?|(?x)|(?y)))"; } + + + + + + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + +auto r {ctx.pass(cur)}; +do { +ctx.set_group_start(1, r.pos); + +std::array str_tmp_0 {"y"}; +if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { +r.matched = false; +break; +} +{ +int i{0}; +for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { +if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} +} +} +if (r.matched) {r.pos += 1;} +else {break;} +ctx.set_group_end(1, r.pos); + +auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); +} +} +}; + +auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; +static_cast(cpp2::move(tmp_1)); +} + while ( +false +); +if (r.matched) { +r = other(r.pos, ctx); +} +else { +r.pos = ctx.end; +} +return r; +} + + +template auto test_tests_18_branch_reset::regex_13_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ +ctx.set_group_invalid(1); +} + + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + +auto r {ctx.pass(cur)}; +do { +ctx.set_group_start(1, r.pos); + +std::array str_tmp_2 {"x"}; +if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { +r.matched = false; +break; +} +{ +int i{0}; +for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { +if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} +} +} +if (r.matched) {r.pos += 1;} +else {break;} +ctx.set_group_end(1, r.pos); + +auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); +} +} +}; + +auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; +static_cast(cpp2::move(tmp_3)); +} + while ( +false +); +if (r.matched) { +r = other(r.pos, ctx); +} +else { +r.pos = ctx.end; +} +return r; +} + + +template auto test_tests_18_branch_reset::regex_13_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ +ctx.set_group_invalid(1); +} + + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + +auto r {ctx.pass(cur)}; +do { +} + while ( +false +); +if (r.matched) { +r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1()); +} +else { +r.pos = ctx.end; +} +return r; +} + + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + +auto r {ctx.pass(cur)}; +do { +} + while ( +false +); +if (r.matched) { +r = other(r.pos, ctx); +} +else { +r.pos = ctx.end; +} +return r; +} + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ +ctx.set_group_start(0, cur); + +auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; +if (r.matched) {ctx.set_group_end(0, r.pos);} +return r; +} + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ +if (name == "bar") {return 1; }else {if (name == "foo") {return 1; }else {return -1; }} +} + +[[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::to_string() -> std::string{return R"((?|(?y)|(?x)))"; } + + + + + + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + +auto r {ctx.pass(cur)}; +do { +ctx.set_group_start(1, r.pos); +ctx.set_group_end(1, r.pos); + +auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); +} +} +}; + +auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; +static_cast(cpp2::move(tmp_0)); +ctx.set_group_start(2, r.pos); + +std::array str_tmp_1 {"x"}; +if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { +r.matched = false; +break; +} +{ +int i{0}; +for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { +if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} +} +} +if (r.matched) {r.pos += 1;} +else {break;} +ctx.set_group_end(2, r.pos); + +auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); +} +} +}; + +auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; +static_cast(cpp2::move(tmp_2)); +} + while ( +false +); +if (r.matched) { +r = other(r.pos, ctx); +} +else { +r.pos = ctx.end; +} +return r; +} + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ +ctx.set_group_start(0, cur); + +auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; +if (r.matched) {ctx.set_group_end(0, r.pos);} +return r; +} + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ +if (name == "bar") {return 1; }else {if (name == "foo") {return 2; }else {return -1; }} +} + +[[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::to_string() -> std::string{return R"((?)(?|(?x)))"; } + + + + + + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + +auto r {ctx.pass(cur)}; +do { +ctx.set_group_start(1, r.pos); + +std::array str_tmp_0 {"b"}; +if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { +r.matched = false; +break; +} +{ +int i{0}; +for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { +if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} +} +} +if (r.matched) {r.pos += 1;} +else {break;} +ctx.set_group_end(1, r.pos); + +auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); +} +} +}; + +auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; +static_cast(cpp2::move(tmp_1)); +} + while ( +false +); +if (r.matched) { +r = other(r.pos, ctx); +} +else { +r.pos = ctx.end; +} +return r; +} + + +template auto test_tests_18_branch_reset::regex_15_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ +ctx.set_group_invalid(1); +} + + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + +auto r {ctx.pass(cur)}; +do { +ctx.set_group_start(1, r.pos); +ctx.set_group_end(1, r.pos); + +auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); +} +} +}; + +auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; +static_cast(cpp2::move(tmp_2)); +ctx.set_group_start(2, r.pos); +ctx.set_group_end(2, r.pos); + +auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); +} +} +}; + +auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; +static_cast(cpp2::move(tmp_3)); +ctx.set_group_start(3, r.pos); +ctx.set_group_end(3, r.pos); + +auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(3); +} +} +}; + +auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; +static_cast(cpp2::move(tmp_4)); +ctx.set_group_start(4, r.pos); +ctx.set_group_end(4, r.pos); + +auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(4); +} +} +}; + +auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; +static_cast(cpp2::move(tmp_5)); +ctx.set_group_start(5, r.pos); +ctx.set_group_end(5, r.pos); + +auto tmp_6_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(5); +} +} +}; + +auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; +static_cast(cpp2::move(tmp_6)); +ctx.set_group_start(6, r.pos); +ctx.set_group_end(6, r.pos); + +auto tmp_7_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(6); +} +} +}; + +auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; +static_cast(cpp2::move(tmp_7)); +ctx.set_group_start(7, r.pos); +ctx.set_group_end(7, r.pos); + +auto tmp_8_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(7); +} +} +}; + +auto tmp_8 {cpp2::regex::make_on_return(cpp2::move(tmp_8_func))}; +static_cast(cpp2::move(tmp_8)); +ctx.set_group_start(8, r.pos); +ctx.set_group_end(8, r.pos); + +auto tmp_9_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(8); +} +} +}; + +auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; +static_cast(cpp2::move(tmp_9)); +ctx.set_group_start(9, r.pos); +ctx.set_group_end(9, r.pos); + +auto tmp_10_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(9); +} +} +}; + +auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; +static_cast(cpp2::move(tmp_10)); +ctx.set_group_start(10, r.pos); +ctx.set_group_end(10, r.pos); + +auto tmp_11_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(10); +} +} +}; + +auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; +static_cast(cpp2::move(tmp_11)); +ctx.set_group_start(11, r.pos); +ctx.set_group_end(11, r.pos); + +auto tmp_12_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(11); +} +} +}; + +auto tmp_12 {cpp2::regex::make_on_return(cpp2::move(tmp_12_func))}; +static_cast(cpp2::move(tmp_12)); +ctx.set_group_start(12, r.pos); +ctx.set_group_end(12, r.pos); + +auto tmp_13_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(12); +} +} +}; + +auto tmp_13 {cpp2::regex::make_on_return(cpp2::move(tmp_13_func))}; +static_cast(cpp2::move(tmp_13)); +ctx.set_group_start(13, r.pos); +ctx.set_group_end(13, r.pos); + +auto tmp_14_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(13); +} +} +}; + +auto tmp_14 {cpp2::regex::make_on_return(cpp2::move(tmp_14_func))}; +static_cast(cpp2::move(tmp_14)); +ctx.set_group_start(14, r.pos); +ctx.set_group_end(14, r.pos); + +auto tmp_15_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(14); +} +} +}; + +auto tmp_15 {cpp2::regex::make_on_return(cpp2::move(tmp_15_func))}; +static_cast(cpp2::move(tmp_15)); +ctx.set_group_start(15, r.pos); +ctx.set_group_end(15, r.pos); + +auto tmp_16_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(15); +} +} +}; + +auto tmp_16 {cpp2::regex::make_on_return(cpp2::move(tmp_16_func))}; +static_cast(cpp2::move(tmp_16)); +ctx.set_group_start(16, r.pos); +ctx.set_group_end(16, r.pos); + +auto tmp_17_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(16); +} +} +}; + +auto tmp_17 {cpp2::regex::make_on_return(cpp2::move(tmp_17_func))}; +static_cast(cpp2::move(tmp_17)); +ctx.set_group_start(17, r.pos); +ctx.set_group_end(17, r.pos); + +auto tmp_18_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(17); +} +} +}; + +auto tmp_18 {cpp2::regex::make_on_return(cpp2::move(tmp_18_func))}; +static_cast(cpp2::move(tmp_18)); +ctx.set_group_start(18, r.pos); +ctx.set_group_end(18, r.pos); + +auto tmp_19_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(18); +} +} +}; + +auto tmp_19 {cpp2::regex::make_on_return(cpp2::move(tmp_19_func))}; +static_cast(cpp2::move(tmp_19)); +ctx.set_group_start(19, r.pos); +ctx.set_group_end(19, r.pos); + +auto tmp_20_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(19); +} +} +}; + +auto tmp_20 {cpp2::regex::make_on_return(cpp2::move(tmp_20_func))}; +static_cast(cpp2::move(tmp_20)); +ctx.set_group_start(20, r.pos); +ctx.set_group_end(20, r.pos); + +auto tmp_21_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(20); +} +} +}; + +auto tmp_21 {cpp2::regex::make_on_return(cpp2::move(tmp_21_func))}; +static_cast(cpp2::move(tmp_21)); +ctx.set_group_start(21, r.pos); +ctx.set_group_end(21, r.pos); + +auto tmp_22_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(21); +} +} +}; + +auto tmp_22 {cpp2::regex::make_on_return(cpp2::move(tmp_22_func))}; +static_cast(cpp2::move(tmp_22)); +ctx.set_group_start(22, r.pos); +ctx.set_group_end(22, r.pos); + +auto tmp_23_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(22); +} +} +}; + +auto tmp_23 {cpp2::regex::make_on_return(cpp2::move(tmp_23_func))}; +static_cast(cpp2::move(tmp_23)); +ctx.set_group_start(23, r.pos); +ctx.set_group_end(23, r.pos); + +auto tmp_24_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(23); +} +} +}; + +auto tmp_24 {cpp2::regex::make_on_return(cpp2::move(tmp_24_func))}; +static_cast(cpp2::move(tmp_24)); +ctx.set_group_start(24, r.pos); +ctx.set_group_end(24, r.pos); + +auto tmp_25_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(24); +} +} +}; + +auto tmp_25 {cpp2::regex::make_on_return(cpp2::move(tmp_25_func))}; +static_cast(cpp2::move(tmp_25)); +ctx.set_group_start(25, r.pos); +ctx.set_group_end(25, r.pos); + +auto tmp_26_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(25); +} +} +}; + +auto tmp_26 {cpp2::regex::make_on_return(cpp2::move(tmp_26_func))}; +static_cast(cpp2::move(tmp_26)); +ctx.set_group_start(26, r.pos); +ctx.set_group_end(26, r.pos); + +auto tmp_27_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(26); +} +} +}; + +auto tmp_27 {cpp2::regex::make_on_return(cpp2::move(tmp_27_func))}; +static_cast(cpp2::move(tmp_27)); +ctx.set_group_start(27, r.pos); +ctx.set_group_end(27, r.pos); + +auto tmp_28_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(27); +} +} +}; + +auto tmp_28 {cpp2::regex::make_on_return(cpp2::move(tmp_28_func))}; +static_cast(cpp2::move(tmp_28)); +ctx.set_group_start(28, r.pos); +ctx.set_group_end(28, r.pos); + +auto tmp_29_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(28); +} +} +}; + +auto tmp_29 {cpp2::regex::make_on_return(cpp2::move(tmp_29_func))}; +static_cast(cpp2::move(tmp_29)); +ctx.set_group_start(29, r.pos); +ctx.set_group_end(29, r.pos); + +auto tmp_30_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(29); +} +} +}; + +auto tmp_30 {cpp2::regex::make_on_return(cpp2::move(tmp_30_func))}; +static_cast(cpp2::move(tmp_30)); +ctx.set_group_start(30, r.pos); +ctx.set_group_end(30, r.pos); + +auto tmp_31_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(30); +} +} +}; + +auto tmp_31 {cpp2::regex::make_on_return(cpp2::move(tmp_31_func))}; +static_cast(cpp2::move(tmp_31)); +ctx.set_group_start(31, r.pos); +ctx.set_group_end(31, r.pos); + +auto tmp_32_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(31); +} +} +}; + +auto tmp_32 {cpp2::regex::make_on_return(cpp2::move(tmp_32_func))}; +static_cast(cpp2::move(tmp_32)); +ctx.set_group_start(32, r.pos); +ctx.set_group_end(32, r.pos); + +auto tmp_33_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(32); +} +} +}; + +auto tmp_33 {cpp2::regex::make_on_return(cpp2::move(tmp_33_func))}; +static_cast(cpp2::move(tmp_33)); +ctx.set_group_start(33, r.pos); +ctx.set_group_end(33, r.pos); + +auto tmp_34_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(33); +} +} +}; + +auto tmp_34 {cpp2::regex::make_on_return(cpp2::move(tmp_34_func))}; +static_cast(cpp2::move(tmp_34)); +ctx.set_group_start(34, r.pos); +ctx.set_group_end(34, r.pos); + +auto tmp_35_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(34); +} +} +}; + +auto tmp_35 {cpp2::regex::make_on_return(cpp2::move(tmp_35_func))}; +static_cast(cpp2::move(tmp_35)); +ctx.set_group_start(35, r.pos); +ctx.set_group_end(35, r.pos); + +auto tmp_36_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(35); +} +} +}; + +auto tmp_36 {cpp2::regex::make_on_return(cpp2::move(tmp_36_func))}; +static_cast(cpp2::move(tmp_36)); +ctx.set_group_start(36, r.pos); +ctx.set_group_end(36, r.pos); + +auto tmp_37_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(36); +} +} +}; + +auto tmp_37 {cpp2::regex::make_on_return(cpp2::move(tmp_37_func))}; +static_cast(cpp2::move(tmp_37)); +ctx.set_group_start(37, r.pos); +ctx.set_group_end(37, r.pos); + +auto tmp_38_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(37); +} +} +}; + +auto tmp_38 {cpp2::regex::make_on_return(cpp2::move(tmp_38_func))}; +static_cast(cpp2::move(tmp_38)); +ctx.set_group_start(38, r.pos); +ctx.set_group_end(38, r.pos); + +auto tmp_39_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(38); +} +} +}; + +auto tmp_39 {cpp2::regex::make_on_return(cpp2::move(tmp_39_func))}; +static_cast(cpp2::move(tmp_39)); +ctx.set_group_start(39, r.pos); +ctx.set_group_end(39, r.pos); + +auto tmp_40_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(39); +} +} +}; + +auto tmp_40 {cpp2::regex::make_on_return(cpp2::move(tmp_40_func))}; +static_cast(cpp2::move(tmp_40)); +ctx.set_group_start(40, r.pos); +ctx.set_group_end(40, r.pos); + +auto tmp_41_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(40); +} +} +}; + +auto tmp_41 {cpp2::regex::make_on_return(cpp2::move(tmp_41_func))}; +static_cast(cpp2::move(tmp_41)); +ctx.set_group_start(41, r.pos); +ctx.set_group_end(41, r.pos); + +auto tmp_42_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(41); +} +} +}; + +auto tmp_42 {cpp2::regex::make_on_return(cpp2::move(tmp_42_func))}; +static_cast(cpp2::move(tmp_42)); +ctx.set_group_start(42, r.pos); +ctx.set_group_end(42, r.pos); + +auto tmp_43_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(42); +} +} +}; + +auto tmp_43 {cpp2::regex::make_on_return(cpp2::move(tmp_43_func))}; +static_cast(cpp2::move(tmp_43)); +ctx.set_group_start(43, r.pos); +ctx.set_group_end(43, r.pos); + +auto tmp_44_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(43); +} +} +}; + +auto tmp_44 {cpp2::regex::make_on_return(cpp2::move(tmp_44_func))}; +static_cast(cpp2::move(tmp_44)); +ctx.set_group_start(44, r.pos); +ctx.set_group_end(44, r.pos); + +auto tmp_45_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(44); +} +} +}; + +auto tmp_45 {cpp2::regex::make_on_return(cpp2::move(tmp_45_func))}; +static_cast(cpp2::move(tmp_45)); +ctx.set_group_start(45, r.pos); +ctx.set_group_end(45, r.pos); + +auto tmp_46_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(45); +} +} +}; + +auto tmp_46 {cpp2::regex::make_on_return(cpp2::move(tmp_46_func))}; +static_cast(cpp2::move(tmp_46)); +ctx.set_group_start(46, r.pos); +ctx.set_group_end(46, r.pos); + +auto tmp_47_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(46); +} +} +}; + +auto tmp_47 {cpp2::regex::make_on_return(cpp2::move(tmp_47_func))}; +static_cast(cpp2::move(tmp_47)); +ctx.set_group_start(47, r.pos); +ctx.set_group_end(47, r.pos); + +auto tmp_48_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(47); +} +} +}; + +auto tmp_48 {cpp2::regex::make_on_return(cpp2::move(tmp_48_func))}; +static_cast(cpp2::move(tmp_48)); +ctx.set_group_start(48, r.pos); +ctx.set_group_end(48, r.pos); + +auto tmp_49_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(48); +} +} +}; + +auto tmp_49 {cpp2::regex::make_on_return(cpp2::move(tmp_49_func))}; +static_cast(cpp2::move(tmp_49)); +ctx.set_group_start(49, r.pos); +ctx.set_group_end(49, r.pos); + +auto tmp_50_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(49); +} +} +}; + +auto tmp_50 {cpp2::regex::make_on_return(cpp2::move(tmp_50_func))}; +static_cast(cpp2::move(tmp_50)); +ctx.set_group_start(50, r.pos); +ctx.set_group_end(50, r.pos); + +auto tmp_51_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(50); +} +} +}; + +auto tmp_51 {cpp2::regex::make_on_return(cpp2::move(tmp_51_func))}; +static_cast(cpp2::move(tmp_51)); +ctx.set_group_start(51, r.pos); +ctx.set_group_end(51, r.pos); + +auto tmp_52_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(51); +} +} +}; + +auto tmp_52 {cpp2::regex::make_on_return(cpp2::move(tmp_52_func))}; +static_cast(cpp2::move(tmp_52)); +ctx.set_group_start(52, r.pos); +ctx.set_group_end(52, r.pos); + +auto tmp_53_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(52); +} +} +}; + +auto tmp_53 {cpp2::regex::make_on_return(cpp2::move(tmp_53_func))}; +static_cast(cpp2::move(tmp_53)); +ctx.set_group_start(53, r.pos); +ctx.set_group_end(53, r.pos); + +auto tmp_54_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(53); +} +} +}; + +auto tmp_54 {cpp2::regex::make_on_return(cpp2::move(tmp_54_func))}; +static_cast(cpp2::move(tmp_54)); +ctx.set_group_start(54, r.pos); +ctx.set_group_end(54, r.pos); + +auto tmp_55_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(54); +} +} +}; + +auto tmp_55 {cpp2::regex::make_on_return(cpp2::move(tmp_55_func))}; +static_cast(cpp2::move(tmp_55)); +ctx.set_group_start(55, r.pos); +ctx.set_group_end(55, r.pos); + +auto tmp_56_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(55); +} +} +}; + +auto tmp_56 {cpp2::regex::make_on_return(cpp2::move(tmp_56_func))}; +static_cast(cpp2::move(tmp_56)); +ctx.set_group_start(56, r.pos); +ctx.set_group_end(56, r.pos); + +auto tmp_57_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(56); +} +} +}; + +auto tmp_57 {cpp2::regex::make_on_return(cpp2::move(tmp_57_func))}; +static_cast(cpp2::move(tmp_57)); +ctx.set_group_start(57, r.pos); +ctx.set_group_end(57, r.pos); + +auto tmp_58_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(57); +} +} +}; + +auto tmp_58 {cpp2::regex::make_on_return(cpp2::move(tmp_58_func))}; +static_cast(cpp2::move(tmp_58)); +ctx.set_group_start(58, r.pos); +ctx.set_group_end(58, r.pos); + +auto tmp_59_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(58); +} +} +}; + +auto tmp_59 {cpp2::regex::make_on_return(cpp2::move(tmp_59_func))}; +static_cast(cpp2::move(tmp_59)); +ctx.set_group_start(59, r.pos); +ctx.set_group_end(59, r.pos); + +auto tmp_60_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(59); +} +} +}; + +auto tmp_60 {cpp2::regex::make_on_return(cpp2::move(tmp_60_func))}; +static_cast(cpp2::move(tmp_60)); +ctx.set_group_start(60, r.pos); +ctx.set_group_end(60, r.pos); + +auto tmp_61_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(60); +} +} +}; + +auto tmp_61 {cpp2::regex::make_on_return(cpp2::move(tmp_61_func))}; +static_cast(cpp2::move(tmp_61)); +ctx.set_group_start(61, r.pos); +ctx.set_group_end(61, r.pos); + +auto tmp_62_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(61); +} +} +}; + +auto tmp_62 {cpp2::regex::make_on_return(cpp2::move(tmp_62_func))}; +static_cast(cpp2::move(tmp_62)); +ctx.set_group_start(62, r.pos); +ctx.set_group_end(62, r.pos); + +auto tmp_63_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(62); +} +} +}; + +auto tmp_63 {cpp2::regex::make_on_return(cpp2::move(tmp_63_func))}; +static_cast(cpp2::move(tmp_63)); +ctx.set_group_start(63, r.pos); +ctx.set_group_end(63, r.pos); + +auto tmp_64_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(63); +} +} +}; + +auto tmp_64 {cpp2::regex::make_on_return(cpp2::move(tmp_64_func))}; +static_cast(cpp2::move(tmp_64)); +ctx.set_group_start(64, r.pos); +ctx.set_group_end(64, r.pos); + +auto tmp_65_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(64); +} +} +}; + +auto tmp_65 {cpp2::regex::make_on_return(cpp2::move(tmp_65_func))}; +static_cast(cpp2::move(tmp_65)); +ctx.set_group_start(65, r.pos); +ctx.set_group_end(65, r.pos); + +auto tmp_66_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(65); +} +} +}; + +auto tmp_66 {cpp2::regex::make_on_return(cpp2::move(tmp_66_func))}; +static_cast(cpp2::move(tmp_66)); +ctx.set_group_start(66, r.pos); +ctx.set_group_end(66, r.pos); + +auto tmp_67_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(66); +} +} +}; + +auto tmp_67 {cpp2::regex::make_on_return(cpp2::move(tmp_67_func))}; +static_cast(cpp2::move(tmp_67)); +ctx.set_group_start(67, r.pos); +ctx.set_group_end(67, r.pos); + +auto tmp_68_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(67); +} +} +}; + +auto tmp_68 {cpp2::regex::make_on_return(cpp2::move(tmp_68_func))}; +static_cast(cpp2::move(tmp_68)); +ctx.set_group_start(68, r.pos); +ctx.set_group_end(68, r.pos); + +auto tmp_69_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(68); +} +} +}; + +auto tmp_69 {cpp2::regex::make_on_return(cpp2::move(tmp_69_func))}; +static_cast(cpp2::move(tmp_69)); +ctx.set_group_start(69, r.pos); +ctx.set_group_end(69, r.pos); + +auto tmp_70_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(69); +} +} +}; + +auto tmp_70 {cpp2::regex::make_on_return(cpp2::move(tmp_70_func))}; +static_cast(cpp2::move(tmp_70)); +ctx.set_group_start(70, r.pos); +ctx.set_group_end(70, r.pos); + +auto tmp_71_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(70); +} +} +}; + +auto tmp_71 {cpp2::regex::make_on_return(cpp2::move(tmp_71_func))}; +static_cast(cpp2::move(tmp_71)); +ctx.set_group_start(71, r.pos); +ctx.set_group_end(71, r.pos); + +auto tmp_72_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(71); +} +} +}; + +auto tmp_72 {cpp2::regex::make_on_return(cpp2::move(tmp_72_func))}; +static_cast(cpp2::move(tmp_72)); +ctx.set_group_start(72, r.pos); +ctx.set_group_end(72, r.pos); + +auto tmp_73_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(72); +} +} +}; + +auto tmp_73 {cpp2::regex::make_on_return(cpp2::move(tmp_73_func))}; +static_cast(cpp2::move(tmp_73)); +ctx.set_group_start(73, r.pos); +ctx.set_group_end(73, r.pos); + +auto tmp_74_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(73); +} +} +}; + +auto tmp_74 {cpp2::regex::make_on_return(cpp2::move(tmp_74_func))}; +static_cast(cpp2::move(tmp_74)); +ctx.set_group_start(74, r.pos); +ctx.set_group_end(74, r.pos); + +auto tmp_75_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(74); +} +} +}; + +auto tmp_75 {cpp2::regex::make_on_return(cpp2::move(tmp_75_func))}; +static_cast(cpp2::move(tmp_75)); +ctx.set_group_start(75, r.pos); +ctx.set_group_end(75, r.pos); + +auto tmp_76_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(75); +} +} +}; + +auto tmp_76 {cpp2::regex::make_on_return(cpp2::move(tmp_76_func))}; +static_cast(cpp2::move(tmp_76)); +ctx.set_group_start(76, r.pos); +ctx.set_group_end(76, r.pos); + +auto tmp_77_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(76); +} +} +}; + +auto tmp_77 {cpp2::regex::make_on_return(cpp2::move(tmp_77_func))}; +static_cast(cpp2::move(tmp_77)); +ctx.set_group_start(77, r.pos); +ctx.set_group_end(77, r.pos); + +auto tmp_78_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(77); +} +} +}; + +auto tmp_78 {cpp2::regex::make_on_return(cpp2::move(tmp_78_func))}; +static_cast(cpp2::move(tmp_78)); +ctx.set_group_start(78, r.pos); +ctx.set_group_end(78, r.pos); + +auto tmp_79_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(78); +} +} +}; + +auto tmp_79 {cpp2::regex::make_on_return(cpp2::move(tmp_79_func))}; +static_cast(cpp2::move(tmp_79)); +ctx.set_group_start(79, r.pos); +ctx.set_group_end(79, r.pos); + +auto tmp_80_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(79); +} +} +}; + +auto tmp_80 {cpp2::regex::make_on_return(cpp2::move(tmp_80_func))}; +static_cast(cpp2::move(tmp_80)); +ctx.set_group_start(80, r.pos); +ctx.set_group_end(80, r.pos); + +auto tmp_81_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(80); +} +} +}; + +auto tmp_81 {cpp2::regex::make_on_return(cpp2::move(tmp_81_func))}; +static_cast(cpp2::move(tmp_81)); +ctx.set_group_start(81, r.pos); +ctx.set_group_end(81, r.pos); + +auto tmp_82_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(81); +} +} +}; + +auto tmp_82 {cpp2::regex::make_on_return(cpp2::move(tmp_82_func))}; +static_cast(cpp2::move(tmp_82)); +ctx.set_group_start(82, r.pos); +ctx.set_group_end(82, r.pos); + +auto tmp_83_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(82); +} +} +}; + +auto tmp_83 {cpp2::regex::make_on_return(cpp2::move(tmp_83_func))}; +static_cast(cpp2::move(tmp_83)); +ctx.set_group_start(83, r.pos); +ctx.set_group_end(83, r.pos); + +auto tmp_84_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(83); +} +} +}; + +auto tmp_84 {cpp2::regex::make_on_return(cpp2::move(tmp_84_func))}; +static_cast(cpp2::move(tmp_84)); +ctx.set_group_start(84, r.pos); +ctx.set_group_end(84, r.pos); + +auto tmp_85_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(84); +} +} +}; + +auto tmp_85 {cpp2::regex::make_on_return(cpp2::move(tmp_85_func))}; +static_cast(cpp2::move(tmp_85)); +ctx.set_group_start(85, r.pos); +ctx.set_group_end(85, r.pos); + +auto tmp_86_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(85); +} +} +}; + +auto tmp_86 {cpp2::regex::make_on_return(cpp2::move(tmp_86_func))}; +static_cast(cpp2::move(tmp_86)); +ctx.set_group_start(86, r.pos); +ctx.set_group_end(86, r.pos); + +auto tmp_87_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(86); +} +} +}; + +auto tmp_87 {cpp2::regex::make_on_return(cpp2::move(tmp_87_func))}; +static_cast(cpp2::move(tmp_87)); +ctx.set_group_start(87, r.pos); +ctx.set_group_end(87, r.pos); + +auto tmp_88_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(87); +} +} +}; + +auto tmp_88 {cpp2::regex::make_on_return(cpp2::move(tmp_88_func))}; +static_cast(cpp2::move(tmp_88)); +ctx.set_group_start(88, r.pos); +ctx.set_group_end(88, r.pos); + +auto tmp_89_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(88); +} +} +}; + +auto tmp_89 {cpp2::regex::make_on_return(cpp2::move(tmp_89_func))}; +static_cast(cpp2::move(tmp_89)); +ctx.set_group_start(89, r.pos); +ctx.set_group_end(89, r.pos); + +auto tmp_90_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(89); +} +} +}; + +auto tmp_90 {cpp2::regex::make_on_return(cpp2::move(tmp_90_func))}; +static_cast(cpp2::move(tmp_90)); +ctx.set_group_start(90, r.pos); +ctx.set_group_end(90, r.pos); + +auto tmp_91_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(90); +} +} +}; + +auto tmp_91 {cpp2::regex::make_on_return(cpp2::move(tmp_91_func))}; +static_cast(cpp2::move(tmp_91)); +ctx.set_group_start(91, r.pos); +ctx.set_group_end(91, r.pos); + +auto tmp_92_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(91); +} +} +}; + +auto tmp_92 {cpp2::regex::make_on_return(cpp2::move(tmp_92_func))}; +static_cast(cpp2::move(tmp_92)); +ctx.set_group_start(92, r.pos); +ctx.set_group_end(92, r.pos); + +auto tmp_93_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(92); +} +} +}; + +auto tmp_93 {cpp2::regex::make_on_return(cpp2::move(tmp_93_func))}; +static_cast(cpp2::move(tmp_93)); +ctx.set_group_start(93, r.pos); +ctx.set_group_end(93, r.pos); + +auto tmp_94_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(93); +} +} +}; + +auto tmp_94 {cpp2::regex::make_on_return(cpp2::move(tmp_94_func))}; +static_cast(cpp2::move(tmp_94)); +ctx.set_group_start(94, r.pos); +ctx.set_group_end(94, r.pos); + +auto tmp_95_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(94); +} +} +}; + +auto tmp_95 {cpp2::regex::make_on_return(cpp2::move(tmp_95_func))}; +static_cast(cpp2::move(tmp_95)); +ctx.set_group_start(95, r.pos); +ctx.set_group_end(95, r.pos); + +auto tmp_96_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(95); +} +} +}; + +auto tmp_96 {cpp2::regex::make_on_return(cpp2::move(tmp_96_func))}; +static_cast(cpp2::move(tmp_96)); +ctx.set_group_start(96, r.pos); +ctx.set_group_end(96, r.pos); + +auto tmp_97_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(96); +} +} +}; + +auto tmp_97 {cpp2::regex::make_on_return(cpp2::move(tmp_97_func))}; +static_cast(cpp2::move(tmp_97)); +ctx.set_group_start(97, r.pos); +ctx.set_group_end(97, r.pos); + +auto tmp_98_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(97); +} +} +}; + +auto tmp_98 {cpp2::regex::make_on_return(cpp2::move(tmp_98_func))}; +static_cast(cpp2::move(tmp_98)); +ctx.set_group_start(98, r.pos); +ctx.set_group_end(98, r.pos); + +auto tmp_99_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(98); +} +} +}; + +auto tmp_99 {cpp2::regex::make_on_return(cpp2::move(tmp_99_func))}; +static_cast(cpp2::move(tmp_99)); +ctx.set_group_start(99, r.pos); +ctx.set_group_end(99, r.pos); + +auto tmp_100_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(99); +} +} +}; + +auto tmp_100 {cpp2::regex::make_on_return(cpp2::move(tmp_100_func))}; +static_cast(cpp2::move(tmp_100)); +ctx.set_group_start(100, r.pos); +ctx.set_group_end(100, r.pos); + +auto tmp_101_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(100); +} +} +}; + +auto tmp_101 {cpp2::regex::make_on_return(cpp2::move(tmp_101_func))}; +static_cast(cpp2::move(tmp_101)); +ctx.set_group_start(101, r.pos); +ctx.set_group_end(101, r.pos); + +auto tmp_102_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(101); +} +} +}; + +auto tmp_102 {cpp2::regex::make_on_return(cpp2::move(tmp_102_func))}; +static_cast(cpp2::move(tmp_102)); +ctx.set_group_start(102, r.pos); +ctx.set_group_end(102, r.pos); + +auto tmp_103_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(102); +} +} +}; + +auto tmp_103 {cpp2::regex::make_on_return(cpp2::move(tmp_103_func))}; +static_cast(cpp2::move(tmp_103)); +ctx.set_group_start(103, r.pos); +ctx.set_group_end(103, r.pos); + +auto tmp_104_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(103); +} +} +}; + +auto tmp_104 {cpp2::regex::make_on_return(cpp2::move(tmp_104_func))}; +static_cast(cpp2::move(tmp_104)); +ctx.set_group_start(104, r.pos); +ctx.set_group_end(104, r.pos); + +auto tmp_105_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(104); +} +} +}; + +auto tmp_105 {cpp2::regex::make_on_return(cpp2::move(tmp_105_func))}; +static_cast(cpp2::move(tmp_105)); +ctx.set_group_start(105, r.pos); +ctx.set_group_end(105, r.pos); + +auto tmp_106_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(105); +} +} +}; + +auto tmp_106 {cpp2::regex::make_on_return(cpp2::move(tmp_106_func))}; +static_cast(cpp2::move(tmp_106)); +ctx.set_group_start(106, r.pos); +ctx.set_group_end(106, r.pos); + +auto tmp_107_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(106); +} +} +}; + +auto tmp_107 {cpp2::regex::make_on_return(cpp2::move(tmp_107_func))}; +static_cast(cpp2::move(tmp_107)); +ctx.set_group_start(107, r.pos); +ctx.set_group_end(107, r.pos); + +auto tmp_108_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(107); +} +} +}; + +auto tmp_108 {cpp2::regex::make_on_return(cpp2::move(tmp_108_func))}; +static_cast(cpp2::move(tmp_108)); +ctx.set_group_start(108, r.pos); +ctx.set_group_end(108, r.pos); + +auto tmp_109_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(108); +} +} +}; + +auto tmp_109 {cpp2::regex::make_on_return(cpp2::move(tmp_109_func))}; +static_cast(cpp2::move(tmp_109)); +ctx.set_group_start(109, r.pos); +ctx.set_group_end(109, r.pos); + +auto tmp_110_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(109); +} +} +}; + +auto tmp_110 {cpp2::regex::make_on_return(cpp2::move(tmp_110_func))}; +static_cast(cpp2::move(tmp_110)); +ctx.set_group_start(110, r.pos); +ctx.set_group_end(110, r.pos); + +auto tmp_111_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(110); +} +} +}; + +auto tmp_111 {cpp2::regex::make_on_return(cpp2::move(tmp_111_func))}; +static_cast(cpp2::move(tmp_111)); +ctx.set_group_start(111, r.pos); +ctx.set_group_end(111, r.pos); + +auto tmp_112_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(111); +} +} +}; + +auto tmp_112 {cpp2::regex::make_on_return(cpp2::move(tmp_112_func))}; +static_cast(cpp2::move(tmp_112)); +ctx.set_group_start(112, r.pos); +ctx.set_group_end(112, r.pos); + +auto tmp_113_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(112); +} +} +}; + +auto tmp_113 {cpp2::regex::make_on_return(cpp2::move(tmp_113_func))}; +static_cast(cpp2::move(tmp_113)); +ctx.set_group_start(113, r.pos); +ctx.set_group_end(113, r.pos); + +auto tmp_114_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(113); +} +} +}; + +auto tmp_114 {cpp2::regex::make_on_return(cpp2::move(tmp_114_func))}; +static_cast(cpp2::move(tmp_114)); +ctx.set_group_start(114, r.pos); +ctx.set_group_end(114, r.pos); + +auto tmp_115_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(114); +} +} +}; + +auto tmp_115 {cpp2::regex::make_on_return(cpp2::move(tmp_115_func))}; +static_cast(cpp2::move(tmp_115)); +ctx.set_group_start(115, r.pos); +ctx.set_group_end(115, r.pos); + +auto tmp_116_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(115); +} +} +}; + +auto tmp_116 {cpp2::regex::make_on_return(cpp2::move(tmp_116_func))}; +static_cast(cpp2::move(tmp_116)); +ctx.set_group_start(116, r.pos); +ctx.set_group_end(116, r.pos); + +auto tmp_117_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(116); +} +} +}; + +auto tmp_117 {cpp2::regex::make_on_return(cpp2::move(tmp_117_func))}; +static_cast(cpp2::move(tmp_117)); +ctx.set_group_start(117, r.pos); +ctx.set_group_end(117, r.pos); + +auto tmp_118_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(117); +} +} +}; + +auto tmp_118 {cpp2::regex::make_on_return(cpp2::move(tmp_118_func))}; +static_cast(cpp2::move(tmp_118)); +ctx.set_group_start(118, r.pos); +ctx.set_group_end(118, r.pos); + +auto tmp_119_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(118); +} +} +}; + +auto tmp_119 {cpp2::regex::make_on_return(cpp2::move(tmp_119_func))}; +static_cast(cpp2::move(tmp_119)); +ctx.set_group_start(119, r.pos); +ctx.set_group_end(119, r.pos); + +auto tmp_120_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(119); +} +} +}; + +auto tmp_120 {cpp2::regex::make_on_return(cpp2::move(tmp_120_func))}; +static_cast(cpp2::move(tmp_120)); +ctx.set_group_start(120, r.pos); +ctx.set_group_end(120, r.pos); + +auto tmp_121_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(120); +} +} +}; + +auto tmp_121 {cpp2::regex::make_on_return(cpp2::move(tmp_121_func))}; +static_cast(cpp2::move(tmp_121)); +ctx.set_group_start(121, r.pos); +ctx.set_group_end(121, r.pos); + +auto tmp_122_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(121); +} +} +}; + +auto tmp_122 {cpp2::regex::make_on_return(cpp2::move(tmp_122_func))}; +static_cast(cpp2::move(tmp_122)); +ctx.set_group_start(122, r.pos); +ctx.set_group_end(122, r.pos); + +auto tmp_123_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(122); +} +} +}; + +auto tmp_123 {cpp2::regex::make_on_return(cpp2::move(tmp_123_func))}; +static_cast(cpp2::move(tmp_123)); +ctx.set_group_start(123, r.pos); +ctx.set_group_end(123, r.pos); + +auto tmp_124_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(123); +} +} +}; + +auto tmp_124 {cpp2::regex::make_on_return(cpp2::move(tmp_124_func))}; +static_cast(cpp2::move(tmp_124)); +ctx.set_group_start(124, r.pos); +ctx.set_group_end(124, r.pos); + +auto tmp_125_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(124); +} +} +}; + +auto tmp_125 {cpp2::regex::make_on_return(cpp2::move(tmp_125_func))}; +static_cast(cpp2::move(tmp_125)); +ctx.set_group_start(125, r.pos); +ctx.set_group_end(125, r.pos); + +auto tmp_126_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(125); +} +} +}; + +auto tmp_126 {cpp2::regex::make_on_return(cpp2::move(tmp_126_func))}; +static_cast(cpp2::move(tmp_126)); +ctx.set_group_start(126, r.pos); +ctx.set_group_end(126, r.pos); + +auto tmp_127_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(126); +} +} +}; + +auto tmp_127 {cpp2::regex::make_on_return(cpp2::move(tmp_127_func))}; +static_cast(cpp2::move(tmp_127)); +ctx.set_group_start(127, r.pos); +ctx.set_group_end(127, r.pos); + +auto tmp_128_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(127); +} +} +}; + +auto tmp_128 {cpp2::regex::make_on_return(cpp2::move(tmp_128_func))}; +static_cast(cpp2::move(tmp_128)); +ctx.set_group_start(128, r.pos); +ctx.set_group_end(128, r.pos); + +auto tmp_129_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(128); +} +} +}; + +auto tmp_129 {cpp2::regex::make_on_return(cpp2::move(tmp_129_func))}; +static_cast(cpp2::move(tmp_129)); +ctx.set_group_start(129, r.pos); +ctx.set_group_end(129, r.pos); + +auto tmp_130_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(129); +} +} +}; + +auto tmp_130 {cpp2::regex::make_on_return(cpp2::move(tmp_130_func))}; +static_cast(cpp2::move(tmp_130)); +ctx.set_group_start(130, r.pos); +ctx.set_group_end(130, r.pos); + +auto tmp_131_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(130); +} +} +}; + +auto tmp_131 {cpp2::regex::make_on_return(cpp2::move(tmp_131_func))}; +static_cast(cpp2::move(tmp_131)); +ctx.set_group_start(131, r.pos); +ctx.set_group_end(131, r.pos); + +auto tmp_132_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(131); +} +} +}; + +auto tmp_132 {cpp2::regex::make_on_return(cpp2::move(tmp_132_func))}; +static_cast(cpp2::move(tmp_132)); +ctx.set_group_start(132, r.pos); +ctx.set_group_end(132, r.pos); + +auto tmp_133_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(132); +} +} +}; + +auto tmp_133 {cpp2::regex::make_on_return(cpp2::move(tmp_133_func))}; +static_cast(cpp2::move(tmp_133)); +ctx.set_group_start(133, r.pos); +ctx.set_group_end(133, r.pos); + +auto tmp_134_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(133); +} +} +}; + +auto tmp_134 {cpp2::regex::make_on_return(cpp2::move(tmp_134_func))}; +static_cast(cpp2::move(tmp_134)); +ctx.set_group_start(134, r.pos); +ctx.set_group_end(134, r.pos); + +auto tmp_135_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(134); +} +} +}; + +auto tmp_135 {cpp2::regex::make_on_return(cpp2::move(tmp_135_func))}; +static_cast(cpp2::move(tmp_135)); +ctx.set_group_start(135, r.pos); +ctx.set_group_end(135, r.pos); + +auto tmp_136_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(135); +} +} +}; + +auto tmp_136 {cpp2::regex::make_on_return(cpp2::move(tmp_136_func))}; +static_cast(cpp2::move(tmp_136)); +ctx.set_group_start(136, r.pos); +ctx.set_group_end(136, r.pos); + +auto tmp_137_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(136); +} +} +}; + +auto tmp_137 {cpp2::regex::make_on_return(cpp2::move(tmp_137_func))}; +static_cast(cpp2::move(tmp_137)); +ctx.set_group_start(137, r.pos); +ctx.set_group_end(137, r.pos); + +auto tmp_138_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(137); +} +} +}; + +auto tmp_138 {cpp2::regex::make_on_return(cpp2::move(tmp_138_func))}; +static_cast(cpp2::move(tmp_138)); +ctx.set_group_start(138, r.pos); +ctx.set_group_end(138, r.pos); + +auto tmp_139_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(138); +} +} +}; + +auto tmp_139 {cpp2::regex::make_on_return(cpp2::move(tmp_139_func))}; +static_cast(cpp2::move(tmp_139)); +ctx.set_group_start(139, r.pos); +ctx.set_group_end(139, r.pos); + +auto tmp_140_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(139); +} +} +}; + +auto tmp_140 {cpp2::regex::make_on_return(cpp2::move(tmp_140_func))}; +static_cast(cpp2::move(tmp_140)); +ctx.set_group_start(140, r.pos); +ctx.set_group_end(140, r.pos); + +auto tmp_141_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(140); +} +} +}; + +auto tmp_141 {cpp2::regex::make_on_return(cpp2::move(tmp_141_func))}; +static_cast(cpp2::move(tmp_141)); +ctx.set_group_start(141, r.pos); +ctx.set_group_end(141, r.pos); + +auto tmp_142_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(141); +} +} +}; + +auto tmp_142 {cpp2::regex::make_on_return(cpp2::move(tmp_142_func))}; +static_cast(cpp2::move(tmp_142)); +ctx.set_group_start(142, r.pos); +ctx.set_group_end(142, r.pos); + +auto tmp_143_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(142); +} +} +}; + +auto tmp_143 {cpp2::regex::make_on_return(cpp2::move(tmp_143_func))}; +static_cast(cpp2::move(tmp_143)); +ctx.set_group_start(143, r.pos); +ctx.set_group_end(143, r.pos); + +auto tmp_144_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(143); +} +} +}; + +auto tmp_144 {cpp2::regex::make_on_return(cpp2::move(tmp_144_func))}; +static_cast(cpp2::move(tmp_144)); +ctx.set_group_start(144, r.pos); +ctx.set_group_end(144, r.pos); + +auto tmp_145_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(144); +} +} +}; + +auto tmp_145 {cpp2::regex::make_on_return(cpp2::move(tmp_145_func))}; +static_cast(cpp2::move(tmp_145)); +ctx.set_group_start(145, r.pos); +ctx.set_group_end(145, r.pos); + +auto tmp_146_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(145); +} +} +}; + +auto tmp_146 {cpp2::regex::make_on_return(cpp2::move(tmp_146_func))}; +static_cast(cpp2::move(tmp_146)); +ctx.set_group_start(146, r.pos); +ctx.set_group_end(146, r.pos); + +auto tmp_147_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(146); +} +} +}; + +auto tmp_147 {cpp2::regex::make_on_return(cpp2::move(tmp_147_func))}; +static_cast(cpp2::move(tmp_147)); +ctx.set_group_start(147, r.pos); +ctx.set_group_end(147, r.pos); + +auto tmp_148_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(147); +} +} +}; + +auto tmp_148 {cpp2::regex::make_on_return(cpp2::move(tmp_148_func))}; +static_cast(cpp2::move(tmp_148)); +ctx.set_group_start(148, r.pos); +ctx.set_group_end(148, r.pos); + +auto tmp_149_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(148); +} +} +}; + +auto tmp_149 {cpp2::regex::make_on_return(cpp2::move(tmp_149_func))}; +static_cast(cpp2::move(tmp_149)); +ctx.set_group_start(149, r.pos); +ctx.set_group_end(149, r.pos); + +auto tmp_150_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(149); +} +} +}; + +auto tmp_150 {cpp2::regex::make_on_return(cpp2::move(tmp_150_func))}; +static_cast(cpp2::move(tmp_150)); +ctx.set_group_start(150, r.pos); +ctx.set_group_end(150, r.pos); + +auto tmp_151_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(150); +} +} +}; + +auto tmp_151 {cpp2::regex::make_on_return(cpp2::move(tmp_151_func))}; +static_cast(cpp2::move(tmp_151)); +ctx.set_group_start(151, r.pos); +ctx.set_group_end(151, r.pos); + +auto tmp_152_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(151); +} +} +}; + +auto tmp_152 {cpp2::regex::make_on_return(cpp2::move(tmp_152_func))}; +static_cast(cpp2::move(tmp_152)); +ctx.set_group_start(152, r.pos); +ctx.set_group_end(152, r.pos); + +auto tmp_153_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(152); +} +} +}; + +auto tmp_153 {cpp2::regex::make_on_return(cpp2::move(tmp_153_func))}; +static_cast(cpp2::move(tmp_153)); +ctx.set_group_start(153, r.pos); +ctx.set_group_end(153, r.pos); + +auto tmp_154_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(153); +} +} +}; + +auto tmp_154 {cpp2::regex::make_on_return(cpp2::move(tmp_154_func))}; +static_cast(cpp2::move(tmp_154)); +ctx.set_group_start(154, r.pos); +ctx.set_group_end(154, r.pos); + +auto tmp_155_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(154); +} +} +}; + +auto tmp_155 {cpp2::regex::make_on_return(cpp2::move(tmp_155_func))}; +static_cast(cpp2::move(tmp_155)); +ctx.set_group_start(155, r.pos); +ctx.set_group_end(155, r.pos); + +auto tmp_156_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(155); +} +} +}; + +auto tmp_156 {cpp2::regex::make_on_return(cpp2::move(tmp_156_func))}; +static_cast(cpp2::move(tmp_156)); +ctx.set_group_start(156, r.pos); +ctx.set_group_end(156, r.pos); + +auto tmp_157_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(156); +} +} +}; + +auto tmp_157 {cpp2::regex::make_on_return(cpp2::move(tmp_157_func))}; +static_cast(cpp2::move(tmp_157)); +ctx.set_group_start(157, r.pos); +ctx.set_group_end(157, r.pos); + +auto tmp_158_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(157); +} +} +}; + +auto tmp_158 {cpp2::regex::make_on_return(cpp2::move(tmp_158_func))}; +static_cast(cpp2::move(tmp_158)); +ctx.set_group_start(158, r.pos); +ctx.set_group_end(158, r.pos); + +auto tmp_159_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(158); +} +} +}; + +auto tmp_159 {cpp2::regex::make_on_return(cpp2::move(tmp_159_func))}; +static_cast(cpp2::move(tmp_159)); +ctx.set_group_start(159, r.pos); +ctx.set_group_end(159, r.pos); + +auto tmp_160_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(159); +} +} +}; + +auto tmp_160 {cpp2::regex::make_on_return(cpp2::move(tmp_160_func))}; +static_cast(cpp2::move(tmp_160)); +ctx.set_group_start(160, r.pos); +ctx.set_group_end(160, r.pos); + +auto tmp_161_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(160); +} +} +}; + +auto tmp_161 {cpp2::regex::make_on_return(cpp2::move(tmp_161_func))}; +static_cast(cpp2::move(tmp_161)); +ctx.set_group_start(161, r.pos); +ctx.set_group_end(161, r.pos); + +auto tmp_162_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(161); +} +} +}; + +auto tmp_162 {cpp2::regex::make_on_return(cpp2::move(tmp_162_func))}; +static_cast(cpp2::move(tmp_162)); +ctx.set_group_start(162, r.pos); +ctx.set_group_end(162, r.pos); + +auto tmp_163_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(162); +} +} +}; + +auto tmp_163 {cpp2::regex::make_on_return(cpp2::move(tmp_163_func))}; +static_cast(cpp2::move(tmp_163)); +ctx.set_group_start(163, r.pos); +ctx.set_group_end(163, r.pos); + +auto tmp_164_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(163); +} +} +}; + +auto tmp_164 {cpp2::regex::make_on_return(cpp2::move(tmp_164_func))}; +static_cast(cpp2::move(tmp_164)); +ctx.set_group_start(164, r.pos); +ctx.set_group_end(164, r.pos); + +auto tmp_165_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(164); +} +} +}; + +auto tmp_165 {cpp2::regex::make_on_return(cpp2::move(tmp_165_func))}; +static_cast(cpp2::move(tmp_165)); +ctx.set_group_start(165, r.pos); +ctx.set_group_end(165, r.pos); + +auto tmp_166_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(165); +} +} +}; + +auto tmp_166 {cpp2::regex::make_on_return(cpp2::move(tmp_166_func))}; +static_cast(cpp2::move(tmp_166)); +ctx.set_group_start(166, r.pos); +ctx.set_group_end(166, r.pos); + +auto tmp_167_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(166); +} +} +}; + +auto tmp_167 {cpp2::regex::make_on_return(cpp2::move(tmp_167_func))}; +static_cast(cpp2::move(tmp_167)); +ctx.set_group_start(167, r.pos); +ctx.set_group_end(167, r.pos); + +auto tmp_168_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(167); +} +} +}; + +auto tmp_168 {cpp2::regex::make_on_return(cpp2::move(tmp_168_func))}; +static_cast(cpp2::move(tmp_168)); +ctx.set_group_start(168, r.pos); +ctx.set_group_end(168, r.pos); + +auto tmp_169_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(168); +} +} +}; + +auto tmp_169 {cpp2::regex::make_on_return(cpp2::move(tmp_169_func))}; +static_cast(cpp2::move(tmp_169)); +ctx.set_group_start(169, r.pos); +ctx.set_group_end(169, r.pos); + +auto tmp_170_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(169); +} +} +}; + +auto tmp_170 {cpp2::regex::make_on_return(cpp2::move(tmp_170_func))}; +static_cast(cpp2::move(tmp_170)); +ctx.set_group_start(170, r.pos); +ctx.set_group_end(170, r.pos); + +auto tmp_171_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(170); +} +} +}; + +auto tmp_171 {cpp2::regex::make_on_return(cpp2::move(tmp_171_func))}; +static_cast(cpp2::move(tmp_171)); +ctx.set_group_start(171, r.pos); +ctx.set_group_end(171, r.pos); + +auto tmp_172_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(171); +} +} +}; + +auto tmp_172 {cpp2::regex::make_on_return(cpp2::move(tmp_172_func))}; +static_cast(cpp2::move(tmp_172)); +ctx.set_group_start(172, r.pos); +ctx.set_group_end(172, r.pos); + +auto tmp_173_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(172); +} +} +}; + +auto tmp_173 {cpp2::regex::make_on_return(cpp2::move(tmp_173_func))}; +static_cast(cpp2::move(tmp_173)); +ctx.set_group_start(173, r.pos); +ctx.set_group_end(173, r.pos); + +auto tmp_174_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(173); +} +} +}; + +auto tmp_174 {cpp2::regex::make_on_return(cpp2::move(tmp_174_func))}; +static_cast(cpp2::move(tmp_174)); +ctx.set_group_start(174, r.pos); +ctx.set_group_end(174, r.pos); + +auto tmp_175_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(174); +} +} +}; + +auto tmp_175 {cpp2::regex::make_on_return(cpp2::move(tmp_175_func))}; +static_cast(cpp2::move(tmp_175)); +ctx.set_group_start(175, r.pos); +ctx.set_group_end(175, r.pos); + +auto tmp_176_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(175); +} +} +}; + +auto tmp_176 {cpp2::regex::make_on_return(cpp2::move(tmp_176_func))}; +static_cast(cpp2::move(tmp_176)); +ctx.set_group_start(176, r.pos); +ctx.set_group_end(176, r.pos); + +auto tmp_177_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(176); +} +} +}; + +auto tmp_177 {cpp2::regex::make_on_return(cpp2::move(tmp_177_func))}; +static_cast(cpp2::move(tmp_177)); +ctx.set_group_start(177, r.pos); +ctx.set_group_end(177, r.pos); + +auto tmp_178_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(177); +} +} +}; + +auto tmp_178 {cpp2::regex::make_on_return(cpp2::move(tmp_178_func))}; +static_cast(cpp2::move(tmp_178)); +ctx.set_group_start(178, r.pos); +ctx.set_group_end(178, r.pos); + +auto tmp_179_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(178); +} +} +}; + +auto tmp_179 {cpp2::regex::make_on_return(cpp2::move(tmp_179_func))}; +static_cast(cpp2::move(tmp_179)); +ctx.set_group_start(179, r.pos); +ctx.set_group_end(179, r.pos); + +auto tmp_180_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(179); +} +} +}; + +auto tmp_180 {cpp2::regex::make_on_return(cpp2::move(tmp_180_func))}; +static_cast(cpp2::move(tmp_180)); +ctx.set_group_start(180, r.pos); +ctx.set_group_end(180, r.pos); + +auto tmp_181_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(180); +} +} +}; + +auto tmp_181 {cpp2::regex::make_on_return(cpp2::move(tmp_181_func))}; +static_cast(cpp2::move(tmp_181)); +ctx.set_group_start(181, r.pos); + +std::array str_tmp_182 {"a"}; +if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { +r.matched = false; +break; +} +{ +int i{0}; +for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { +if (CPP2_ASSERT_IN_BOUNDS(str_tmp_182, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} +} +} +if (r.matched) {r.pos += 1;} +else {break;} +ctx.set_group_end(181, r.pos); + +auto tmp_183_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ +if (!((*cpp2::impl::assert_not_null(_1)).matched)) { +(*cpp2::impl::assert_not_null(_2)).set_group_invalid(181); +} +} +}; + +auto tmp_183 {cpp2::regex::make_on_return(cpp2::move(tmp_183_func))}; +static_cast(cpp2::move(tmp_183)); +} + while ( +false +); +if (r.matched) { +r = other(r.pos, ctx); +} +else { +r.pos = ctx.end; +} +return r; +} + + +template auto test_tests_18_branch_reset::regex_15_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ +ctx.set_group_invalid(1); +ctx.set_group_invalid(2); +ctx.set_group_invalid(3); +ctx.set_group_invalid(4); +ctx.set_group_invalid(5); +ctx.set_group_invalid(6); +ctx.set_group_invalid(7); +ctx.set_group_invalid(8); +ctx.set_group_invalid(9); +ctx.set_group_invalid(10); +ctx.set_group_invalid(11); +ctx.set_group_invalid(12); +ctx.set_group_invalid(13); +ctx.set_group_invalid(14); +ctx.set_group_invalid(15); +ctx.set_group_invalid(16); +ctx.set_group_invalid(17); +ctx.set_group_invalid(18); +ctx.set_group_invalid(19); +ctx.set_group_invalid(20); +ctx.set_group_invalid(21); +ctx.set_group_invalid(22); +ctx.set_group_invalid(23); +ctx.set_group_invalid(24); +ctx.set_group_invalid(25); +ctx.set_group_invalid(26); +ctx.set_group_invalid(27); +ctx.set_group_invalid(28); +ctx.set_group_invalid(29); +ctx.set_group_invalid(30); +ctx.set_group_invalid(31); +ctx.set_group_invalid(32); +ctx.set_group_invalid(33); +ctx.set_group_invalid(34); +ctx.set_group_invalid(35); +ctx.set_group_invalid(36); +ctx.set_group_invalid(37); +ctx.set_group_invalid(38); +ctx.set_group_invalid(39); +ctx.set_group_invalid(40); +ctx.set_group_invalid(41); +ctx.set_group_invalid(42); +ctx.set_group_invalid(43); +ctx.set_group_invalid(44); +ctx.set_group_invalid(45); +ctx.set_group_invalid(46); +ctx.set_group_invalid(47); +ctx.set_group_invalid(48); +ctx.set_group_invalid(49); +ctx.set_group_invalid(50); +ctx.set_group_invalid(51); +ctx.set_group_invalid(52); +ctx.set_group_invalid(53); +ctx.set_group_invalid(54); +ctx.set_group_invalid(55); +ctx.set_group_invalid(56); +ctx.set_group_invalid(57); +ctx.set_group_invalid(58); +ctx.set_group_invalid(59); +ctx.set_group_invalid(60); +ctx.set_group_invalid(61); +ctx.set_group_invalid(62); +ctx.set_group_invalid(63); +ctx.set_group_invalid(64); +ctx.set_group_invalid(65); +ctx.set_group_invalid(66); +ctx.set_group_invalid(67); +ctx.set_group_invalid(68); +ctx.set_group_invalid(69); +ctx.set_group_invalid(70); +ctx.set_group_invalid(71); +ctx.set_group_invalid(72); +ctx.set_group_invalid(73); +ctx.set_group_invalid(74); +ctx.set_group_invalid(75); +ctx.set_group_invalid(76); +ctx.set_group_invalid(77); +ctx.set_group_invalid(78); +ctx.set_group_invalid(79); +ctx.set_group_invalid(80); +ctx.set_group_invalid(81); +ctx.set_group_invalid(82); +ctx.set_group_invalid(83); +ctx.set_group_invalid(84); +ctx.set_group_invalid(85); +ctx.set_group_invalid(86); +ctx.set_group_invalid(87); +ctx.set_group_invalid(88); +ctx.set_group_invalid(89); +ctx.set_group_invalid(90); +ctx.set_group_invalid(91); +ctx.set_group_invalid(92); +ctx.set_group_invalid(93); +ctx.set_group_invalid(94); +ctx.set_group_invalid(95); +ctx.set_group_invalid(96); +ctx.set_group_invalid(97); +ctx.set_group_invalid(98); +ctx.set_group_invalid(99); +ctx.set_group_invalid(100); +ctx.set_group_invalid(101); +ctx.set_group_invalid(102); +ctx.set_group_invalid(103); +ctx.set_group_invalid(104); +ctx.set_group_invalid(105); +ctx.set_group_invalid(106); +ctx.set_group_invalid(107); +ctx.set_group_invalid(108); +ctx.set_group_invalid(109); +ctx.set_group_invalid(110); +ctx.set_group_invalid(111); +ctx.set_group_invalid(112); +ctx.set_group_invalid(113); +ctx.set_group_invalid(114); +ctx.set_group_invalid(115); +ctx.set_group_invalid(116); +ctx.set_group_invalid(117); +ctx.set_group_invalid(118); +ctx.set_group_invalid(119); +ctx.set_group_invalid(120); +ctx.set_group_invalid(121); +ctx.set_group_invalid(122); +ctx.set_group_invalid(123); +ctx.set_group_invalid(124); +ctx.set_group_invalid(125); +ctx.set_group_invalid(126); +ctx.set_group_invalid(127); +ctx.set_group_invalid(128); +ctx.set_group_invalid(129); +ctx.set_group_invalid(130); +ctx.set_group_invalid(131); +ctx.set_group_invalid(132); +ctx.set_group_invalid(133); +ctx.set_group_invalid(134); +ctx.set_group_invalid(135); +ctx.set_group_invalid(136); +ctx.set_group_invalid(137); +ctx.set_group_invalid(138); +ctx.set_group_invalid(139); +ctx.set_group_invalid(140); +ctx.set_group_invalid(141); +ctx.set_group_invalid(142); +ctx.set_group_invalid(143); +ctx.set_group_invalid(144); +ctx.set_group_invalid(145); +ctx.set_group_invalid(146); +ctx.set_group_invalid(147); +ctx.set_group_invalid(148); +ctx.set_group_invalid(149); +ctx.set_group_invalid(150); +ctx.set_group_invalid(151); +ctx.set_group_invalid(152); +ctx.set_group_invalid(153); +ctx.set_group_invalid(154); +ctx.set_group_invalid(155); +ctx.set_group_invalid(156); +ctx.set_group_invalid(157); +ctx.set_group_invalid(158); +ctx.set_group_invalid(159); +ctx.set_group_invalid(160); +ctx.set_group_invalid(161); +ctx.set_group_invalid(162); +ctx.set_group_invalid(163); +ctx.set_group_invalid(164); +ctx.set_group_invalid(165); +ctx.set_group_invalid(166); +ctx.set_group_invalid(167); +ctx.set_group_invalid(168); +ctx.set_group_invalid(169); +ctx.set_group_invalid(170); +ctx.set_group_invalid(171); +ctx.set_group_invalid(172); +ctx.set_group_invalid(173); +ctx.set_group_invalid(174); +ctx.set_group_invalid(175); +ctx.set_group_invalid(176); +ctx.set_group_invalid(177); +ctx.set_group_invalid(178); +ctx.set_group_invalid(179); +ctx.set_group_invalid(180); +ctx.set_group_invalid(181); +} + + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + +auto r {ctx.pass(cur)}; +do { +} + while ( +false +); +if (r.matched) { +r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1()); +} +else { +r.pos = ctx.end; +} +return r; +} + + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + +auto r {ctx.pass(cur)}; +do { +} + while ( +false +); +if (r.matched) { +r = other(r.pos, ctx); +} +else { +r.pos = ctx.end; +} +return r; +} + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ +ctx.set_group_start(0, cur); + +auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; +if (r.matched) {ctx.set_group_end(0, r.pos);} +return r; +} + +template [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ +static_cast(name); +return -1; +} + +[[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::to_string() -> std::string{return R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))"; } + + +#line 189 "pure2-regex_18_branch_reset.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_18_branch_reset()); +} + diff --git a/regression-tests/test-results/pure2-regex_18_branch_reset.cpp2.output b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp2.output new file mode 100644 index 0000000000..b341e8984a --- /dev/null +++ b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_18_branch_reset.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/regression-tests/test-results/pure2-regex_19_lookahead.cpp b/regression-tests/test-results/pure2-regex_19_lookahead.cpp new file mode 100644 index 0000000000..78bbec6625 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_19_lookahead.cpp @@ -0,0 +1,9643 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex_19_lookahead.cpp2" + +#line 153 "pure2-regex_19_lookahead.cpp2" +class test_tests_19_lookahead; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex_19_lookahead.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string; + +#line 112 "pure2-regex_19_lookahead.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void; + +#line 153 "pure2-regex_19_lookahead.cpp2" +class test_tests_19_lookahead { + +#line 199 "pure2-regex_19_lookahead.cpp2" + public: auto run() const& -> void; + public: class regex_01_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_01_matcher() = default; + public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_01_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_02_matcher() = default; + public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_02_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_03_matcher() = default; + public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_03_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_04_matcher() = default; + public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_04_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_05_matcher() = default; + public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_05_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_06_matcher() = default; + public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_06_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_07_matcher() = default; + public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_07_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_08_matcher() = default; + public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_08_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_09_matcher() = default; + public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_09_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_10_matcher() = default; + public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_10_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_11_matcher() = default; + public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_11_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_12_matcher() = default; + public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_12_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_13_matcher() = default; + public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_13_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_14_matcher() = default; + public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_14_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_15_matcher() = default; + public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_15_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_16_matcher() = default; + public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_16_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_17_matcher() = default; + public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_17_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_18_matcher() = default; + public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_18_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_19_matcher() = default; + public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_19_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_20_matcher() = default; + public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_20_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_21_matcher() = default; + public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_21_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_22_matcher() = default; + public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_22_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_23_matcher() = default; + public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_23_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_24_matcher() = default; + public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_24_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_25_matcher() = default; + public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_25_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_26_matcher() = default; + public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_26_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_27_matcher() = default; + public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_27_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_28_matcher() = default; + public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_28_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_28 {}; public: class regex_37_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_37_matcher() = default; + public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_37_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_38_matcher() = default; + public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_38_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_39_matcher() = default; + public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_39_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_40_matcher() = default; + public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_40_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_10 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_41_matcher() = default; + public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_41_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_42_matcher() = default; + public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_42_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_43_matcher() = default; + public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_43_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_10 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_11 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_12 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_44_matcher() = default; + public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_44_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return; + + public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_45_matcher() = default; + public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_45_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher { + public: template class wrap { + public: using context = cpp2::regex::match_context; +public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_1 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_6 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_5 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_7 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_0 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_4 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_11 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_10 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_12 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class reset_1 { + public: auto operator()(auto& ctx) const& -> void; + + }; + + public: class func_9 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_13 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_8 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_14 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: class func_15 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_46_matcher() = default; + public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_46_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_47_matcher() = default; + public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_47_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_48_matcher() = default; + public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_48_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_49_matcher() = default; + public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_49_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_50_matcher() = default; + public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_50_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_51_matcher() = default; + public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_51_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_52_matcher() = default; + public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_52_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher { + public: template class wrap { + public: 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: class func_0 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_3 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return; + + }; + + public: class func_2 { + public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& 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: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int; + + 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: regex_53_matcher() = default; + public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_53_matcher const&) -> void = delete; + + }; + + public: cpp2::regex::regular_expression regex_53 {}; + public: test_tests_19_lookahead() = default; + public: test_tests_19_lookahead(test_tests_19_lookahead const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_tests_19_lookahead const&) -> void = delete; + + +#line 248 "pure2-regex_19_lookahead.cpp2" +}; +auto main() -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex_19_lookahead.cpp2" +[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{ +#line 2 "pure2-regex_19_lookahead.cpp2" + std::string result {""}; + + auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{ + auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; + auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; + auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; + + auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; + if (end != std::string::npos) { + return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); + } + else { + return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); + } + }}; + auto extract_group_and_advance {[](auto& iter) mutable -> auto{ + auto start {iter}; + + for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {} + + return std::stoi(std::string(cpp2::move(start), iter)); + }}; + auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{ + auto start {iter}; + + for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication) + + return std::string(cpp2::move(start), iter); + }}; + + auto iter {CPP2_UFCS(begin)(resultExpr)}; + + while( iter != CPP2_UFCS(end)(resultExpr) ) { + auto next {get_next(iter)}; + + if (next != iter) { + result += std::string(iter, next); + } + if (next != CPP2_UFCS(end)(resultExpr)) { + if (*cpp2::impl::assert_not_null(next) == '$') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '&') { + ++next; + result += CPP2_UFCS(group)(r, 0); + } + else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; + ++next; + if (*cpp2::impl::assert_not_null(next) == '{') { + ++next; // Skip { + auto group {extract_until(next, '}')}; + ++next; // Skip } + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else {if (*cpp2::impl::assert_not_null(next) == '[') { + ++next; // Skip [ + auto group {extract_group_and_advance(next)}; + ++next; // Skip ] + + if (cpp2::move(is_start)) { + result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group))); + } + else { + result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group))); + } + } + else { + // Return max group + result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1); + }} + } + else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) { + auto group {extract_group_and_advance(next)}; + result += CPP2_UFCS(group)(r, cpp2::move(group)); + } + else { + std::cerr << "Not implemented"; + }}} + } + else {if (*cpp2::impl::assert_not_null(next) == '@') { + ++next; + + if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') { + auto i {0}; + for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) { + auto pos {0}; + if (*cpp2::impl::assert_not_null(next) == '-') { + pos = CPP2_UFCS(group_start)(r, i); + } + else { + pos = CPP2_UFCS(group_end)(r, i); + } + result += std::to_string(cpp2::move(pos)); + } + } + else { + std::cerr << "Not implemented"; + } + } + else { + std::cerr << "Not implemented."; + }} + } + iter = cpp2::move(next); + } + + return result; +} + +#line 112 "pure2-regex_19_lookahead.cpp2" +template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, + cpp2::impl::in resultExpected) -> void{ + + std::string warning {""}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + warning = "Warning: Parsed regex does not match."; + } + + std::string status {"OK"}; + + auto r {CPP2_UFCS(search)(regex, str)}; + + if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) { + if (!(r.matched)) { + status = "Failure: Regex should apply."; + } + else { + // Have a match check the result + + auto result {create_result(resultExpr, cpp2::move(r))}; + + if (result != resultExpected) { + status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")"; + } + } + } + else {if ("n" == kind) { + if (r.matched) { + status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'"; + } + }else { + status = "Unknown kind '" + cpp2::to_string(kind) + "'"; + }} + + if (!(CPP2_UFCS(empty)(warning))) { + warning += " "; + } + std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl; +} + +#line 199 "pure2-regex_19_lookahead.cpp2" + auto test_tests_19_lookahead::run() const& -> void{ + std::cout << "Running tests_19_lookahead:" << std::endl; + test(regex_01, "01", R"(a(?!b).)", "abad", "y", R"($&)", "ad"); + test(regex_02, "02", R"((?=)a)", "a", "y", R"($&)", "a"); + test(regex_03, "03", R"(a(?=d).)", "abad", "y", R"($&)", "ad"); + test(regex_04, "04", R"(a(?=c|d).)", "abad", "y", R"($&)", "ad"); + test(regex_05, "05", R"(^(?:b|a(?=(.)))*\1)", "abc", "y", R"($&)", "ab"); + test(regex_06, "06", R"((?=(a+?))(\1ab))", "aaab", "y", R"($2)", "aab"); + test(regex_07, "07", R"(^(?=(a+?))\1ab)", "aaab", "n", R"(-)", "-"); + test(regex_08, "08", R"((?=(a+?))(\1ab))", "aaab", "y", R"($2)", "aab"); + test(regex_09, "09", R"(^(?=(a+?))\1ab)", "aaab", "n", R"(-)", "-"); + test(regex_10, "10", R"((.*)(?=c))", "abcd", "y", R"($1)", "ab"); + test(regex_11, "11", R"((.*)(?=c)c)", "abcd", "yB", R"($1)", "ab"); + test(regex_12, "12", R"((.*)(?=b|c))", "abcd", "y", R"($1)", "ab"); + test(regex_13, "13", R"((.*)(?=b|c)c)", "abcd", "y", R"($1)", "ab"); + test(regex_14, "14", R"((.*)(?=c|b))", "abcd", "y", R"($1)", "ab"); + test(regex_15, "15", R"((.*)(?=c|b)c)", "abcd", "y", R"($1)", "ab"); + test(regex_16, "16", R"((.*)(?=[bc]))", "abcd", "y", R"($1)", "ab"); + test(regex_17, "17", R"((.*)(?=[bc])c)", "abcd", "yB", R"($1)", "ab"); + test(regex_18, "18", R"((.*?)(?=c))", "abcd", "y", R"($1)", "ab"); + test(regex_19, "19", R"((.*?)(?=c)c)", "abcd", "yB", R"($1)", "ab"); + test(regex_20, "20", R"((.*?)(?=b|c))", "abcd", "y", R"($1)", "a"); + test(regex_21, "21", R"((.*?)(?=b|c)c)", "abcd", "y", R"($1)", "ab"); + test(regex_22, "22", R"((.*?)(?=c|b))", "abcd", "y", R"($1)", "a"); + test(regex_23, "23", R"((.*?)(?=c|b)c)", "abcd", "y", R"($1)", "ab"); + test(regex_24, "24", R"((.*?)(?=[bc]))", "abcd", "y", R"($1)", "a"); + test(regex_25, "25", R"((.*?)(?=[bc])c)", "abcd", "yB", R"($1)", "ab"); + test(regex_26, "26", R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))", "aaaaaaaa", "y", R"($1)", "aaaaaaa"); + test(regex_27, "27", R"(a(?!b(?!c))(..))", "abababc", "y", R"($1)", "bc"); + test(regex_28, "28", R"(a(?!b(?=a))(..))", "abababc", "y", R"($1)", "bc"); + test(regex_37, "37", R"(X(\w+)(?=\s)|X(\w+))", "Xab", "y", R"([$1-$2])", "[-ab]"); + test(regex_38, "38", R"(^a*(?=b)b)", "ab", "y", R"($&)", "ab"); + test(regex_39, "39", R"('(?!\A)x'm)", "a\nxb\n", "y", R"(-)", "-"); + test(regex_40, "40", R"('^(o)(?!.*\1)'i)", "Oo", "n", R"(-)", "-"); + test(regex_41, "41", R"(.*a(?!(b|cd)*e).*f)", "......abef", "n", R"(-)", "-"); + test(regex_42, "42", R"(^(a*?)(?!(aa|aaaa)*$))", "aaaaaaaaaaaaaaaaaaaa", "y", R"($1)", "a"); + test(regex_43, "43", R"((?!)+?|(.{2,4}))", "abcde", "y", R"($1)", "abcd"); + test(regex_44, "44", R"(^(a*?)(?!(a{6}|a{5})*$))", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", R"($+[1])", "12"); + test(regex_45, "45", R"(a(?!b(?!c(?!d(?!e))))...(.))", "abxabcdxabcde", "y", R"($1)", "e"); + test(regex_46, "46", R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)", "aXbbbbbbbcccccccccccccaaaX", "y", R"(-)", "-"); + test(regex_47, "47", R"(((?s).)c(?!.))", "a\nb\nc\n", "y", R"($1)", "\n"); + test(regex_48, "48", R"(((?s).)c(?!.))", "a\nb\nc\n", "y", R"($1:$&)", "\n:\nc"); + test(regex_49, "49", R"(((?s)b.)c(?!.))", "a\nb\nc\n", "y", R"($1)", "b\n"); + test(regex_50, "50", R"(((?s)b.)c(?!.))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); + test(regex_51, "51", R"(((?s)b.)c(?!\N))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); + test(regex_52, "52", R"('(b.)c(?!\N)'s)", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc"); + test(regex_53, "53", R"(a*(?!))", "aaaab", "n", R"(-)", "-"); + std::cout << std::endl; + } + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::to_string() -> std::string{return R"(a(?!b).)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::to_string() -> std::string{return R"((?=)a)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::to_string() -> std::string{return R"(a(?=d).)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::to_string() -> std::string{return R"(a(?=c|d).)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_2_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; + static_cast(cpp2::move(tmp_2)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_4()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_05_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_5(), func_2(), cpp2::regex::no_reset(), func_3(), reset_0()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_05_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_1(), other, func_6()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::to_string() -> std::string{return R"(^(?:b|a(?=(.)))*\1)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_2 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::to_string() -> std::string{return R"((?=(a+?))(\1ab))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_2 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::to_string() -> std::string{return R"(^(?=(a+?))\1ab)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + ctx.set_group_start(2, r.pos); + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_2 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::to_string() -> std::string{return R"((?=(a+?))(\1ab))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + + std::array str_tmp_2 {"ab"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::to_string() -> std::string{return R"(^(?=(a+?))\1ab)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::to_string() -> std::string{return R"((.*)(?=c))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::to_string() -> std::string{return R"((.*)(?=c)c)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::to_string() -> std::string{return R"((.*)(?=b|c))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::to_string() -> std::string{return R"((.*)(?=b|c)c)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::to_string() -> std::string{return R"((.*)(?=c|b))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::to_string() -> std::string{return R"((.*)(?=c|b)c)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::to_string() -> std::string{return R"((.*)(?=[bc]))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::to_string() -> std::string{return R"((.*)(?=[bc])c)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::to_string() -> std::string{return R"((.*?)(?=c))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::to_string() -> std::string{return R"((.*?)(?=c)c)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::to_string() -> std::string{return R"((.*?)(?=b|c))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::to_string() -> std::string{return R"((.*?)(?=b|c)c)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::to_string() -> std::string{return R"((.*?)(?=c|b))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_3 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::to_string() -> std::string{return R"((.*?)(?=c|b)c)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::to_string() -> std::string{return R"((.*?)(?=[bc]))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::to_string() -> std::string{return R"((.*?)(?=[bc])c)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"aaaa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_7(), func_5(), cpp2::regex::no_reset(), func_6(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_26_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), reset_0(), other, func_8()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_5 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_9()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::to_string() -> std::string{return R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::to_string() -> std::string{return R"(a(?!b(?!c))(..))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::to_string() -> std::string{return R"(a(?!b(?=a))(..))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"X"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_space::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_4()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_37_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"X"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_6(), cpp2::regex::no_reset(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_37_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_1(), reset_0(), func_5(), reset_1()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::to_string() -> std::string{return R"(X(\w+)(?=\s)|X(\w+))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + + std::array str_tmp_2 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::to_string() -> std::string{return R"(^a*(?=b)b)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + + std::array str_tmp_0 {"x"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::to_string() -> std::string{return R"('(?!\A)x'm)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + + std::array lower_str_tmp_0 {"o"}; + + std::array upper_str_tmp_0 {"O"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::to_string() -> std::string{return R"('^(o)(?!.*\1)'i)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"cd"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_7(), func_5(), cpp2::regex::no_reset(), func_6(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_41_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), reset_0(), other, func_8()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"e"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_9(), cpp2::regex::no_reset(), other, func_10()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_5 {"f"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::to_string() -> std::string{return R"(.*a(?!(b|cd)*e).*f)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"aa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 2;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"aaaa"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 4;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_7(), func_5(), cpp2::regex::no_reset(), func_6(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_42_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), reset_0(), other, func_8()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::to_string() -> std::string{return R"(^(a*?)(?!(aa|aaaa)*$))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_4()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_6(), cpp2::regex::no_reset(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_43_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_1(), cpp2::regex::no_reset(), func_5(), reset_0()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::to_string() -> std::string{return R"((?!)+?|(.{2,4}))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_6(), cpp2::regex::no_reset(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_9(), cpp2::regex::no_reset(), other, func_10()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_11(), func_5(), cpp2::regex::no_reset(), func_8(), cpp2::regex::no_reset()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_4_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; + static_cast(cpp2::move(tmp_4)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_44_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), reset_0(), other, func_12()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::to_string() -> std::string{return R"(^(a*?)(?!(a{6}|a{5})*$))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"e"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_3 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_4()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::to_string() -> std::string{return R"(a(?!b(?!c(?!d(?!e))))...(.))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_1 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_6(), cpp2::regex::no_reset(), other, func_7()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(1, r.pos); + + auto tmp_3_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; + static_cast(cpp2::move(tmp_3)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_46_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(1); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), reset_0(), other, func_8()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_4 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(2, r.pos); + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_11(), cpp2::regex::no_reset(), other, func_12()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_end(2, r.pos); + + auto tmp_5_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2); + } + } + }; + + auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; + static_cast(cpp2::move(tmp_5)); + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template auto test_tests_19_lookahead::regex_46_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{ + ctx.set_group_invalid(2); + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_10(), reset_1(), other, func_13()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_6 {"d"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_9()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_4()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_14::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"X"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_14(), cpp2::regex::no_reset(), other, func_15()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_15::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_7 {"X"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_7, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::to_string() -> std::string{return R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::to_string() -> std::string{return R"(((?s).)c(?!.))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_0_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; + static_cast(cpp2::move(tmp_0)); + + std::array str_tmp_1 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::to_string() -> std::string{return R"(((?s).)c(?!.))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!.))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!.))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!\N))"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + ctx.set_group_start(1, r.pos); + + std::array str_tmp_0 {"b"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;} + ctx.set_group_end(1, r.pos); + + auto tmp_1_func { +[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{ + if (!((*cpp2::impl::assert_not_null(_1)).matched)) { + (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1); + } + } + }; + + auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; + static_cast(cpp2::move(tmp_1)); + + std::array str_tmp_2 {"c"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::to_string() -> std::string{return R"('(b.)c(?!\N)'s)"; } + + + + + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + + std::array str_tmp_0 {"a"}; + if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) { + r.matched = false; + break; + } +{ +int i{0}; + for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) { + if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;} + } +} + if (r.matched) {r.pos += 1;} + else {break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2()); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + + template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{ + + auto r {ctx.pass(cur)}; + do { + if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;} + } + while ( + false + ); + if (r.matched) { + r = other(r.pos, ctx); + } + else { + r.pos = ctx.end; + } + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{ + ctx.set_group_start(0, cur); + + auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; + if (r.matched) {ctx.set_group_end(0, r.pos);} + return r; + } + + template [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{ + static_cast(name); + return -1; + } + + [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::to_string() -> std::string{return R"(a*(?!))"; } + + +#line 249 "pure2-regex_19_lookahead.cpp2" +auto main() -> int{ + CPP2_UFCS(run)(test_tests_19_lookahead()); +} + diff --git a/regression-tests/test-results/pure2-regex_19_lookahead.cpp2.output b/regression-tests/test-results/pure2-regex_19_lookahead.cpp2.output new file mode 100644 index 0000000000..bc21b51243 --- /dev/null +++ b/regression-tests/test-results/pure2-regex_19_lookahead.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex_19_lookahead.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/source/cpp2regex.h b/source/cpp2regex.h new file mode 100644 index 0000000000..552c608d9b --- /dev/null +++ b/source/cpp2regex.h @@ -0,0 +1 @@ +#include "../include/cpp2regex.h" diff --git a/source/reflect.h b/source/reflect.h index e7fb414603..7b89be4d5c 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -10,36 +10,36 @@ #line 1 "reflect.h2" -#line 20 "reflect.h2" +#line 21 "reflect.h2" namespace cpp2 { namespace meta { -#line 32 "reflect.h2" +#line 33 "reflect.h2" class compiler_services; -#line 226 "reflect.h2" +#line 227 "reflect.h2" class declaration_base; -#line 252 "reflect.h2" +#line 253 "reflect.h2" class declaration; -#line 334 "reflect.h2" +#line 335 "reflect.h2" class function_declaration; -#line 424 "reflect.h2" +#line 425 "reflect.h2" class object_declaration; -#line 460 "reflect.h2" +#line 461 "reflect.h2" class type_declaration; -#line 597 "reflect.h2" +#line 598 "reflect.h2" class alias_declaration; -#line 1005 "reflect.h2" +#line 1006 "reflect.h2" class value_member_info; -#line 1561 "reflect.h2" +#line 1632 "reflect.h2" } } @@ -66,13 +66,14 @@ class value_member_info; //=========================================================================== #include "parse.h" +#include "cpp2regex.h" -#line 20 "reflect.h2" +#line 21 "reflect.h2" namespace cpp2 { namespace meta { -#line 25 "reflect.h2" +#line 26 "reflect.h2" //----------------------------------------------------------------------- // // Compiler services @@ -100,34 +101,34 @@ class compiler_services stable_vector* generated_tokens_ ); -#line 58 "reflect.h2" +#line 59 "reflect.h2" // Common API // public: auto set_metafunction_name(cpp2::impl::in name, cpp2::impl::in> args) & -> void; -#line 66 "reflect.h2" +#line 67 "reflect.h2" public: [[nodiscard]] auto get_metafunction_name() const& -> std::string_view; public: [[nodiscard]] auto get_argument(cpp2::impl::in index) & -> std::string; -#line 76 "reflect.h2" +#line 77 "reflect.h2" public: [[nodiscard]] auto get_arguments() & -> std::vector; -#line 81 "reflect.h2" +#line 82 "reflect.h2" public: [[nodiscard]] auto arguments_were_used() const& -> bool; using parse_statement_ret = std::unique_ptr; -#line 83 "reflect.h2" +#line 84 "reflect.h2" protected: [[nodiscard]] auto parse_statement( std::string_view source ) & -> parse_statement_ret; -#line 136 "reflect.h2" +#line 137 "reflect.h2" public: [[nodiscard]] virtual auto position() const -> source_position; -#line 142 "reflect.h2" +#line 143 "reflect.h2" // Error diagnosis and handling, integrated with compiler output // Unlike a contract violation, .requires continues further processing // @@ -137,24 +138,24 @@ using parse_statement_ret = std::unique_ptr; cpp2::impl::in msg ) const& -> void; -#line 156 "reflect.h2" +#line 157 "reflect.h2" public: auto error(cpp2::impl::in msg) const& -> void; -#line 165 "reflect.h2" +#line 166 "reflect.h2" // Enable custom contracts on this object, integrated with compiler output // Unlike .requires, a contract violation stops further processing // public: auto report_violation(auto const& msg) const& -> void; -#line 176 "reflect.h2" +#line 177 "reflect.h2" public: [[nodiscard]] auto is_active() const& -> auto; public: virtual ~compiler_services() noexcept; public: compiler_services(compiler_services const& that); -#line 177 "reflect.h2" +#line 178 "reflect.h2" }; -#line 180 "reflect.h2" +#line 181 "reflect.h2" /* //----------------------------------------------------------------------- // @@ -191,7 +192,7 @@ type_id: @polymorphic_base @copyable type = } */ -#line 217 "reflect.h2" +#line 218 "reflect.h2" //----------------------------------------------------------------------- // // Declarations @@ -204,7 +205,7 @@ type_id: @polymorphic_base @copyable type = class declaration_base : public compiler_services { -#line 230 "reflect.h2" +#line 231 "reflect.h2" protected: declaration_node* n; protected: explicit declaration_base( @@ -213,31 +214,31 @@ class declaration_base cpp2::impl::in s ); -#line 243 "reflect.h2" +#line 244 "reflect.h2" public: [[nodiscard]] auto position() const -> source_position override; public: [[nodiscard]] auto print() const& -> std::string; public: virtual ~declaration_base() noexcept; public: declaration_base(declaration_base const& that); -#line 246 "reflect.h2" +#line 247 "reflect.h2" }; -#line 249 "reflect.h2" +#line 250 "reflect.h2" //----------------------------------------------------------------------- // All declarations // class declaration : public declaration_base { -#line 256 "reflect.h2" +#line 257 "reflect.h2" public: explicit declaration( declaration_node* n_, cpp2::impl::in s ); -#line 265 "reflect.h2" +#line 266 "reflect.h2" public: [[nodiscard]] auto is_public() const& -> bool; public: [[nodiscard]] auto is_protected() const& -> bool; public: [[nodiscard]] auto is_private() const& -> bool; @@ -256,7 +257,7 @@ class declaration public: [[nodiscard]] auto name() const& -> std::string_view; -#line 286 "reflect.h2" +#line 287 "reflect.h2" public: [[nodiscard]] auto has_initializer() const& -> bool; public: [[nodiscard]] auto is_global() const& -> bool; @@ -299,24 +300,24 @@ public: declaration(declaration const& that); // this precondition should be sufficient ... -#line 328 "reflect.h2" +#line 329 "reflect.h2" }; -#line 331 "reflect.h2" +#line 332 "reflect.h2" //----------------------------------------------------------------------- // Function declarations // class function_declaration : public declaration { -#line 338 "reflect.h2" +#line 339 "reflect.h2" public: explicit function_declaration( declaration_node* n_, cpp2::impl::in s ); -#line 348 "reflect.h2" +#line 349 "reflect.h2" public: [[nodiscard]] auto index_of_parameter_named(cpp2::impl::in s) const& -> int; public: [[nodiscard]] auto has_parameter_named(cpp2::impl::in s) const& -> bool; public: [[nodiscard]] auto has_in_parameter_named(cpp2::impl::in s) const& -> bool; @@ -356,7 +357,7 @@ class function_declaration public: [[nodiscard]] auto get_parameters() const& -> std::vector; -#line 395 "reflect.h2" +#line 396 "reflect.h2" public: [[nodiscard]] auto is_binary_comparison_function() const& -> bool; public: auto default_to_virtual() & -> void; @@ -367,103 +368,103 @@ class function_declaration public: function_declaration(function_declaration const& that); -#line 418 "reflect.h2" +#line 419 "reflect.h2" }; -#line 421 "reflect.h2" +#line 422 "reflect.h2" //----------------------------------------------------------------------- // Object declarations // class object_declaration : public declaration { -#line 428 "reflect.h2" +#line 429 "reflect.h2" public: explicit object_declaration( declaration_node* n_, cpp2::impl::in s ); -#line 438 "reflect.h2" +#line 439 "reflect.h2" public: [[nodiscard]] auto is_const() const& -> bool; public: [[nodiscard]] auto has_wildcard_type() const& -> bool; public: [[nodiscard]] auto type() const& -> std::string; -#line 448 "reflect.h2" +#line 449 "reflect.h2" public: [[nodiscard]] auto initializer() const& -> std::string; public: object_declaration(object_declaration const& that); -#line 454 "reflect.h2" +#line 455 "reflect.h2" }; -#line 457 "reflect.h2" +#line 458 "reflect.h2" //----------------------------------------------------------------------- // Type declarations // class type_declaration : public declaration { -#line 464 "reflect.h2" +#line 465 "reflect.h2" public: explicit type_declaration( declaration_node* n_, cpp2::impl::in s ); -#line 474 "reflect.h2" +#line 475 "reflect.h2" public: auto reserve_names(cpp2::impl::in name, auto&& ...etc) const& -> void; -#line 488 "reflect.h2" +#line 489 "reflect.h2" public: [[nodiscard]] auto is_polymorphic() const& -> bool; public: [[nodiscard]] auto is_final() const& -> bool; public: [[nodiscard]] auto make_final() & -> bool; public: [[nodiscard]] auto get_member_functions() const& -> std::vector; -#line 503 "reflect.h2" +#line 504 "reflect.h2" public: [[nodiscard]] auto get_member_functions_needing_initializer() const& -> std::vector; -#line 518 "reflect.h2" +#line 519 "reflect.h2" public: [[nodiscard]] auto get_member_objects() const& -> std::vector; -#line 528 "reflect.h2" +#line 529 "reflect.h2" public: [[nodiscard]] auto get_member_types() const& -> std::vector; -#line 538 "reflect.h2" +#line 539 "reflect.h2" public: [[nodiscard]] auto get_member_aliases() const& -> std::vector; -#line 548 "reflect.h2" +#line 549 "reflect.h2" public: [[nodiscard]] auto get_members() const& -> std::vector; struct query_declared_value_set_functions_ret { bool out_this_in_that; bool out_this_move_that; bool inout_this_in_that; bool inout_this_move_that; }; -#line 558 "reflect.h2" +#line 559 "reflect.h2" public: [[nodiscard]] auto query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret; -#line 573 "reflect.h2" +#line 574 "reflect.h2" public: auto add_member(cpp2::impl::in source) & -> void; -#line 587 "reflect.h2" +#line 588 "reflect.h2" public: auto remove_marked_members() & -> void; public: auto remove_all_members() & -> void; public: auto disable_member_function_generation() & -> void; public: type_declaration(type_declaration const& that); -#line 591 "reflect.h2" +#line 592 "reflect.h2" }; -#line 594 "reflect.h2" +#line 595 "reflect.h2" //----------------------------------------------------------------------- // Alias declarations // class alias_declaration : public declaration { -#line 601 "reflect.h2" +#line 602 "reflect.h2" public: explicit alias_declaration( declaration_node* n_, @@ -472,10 +473,10 @@ class alias_declaration public: alias_declaration(alias_declaration const& that); -#line 610 "reflect.h2" +#line 611 "reflect.h2" }; -#line 613 "reflect.h2" +#line 614 "reflect.h2" //----------------------------------------------------------------------- // // Metafunctions - these are hardwired for now until we get to the @@ -490,7 +491,7 @@ class alias_declaration // auto add_virtual_destructor(meta::type_declaration& t) -> void; -#line 631 "reflect.h2" +#line 632 "reflect.h2" //----------------------------------------------------------------------- // // "... an abstract base class defines an interface ..." @@ -505,7 +506,7 @@ auto add_virtual_destructor(meta::type_declaration& t) -> void; // auto interface(meta::type_declaration& t) -> void; -#line 670 "reflect.h2" +#line 671 "reflect.h2" //----------------------------------------------------------------------- // // "C.35: A base class destructor should be either public and @@ -527,7 +528,7 @@ auto interface(meta::type_declaration& t) -> void; // auto polymorphic_base(meta::type_declaration& t) -> void; -#line 714 "reflect.h2" +#line 715 "reflect.h2" //----------------------------------------------------------------------- // // "... A totally ordered type ... requires operator<=> that @@ -553,7 +554,7 @@ auto ordered_impl( cpp2::impl::in ordering// must be "strong_ordering" etc. ) -> void; -#line 758 "reflect.h2" +#line 759 "reflect.h2" //----------------------------------------------------------------------- // ordered - a totally ordered type // @@ -561,19 +562,19 @@ auto ordered_impl( // auto ordered(meta::type_declaration& t) -> void; -#line 768 "reflect.h2" +#line 769 "reflect.h2" //----------------------------------------------------------------------- // weakly_ordered - a weakly ordered type // auto weakly_ordered(meta::type_declaration& t) -> void; -#line 776 "reflect.h2" +#line 777 "reflect.h2" //----------------------------------------------------------------------- // partially_ordered - a partially ordered type // auto partially_ordered(meta::type_declaration& t) -> void; -#line 785 "reflect.h2" +#line 786 "reflect.h2" //----------------------------------------------------------------------- // // "A value is ... a regular type. It must have all public @@ -592,7 +593,7 @@ auto partially_ordered(meta::type_declaration& t) -> void; // auto copyable(meta::type_declaration& t) -> void; -#line 828 "reflect.h2" +#line 829 "reflect.h2" //----------------------------------------------------------------------- // // basic_value @@ -602,7 +603,7 @@ auto copyable(meta::type_declaration& t) -> void; // auto basic_value(meta::type_declaration& t) -> void; -#line 853 "reflect.h2" +#line 854 "reflect.h2" //----------------------------------------------------------------------- // // "A 'value' is a totally ordered basic_value..." @@ -615,13 +616,13 @@ auto basic_value(meta::type_declaration& t) -> void; // auto value(meta::type_declaration& t) -> void; -#line 869 "reflect.h2" +#line 870 "reflect.h2" auto weakly_ordered_value(meta::type_declaration& t) -> void; -#line 875 "reflect.h2" +#line 876 "reflect.h2" auto partially_ordered_value(meta::type_declaration& t) -> void; -#line 882 "reflect.h2" +#line 883 "reflect.h2" //----------------------------------------------------------------------- // // C.20: If you can avoid defining default operations, do @@ -646,7 +647,7 @@ auto partially_ordered_value(meta::type_declaration& t) -> void; // auto cpp1_rule_of_zero(meta::type_declaration& t) -> void; -#line 916 "reflect.h2" +#line 917 "reflect.h2" //----------------------------------------------------------------------- // // "By definition, a `struct` is a `class` in which members @@ -674,7 +675,7 @@ auto cpp1_rule_of_zero(meta::type_declaration& t) -> void; // auto cpp2_struct(meta::type_declaration& t) -> void; -#line 988 "reflect.h2" +#line 989 "reflect.h2" //----------------------------------------------------------------------- // // "C enumerations constitute a curiously half-baked concept. ... @@ -698,7 +699,7 @@ class value_member_info { public: std::string value; public: value_member_info(auto const& name_, auto const& type_, auto const& value_); -#line 1009 "reflect.h2" +#line 1010 "reflect.h2" }; auto basic_enum( @@ -707,7 +708,7 @@ auto basic_enum( cpp2::impl::in bitwise ) -> void; -#line 1206 "reflect.h2" +#line 1207 "reflect.h2" //----------------------------------------------------------------------- // // "An enum[...] is a totally ordered value type that stores a @@ -719,7 +720,7 @@ auto basic_enum( // auto cpp2_enum(meta::type_declaration& t) -> void; -#line 1232 "reflect.h2" +#line 1233 "reflect.h2" //----------------------------------------------------------------------- // // "flag_enum expresses an enumeration that stores values @@ -732,7 +733,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void; // auto flag_enum(meta::type_declaration& t) -> void; -#line 1264 "reflect.h2" +#line 1265 "reflect.h2" //----------------------------------------------------------------------- // // "As with void*, programmers should know that unions [...] are @@ -759,14 +760,31 @@ auto flag_enum(meta::type_declaration& t) -> void; auto cpp2_union(meta::type_declaration& t) -> void; -#line 1435 "reflect.h2" +#line 1436 "reflect.h2" //----------------------------------------------------------------------- // // print - output a pretty-printed visualization of t // auto print(cpp2::impl::in t) -> void; -#line 1445 "reflect.h2" +#line 1446 "reflect.h2" +//----------------------------------------------------------------------- +// +// regex - creates regular expressions from members +// +// Each member that starts with `regex` is replaced by a regular expression +// of the initializer string. E.g.: +// ``` +// regex := "ab"; +// ``` +// is replaced with +// ``` +// regex := ::cpp2::regex::regular_expression<...>; +// ``` +// +auto regex_gen(meta::type_declaration& t) -> void; + +#line 1513 "reflect.h2" //----------------------------------------------------------------------- // // apply_metafunctions @@ -777,7 +795,7 @@ auto print(cpp2::impl::in t) -> void; auto const& error ) -> bool; -#line 1561 "reflect.h2" +#line 1632 "reflect.h2" } } @@ -787,12 +805,12 @@ auto print(cpp2::impl::in t) -> void; #line 1 "reflect.h2" -#line 20 "reflect.h2" +#line 21 "reflect.h2" namespace cpp2 { namespace meta { -#line 46 "reflect.h2" +#line 47 "reflect.h2" compiler_services::compiler_services( std::vector* errors_, @@ -802,23 +820,23 @@ namespace meta { , errors_original_size{ cpp2::unsafe_narrow(std::ssize(*cpp2::impl::assert_not_null(errors))) } , generated_tokens{ generated_tokens_ } , parser{ *cpp2::impl::assert_not_null(errors) } -#line 51 "reflect.h2" +#line 52 "reflect.h2" { -#line 56 "reflect.h2" +#line 57 "reflect.h2" } -#line 60 "reflect.h2" +#line 61 "reflect.h2" auto compiler_services::set_metafunction_name(cpp2::impl::in name, cpp2::impl::in> args) & -> void{ metafunction_name = name; metafunction_args = args; metafunctions_used = CPP2_UFCS(empty)(args); } -#line 66 "reflect.h2" +#line 67 "reflect.h2" [[nodiscard]] auto compiler_services::get_metafunction_name() const& -> std::string_view { return metafunction_name; } -#line 68 "reflect.h2" +#line 69 "reflect.h2" [[nodiscard]] auto compiler_services::get_argument(cpp2::impl::in index) & -> std::string{ metafunctions_used = true; if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less(_1,_2); }())) { @@ -827,16 +845,16 @@ namespace meta { return ""; } -#line 76 "reflect.h2" +#line 77 "reflect.h2" [[nodiscard]] auto compiler_services::get_arguments() & -> std::vector{ metafunctions_used = true; return metafunction_args; } -#line 81 "reflect.h2" +#line 82 "reflect.h2" [[nodiscard]] auto compiler_services::arguments_were_used() const& -> bool { return metafunctions_used; } -#line 83 "reflect.h2" +#line 84 "reflect.h2" [[nodiscard]] auto compiler_services::parse_statement( std::string_view source @@ -844,7 +862,7 @@ namespace meta { { cpp2::impl::deferred_init> ret; -#line 89 "reflect.h2" +#line 90 "reflect.h2" auto original_source {source}; CPP2_UFCS(push_back)(generated_lines, std::vector()); @@ -859,7 +877,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')}; // First split this string into source_lines // -#line 101 "reflect.h2" +#line 102 "reflect.h2" if ( cpp2::impl::cmp_greater(CPP2_UFCS(ssize)(source),1) && newline_pos != source.npos) { @@ -872,7 +890,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')}; } } -#line 112 "reflect.h2" +#line 113 "reflect.h2" if (!(CPP2_UFCS(empty)(source))) { cpp2::move(add_line)(cpp2::move(source)); } @@ -897,14 +915,14 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')}; }return std::move(ret.value()); } -#line 136 "reflect.h2" +#line 137 "reflect.h2" [[nodiscard]] auto compiler_services::position() const -> source_position { return { }; } -#line 145 "reflect.h2" +#line 146 "reflect.h2" auto compiler_services::require( cpp2::impl::in b, @@ -916,7 +934,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')}; } } -#line 156 "reflect.h2" +#line 157 "reflect.h2" auto compiler_services::error(cpp2::impl::in msg) const& -> void { auto message {cpp2::impl::as_(msg)}; @@ -926,7 +944,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')}; static_cast(CPP2_UFCS(emplace_back)((*cpp2::impl::assert_not_null(errors)), position(), cpp2::move(message))); } -#line 168 "reflect.h2" +#line 169 "reflect.h2" auto compiler_services::report_violation(auto const& msg) const& -> void{ error(msg); throw(std::runtime_error( @@ -935,7 +953,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')}; )); } -#line 176 "reflect.h2" +#line 177 "reflect.h2" [[nodiscard]] auto compiler_services::is_active() const& -> auto { return true; } compiler_services::~compiler_services() noexcept{} @@ -948,7 +966,7 @@ compiler_services::compiler_services(compiler_services const& that) , metafunction_args{ that.metafunction_args } , metafunctions_used{ that.metafunctions_used }{} -#line 232 "reflect.h2" +#line 233 "reflect.h2" declaration_base::declaration_base( declaration_node* n_, @@ -956,17 +974,17 @@ compiler_services::compiler_services(compiler_services const& that) ) : compiler_services{ s } , n{ n_ } -#line 237 "reflect.h2" +#line 238 "reflect.h2" { -#line 240 "reflect.h2" +#line 241 "reflect.h2" if (cpp2::cpp2_default.is_active() && !(n) ) { cpp2::cpp2_default.report_violation(CPP2_CONTRACT_MSG("a meta::declaration must point to a valid declaration_node, not null")); } } -#line 243 "reflect.h2" +#line 244 "reflect.h2" [[nodiscard]] auto declaration_base::position() const -> source_position { return CPP2_UFCS(position)((*cpp2::impl::assert_not_null(n))); } -#line 245 "reflect.h2" +#line 246 "reflect.h2" [[nodiscard]] auto declaration_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*cpp2::impl::assert_not_null(n)), 0); } declaration_base::~declaration_base() noexcept{} @@ -974,121 +992,121 @@ declaration_base::declaration_base(declaration_base const& that) : compiler_services{ static_cast(that) } , n{ that.n }{} -#line 256 "reflect.h2" +#line 257 "reflect.h2" declaration::declaration( declaration_node* n_, cpp2::impl::in s ) : declaration_base{ n_, s } -#line 261 "reflect.h2" +#line 262 "reflect.h2" { } -#line 265 "reflect.h2" - [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*cpp2::impl::assert_not_null(n))); } #line 266 "reflect.h2" - [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*cpp2::impl::assert_not_null(n))); } #line 267 "reflect.h2" - [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*cpp2::impl::assert_not_null(n))); } #line 268 "reflect.h2" + [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*cpp2::impl::assert_not_null(n))); } +#line 269 "reflect.h2" [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*cpp2::impl::assert_not_null(n))); } -#line 270 "reflect.h2" - auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*cpp2::impl::assert_not_null(n)))); } #line 271 "reflect.h2" - auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*cpp2::impl::assert_not_null(n)))); } + auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*cpp2::impl::assert_not_null(n)))); } #line 272 "reflect.h2" + auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*cpp2::impl::assert_not_null(n)))); } +#line 273 "reflect.h2" auto declaration::default_to_private() & -> void { static_cast(CPP2_UFCS(make_private)((*cpp2::impl::assert_not_null(n)))); } -#line 274 "reflect.h2" - [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*cpp2::impl::assert_not_null(n))); } #line 275 "reflect.h2" - [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*cpp2::impl::assert_not_null(n))); } #line 276 "reflect.h2" + [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*cpp2::impl::assert_not_null(n))); } +#line 277 "reflect.h2" [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*cpp2::impl::assert_not_null(n))); } -#line 278 "reflect.h2" - [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*cpp2::impl::assert_not_null(n))); } #line 279 "reflect.h2" + [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*cpp2::impl::assert_not_null(n))); } +#line 280 "reflect.h2" [[nodiscard]] auto declaration::has_name(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_name)((*cpp2::impl::assert_not_null(n)), s); } -#line 281 "reflect.h2" +#line 282 "reflect.h2" [[nodiscard]] auto declaration::name() const& -> std::string_view{ if (has_name()) {return CPP2_UFCS(as_string_view)((*cpp2::impl::assert_not_null(CPP2_UFCS(name)(*cpp2::impl::assert_not_null(n))))); } else { return ""; } } -#line 286 "reflect.h2" +#line 287 "reflect.h2" [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*cpp2::impl::assert_not_null(n))); } -#line 288 "reflect.h2" - [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*cpp2::impl::assert_not_null(n))); } #line 289 "reflect.h2" - [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*cpp2::impl::assert_not_null(n))); } #line 290 "reflect.h2" - [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*cpp2::impl::assert_not_null(n))); } #line 291 "reflect.h2" - [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*cpp2::impl::assert_not_null(n))); } #line 292 "reflect.h2" - [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*cpp2::impl::assert_not_null(n))); } #line 293 "reflect.h2" - [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*cpp2::impl::assert_not_null(n))); } #line 294 "reflect.h2" - [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*cpp2::impl::assert_not_null(n))); } #line 295 "reflect.h2" + [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*cpp2::impl::assert_not_null(n))); } +#line 296 "reflect.h2" [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*cpp2::impl::assert_not_null(n))); } -#line 297 "reflect.h2" - [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*cpp2::impl::assert_not_null(n))); } #line 298 "reflect.h2" - [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*cpp2::impl::assert_not_null(n))); } #line 299 "reflect.h2" + [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*cpp2::impl::assert_not_null(n))); } +#line 300 "reflect.h2" [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*cpp2::impl::assert_not_null(n))); } -#line 301 "reflect.h2" +#line 302 "reflect.h2" [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*cpp2::impl::assert_not_null(n))); } -#line 303 "reflect.h2" - [[nodiscard]] auto declaration::as_function() const& -> function_declaration { return function_declaration(n, (*this)); } #line 304 "reflect.h2" - [[nodiscard]] auto declaration::as_object() const& -> object_declaration { return object_declaration(n, (*this)); } + [[nodiscard]] auto declaration::as_function() const& -> function_declaration { return function_declaration(n, (*this)); } #line 305 "reflect.h2" - [[nodiscard]] auto declaration::as_type() const& -> type_declaration { return type_declaration(n, (*this)); } + [[nodiscard]] auto declaration::as_object() const& -> object_declaration { return object_declaration(n, (*this)); } #line 306 "reflect.h2" + [[nodiscard]] auto declaration::as_type() const& -> type_declaration { return type_declaration(n, (*this)); } +#line 307 "reflect.h2" [[nodiscard]] auto declaration::as_alias() const& -> alias_declaration { return alias_declaration(n, (*this)); } -#line 308 "reflect.h2" +#line 309 "reflect.h2" [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*cpp2::impl::assert_not_null(n)).parent_declaration, (*this)); } -#line 310 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*cpp2::impl::assert_not_null(n))); } #line 311 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*cpp2::impl::assert_not_null(n))); } #line 312 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*cpp2::impl::assert_not_null(n))); } #line 313 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*cpp2::impl::assert_not_null(n))); } #line 314 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*cpp2::impl::assert_not_null(n))); } +#line 315 "reflect.h2" [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*cpp2::impl::assert_not_null(n))); } -#line 316 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*cpp2::impl::assert_not_null(n))); } #line 317 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*cpp2::impl::assert_not_null(n))); } #line 318 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*cpp2::impl::assert_not_null(n))); } +#line 319 "reflect.h2" [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*cpp2::impl::assert_not_null(n))); } -#line 320 "reflect.h2" +#line 321 "reflect.h2" [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*cpp2::impl::assert_not_null(n))); } -#line 322 "reflect.h2" +#line 323 "reflect.h2" auto declaration::mark_for_removal_from_enclosing_type() & -> void { if (cpp2::type_safety.is_active() && !(parent_is_type()) ) { cpp2::type_safety.report_violation(""); } -#line 325 "reflect.h2" +#line 326 "reflect.h2" auto test {CPP2_UFCS(type_member_mark_for_removal)((*cpp2::impl::assert_not_null(n)))}; if (cpp2::cpp2_default.is_active() && !(cpp2::move(test)) ) { cpp2::cpp2_default.report_violation(""); }// ... to ensure this assert is true } @@ -1097,88 +1115,88 @@ declaration_base::declaration_base(declaration_base const& that) declaration::declaration(declaration const& that) : declaration_base{ static_cast(that) }{} -#line 338 "reflect.h2" +#line 339 "reflect.h2" function_declaration::function_declaration( declaration_node* n_, cpp2::impl::in s ) : declaration{ n_, s } -#line 343 "reflect.h2" +#line 344 "reflect.h2" { if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_function)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } } -#line 348 "reflect.h2" - [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::impl::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } #line 349 "reflect.h2" - [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::impl::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } #line 350 "reflect.h2" - [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } #line 351 "reflect.h2" - [[nodiscard]] auto function_declaration::has_copy_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_copy_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } #line 352 "reflect.h2" - [[nodiscard]] auto function_declaration::has_inout_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_inout_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::has_copy_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_copy_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } #line 353 "reflect.h2" - [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::has_inout_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_inout_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } #line 354 "reflect.h2" - [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } #line 355 "reflect.h2" - [[nodiscard]] auto function_declaration::has_forward_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_forward_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } #line 356 "reflect.h2" + [[nodiscard]] auto function_declaration::has_forward_parameter_named(cpp2::impl::in s) const& -> bool { return CPP2_UFCS(has_forward_parameter_named)((*cpp2::impl::assert_not_null(n)), s); } +#line 357 "reflect.h2" [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*cpp2::impl::assert_not_null(n))); } -#line 358 "reflect.h2" +#line 359 "reflect.h2" [[nodiscard]] auto function_declaration::has_parameter_with_name_and_pass(cpp2::impl::in s, cpp2::impl::in pass) const& -> bool { return CPP2_UFCS(has_parameter_with_name_and_pass)((*cpp2::impl::assert_not_null(n)), s, pass); } -#line 360 "reflect.h2" - [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::impl::assert_not_null(n))); } #line 361 "reflect.h2" - [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::impl::assert_not_null(n))); } #line 362 "reflect.h2" - [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*cpp2::impl::assert_not_null(n))); } #line 363 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*cpp2::impl::assert_not_null(n))); } #line 364 "reflect.h2" - [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*cpp2::impl::assert_not_null(n))); } #line 365 "reflect.h2" - [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*cpp2::impl::assert_not_null(n))); } #line 366 "reflect.h2" - [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*cpp2::impl::assert_not_null(n))); } #line 367 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*cpp2::impl::assert_not_null(n))); } #line 368 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*cpp2::impl::assert_not_null(n))); } #line 369 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*cpp2::impl::assert_not_null(n))); } #line 370 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*cpp2::impl::assert_not_null(n))); } #line 371 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*cpp2::impl::assert_not_null(n))); } #line 372 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*cpp2::impl::assert_not_null(n))); } #line 373 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*cpp2::impl::assert_not_null(n))); } #line 374 "reflect.h2" + [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*cpp2::impl::assert_not_null(n))); } +#line 375 "reflect.h2" [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*cpp2::impl::assert_not_null(n))); } -#line 376 "reflect.h2" +#line 377 "reflect.h2" [[nodiscard]] auto function_declaration::is_copy_or_move() const& -> bool { return is_constructor_with_that() || is_assignment_with_that(); } -#line 378 "reflect.h2" - [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*cpp2::impl::assert_not_null(n))); } #line 379 "reflect.h2" - [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*cpp2::impl::assert_not_null(n))); } #line 380 "reflect.h2" - [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*cpp2::impl::assert_not_null(n))); } #line 381 "reflect.h2" + [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*cpp2::impl::assert_not_null(n))); } +#line 382 "reflect.h2" [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*cpp2::impl::assert_not_null(n))); } -#line 383 "reflect.h2" +#line 384 "reflect.h2" [[nodiscard]] auto function_declaration::unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*cpp2::impl::assert_not_null(n))); } -#line 385 "reflect.h2" +#line 386 "reflect.h2" [[nodiscard]] auto function_declaration::get_parameters() const& -> std::vector { @@ -1189,19 +1207,19 @@ declaration::declaration(declaration const& that) return ret; } -#line 395 "reflect.h2" +#line 396 "reflect.h2" [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*cpp2::impl::assert_not_null(n))); } -#line 397 "reflect.h2" +#line 398 "reflect.h2" auto function_declaration::default_to_virtual() & -> void { static_cast(CPP2_UFCS(make_function_virtual)((*cpp2::impl::assert_not_null(n)))); } -#line 399 "reflect.h2" +#line 400 "reflect.h2" [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*cpp2::impl::assert_not_null(n))); } -#line 401 "reflect.h2" +#line 402 "reflect.h2" auto function_declaration::add_initializer(cpp2::impl::in source) & -> void -#line 404 "reflect.h2" +#line 405 "reflect.h2" { if ((*this).is_active() && !(!(has_initializer())) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that already has one")); } if ((*this).is_active() && !(parent_is_type()) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that isn't in a type scope")); } @@ -1210,7 +1228,7 @@ declaration::declaration(declaration const& that) //require( parent_is_type(), // "cannot add an initializer to a function that isn't in a type scope"); -#line 410 "reflect.h2" +#line 411 "reflect.h2" auto stmt {parse_statement(source)}; if (!((cpp2::impl::as_(stmt)))) { error("cannot add an initializer that is not a valid statement"); @@ -1223,25 +1241,25 @@ declaration::declaration(declaration const& that) function_declaration::function_declaration(function_declaration const& that) : declaration{ static_cast(that) }{} -#line 428 "reflect.h2" +#line 429 "reflect.h2" object_declaration::object_declaration( declaration_node* n_, cpp2::impl::in s ) : declaration{ n_, s } -#line 433 "reflect.h2" +#line 434 "reflect.h2" { if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_object)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } } -#line 438 "reflect.h2" - [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*cpp2::impl::assert_not_null(n))); } #line 439 "reflect.h2" + [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*cpp2::impl::assert_not_null(n))); } +#line 440 "reflect.h2" [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*cpp2::impl::assert_not_null(n))); } -#line 441 "reflect.h2" +#line 442 "reflect.h2" [[nodiscard]] auto object_declaration::type() const& -> std::string{ auto ret {CPP2_UFCS(object_type)((*cpp2::impl::assert_not_null(n)))}; require(!(contains(ret, "(*ERROR*)")), @@ -1249,7 +1267,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 448 "reflect.h2" +#line 449 "reflect.h2" [[nodiscard]] auto object_declaration::initializer() const& -> std::string{ auto ret {CPP2_UFCS(object_initializer)((*cpp2::impl::assert_not_null(n)))}; require(!(contains(ret, "(*ERROR*)")), @@ -1260,20 +1278,20 @@ declaration::declaration(declaration const& that) object_declaration::object_declaration(object_declaration const& that) : declaration{ static_cast(that) }{} -#line 464 "reflect.h2" +#line 465 "reflect.h2" type_declaration::type_declaration( declaration_node* n_, cpp2::impl::in s ) : declaration{ n_, s } -#line 469 "reflect.h2" +#line 470 "reflect.h2" { if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_type)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } } -#line 474 "reflect.h2" +#line 475 "reflect.h2" auto type_declaration::reserve_names(cpp2::impl::in name, auto&& ...etc) const& -> void { // etc is not declared ':string_view' for compatibility with GCC 10.x for ( @@ -1288,14 +1306,14 @@ declaration::declaration(declaration const& that) } } -#line 488 "reflect.h2" - [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*cpp2::impl::assert_not_null(n))); } #line 489 "reflect.h2" - [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*cpp2::impl::assert_not_null(n))); } + [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*cpp2::impl::assert_not_null(n))); } #line 490 "reflect.h2" + [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*cpp2::impl::assert_not_null(n))); } +#line 491 "reflect.h2" [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*cpp2::impl::assert_not_null(n))); } -#line 492 "reflect.h2" +#line 493 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_functions() const& -> std::vector { @@ -1307,7 +1325,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 503 "reflect.h2" +#line 504 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_functions_needing_initializer() const& -> std::vector { @@ -1323,7 +1341,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 518 "reflect.h2" +#line 519 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_objects() const& -> std::vector { @@ -1334,7 +1352,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 528 "reflect.h2" +#line 529 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_types() const& -> std::vector { @@ -1345,7 +1363,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 538 "reflect.h2" +#line 539 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_aliases() const& -> std::vector { @@ -1356,7 +1374,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 548 "reflect.h2" +#line 549 "reflect.h2" [[nodiscard]] auto type_declaration::get_members() const& -> std::vector { @@ -1367,16 +1385,16 @@ declaration::declaration(declaration const& that) return ret; } -#line 558 "reflect.h2" +#line 559 "reflect.h2" [[nodiscard]] auto type_declaration::query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret -#line 565 "reflect.h2" +#line 566 "reflect.h2" { cpp2::impl::deferred_init out_this_in_that; cpp2::impl::deferred_init out_this_move_that; cpp2::impl::deferred_init inout_this_in_that; cpp2::impl::deferred_init inout_this_move_that; -#line 566 "reflect.h2" +#line 567 "reflect.h2" auto declared {CPP2_UFCS(find_declared_value_set_functions)((*cpp2::impl::assert_not_null(n)))}; out_this_in_that.construct(declared.out_this_in_that != nullptr); out_this_move_that.construct(declared.out_this_move_that != nullptr); @@ -1384,7 +1402,7 @@ declaration::declaration(declaration const& that) inout_this_move_that.construct(cpp2::move(declared).inout_this_move_that != nullptr); return { std::move(out_this_in_that.value()), std::move(out_this_move_that.value()), std::move(inout_this_in_that.value()), std::move(inout_this_move_that.value()) }; } -#line 573 "reflect.h2" +#line 574 "reflect.h2" auto type_declaration::add_member(cpp2::impl::in source) & -> void { auto decl {parse_statement(source)}; @@ -1399,25 +1417,25 @@ declaration::declaration(declaration const& that) std::string("unexpected error while attempting to add member:\n") + source); } -#line 587 "reflect.h2" - auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*cpp2::impl::assert_not_null(n))); } #line 588 "reflect.h2" + auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*cpp2::impl::assert_not_null(n))); } +#line 589 "reflect.h2" auto type_declaration::remove_all_members() & -> void { CPP2_UFCS(type_remove_all_members)((*cpp2::impl::assert_not_null(n))); } -#line 590 "reflect.h2" +#line 591 "reflect.h2" auto type_declaration::disable_member_function_generation() & -> void { CPP2_UFCS(type_disable_member_function_generation)((*cpp2::impl::assert_not_null(n))); } type_declaration::type_declaration(type_declaration const& that) : declaration{ static_cast(that) }{} -#line 601 "reflect.h2" +#line 602 "reflect.h2" alias_declaration::alias_declaration( declaration_node* n_, cpp2::impl::in s ) : declaration{ n_, s } -#line 606 "reflect.h2" +#line 607 "reflect.h2" { if (cpp2::cpp2_default.is_active() && !(CPP2_UFCS(is_alias)((*cpp2::impl::assert_not_null(n)))) ) { cpp2::cpp2_default.report_violation(""); } @@ -1426,13 +1444,13 @@ declaration::declaration(declaration const& that) alias_declaration::alias_declaration(alias_declaration const& that) : declaration{ static_cast(that) }{} -#line 625 "reflect.h2" +#line 626 "reflect.h2" auto add_virtual_destructor(meta::type_declaration& t) -> void { CPP2_UFCS(add_member)(t, "operator=: (virtual move this) = { }"); } -#line 643 "reflect.h2" +#line 644 "reflect.h2" auto interface(meta::type_declaration& t) -> void { auto has_dtor {false}; @@ -1459,7 +1477,7 @@ auto interface(meta::type_declaration& t) -> void } } -#line 689 "reflect.h2" +#line 690 "reflect.h2" auto polymorphic_base(meta::type_declaration& t) -> void { auto has_dtor {false}; @@ -1484,7 +1502,7 @@ auto polymorphic_base(meta::type_declaration& t) -> void } } -#line 734 "reflect.h2" +#line 735 "reflect.h2" auto ordered_impl( meta::type_declaration& t, cpp2::impl::in ordering @@ -1509,25 +1527,25 @@ auto ordered_impl( } } -#line 763 "reflect.h2" +#line 764 "reflect.h2" auto ordered(meta::type_declaration& t) -> void { ordered_impl(t, "strong_ordering"); } -#line 771 "reflect.h2" +#line 772 "reflect.h2" auto weakly_ordered(meta::type_declaration& t) -> void { ordered_impl(t, "weak_ordering"); } -#line 779 "reflect.h2" +#line 780 "reflect.h2" auto partially_ordered(meta::type_declaration& t) -> void { ordered_impl(t, "partial_ordering"); } -#line 801 "reflect.h2" +#line 802 "reflect.h2" auto copyable(meta::type_declaration& t) -> void { // If the user explicitly wrote any of the copy/move functions, @@ -1555,7 +1573,7 @@ auto copyable(meta::type_declaration& t) -> void }} } -#line 835 "reflect.h2" +#line 836 "reflect.h2" auto basic_value(meta::type_declaration& t) -> void { CPP2_UFCS(copyable)(t); @@ -1574,28 +1592,28 @@ auto basic_value(meta::type_declaration& t) -> void } } -#line 863 "reflect.h2" +#line 864 "reflect.h2" auto value(meta::type_declaration& t) -> void { CPP2_UFCS(ordered)(t); CPP2_UFCS(basic_value)(t); } -#line 869 "reflect.h2" +#line 870 "reflect.h2" auto weakly_ordered_value(meta::type_declaration& t) -> void { CPP2_UFCS(weakly_ordered)(t); CPP2_UFCS(basic_value)(t); } -#line 875 "reflect.h2" +#line 876 "reflect.h2" auto partially_ordered_value(meta::type_declaration& t) -> void { CPP2_UFCS(partially_ordered)(t); CPP2_UFCS(basic_value)(t); } -#line 904 "reflect.h2" +#line 905 "reflect.h2" auto cpp1_rule_of_zero(meta::type_declaration& t) -> void { for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) @@ -1608,7 +1626,7 @@ auto cpp1_rule_of_zero(meta::type_declaration& t) -> void CPP2_UFCS(disable_member_function_generation)(t); } -#line 941 "reflect.h2" +#line 942 "reflect.h2" auto cpp2_struct(meta::type_declaration& t) -> void { std::string ctor_params {}; @@ -1660,7 +1678,7 @@ value_member_info::value_member_info(auto const& name_, auto const& type_, auto , type{ type_ } , value{ value_ }{} -#line 1011 "reflect.h2" +#line 1012 "reflect.h2" auto basic_enum( meta::type_declaration& t, auto const& nextval, @@ -1685,7 +1703,7 @@ auto basic_enum( { std::string value{"-1"}; -#line 1034 "reflect.h2" +#line 1035 "reflect.h2" for ( auto const& m : CPP2_UFCS(get_members)(t) ) if ( CPP2_UFCS(is_member_object)(m)) @@ -1727,7 +1745,7 @@ std::string value{"-1"}; } } -#line 1074 "reflect.h2" +#line 1075 "reflect.h2" if ((CPP2_UFCS(empty)(enumerators))) { CPP2_UFCS(error)(t, "an enumeration must contain at least one enumerator value"); return ; @@ -1778,7 +1796,7 @@ std::string value{"-1"}; } } -#line 1125 "reflect.h2" +#line 1126 "reflect.h2" // 2. Replace: Erase the contents and replace with modified contents // // Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr' @@ -1827,7 +1845,7 @@ std::string to_string{" to_string: (this) -> std::string = { \n"}; // Provide a 'to_string' function to print enumerator name(s) -#line 1171 "reflect.h2" +#line 1172 "reflect.h2" { if (bitwise) { to_string += " _ret : std::string = \"(\";\n" @@ -1861,10 +1879,10 @@ std::string to_string{" to_string: (this) -> std::string = { \n"}; CPP2_UFCS(add_member)(t, cpp2::move(to_string)); } } -#line 1203 "reflect.h2" +#line 1204 "reflect.h2" } -#line 1215 "reflect.h2" +#line 1216 "reflect.h2" auto cpp2_enum(meta::type_declaration& t) -> void { // Let basic_enum do its thing, with an incrementing value generator @@ -1881,7 +1899,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void ); } -#line 1242 "reflect.h2" +#line 1243 "reflect.h2" auto flag_enum(meta::type_declaration& t) -> void { // Let basic_enum do its thing, with a power-of-two value generator @@ -1903,7 +1921,7 @@ auto flag_enum(meta::type_declaration& t) -> void ); } -#line 1288 "reflect.h2" +#line 1289 "reflect.h2" auto cpp2_union(meta::type_declaration& t) -> void { std::vector alternatives {}; @@ -1912,7 +1930,7 @@ auto value{0}; // 1. Gather: All the user-written members, and find/compute the max size -#line 1295 "reflect.h2" +#line 1296 "reflect.h2" for ( auto const& m : CPP2_UFCS(get_members)(t) ) { do @@ -1942,7 +1960,7 @@ auto value{0}; } while (false); ++value; } } -#line 1323 "reflect.h2" +#line 1324 "reflect.h2" std::string discriminator_type {}; if (cpp2::impl::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { discriminator_type = "i8"; @@ -1957,7 +1975,7 @@ auto value{0}; discriminator_type = "i64"; }}} -#line 1338 "reflect.h2" +#line 1339 "reflect.h2" // 2. Replace: Erase the contents and replace with modified contents CPP2_UFCS(remove_marked_members)(t); @@ -1966,7 +1984,7 @@ std::string storage{" _storage: cpp2::aligned_storage t) -> void { std::cout << CPP2_UFCS(print)(t) << "\n"; } -#line 1449 "reflect.h2" +#line 1460 "reflect.h2" +auto regex_gen(meta::type_declaration& t) -> void +{ + auto has_default {false}; + auto prefix {"regex"}; + std::string postfix {"_mod"}; // TODO: remove mod syntax when 'm.initializer()' can be '("pat", "mod")' + std::map expressions {}; + + for ( auto& m : CPP2_UFCS(get_member_objects)(t) ) + { + std::string name {CPP2_UFCS(name)(m)}; + + if (CPP2_UFCS(starts_with)(name, prefix)) + { + if (!(CPP2_UFCS(has_initializer)(m))) { + CPP2_UFCS(error)(t, "Regular expression must have an initializer."); + } + CPP2_UFCS(mark_for_removal_from_enclosing_type)(m); + + if (name == prefix) { + if (has_default) { + CPP2_UFCS(error)(t, "Type can only contain one default named regular expression."); + } + has_default = true; + } + + std::string expr {CPP2_UFCS(initializer)(m)}; + if (CPP2_UFCS(starts_with)(expr, "R\"(") && CPP2_UFCS(ends_with)(expr, ")\"")) { + expr = CPP2_UFCS(substr)(expr, 3, CPP2_UFCS(size)(expr) - 5); + } + else {if (string_util::is_escaped(expr)) { + expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2); + } + else { + CPP2_UFCS(error)(t, "Unknown string format '" + cpp2::to_string(expr) + "'"); + }} + + CPP2_ASSERT_IN_BOUNDS(expressions, name) = cpp2::move(expr); + } + } + + CPP2_UFCS(remove_marked_members)(t); + + for ( auto const& expr : cpp2::move(expressions) ) { + auto regular_expression {::cpp2::regex::generate_regex(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message); })}; + + if (!(regular_expression.empty())) { + CPP2_UFCS(add_member)(t, "public " + cpp2::to_string(expr.first) + "_matcher: type = " + cpp2::to_string(cpp2::move(regular_expression)) + ""); + CPP2_UFCS(add_member)(t, "public " + cpp2::to_string(expr.first) + ": cpp2::regex::regular_expression = ();"); + } + } +} + +#line 1517 "reflect.h2" [[nodiscard]] auto apply_metafunctions( declaration_node& n, type_declaration& rtype, @@ -2163,16 +2234,19 @@ auto print(cpp2::impl::in t) -> void else {if (name == "print") { print(rtype); } + else {if (name == "regex") { + regex_gen(rtype); + } else { error("unrecognized metafunction name: " + name); error( "(temporary alpha limitation) currently the supported names are: " "interface, polymorphic_base, ordered, weakly_ordered, partially_ordered, " "copyable, basic_value, value, weakly_ordered_value, partially_ordered_value, " - "struct, enum, flag_enum, union, cpp1_rule_of_zero, print" + "struct, enum, flag_enum, union, cpp1_rule_of_zero, regex, print" ); return false; - }}}}}}}}}}}}}}}} + }}}}}}}}}}}}}}}}} if (( !(CPP2_UFCS(empty)(args)) @@ -2187,7 +2261,7 @@ auto print(cpp2::impl::in t) -> void return true; } -#line 1561 "reflect.h2" +#line 1632 "reflect.h2" } } diff --git a/source/reflect.h2 b/source/reflect.h2 index adddf90187..9f82035a02 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -16,6 +16,7 @@ //=========================================================================== #include "parse.h" +#include "cpp2regex.h" cpp2: namespace = { @@ -1442,6 +1443,73 @@ print: (t: meta::type_declaration) = } +//----------------------------------------------------------------------- +// +// regex - creates regular expressions from members +// +// Each member that starts with `regex` is replaced by a regular expression +// of the initializer string. E.g.: +// ``` +// regex := "ab"; +// ``` +// is replaced with +// ``` +// regex := ::cpp2::regex::regular_expression<...>; +// ``` +// +regex_gen: (inout t: meta::type_declaration) = +{ + has_default := false; + prefix := "regex"; + postfix : std::string = "_mod"; // TODO: remove mod syntax when 'm.initializer()' can be '("pat", "mod")' + expressions : std::map = (); + + for t.get_member_objects() do (inout m) + { + name: std::string = m.name(); + + if name.starts_with(prefix) + { + if !m.has_initializer() { + t.error("Regular expression must have an initializer."); + } + m.mark_for_removal_from_enclosing_type(); + + if name == prefix { + if has_default { + t.error("Type can only contain one default named regular expression."); + } + has_default = true; + } + + expr: std::string = m.initializer(); + if expr.starts_with("R\"(") && expr.ends_with(")\"") { + expr = expr.substr(3, expr.size() - 5); + } + else if string_util::is_escaped(expr) { + expr = expr.substr(1, expr.size() - 2); + } + else { + t.error("Unknown string format '(expr)$'"); + } + + expressions[name] = expr; + } + } + + t.remove_marked_members(); + + for expressions do (expr) { + regular_expression := ::cpp2::regex::generate_regex(expr.second, :(message) = t$.error(message);); + + if !regular_expression..empty() { + t.add_member("public (expr.first)$_matcher: type = (regular_expression)$"); + t.add_member("public (expr.first)$: cpp2::regex::regular_expression = ();"); + } + } +} + + //----------------------------------------------------------------------- // // apply_metafunctions @@ -1533,13 +1601,16 @@ apply_metafunctions: ( else if name == "print" { print( rtype ); } + else if name == "regex" { + regex_gen( rtype ); + } else { error( "unrecognized metafunction name: " + name ); error( "(temporary alpha limitation) currently the supported names are: " "interface, polymorphic_base, ordered, weakly_ordered, partially_ordered, " "copyable, basic_value, value, weakly_ordered_value, partially_ordered_value, " - "struct, enum, flag_enum, union, cpp1_rule_of_zero, print" + "struct, enum, flag_enum, union, cpp1_rule_of_zero, regex, print" ); return false; }