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

The resource limits of one expression, for a service that compiles patterns it did not write: each may be lowered for the patterns of one call, none raised past this build's ceiling (REAL_MAX_*), and the defaults are those ceilings. A pattern past one is refused with error_kind::limit. More...

#include <program.hpp>

Public Member Functions

constexpr limits () noexcept
 This build's limits: its ceilings, and the default DFA memory.
 

Public Attributes

std::size_t program_size
 NFA instructions.
 
std::int32_t repeat_count
 A bounded repeat's count (a{n}).
 
std::int32_t group_count
 Capture groups.
 
std::int32_t nesting_depth
 Group nesting.
 
std::int32_t lookaround_length
 Bytes a bounded lookaround may match.
 
std::size_t dfa_memory
 Bytes the lazy DFA may cache per direction (64 MiB by default).
 

Detailed Description

The resource limits of one expression, for a service that compiles patterns it did not write: each may be lowered for the patterns of one call, none raised past this build's ceiling (REAL_MAX_*), and the defaults are those ceilings. A pattern past one is refused with error_kind::limit.

dfa_memory bounds what the search's lazy DFA may cache for this expression, per direction: past it the cache flushes, and a search that keeps flushing finishes on the VM, still linear and still exact. It has no ceiling, and may be raised.


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