|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
Storage policy backing real::regex: heap, sized once at run time.
More...
#include <storage.hpp>
Classes | |
| struct | state_type |
| VM scratch state: SBO thread lists, working slots and eps stack. More... | |
Public Types | |
| using | slot_storage = small_vec< std::size_t, 32 > |
| Capture-slot container: SBO, avoiding the heap for typical small group counts. | |
Public Member Functions | |
| constexpr program_view | view () const |
| Returns a non-owning view of the compiled program. | |
| constexpr std::string_view | pattern () const |
| Returns the original pattern text. | |
| constexpr flags | compiled_flags () const |
| Returns the effective flags (constructor flags merged with (?ims)). | |
Static Public Member Functions | |
| static constexpr dynamic_storage | compile (std::string_view pattern, flags compile_flags) |
Parses and compiles pattern with flags compile_flags. | |
Public Attributes | |
| std::string | pattern_text |
| The original pattern text. | |
| dynamic_program | program |
| The compiled program. | |
| flags | effective_flags {flags::none} |
| Constructor flags merged with any (?ims). | |
| detail::regex_immutables | immut_ {} |
Per-regex lazy-DFA/one-pass cache, built once (thread-safe) and shared by every search on this regex — not rebuilt per find_iter. mutable: a const regex fills it on first routed search. Copy/move reset it (a copied regex rebuilds its own; see detail::regex_immutables). | |
Static Public Attributes | |
| static constexpr bool | is_compile_time {} |
| Selects the runtime constructor. | |
Storage policy backing real::regex: heap, sized once at run time.
Match scratch uses small-buffer-optimized containers, so the common small-group match runs without a heap allocation.
Definition at line 702 of file storage.hpp.
| using real::detail::dynamic_storage::slot_storage = small_vec<std::size_t, 32> |
Capture-slot container: SBO, avoiding the heap for typical small group counts.
Definition at line 708 of file storage.hpp.
|
inlinestaticconstexpr |
Parses and compiles pattern with flags compile_flags.
| [in] | pattern | The pattern text. |
| [in] | compile_flags | The requested flags (merged with a leading (?ims)). |
| real::regex_error | on an invalid or over-limit pattern. |
Definition at line 745 of file storage.hpp.
|
inlineconstexpr |
Returns the effective flags (constructor flags merged with (?ims)).
Definition at line 776 of file storage.hpp.
|
inlineconstexpr |
Returns the original pattern text.
Definition at line 768 of file storage.hpp.
|
inlineconstexpr |
Returns a non-owning view of the compiled program.
Definition at line 758 of file storage.hpp.
| flags real::detail::dynamic_storage::effective_flags {flags::none} |
Constructor flags merged with any (?ims).
Definition at line 731 of file storage.hpp.
|
mutable |
Per-regex lazy-DFA/one-pass cache, built once (thread-safe) and shared by every search on this regex — not rebuilt per find_iter. mutable: a const regex fills it on first routed search. Copy/move reset it (a copied regex rebuilds its own; see detail::regex_immutables).
Definition at line 736 of file storage.hpp.
|
staticconstexpr |
Selects the runtime constructor.
Definition at line 704 of file storage.hpp.
| std::string real::detail::dynamic_storage::pattern_text |
The original pattern text.
Definition at line 729 of file storage.hpp.
| dynamic_program real::detail::dynamic_storage::program |
The compiled program.
Definition at line 730 of file storage.hpp.