REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
real::detail::dynamic_storage Struct Reference

Storage policy backing real::regex: heap, sized once at run time. More...

#include <storage.hpp>

Collaboration diagram for real::detail::dynamic_storage:
[legend]

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.
 

Detailed Description

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.

Member Typedef Documentation

◆ slot_storage

Capture-slot container: SBO, avoiding the heap for typical small group counts.

Definition at line 708 of file storage.hpp.

Member Function Documentation

◆ compile()

static constexpr dynamic_storage real::detail::dynamic_storage::compile ( std::string_view  pattern,
flags  compile_flags 
)
inlinestaticconstexpr

Parses and compiles pattern with flags compile_flags.

Parameters
[in]patternThe pattern text.
[in]compile_flagsThe requested flags (merged with a leading (?ims)).
Returns
A populated storage object.
Exceptions
real::regex_erroron an invalid or over-limit pattern.

Definition at line 745 of file storage.hpp.

◆ compiled_flags()

constexpr flags real::detail::dynamic_storage::compiled_flags ( ) const
inlineconstexpr

Returns the effective flags (constructor flags merged with (?ims)).

Definition at line 776 of file storage.hpp.

◆ pattern()

constexpr std::string_view real::detail::dynamic_storage::pattern ( ) const
inlineconstexpr

Returns the original pattern text.

Definition at line 768 of file storage.hpp.

◆ view()

constexpr program_view real::detail::dynamic_storage::view ( ) const
inlineconstexpr

Returns a non-owning view of the compiled program.

Definition at line 758 of file storage.hpp.

Member Data Documentation

◆ effective_flags

flags real::detail::dynamic_storage::effective_flags {flags::none}

Constructor flags merged with any (?ims).

Definition at line 731 of file storage.hpp.

◆ immut_

detail::regex_immutables real::detail::dynamic_storage::immut_ {}
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.

◆ is_compile_time

constexpr bool real::detail::dynamic_storage::is_compile_time {}
staticconstexpr

Selects the runtime constructor.

Definition at line 704 of file storage.hpp.

◆ pattern_text

std::string real::detail::dynamic_storage::pattern_text

The original pattern text.

Definition at line 729 of file storage.hpp.

◆ program

dynamic_program real::detail::dynamic_storage::program

The compiled program.

Definition at line 730 of file storage.hpp.


The documentation for this struct was generated from the following file: