|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
Compatibility constants mirroring std::regex_constants (own values, mapped internally).
More...
Typedefs | |
| using | error_type = std::regex_constants::error_type |
Error categories, aliased to std's so regex_error::code() is a true drop-in. | |
Enumerations | |
| enum | syntax_option_type : unsigned { ECMAScript = 0 , icase = 1U << 0U , nosubs = 1U << 1U , optimize = 1U << 2U , collate = 1U << 3U , multiline = 1U << 4U , basic = 1U << 5U , extended = 1U << 6U , awk = 1U << 7U , grep = 1U << 8U , egrep = 1U << 9U } |
| Grammar / option flags (own bit values; mapped to real::flags or std at construction). More... | |
| enum | match_flag_type : unsigned { match_default = 0 , match_not_bol = 1U << 0U , match_not_eol = 1U << 1U , match_not_bow = 1U << 2U , match_not_eow = 1U << 3U , match_any = 1U << 4U , match_not_null = 1U << 5U , match_continuous = 1U << 6U , match_prev_avail = 1U << 7U , format_default = 0 , format_sed = 1U << 8U , format_no_copy = 1U << 9U , format_first_only = 1U << 10U } |
| Match-control flags: the common subset. More... | |
Functions | |
| constexpr syntax_option_type | operator| (syntax_option_type a, syntax_option_type b) noexcept |
Bitwise OR of two syntax options, so ECMAScript | icase stays typed. | |
| constexpr syntax_option_type | operator& (syntax_option_type a, syntax_option_type b) noexcept |
| Bitwise AND of two syntax options, for testing a bit. | |
| constexpr match_flag_type | operator| (match_flag_type a, match_flag_type b) noexcept |
| Bitwise OR of two match flags. | |
| constexpr match_flag_type | operator& (match_flag_type a, match_flag_type b) noexcept |
| Bitwise AND of two match flags, for testing a bit. | |
| constexpr match_flag_type | operator~ (match_flag_type a) noexcept |
| Bitwise complement of a match-flag set, for masking bits off. | |
Variables | |
| constexpr error_type | error_collate {std::regex_constants::error_collate} |
| As std's: an invalid collating element. | |
| constexpr error_type | error_ctype {std::regex_constants::error_ctype} |
| As std's: an invalid character class. | |
| constexpr error_type | error_escape {std::regex_constants::error_escape} |
| As std's: an invalid escape. | |
| constexpr error_type | error_backref {std::regex_constants::error_backref} |
| As std's: an invalid back reference. | |
| constexpr error_type | error_brack {std::regex_constants::error_brack} |
| As std's: mismatched brackets. | |
| constexpr error_type | error_paren {std::regex_constants::error_paren} |
| As std's: mismatched parentheses. | |
| constexpr error_type | error_brace {std::regex_constants::error_brace} |
| As std's: mismatched braces. | |
| constexpr error_type | error_badbrace {std::regex_constants::error_badbrace} |
| As std's: an invalid range in braces. | |
| constexpr error_type | error_range {std::regex_constants::error_range} |
| As std's: an invalid character range. | |
| constexpr error_type | error_space {std::regex_constants::error_space} |
| As std's: out of memory. | |
| constexpr error_type | error_badrepeat {std::regex_constants::error_badrepeat} |
| As std's: a repeat with nothing to repeat. | |
| constexpr error_type | error_complexity {std::regex_constants::error_complexity} |
| As std's; also a strict-policy rejection. | |
| constexpr error_type | error_stack {std::regex_constants::error_stack} |
| As std's: out of stack. | |
Compatibility constants mirroring std::regex_constants (own values, mapped internally).
| enum real::compat::regex_constants::match_flag_type : unsigned |
Match-control flags: the common subset.
| enum real::compat::regex_constants::syntax_option_type : unsigned |
Grammar / option flags (own bit values; mapped to real::flags or std at construction).
| Enumerator | |
|---|---|
| ECMAScript | The default grammar. |
| icase | Case-insensitive (ASCII). |
| nosubs | Do not expose sub-expressions; std only, so rejected under |
| optimize | Hint to favour matching speed; honoured as a no-op. |
| collate | Locale-sensitive ranges; std only, so rejected under |
| multiline |
|
| basic | POSIX BRE — translated onto REAL when the pattern translates, else the std backend. |
| extended | POSIX ERE — translated onto REAL when the pattern translates, else the std backend. |
| awk | awk grammar (ERE + C escapes) — translated onto REAL when it translates, else std. |
| grep | grep grammar (BRE, lines joined by |
| egrep | egrep grammar (ERE, lines joined by |
|
constexprnoexcept |
Bitwise AND of two match flags, for testing a bit.
| [in] | a | Left operand. |
| [in] | b | Right operand. |
|
constexprnoexcept |
Bitwise AND of two syntax options, for testing a bit.
| [in] | a | Left operand. |
| [in] | b | Right operand. |
|
constexprnoexcept |
Bitwise OR of two match flags.
| [in] | a | Left operand. |
| [in] | b | Right operand. |
|
constexprnoexcept |
Bitwise OR of two syntax options, so ECMAScript | icase stays typed.
| [in] | a | Left operand. |
| [in] | b | Right operand. |
|
constexprnoexcept |
Bitwise complement of a match-flag set, for masking bits off.
| [in] | a | The flags to complement. |
a does not hold.