REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1
9#ifndef REAL_CONFIG_HPP
10#define REAL_CONFIG_HPP
11
12// Internal — do not include directly.
13// Users: #include <real/real.hpp> (or the documented opt-ins <real/dfa.hpp>, <real/std/regex.hpp>).
14
15#include "real/version.hpp"
16
17#include <cstddef>
18#include <cstdint>
19
20namespace real::detail {
21
29 inline constexpr std::size_t max_program_size {262144};
30
32 inline constexpr std::int32_t max_repeat_count {1000};
33
35 inline constexpr std::int32_t max_group_count {32766};
36
38 inline constexpr std::int32_t max_nesting_depth {200};
39
42 inline constexpr std::int32_t max_lookaround_length {255};
43
47 inline constexpr std::size_t max_dfa_states {65536};
48} // namespace real::detail
49
50#endif // REAL_CONFIG_HPP
constexpr std::size_t max_program_size
Maximum number of NFA instructions in a compiled program.
Definition config.hpp:29
constexpr std::int32_t max_group_count
Maximum capture groups; bounds slot_count = 2 * (groups + 1).
Definition config.hpp:35
constexpr std::int32_t max_lookaround_length
Maximum bytes a bounded lookaround sub-pattern may consume (its L_max). Bounds the per-position looka...
Definition config.hpp:42
constexpr std::size_t max_dfa_states
Maximum DFA states (opt-in real::dfa). Subset construction is 2^NFA in the worst case; this caps it s...
Definition config.hpp:47
constexpr std::int32_t max_repeat_count
Per-quantifier bounded-repeat cap, enforced at parse time.
Definition config.hpp:32
constexpr std::int32_t max_nesting_depth
Maximum parser recursion depth; prevents stack overflow on deep nesting.
Definition config.hpp:38
REAL's version macros and the C++20 language-standard guard.