|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
Resource limits guarding against pattern-driven resource exhaustion. More...
Namespaces | |
| namespace | real |
| REAL's public API: real::regex, real::static_regex, real::flags and the match/iterator types built on them. | |
| namespace | real::detail |
| DFA construction internals: subset construction over a flattened NFA. Not a stable API. | |
Variables | |
| constexpr std::size_t | real::detail::max_program_size {262144} |
| Maximum number of NFA instructions in a compiled program — 256 Ki. | |
| constexpr std::int32_t | real::detail::max_repeat_count {1000} |
| Per-quantifier bounded-repeat cap, enforced at parse time. | |
| constexpr std::int32_t | real::detail::max_group_count {32766} |
Maximum capture groups; bounds slot_count = 2 * (groups + 1). | |
| constexpr std::int32_t | real::detail::max_nesting_depth {200} |
| Maximum parser recursion depth; prevents stack overflow on deep nesting. | |
| constexpr std::int32_t | real::detail::max_lookaround_length {255} |
| Maximum bytes a bounded lookaround sub-pattern may consume (its L_max); bounding it keeps per-position evaluation linear. | |
| constexpr std::size_t | real::detail::max_dfa_states {65536} |
Maximum DFA states (opt-in real::dfa). | |
Resource limits guarding against pattern-driven resource exhaustion.
Bounded-repeat unrolling, parser nesting, capture-group count, program size, lookaround width and DFA state count are each capped. Values are conservative for portability while still admitting practical patterns (e.g. a{1000}).