REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
regex_set.hpp File Reference

real::regex_set — multi-pattern which-matched set. More...

#include "real/dfa.hpp"
#include "real/real.hpp"
#include <algorithm>
#include <array>
#include <atomic>
#include <functional>
#include <memory>
#include <mutex>
#include <ranges>
#include <cstddef>
#include <initializer_list>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
Include dependency graph for regex_set.hpp:

Classes

class  real::regex_set
 Multi-pattern set: which patterns match the subject at least once. More...
 
struct  real::regex_set::fused_state
 The fused scan's state: the DFA, its subset maps, and what the deferred build counts. More...
 

Namespaces

namespace  real
 REAL's public API: real::regex, real::static_regex, real::flags and the match/iterator types built on them.
 

Detailed Description

real::regex_set — multi-pattern which-matched set.

Which-matched semantics (RE2::Set / rust RegexSet): which members match the subject at least once. Not real::dfa munch (one winner at the cursor).

Two search shapes. When enough patterns are DFA-eligible, a fused unanchored multi-accept DFA (dfa_mode::which_matched) scans once for all of them: built at construction for a large set, or once a mid-sized set has walked enough text to pay for it. Ineligible patterns (lookaround, a wide code-point class such as text-mode \w, …) and small sets walk one pattern at a time through regex::search. The public bitset is always in construction order; fused rule indices are remapped.

Include this header explicitly; real.hpp does not pull it in.