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 <functional>
#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...
 

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, chosen at construction. When enough patterns are DFA-eligible, a fused unanchored multi-accept DFA (dfa_mode::which_matched) scans once for all of them; ineligible patterns (lookaround, Unicode \w/\d/\s, …) and sets below the threshold walk one pattern at a time through regex::search. The public bitset is always in construction order — fused rule indices are remapped through an eligible→original map.

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