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

DFA construction internals: subset construction over a flattened NFA. Not a stable API. More...

Namespaces

namespace  inner_literal_detail
 Helpers for real::detail::extract_inner_literal; not part of any interface.
 
namespace  prof
 Opt-in route/work counters, compiled out unless the profiling build flag is set.
 

Classes

class  ac_automaton
 Dense Aho-Corasick automaton for a fixed_alternation program's branch set. More...
 
struct  ac_node
 One Aho-Corasick trie/DFA node: a dense 256-entry goto row plus fail/output links. More...
 
struct  ast
 A parsed pattern: the node pool plus side tables. More...
 
struct  ast_node
 One AST node. Active fields depend on kind (noted per field). More...
 
struct  basic_capture_pool
 Copy-on-write pool of capture blocks (COW) — the one capture-slot mechanism for both storages. More...
 
struct  basic_pike_state
 Reusable VM scratch state. More...
 
struct  basic_thread_list
 One priority-ordered list of NFA threads (leftmost-greedy semantics). More...
 
struct  binprop_alias_entry
 A loose-normalized (lowercase, no _/-/space) binary-property name and its value. More...
 
struct  borrowed_names
 The compile-time policy's name owner: there is nothing to own. More...
 
struct  byte_program
 A byte-level program derived from a Pike program for the DFA passes: every klass_cp construct is expanded into UTF-8 byte-range split/klass chains, so the whole thing is byte-transition-only and a forward DFA can represent it. The Pike program itself is untouched (byte-identity); this is a private recognition view the DFAs own. eligible is false when an op no DFA can represent (a position assertion or a lookaround) is present — the caller then keeps the Pike VM. More...
 
struct  char_class
 A set of byte values (0–255) as a 256-bit bitmap. More...
 
struct  class_def
 A parsed character class: its ASCII bitmap plus any non-ASCII code-point ranges. Bundling the two (rather than parallel side tables) makes them impossible to desynchronize. More...
 
struct  class_ref
 A typed reference into one of the three possessive-loop-body opcodes' own operand spaces. More...
 
struct  code_range
 An inclusive code-point range [lo, hi]. Shared by character classes (ast.hpp) and the generated Unicode property / fold tables; lives here so those low-level headers need not pull in the parser. More...
 
class  compiler
 Compiles an ast into a dynamic_program (NFA bytecode). More...
 
struct  cp_class
 A match-time code-point class for the klass_cp opcode: an ASCII bitmap for code points < 0x80 plus a slice of sorted non-ASCII ranges (indexing the program's flat cp_ranges buffer). It is the already-effective set (any \W/[^…] negation is materialised at compile time). Unlike the byte-NFA klass, the ranges are kept and binary-searched at match time — O(log ranges) per position, independent of the range count. More...
 
struct  cp_hi_table
 Unicode-property sparse 2-stage membership for code points > U+07FF (page = cp>>8 → 256-bit block). Thread-local heap cache only — basic_pike_state's size is unchanged, which is what keeps the ASCII class loop clear of it. More...
 
struct  decoded_codepoint
 The result of a strict UTF-8 decode: the code point, its byte length, and validity. More...
 
struct  dfa_byte_classes
 Computes byte-equivalence classes: two bytes are equivalent iff they satisfy the same consuming predicates (every klass test and every byte literal). Reduces the alphabet so the DFA is built over classes, not over 256 bytes. More...
 
struct  dfa_instr
 A flattened NFA instruction (global PCs, global class index). More...
 
struct  dfa_nfa
 The union NFA over all the patterns, flattened into one address space. More...
 
struct  dfa_tables
 The baked DFA tables produced by dfa_build. More...
 
struct  digit_escape_result
 Result of decode_digit_escape. More...
 
struct  dynamic_program
 This view is COPIED ON EVERY find_iter AND count_matches CALL, so its size is a per-call cost and growing it is a decision, not a detail. More...
 
struct  dynamic_storage
 Storage policy backing real::regex: heap, sized once at run time. More...
 
struct  eps_entry
 One frame on the epsilon-closure DFS stack (COW): a program counter to explore, plus the capture block the branch carries. The block travels with the branch — a split shares it and a save copies it on write — so there is no slot-restore entry and no shared working array. More...
 
struct  fold_entry
 A code point and the other members of its case-fold orbit (up to 3; orbits <= 4). More...
 
struct  gc_alias_entry
 A loose-normalized (lowercase, no _/-/space) General_Category name and its property. More...
 
struct  inner_literal
 The best required inner literal of a pattern (the memmem candidate). More...
 
struct  instr
 One NFA instruction. Field meaning depends on op. More...
 
struct  lazy_byte_alphabet
 Byte-class alphabet over a Pike program: bytes that satisfy exactly the same byte/klass predicates share a class, so the DFA transitions over classes instead of 256 raw bytes. The same reduction real::dfa uses, computed here from the Pike program's own ops. More...
 
class  lazy_dfa
 A lazy priority-preserving forward DFA over a Pike program (the kFirstMatch forward pass). More...
 
struct  lookaround_scratch
 Reusable, isolated scratch for one level of lookaround evaluation (dynamic only). More...
 
struct  lookaround_sub
 A bounded lookaround sub-program, referenced by assert_lookaround's arg16. More...
 
class  name_context_box
 A uniquely-owning, deep-copying box for owned_name_context that survives constant evaluation. More...
 
struct  named_group
 A named capture group. More...
 
class  onepass
 Builds and holds the one-pass classification (and table, when eligible) of a byte-program. More...
 
struct  onepass_edge
 One outgoing edge of a one-pass node, for a byte-class: the next node and the capture slots that take the current position as the byte is consumed. Two epsilon paths reaching the same class with a different edge is the one-pass conflict — the pattern is then rejected. More...
 
struct  onepass_node
 A one-pass node: one edge per byte-class, plus whether the run may end here and with what captures. Nodes are the points the automaton can be in between byte reads. More...
 
struct  owned_name_context
 The name-resolution context a result owns when it must outlive the regex it came from. More...
 
class  parser
 Recursive-descent parser: a pattern string in, an ast out. More...
 
struct  pattern_hints
 Search-acceleration hints extracted from a compiled program. More...
 
struct  pc_set_cache
 A tiny open-chaining hash set of interned PC-set state ids, keyed by their pc-set. Replaces a std::unordered_map so the DFAs stay literal types (a constexpr real::regex embeds one in its scratch state); all-std::vector storage is constexpr-constructible in C++20. Maps a candidate pc-set to its existing state id, or not_found, comparing against the owner's pcs. More...
 
struct  pike_state
 VM scratch state for the dynamic storage mode, plus the lookaround sub-scratch. More...
 
class  pike_vm
 The Pike VM, generic over the scratch-state container policy. More...
 
struct  program_view
 A non-owning view of everything the engine needs to run one compiled pattern: the borrowed spans, the slot count, the mode flags, the search hints, and the per-regex cache. Both storages hand one of these to the VM, which is why the engine is storage-agnostic. Valid only as long as the program it views is alive. More...
 
struct  range_intern_table
 Intern table for UTF-8 edge byte ranges, keyed by the exact 16-bit (lo << 8) | hi. More...
 
struct  regex_immutables
 The per-regex immutable cache the router shares across every find_iter on a regex: the byte program (klass_cp expanded to the deterministic trie) and, when the pattern is one-pass, the extractor table. More...
 
class  reverse_dfa
 The start-finder companion to lazy_dfa. Given a match end, it finds the leftmost start (the design guide §7.6 contract). It runs the inverted program — the forward program's edges transposed, its consuming bytes kept — as a cached DFA over the text scanned right-to-left from the end, recording an accept each time it reaches the original start (reverse-kLongest: the furthest-back accept is the start). It needs no priority ordering — its states are plain unordered (sorted) PC sets and its rule is longest — so it is simpler than the forward pass. Dynamic only. More...
 
struct  script_alias_entry
 A loose-normalized (lowercase, no _/-/space) Script name and its value. More...
 
struct  script_range
 One code-point range and the Script it belongs to (the table partitions the code space). More...
 
struct  shape_close
 The shape_lead counterpart: optional trail \b/\B at from, then exactly save 1, match at the very end of code. from (the body's own end) is the caller's to supply – only its shape-specific body walk knows where that is. More...
 
struct  shape_lead
 detect_fast_shapes's outer envelope: save 0, optional lead \b/\B. No-ops safely on a shape with no \b/\B support (e.g. a literal byte right after save 0). More...
 
struct  shared_dfa_slot
 Process-wide shared DFA transition caches keyed by regex_immutables*. More...
 
class  small_vec
 Small-buffer-optimized vector for the dynamic hot paths. More...
 
struct  static_il_guard_fields
 IL: the per-haystack guard fields the inner-literal route needs, for a compile-time storage. More...
 
struct  static_no_il_guard_fields
 No IL fields: the route is not compiled for this pattern. More...
 
struct  static_pike_scratch
 Compile-time-storage VM scratch, all fixed-capacity (zero heap), keyed on DIMENSIONS ONLY. More...
 
struct  static_storage
 Storage policy backing real::static_regex: compile-time, stateless. More...
 
class  static_vec
 Fixed-capacity vector backed by an inline array (no heap). More...
 
struct  utf8_byte_range
 One byte-range step [lo, hi] of a UTF-8 sequence produced by the code-point-range algorithm. More...
 
struct  utf8_byte_seq
 A canonical UTF-8 byte-range sequence (1–4 steps) covering part of a code-point range. More...
 
struct  utf8_second_byte_bounds
 [lo, hi] bounds for the FIRST continuation byte of a multi-byte UTF-8 sequence, given its lead byte — one entry of utf8_second_byte_bounds_table. More...
 
struct  utf8_trie
 A minimal deterministic UTF-8 trie for a code-point class. root == -1 means the class is empty. More...
 
struct  utf8_trie_node
 One node of a minimal deterministic UTF-8 trie for a code-point class. Its transitions are byte ranges that are pairwise disjoint, so at most one edge matches any byte — that determinism is what makes the byte-program one-pass-friendly. A target >= 0 is a node id; -1 is accept (a code point ends here — the run continues at the construct's successor). More...
 

Typedefs

using dfa_set = std::vector< std::uint64_t >
 A set of NFA PCs as a bitset (one per DFA state during construction).
 
using capture_pool = basic_capture_pool< std::vector< std::size_t >, std::vector< std::int32_t >, std::vector< std::uint32_t > >
 The dynamic-storage capture pool: heap vectors, grows on demand.
 
using thread_list = basic_thread_list< std::vector< std::int32_t >, std::vector< std::size_t >, std::vector< std::uint64_t > >
 Thread list specialized on std::vector (the dynamic storage mode).
 

Enumerations

enum class  ac_verdict : std::uint8_t { not_consulted = 0 , cascade , automaton }
 What the AC density gate last decided; ac_density_last_verdict() below reports it. More...
 
enum class  opcode : std::uint8_t {
  byte , klass , klass_cp , split ,
  jump , save , assert_position , match ,
  assert_lookaround , byte_loop_possessive , klass_loop_possessive , klass_cp_loop_possessive
}
 NFA instruction opcodes executed by the Pike VM. More...
 
enum class  assert_kind : std::uint8_t {
  text_start , text_end , text_end_or_final_newline , line_start ,
  line_end , word_boundary , not_word_boundary , word_start ,
  word_end
}
 Kind of zero-width assertion carried in assert_position's arg8. More...
 
enum class  look_dir : std::uint8_t { ahead , behind }
 Direction of a lookaround sub-pattern. More...
 
enum class  class_kind : std::uint8_t { none , byte , klass , klass_cp }
 Which operand space a class_ref indexes: byte_loop_possessive's own literal byte value (not a table at all), classes[] (klass_loop_possessive), or cp_classes[] (klass_cp_loop_possessive). none = unarmed.
 
enum class  run_mode : std::uint8_t { prefix , full , search }
 How a VM run is anchored. More...
 
enum class  node_kind : std::uint8_t {
  empty , byte , klass , any ,
  concat , repeat , alternation , group ,
  anchor , lookaround
}
 Kind of an AST node; selects which fields of real::detail::ast_node are meaningful. More...
 
enum class  anchor_kind : std::uint8_t {
  caret , dollar , text_start , text_end ,
  word_boundary , not_word_boundary , word_start , word_end
}
 The specific zero-width assertion of an anchor node (see node_kind::anchor). More...
 
enum class  digit_escape_kind : std::uint8_t { octal , group_ref , octal_overflow }
 What a \<digit> escape decoded to (see decode_digit_escape()). More...
 
enum class  binprop : std::uint8_t {
  ASCII_Hex_Digit , Alphabetic , Bidi_Control , Case_Ignorable ,
  Cased , Changes_When_Casefolded , Changes_When_Casemapped , Changes_When_Lowercased ,
  Changes_When_Titlecased , Changes_When_Uppercased , Dash , Default_Ignorable_Code_Point ,
  Deprecated , Diacritic , Emoji , Emoji_Component ,
  Emoji_Modifier , Emoji_Modifier_Base , Emoji_Presentation , Extended_Pictographic ,
  Extender , Grapheme_Base , Grapheme_Extend , Grapheme_Link ,
  Hex_Digit , Hyphen , IDS_Binary_Operator , IDS_Trinary_Operator ,
  IDS_Unary_Operator , ID_Compat_Math_Continue , ID_Compat_Math_Start , ID_Continue ,
  ID_Start , Ideographic , Join_Control , Logical_Order_Exception ,
  Lowercase , Math , Modifier_Combining_Mark , Noncharacter_Code_Point ,
  Other_Alphabetic , Other_Default_Ignorable_Code_Point , Other_Grapheme_Extend , Other_ID_Continue ,
  Other_ID_Start , Other_Lowercase , Other_Math , Other_Uppercase ,
  Pattern_Syntax , Pattern_White_Space , Prepended_Concatenation_Mark , Quotation_Mark ,
  Radical , Regional_Indicator , Sentence_Terminal , Soft_Dotted ,
  Terminal_Punctuation , Unified_Ideograph , Uppercase , Variation_Selector ,
  White_Space , XID_Continue , XID_Start , count
}
 A Unicode binary property: the 63 standard yes/no properties this build knows.
 
enum class  gc_property : std::uint8_t {
  Lu , Ll , Lt , Lm ,
  Lo , Mn , Mc , Me ,
  Nd , Nl , No , Pc ,
  Pd , Ps , Pe , Pi ,
  Pf , Po , Sm , Sc ,
  Sk , So , Zs , Zl ,
  Zp , Cc , Cf , Co ,
  Cn , L , M , N ,
  P , S , Z , C ,
  count
}
 A Unicode General_Category property: the 29 assignable categories then the 7 groups.
 
enum class  script : std::uint8_t {
  Unknown , Adlam , Ahom , Anatolian_Hieroglyphs ,
  Arabic , Armenian , Avestan , Balinese ,
  Bamum , Bassa_Vah , Batak , Bengali ,
  Bhaiksuki , Bopomofo , Brahmi , Braille ,
  Buginese , Buhid , Canadian_Aboriginal , Carian ,
  Caucasian_Albanian , Chakma , Cham , Cherokee ,
  Chorasmian , Common , Coptic , Cuneiform ,
  Cypriot , Cypro_Minoan , Cyrillic , Deseret ,
  Devanagari , Dives_Akuru , Dogra , Duployan ,
  Egyptian_Hieroglyphs , Elbasan , Elymaic , Ethiopic ,
  Garay , Georgian , Glagolitic , Gothic ,
  Grantha , Greek , Gujarati , Gunjala_Gondi ,
  Gurmukhi , Gurung_Khema , Han , Hangul ,
  Hanifi_Rohingya , Hanunoo , Hatran , Hebrew ,
  Hiragana , Imperial_Aramaic , Inherited , Inscriptional_Pahlavi ,
  Inscriptional_Parthian , Javanese , Kaithi , Kannada ,
  Katakana , Kawi , Kayah_Li , Kharoshthi ,
  Khitan_Small_Script , Khmer , Khojki , Khudawadi ,
  Kirat_Rai , Lao , Latin , Lepcha ,
  Limbu , Linear_A , Linear_B , Lisu ,
  Lycian , Lydian , Mahajani , Makasar ,
  Malayalam , Mandaic , Manichaean , Marchen ,
  Masaram_Gondi , Medefaidrin , Meetei_Mayek , Mende_Kikakui ,
  Meroitic_Cursive , Meroitic_Hieroglyphs , Miao , Modi ,
  Mongolian , Mro , Multani , Myanmar ,
  Nabataean , Nag_Mundari , Nandinagari , New_Tai_Lue ,
  Newa , Nko , Nushu , Nyiakeng_Puachue_Hmong ,
  Ogham , Ol_Chiki , Ol_Onal , Old_Hungarian ,
  Old_Italic , Old_North_Arabian , Old_Permic , Old_Persian ,
  Old_Sogdian , Old_South_Arabian , Old_Turkic , Old_Uyghur ,
  Oriya , Osage , Osmanya , Pahawh_Hmong ,
  Palmyrene , Pau_Cin_Hau , Phags_Pa , Phoenician ,
  Psalter_Pahlavi , Rejang , Runic , Samaritan ,
  Saurashtra , Sharada , Shavian , Siddham ,
  SignWriting , Sinhala , Sogdian , Sora_Sompeng ,
  Soyombo , Sundanese , Sunuwar , Syloti_Nagri ,
  Syriac , Tagalog , Tagbanwa , Tai_Le ,
  Tai_Tham , Tai_Viet , Takri , Tamil ,
  Tangsa , Tangut , Telugu , Thaana ,
  Thai , Tibetan , Tifinagh , Tirhuta ,
  Todhri , Toto , Tulu_Tigalari , Ugaritic ,
  Vai , Vithkuqi , Wancho , Warang_Citi ,
  Yezidi , Yi , Zanabazar_Square , count
}
 A Unicode Script value; Unknown (0) is every code point no script assigns.
 

Functions

bool & lazy_dfa_route_disabled ()
 Test seam: force the matcher off the lazy-DFA route onto the pure Pike VM, so a differential can assert that routed and unrouted searches give identical results within one binary. Not for production use — the routing is transparent by contract, and this only exists to prove it.
 
bool & inner_literal_route_disabled ()
 Test seam: force the matcher off the inner-literal search route onto the core search, so a differential can assert routed and unrouted searches agree. Not for production use — the route is transparent by contract (its reverse bound never advances mid-search, so it cannot miss a leftmost match), and this only exists to prove it.
 
bool & rare_disc_route_disabled ()
 Test seam: force off the rare-discriminant prefilter (https?:// memchr-: route) onto prefix/first-byte search, so a differential can assert routed and unrouted agree.
 
bool & inner_literal_guard_disabled ()
 Test seam: force the inner-literal small-haystack guard off, so the route fires on any size. In production the guard uses a cold floor (regex_immutables::il_min_haystack) on the first candidate-scan and il_warm_floor thereafter (shared reverse DFA in shared_dfa_slot). Correctness suites use tiny inputs, so they set this to exercise the route rather than the core fallback. Not for production use.
 
bool & trailing_la_route_disabled ()
 Test seam: force the matcher off the trailing-lookaround class+ route onto the pure Pike VM, so a differential can assert routed and unrouted searches agree. Not for production use — the route is transparent by contract (same leftmost-first spans as the general loop on the eligible shape).
 
bool & fixed_shape_pair_route_disabled ()
 Test seam: force the matcher off the heterogeneous fixed-shape pair-filter route onto the ordinary run_fixed_shape walk, so a differential can assert routed and unrouted agree. The route is transparent by contract (it only filters candidates; the same match_fixed_body_wb verify decides every one of them), and this seam is what proves it. Not for production use.
 
bool & fixed_shape_route_disabled ()
 Test seam: force the matcher off the fixed-shape walk (run_fixed_shape) onto the general Pike loop, so a differential can assert routed and unrouted agree.
 
bool & class_fastpath_disabled ()
 Test/profile seam: skip dedicated class-scan fast paths (byte class-loop, cp-class-loop, and codepoint_class / negated-class ./[^,]+) so a pattern that would take them falls through to lazy-DFA / general (dispatch-optimality audit; matrix4d class-scan rows). Not for production — same contract as the other route-disabled seams.
 
bool & possessive_fastpath_disabled ()
 Test/profile seam : force the matcher off the possessive-loop fast paths (bare/suffixed/delimited X*+/X++) onto the general VM, so a differential can assert route-auto and forced-general agree on every input — the route-agreement pattern applied to the new recognizers. Not for production use — same contract as the other route-disabled seams.
 
bool & aho_corasick_route_disabled ()
 Test seam : force the matcher off the Aho-Corasick multi-literal route (past the branch-count threshold) onto the existing pattern_hints::fixed_alternation run_alternation path, so a differential can assert routed and unrouted searches agree. Not for production use — same contract as the other route-disabled seams.
 
bool & ac_density_gate_disabled ()
 Test seam : take the Aho-Corasick DENSITY gate out, so the route is chosen on branch count alone — the behaviour that shipped before the gate existed.
 
bool & il_density_last_abandoned ()
 Test observability : whether the inner-literal density gate last abandoned the route.
 
ac_verdictac_density_last_verdict ()
 Test observability : the AC density gate's most recent verdict.
 
constexpr utf8_trie build_utf8_trie (const cp_class &cc, std::span< const code_range > cp_ranges)
 Builds the minimal deterministic trie recognising a code-point class's UTF-8 byte sequences.
 
constexpr std::size_t utf8_trie_emit_size (const utf8_trie &trie)
 The instruction count emit_utf8_trie writes: an empty class is one dead klass; otherwise each node is a split-guarded chain of k byte ranges (3k - 1 instructions).
 
constexpr void emit_utf8_trie (byte_program &bp, const utf8_trie &trie, std::int32_t after, range_intern_table &seen)
 Emits trie into bp as a deterministic split/klass/jump fragment, interning each edge's byte range through seen.
 
constexpr byte_program build_byte_program (const program_view &prog, bool keep_assertions=false, std::size_t max_size=max_byte_program_size)
 Builds the byte-level DFA program for prog (see byte_program). A klass_cp at P (a four- instruction construct: the op plus three utf8_cont continuation slots) is replaced by the deterministic UTF-8 trie recognising its code-point class (build_utf8_trie), converging on the mapped P+4; every other op is copied with its branch targets remapped. Two passes: the first builds each trie and sizes it to form the old→new pc map, the second emits. The first pass also enforces max_size (see max_byte_program_size) as it accumulates cur, so a large repeated class declines before building any trie past the one that crosses the cap.
 
constexpr lazy_byte_alphabet compute_lazy_alphabet (std::span< const instr > code, std::span< const char_class > classes)
 Partition 0..255 by the program's consuming predicates (every klass test, every byte literal). Bytes with an identical signature collapse to one class.
 
void erase_shared_dfas (const regex_immutables *immut)
 Retire this regex's slot (called from ~regex_immutables). Concurrent scans that still hold a shared_ptr via TLS keep the slot object alive until they release; clearing shared_dfa_slot::owner is what makes their cached copy stop matching, so a new regex landing on this address can never be served the retired slot.
 
std::mutex & immut_build_mu (const regex_immutables *immut)
 Striped rebuild lock for pike_vm::ensure_immutables (not on regex_immutables — layout isolation). Distinct from shared_dfa_map_mu / slot.mu so reset_shared_dfas cannot self-deadlock. Different immutables rarely share a stripe.
 
std::mutex & shared_dfa_map_mu ()
 The mutex guarding insert/erase on the process-wide shared_dfa_slot map.
 
std::unordered_map< const regex_immutables *, std::shared_ptr< shared_dfa_slot > > & shared_dfa_map ()
 Process-wide map. Intentionally never destroyed (leaky singleton): a static map would tear down at exit while other statics' ~regex_immutables still call erase_shared_dfas. The OS reclaims the map at process exit — not an accumulating leak; entries are erased on dtor.
 
shared_dfa_slotshared_dfa_for (regex_immutables *immut)
 Resolve the process-wide DFA slot for this regex (map insert under shared_dfa_map_mu).
 
void reset_shared_dfas (regex_immutables *immut)
 Drop any DFAs cached for immut (caller holds nothing; takes map + slot locks). Invoked from pike_vm's ensure_immutables rebuild so a reused immutables address — or the same address under a new program — cannot keep a previous pattern's DFAs.
 
std::size_t shared_dfa_map_size_for_test ()
 Test/audit: number of live shared-DFA map entries (process-wide). Not for production.
 
constexpr std::size_t encode_utf8_bytes (std::uint32_t cp, std::uint8_t(&out)[4])
 Encodes cp to its UTF-8 bytes in out, returning the length (1–4).
 
constexpr void utf8_push_range (std::uint32_t start, std::uint32_t end, std::vector< utf8_byte_seq > &out)
 Appends to out the byte-range sequences recognising exactly the UTF-8 encodings of [start, end] (RE2 / rust regex-syntax Utf8Sequences).
 
constexpr std::vector< utf8_byte_sequtf8_range_sequences (std::uint32_t lo, std::uint32_t hi)
 Canonical UTF-8 byte-range sequences for the code-point range [lo, hi], excluding the surrogate block [U+D800, U+DFFF] (so a negated class never matches a surrogate encoding).
 
constexpr void fold_ascii_case (char_class &klass)
 Closes klass under ASCII case folding.
 
constexpr bool is_ascii_word_byte (std::uint8_t byte)
 Reports whether byte is an ASCII "word" byte ([0-9A-Za-z_]).
 
constexpr char_class digit_set ()
 The ASCII digit set behind \d (Python re.ASCII semantics).
 
constexpr char_class word_set ()
 The ASCII word set behind \w.
 
constexpr char_class space_set ()
 The ASCII whitespace set behind \s under flags::ascii / flags::bytes.
 
constexpr char_class utf8_cont_set ()
 The UTF-8 continuation-byte set 10xxxxxx.
 
constexpr char_class utf8_lead2_set ()
 The lead-byte set of a 2-byte UTF-8 sequence.
 
constexpr char_class utf8_lead3_set ()
 The lead-byte set of a 3-byte UTF-8 sequence.
 
constexpr char_class utf8_lead4_set ()
 The lead-byte set of a 4-byte UTF-8 sequence.
 
constexpr std::array< utf8_second_byte_bounds, 256 > make_utf8_second_byte_bounds_table ()
 Builds utf8_second_byte_bounds_table (a plain function so the 256-entry table is four lines of exceptions, not a 256-line literal).
 
constexpr std::uint64_t fingerprint_cp_class_content (const char_class &ascii, const code_range *ranges, std::uint32_t range_count)
 FNV-1a 64-bit content fingerprint of an ASCII bitmap + a contiguous range span. Used once at intern_cp_class (compile time / first intern); match time only reads cp_class::fingerprint. Constexpr so static_regex stays happy.
 
dfa_nfa dfa_flatten (std::span< const program_view > programs)
 Flattens programs into one union NFA, auditing DFA-ability.
 
void dfa_set_bit (dfa_set &s, std::size_t i)
 Set bit i in s. Indices past the set's size are ignored (it is sized to fit).
 
bool dfa_test_bit (const dfa_set &s, std::size_t i)
 Whether bit i is set in s.
 
dfa_set dfa_closure (const dfa_nfa &nfa, const std::vector< std::uint32_t > &seeds, bool at_start)
 The epsilon-closure of seeds (a PC list), as a canonical PC bitset. at_start follows a text_start assertion (true only at offset 0).
 
dfa_set dfa_move (const dfa_nfa &nfa, const dfa_set &set, std::uint8_t rep)
 The move on the byte rep: ε-closure of the successors of every PC in set that consumes rep.
 
std::int64_t dfa_accept_of (const dfa_nfa &nfa, const dfa_set &set)
 The accepting rule of a state set: the SMALLEST rule index among its match PCs (the order tie-break), or -1 if none accept.
 
std::size_t dfa_mask_words (std::size_t rule_count) noexcept
 Word count for a which-matched bitset over rule_count rules.
 
std::vector< std::uint64_t > dfa_accept_mask_of (const dfa_nfa &nfa, const dfa_set &set)
 Bitset of ALL accepting rule indices in set (which-matched; word-packed). Empty vector when no rule accepts (or rule_count == 0).
 
std::int64_t dfa_mask_min_rule (const std::vector< std::uint64_t > &mask)
 Smallest rule index set in mask, or -1 if empty (munch tag derivation).
 
dfa_byte_classes dfa_compute_classes (const dfa_nfa &nfa)
 Partition 0..255 by the union NFA's consuming predicates.
 
dfa_tables dfa_build (std::span< const program_view > programs, std::size_t state_cap=max_dfa_states, bool unanchored=false)
 Subset construction over byte-classes, then Moore minimization.
 
std::optional< ac_automatonbuild_ac_automaton (std::span< const instr > code, std::span< const char_class > classes, std::size_t body_pc)
 Builds an ac_automaton from a fixed_alternation-shaped program's branch set.
 
constexpr bool word_before (std::string_view text, std::size_t pos, bool ascii_word)
 Word-ness of the code point ending at pos — the left side of a boundary. False at the text start or on a malformed sequence; ASCII / bytes / re.A (ascii_word) stay byte-level.
 
constexpr bool word_after (std::string_view text, std::size_t pos, bool ascii_word)
 Word-ness of the code point starting at pos — the right side of a boundary. False at the text end or on a malformed sequence; ASCII / bytes / re.A stay byte-level.
 
constexpr bool assertion_holds (assert_kind kind, std::string_view text, std::size_t pos, bool ascii_word)
 Evaluates a zero-width assertion at pos in text.
 
std::uint64_t & prefilter_work_units () noexcept
 Prefilter work counter for the O(n) vs O(n²) smoke test. Always declared (clang-tidy / tests see the symbol). Billing is a no-op unless REAL_TEST_INSTRUMENT is defined on the test binary — wheel/prod pay nothing.
 
void prefilter_note_scan (std::size_t n) noexcept
 Bill n scanned bytes to prefilter_work_units. A no-op unless the test binary defines REAL_TEST_INSTRUMENT.
 
constexpr bool is_word_boundary_kind (assert_kind kind) noexcept
 True if kind is \b or \B (the only position asserts a fast path wraps).
 
constexpr std::uint8_t wb_hint_of (assert_kind kind) noexcept
 Encodes kind as a wb_lead/wb_trail hint value (1 = \b, 2 = \B); 0 if not a word boundary.
 
constexpr bool peel_optional_wb (std::span< const instr > code, std::size_t &p, std::uint8_t &hint) noexcept
 Peel an optional \b/\B assertion at p.
 
constexpr shape_lead parse_shape_lead (std::span< const instr > code) noexcept
 Peels a fixed shape's save 0 and its optional lead \b/\B.
 
constexpr shape_close parse_shape_close (std::span< const instr > code, std::size_t from) noexcept
 Peels a fixed shape's optional trail \b/\B, then its save 1 and match.
 
constexpr bool is_full_ascii_word_class (const char_class &cls) noexcept
 True if cls is exactly the ASCII word set [0-9A-Za-z_] (\w under bytes/re.A).
 
constexpr bool is_ascii_word_subset_class (const char_class &cls) noexcept
 True if every member of cls is an ASCII word byte (subset of \w under bytes/re.A).
 
constexpr bool is_full_unicode_word_cp_class (const cp_class &cc, std::span< const code_range > all_ranges) noexcept
 True if cc is exactly the canonical Unicode \w class (not a user superset).
 
constexpr bool wb_redundant_for_full_word (std::uint8_t lead, std::uint8_t trail) noexcept
 The DROP rule: \b next to a full-\w MAXIMAL run is redundant (\B never is). Only sound when the match is a greedy + run: a maximal run of \w can only ever START where the character before it is non-word (or absent) – that IS \b (or the text edge), so checking it again is redundant. A SINGLE code point (no +) has no such guarantee: \b\w may legally start mid-run (any word code point qualifies as a candidate start), so dropping the boundary there is unsound, not just conservative. The caller is responsible for only calling this when lead / trail came from a provably maximal-run shape (see resolve_class_wb_hints's maximal_run).
 
constexpr bool resolve_class_wb_hints (bool full_word, bool word_sub, bool maximal_run, std::uint8_t lead, std::uint8_t trail, std::uint8_t &out_lead, std::uint8_t &out_trail) noexcept
 DROP / WRAP policy for class / cp-class loops under optional \b/\B wraps.
 
constexpr bool word_ranges_cover_interval_from (char32_t lo, char32_t hi, std::size_t &cursor) noexcept
 True if every code point in [lo, hi] is a Unicode word char (word_ranges), resuming the scan at cursor and leaving it past the last range consulted.
 
constexpr bool word_ranges_cover_interval (char32_t lo, char32_t hi) noexcept
 True if every code point in [lo, hi] is a Unicode word char (covered by word_ranges). Standalone form of word_ranges_cover_interval_from.
 
constexpr bool is_unicode_word_subset_cp_class (const cp_class &cc, std::span< const code_range > all_ranges) noexcept
 True if cc is a non-empty subset of Unicode \w (safe for maximal-run + \b wrap).
 
constexpr bool cp_class_may_contain_ascii_byte (const cp_class &cc, std::uint8_t b) noexcept
 safety check: true if the ASCII byte b could be a member of code-point class cc — used only to test whether a single-byte delimiter (a "quoted"-shape prefix or suffix) could hide inside a klass_cp_loop_possessive body, in which case the delimited fast path must decline (see pattern_hints::possessive_prefix). A non-ASCII b (>= 0x80) is conservatively treated as a member (unsafe, declines) — this shape's corpus is single-byte ASCII delimiters (", ;, …), so a multi-byte delimiter simply stays general.
 
constexpr bool is_fixed_alternation (std::span< const instr > code, std::uint8_t *out_wb_lead=nullptr, std::uint8_t *out_wb_trail=nullptr, std::uint8_t *out_body_pc=nullptr, std::int32_t *out_branch_count=nullptr)
 Alternation of straight-line byte/klass branches, optionally wrapped in \b/\B.
 
constexpr void extract_anchoring (std::span< const instr > code, pattern_hints &hints)
 Records start anchoring: the first non-save instruction tells whether every match must begin at position 0 (\A/^ non-multiline) or at a line start.
 
constexpr void extract_prefix (std::span< const instr > code, pattern_hints &hints)
 Collects the required literal prefix and the exact-literal fast-path length.
 
constexpr void compute_first_bytes (std::span< const instr > code, std::span< const char_class > classes, std::span< const cp_class > cp_classes, pattern_hints &hints)
 Computes the possible first-byte set by a DFS over the epsilon closure of pc 0.
 
constexpr std::int32_t fixed_run_width (std::span< const instr > code)
 Total consuming width (in bytes) of a straight-line byte/klass program: save 0, an interleaved byte/klass/save sequence with no nested capturing groups, save 1, match – the same shape detect_fast_shapes's fixed_shape check recognizes, factored out so a SEPARATE complete program (e.g. the inner-literal prefix sub-program, compiled on its own AST) can be measured the same way without re-deriving the walk.
 
constexpr int class_range_count (const char_class &klass, std::uint8_t &lo0, std::uint8_t &hi0, std::uint8_t &lo1, std::uint8_t &hi1)
 Reports klass as up to two contiguous byte ranges.
 
constexpr void detect_fast_shapes (std::span< const instr > code, std::span< const char_class > classes, std::span< const cp_class > cp_classes, std::span< const code_range > cp_ranges, std::int32_t cp_mark_ascii, std::int32_t cp_mark_offset, std::int32_t cp_mark_end, std::span< const lookaround_sub > lookarounds, pattern_hints &hints)
 Detects the whole-pattern fast-path shapes and sets their hint flags: class+, fixed-shape straight runs, a single codepoint class (./negated, optional +), an alternation of straight-line branches, and trailing-lookaround class+.
 
constexpr std::uint16_t byte_frequency (std::uint8_t b)
 Approximate static frequency of a byte in mixed English + source text (occurrences per 10000; higher = more common). No text is ever scanned — this only ranks candidate prefilter bytes against one another. Punctuation like - @ . is far rarer than any letter, digit or space, which is the whole point: a required rare byte makes a far more selective memchr target than a common first-byte class.
 
constexpr void extract_rare_byte (std::span< const instr > code, pattern_hints &hints)
 Finds a required literal byte at a FIXED offset that is statically far rarer than the pattern's first-byte set, and records it (pattern_hints::rare_byte / rare_offset) so the search can memchr that one byte instead of scanning a common first-byte class per byte.
 
constexpr void extract_rare_discriminant (std::span< const instr > code, pattern_hints &hints)
 Arms the rare-discriminant prefilter for shapes like https?://…: fixed prefix (http) + optional mono-byte (s?) + fixed mid with a rare disc (://).
 
constexpr bool capture_free_walk_structural (std::span< const instr > code) noexcept
 The STRUCTURAL half of pattern_hints::capture_free_walksave 0 is the program's first instruction.
 
constexpr pattern_hints analyze_program (std::span< const instr > code, std::span< const char_class > classes, std::span< const cp_class > cp_classes, std::span< const code_range > cp_ranges, std::int32_t cp_mark_ascii, std::int32_t cp_mark_offset, std::int32_t cp_mark_end, std::span< const lookaround_sub > lookarounds={})
 Walks a compiled program once to derive its search hints.
 
constexpr std::size_t find_byte (std::string_view text, std::size_t pos, char byte)
 Index of byte in text[pos..), or real::npos.
 
constexpr std::size_t find_rare_disc_candidate (std::string_view text, std::size_t pos, const pattern_hints &hints, bool *density_abandon=nullptr)
 Next candidate start for the rare-discriminant prefilter, or real::npos.
 
constexpr std::size_t find_literal (std::string_view text, std::size_t pos, std::string_view literal)
 Index of the first occurrence of literal in text[pos..), or real::npos.
 
constexpr std::size_t find_prefix (std::string_view text, std::size_t pos, std::string_view prefix)
 First position >= pos where prefix occurs in text, or npos.
 
std::size_t find_members (std::string_view text, std::size_t pos, const std::array< std::uint8_t, 8 > &mem, std::uint8_t n)
 Least index at or after pos whose byte is one of n members, in ONE pass.
 
constexpr std::size_t find_bytes_cascade (std::string_view text, std::size_t pos, const char *set, std::uint8_t n)
 Index of the first byte in text[pos..) that belongs to a small (2..4) first-byte set.
 
constexpr std::size_t first_high_byte (std::string_view text, std::size_t pos, std::size_t end)
 Index of the first byte >= 0x80 in text[pos, end), or end if the range is pure ASCII.
 
constexpr std::vector< code_rangecoalesce_ranges (std::vector< code_range > ranges)
 Sorts ranges and merges overlapping / adjacent ones into a minimal, sorted set (the same set of code points, the fewest ranges). Used to keep folded / property classes compact.
 
constexpr std::vector< code_rangecomplement_code_ranges (std::vector< code_range > ranges)
 Complements a set of code-point ranges within [0x80, 0x10FFFF] (used by negated classes and by an in-class \W/\D/\S). Input may be unsorted/overlapping; the gaps come sorted.
 
constexpr std::uint32_t single_codepoint_atom (const ast &tree, std::int32_t index)
 The code point a node spells, when it is exactly one non-ASCII literal character.
 
constexpr digit_escape_result decode_digit_escape (std::string_view text, std::size_t first)
 Decodes a \<digit> escape per CPython's exact rule (shared by the pattern parser and the replacement-template parser, so the two never drift).
 
constexpr ast parse (std::string_view pattern, flags initial_flags=flags::none)
 Parses pattern into an ast (convenience over parser).
 
constexpr bool is_any_non_ascii (const std::vector< code_range > &ranges)
 Whether ranges is exactly the whole non-ASCII space [U+0080, U+10FFFF] — the "any non-ASCII code point" shape emitted by compiler::emit_any_codepoint_class.
 
constexpr class_def unicode_casefold (const class_def &in)
 Expands a character class to its Unicode simple case-fold closure (text-mode icase).
 
constexpr bool node_nullable (const ast &tree, std::int32_t idx)
 True if the AST subtree rooted at idx can match the empty string. concat: every child nullable; alternation: some branch nullable; group: its body nullable; repeat: min == 0 or its body nullable; byte/klass/any: never (they always consume exactly one unit). empty/anchor/lookaround are always zero-width by construction — never consuming input as part of the surrounding match — so they are always nullable here; not an approximation for those three, the exact contribution of those node kinds to the enclosing match's width. Used by ast_has_nullable_captured_repeat to decide whether a capturing group's body is nullable.
 
constexpr bool subtree_has_nullable_capturing_group (const ast &tree, std::int32_t idx)
 True if the AST subtree rooted at idx contains a CAPTURING group (group >= 0, i.e. not (?:...)) whose own body is nullable (node_nullable). Descends through every node kind that can nest a group (including a further repeat/lookaround) so a group need not be the direct child of the repeat this is called from — only transitively underneath it. Used only from ast_has_nullable_captured_repeat, on a repeat node's subtree.
 
constexpr bool ast_has_nullable_captured_repeat (const ast &tree, std::int32_t idx)
 True if the AST rooted at idx contains a capturing group with a nullable body, transitively under a quantifier (any quantifier, ? included) — the frontend source of pattern_hints::nullable_captured_repeat (compiler::compile() reads this after analyze_program, the same AST-derived-hint slot as the inner-literal fields below). At each repeat node, checks its whole subtree for a nullable capturing group (subtree_has_nullable_capturing_group) — the group need not be the repeat's immediate child — and independently keeps walking for any other repeat elsewhere in the tree. Safe over-approximation: it does not prove the loop's empty iteration actually surfaces a divergent capture, only that the shape can (e.g. (\b|x)+ counts: \b is nullable by node_nullable, conservatively, same posture as empty_match_possible).
 
constexpr dynamic_program compile (const ast &tree, flags compile_flags)
 Compiles tree to an NFA program (convenience over compiler).
 
constexpr inner_literal extract_inner_literal (const ast &tree)
 Extract the best required inner literal from a pattern's AST (a pure function on the node pool).
 
ast build_prefix_ast (const ast &tree, std::int32_t count, std::int32_t skip=0)
 Build the prefix sub-AST: count top-level concat children starting after skip lead children.
 
std::size_t prefix_reverse_start (const ast &tree, std::int32_t count, flags compile_flags, std::string_view text, std::size_t h, std::size_t min_start)
 The match start for a literal candidate at h: reverse-match the prefix (the first count top-level children) ending at h, bounded below by min_start. count == 0 means the literal is at the head, so the reverse is the identity (the match starts at the candidate). Returns npos when the prefix cannot reach a start (an orphan candidate). Runtime only — the reverse DFA is not constexpr; a static_regex would keep the inner-literal path dynamic.
 
constexpr std::size_t scratch_code_tier (std::size_t code_size)
 Rounds a program length up to the scratch capacity tier it shares with its neighbours.
 
constexpr bool is_binprop_cp (binprop prop, char32_t cp)
 Whether cp has the binary property prop (== the UCD).
 
constexpr binprop resolve_binprop (std::string_view loose)
 Resolve a loose-normalized binary-property name to its value, or count if unknown.
 
constexpr std::size_t find_fold_lower_bound (std::uint32_t cp)
 Index of the first entry whose code point is at or after cp, or unicode_fold_table_size if none is. The seek half of find_fold_index, exposed on its own so a caller holding a RANGE enters the table once and walks forward instead of scanning it whole – see real::detail::unicode_casefold.
 
constexpr std::size_t find_fold_index (std::uint32_t cp)
 Binary-searches unicode_fold_table for cp; returns its index, or unicode_fold_table_size if cp is not cased. An index (not a pointer into the table) keeps this usable in a constant expression on every compiler — g++ rejects a &table[i] != nullptr comparison inside a static_regex. Shared by the parser (is a literal cased?) and the compiler (its fold partners).
 
constexpr bool is_gc_cp (gc_property prop, char32_t cp)
 Whether cp is in the General_Category property prop (== the UCD).
 
constexpr gc_property resolve_gc (std::string_view loose)
 Resolve a loose-normalized General_Category name to its property, or count if unknown.
 
constexpr bool cp_in_ranges (std::span< const code_range > ranges, char32_t cp)
 Binary-searches a sorted, non-overlapping range table for cp. Returns a bool (not a pointer into the table) so it stays constant-evaluable on every compiler.
 
constexpr bool is_word_cp (char32_t cp)
 Whether cp is a Unicode word code point (== re \w).
 
constexpr bool is_digit_cp (char32_t cp)
 Whether cp is a Unicode digit code point (== re \d).
 
constexpr bool is_space_cp (char32_t cp)
 Whether cp is a Unicode whitespace code point (== re \s).
 
constexpr script script_of (char32_t cp)
 The Script of cp (binary search; Unknown when no range covers it).
 
constexpr bool is_script_cp (script sc, char32_t cp)
 Whether cp belongs to Script sc (== the UCD).
 
constexpr script resolve_script (std::string_view loose)
 Resolve a loose-normalized Script name to its value, or count if unknown.
 
constexpr bool is_scx_cp (script sc, char32_t cp)
 Whether cp is in the Script_Extensions of sc (== the UCD). NOT exclusive: a code point can satisfy this for several script values at once.
 
constexpr decoded_codepoint decode_codepoint_strict (std::string_view text, std::size_t pos)
 Strictly decodes and validates the UTF-8 sequence at text[pos].
 
constexpr std::size_t codepoint_advance (std::string_view text, std::size_t pos)
 Number of bytes from pos to the next code-point boundary, for advancing past an empty match during iteration.
 
constexpr std::size_t codepoint_retreat (std::string_view text, std::size_t end, std::size_t floor)
 Number of bytes from the code-point boundary immediately before end back to end – the mirror of codepoint_advance, for the width of the LAST code point in a well-formed run ending at end (a possessive cp-class loop's own last iteration: the loop only ever advanced by codepoint_advance-consistent steps, so walking backward over continuation bytes lands on the same boundary walking forward would have stopped at). Capped at 4 (the longest valid UTF-8 sequence) and never walks past floor, so a malformed/truncated run can never read out of the caller's own known-valid range.
 

Variables

constexpr std::size_t max_byte_program_size {20000}
 
constexpr std::size_t il_warm_floor {4UL * 1024}
 Warm-regime IL minimum haystack, in bytes. The shared reverse DFA is amortised after the first scan, but below this size the candidate scan itself can cost more than the route saves, so the floor stays. A cold first scan uses the higher regex_immutables::il_min_haystack instead.
 
constexpr std::array< utf8_second_byte_bounds, 256 > utf8_second_byte_bounds_table
 First-continuation-byte bounds indexed by lead byte (0–255; only 0xC2–0xF4 are ever consulted). inline constexpr: computed once at compile time, one instance across TUs.
 
constexpr std::size_t max_program_size {262144}
 Maximum number of NFA instructions in a compiled program — 256 Ki.
 
constexpr std::int32_t max_repeat_count {1000}
 Per-quantifier bounded-repeat cap, enforced at parse time.
 
constexpr std::int32_t max_group_count {32766}
 Maximum capture groups; bounds slot_count = 2 * (groups + 1).
 
constexpr std::int32_t max_nesting_depth {200}
 Maximum parser recursion depth; prevents stack overflow on deep nesting.
 
constexpr std::int32_t max_lookaround_length {255}
 Maximum bytes a bounded lookaround sub-pattern may consume (its L_max); bounding it keeps per-position evaluation linear.
 
constexpr std::size_t max_dfa_states {65536}
 Maximum DFA states (opt-in real::dfa).
 
constexpr std::uint64_t fnv1a_offset_basis {14695981039346656037ULL}
 FNV-1a 64-bit offset basis. Defined once and referenced everywhere, never re-typed: a constant copied by hand drifts, and a wrong basis still hashes perfectly well – it simply is not FNV-1a, so nothing downstream notices.
 
constexpr std::uint64_t fnv1a_prime {1099511628211ULL}
 FNV-1a 64-bit prime, paired with fnv1a_offset_basis.
 
constexpr std::size_t max_dfa_byte_program {512}
 Cap on a pattern's expanded byte program before subset construction runs on it.
 
constexpr std::uint32_t dfa_no_rule {std::numeric_limits<std::uint32_t>::max()}
 dfa_tables::accept's "this state does not accept" marker.
 
constexpr std::size_t ac_max_branch_expansion = 64
 Maximum concrete literal strings a single branch may expand into (icase klass fan-out).
 
constexpr std::uint32_t rare_disc_fail_abandon {32}
 Consecutive disc hits that fail back-verify before the density gate trips. Dense : filler (e.g. a:b:c:d…) makes memchr+verify lose to a selective http prefix.
 
constexpr bool have_members_scan {false}
 Whether a consumer should ARM a filter on find_members – one ISA only, and measured.
 
constexpr std::uint32_t not_a_single_codepoint {0xFFFFFFFFU}
 Returned by single_codepoint_atom when the node is not one code point's bytes.
 
constexpr std::size_t inner_literal_max {16}
 The most bytes an inner literal keeps; past this a longer needle costs storage without shrinking the candidate set much.
 
constexpr const char * unicode_binprop_unidata_version {"16.0.0"}
 The Unicode data version these tables were generated from.
 
constexpr code_range binprop_ASCII_Hex_Digit_ranges []
 \p{ASCII_Hex_Digit} — 3 ranges, 22 code points.
 
constexpr code_range binprop_Alphabetic_ranges []
 \p{Alphabetic} — 757 ranges, 142759 code points.
 
constexpr code_range binprop_Bidi_Control_ranges []
 \p{Bidi_Control} — 4 ranges, 12 code points.
 
constexpr code_range binprop_Case_Ignorable_ranges []
 \p{Case_Ignorable} — 452 ranges, 2749 code points.
 
constexpr code_range binprop_Cased_ranges []
 \p{Cased} — 159 ranges, 4578 code points.
 
constexpr code_range binprop_Changes_When_Casefolded_ranges []
 \p{Changes_When_Casefolded} — 626 ranges, 1533 code points.
 
constexpr code_range binprop_Changes_When_Casemapped_ranges []
 \p{Changes_When_Casemapped} — 131 ranges, 2981 code points.
 
constexpr code_range binprop_Changes_When_Lowercased_ranges []
 \p{Changes_When_Lowercased} — 614 ranges, 1460 code points.
 
constexpr code_range binprop_Changes_When_Titlecased_ranges []
 \p{Changes_When_Titlecased} — 629 ranges, 1479 code points.
 
constexpr code_range binprop_Changes_When_Uppercased_ranges []
 \p{Changes_When_Uppercased} — 630 ranges, 1552 code points.
 
constexpr code_range binprop_Dash_ranges []
 \p{Dash} — 24 ranges, 31 code points.
 
constexpr code_range binprop_Default_Ignorable_Code_Point_ranges []
 \p{Default_Ignorable_Code_Point} — 17 ranges, 4174 code points.
 
constexpr code_range binprop_Deprecated_ranges []
 \p{Deprecated} — 8 ranges, 15 code points.
 
constexpr code_range binprop_Diacritic_ranges []
 \p{Diacritic} — 214 ranges, 1178 code points.
 
constexpr code_range binprop_Emoji_ranges []
 \p{Emoji} — 150 ranges, 1431 code points.
 
constexpr code_range binprop_Emoji_Component_ranges []
 \p{Emoji_Component} — 10 ranges, 146 code points.
 
constexpr code_range binprop_Emoji_Modifier_ranges []
 \p{Emoji_Modifier} — 1 ranges, 5 code points.
 
constexpr code_range binprop_Emoji_Modifier_Base_ranges []
 \p{Emoji_Modifier_Base} — 40 ranges, 134 code points.
 
constexpr code_range binprop_Emoji_Presentation_ranges []
 \p{Emoji_Presentation} — 80 ranges, 1212 code points.
 
constexpr code_range binprop_Extended_Pictographic_ranges []
 \p{Extended_Pictographic} — 78 ranges, 3537 code points.
 
constexpr code_range binprop_Extender_ranges []
 \p{Extender} — 41 ranges, 59 code points.
 
constexpr code_range binprop_Grapheme_Base_ranges []
 \p{Grapheme_Base} — 894 ranges, 152730 code points.
 
constexpr code_range binprop_Grapheme_Extend_ranges []
 \p{Grapheme_Extend} — 375 ranges, 2193 code points.
 
constexpr code_range binprop_Grapheme_Link_ranges []
 \p{Grapheme_Link} — 58 ranges, 69 code points.
 
constexpr code_range binprop_Hex_Digit_ranges []
 \p{Hex_Digit} — 6 ranges, 44 code points.
 
constexpr code_range binprop_Hyphen_ranges []
 \p{Hyphen} — 10 ranges, 11 code points.
 
constexpr code_range binprop_IDS_Binary_Operator_ranges []
 \p{IDS_Binary_Operator} — 3 ranges, 13 code points.
 
constexpr code_range binprop_IDS_Trinary_Operator_ranges []
 \p{IDS_Trinary_Operator} — 1 ranges, 2 code points.
 
constexpr code_range binprop_IDS_Unary_Operator_ranges []
 \p{IDS_Unary_Operator} — 1 ranges, 2 code points.
 
constexpr code_range binprop_ID_Compat_Math_Continue_ranges []
 \p{ID_Compat_Math_Continue} — 18 ranges, 43 code points.
 
constexpr code_range binprop_ID_Compat_Math_Start_ranges []
 \p{ID_Compat_Math_Start} — 13 ranges, 13 code points.
 
constexpr code_range binprop_ID_Continue_ranges []
 \p{ID_Continue} — 793 ranges, 144541 code points.
 
constexpr code_range binprop_ID_Start_ranges []
 \p{ID_Start} — 677 ranges, 141269 code points.
 
constexpr code_range binprop_Ideographic_ranges []
 \p{Ideographic} — 21 ranges, 106477 code points.
 
constexpr code_range binprop_Join_Control_ranges []
 \p{Join_Control} — 1 ranges, 2 code points.
 
constexpr code_range binprop_Logical_Order_Exception_ranges []
 \p{Logical_Order_Exception} — 7 ranges, 19 code points.
 
constexpr code_range binprop_Lowercase_ranges []
 \p{Lowercase} — 675 ranges, 2569 code points.
 
constexpr code_range binprop_Math_ranges []
 \p{Math} — 139 ranges, 2312 code points.
 
constexpr code_range binprop_Modifier_Combining_Mark_ranges []
 \p{Modifier_Combining_Mark} — 9 ranges, 14 code points.
 
constexpr code_range binprop_Noncharacter_Code_Point_ranges []
 \p{Noncharacter_Code_Point} — 18 ranges, 66 code points.
 
constexpr code_range binprop_Other_Alphabetic_ranges []
 \p{Other_Alphabetic} — 250 ranges, 1495 code points.
 
constexpr code_range binprop_Other_Default_Ignorable_Code_Point_ranges []
 \p{Other_Default_Ignorable_Code_Point} — 11 ranges, 3776 code points.
 
constexpr code_range binprop_Other_Grapheme_Extend_ranges []
 \p{Other_Grapheme_Extend} — 49 ranges, 160 code points.
 
constexpr code_range binprop_Other_ID_Continue_ranges []
 \p{Other_ID_Continue} — 7 ranges, 16 code points.
 
constexpr code_range binprop_Other_ID_Start_ranges []
 \p{Other_ID_Start} — 4 ranges, 6 code points.
 
constexpr code_range binprop_Other_Lowercase_ranges []
 \p{Other_Lowercase} — 28 ranges, 311 code points.
 
constexpr code_range binprop_Other_Math_ranges []
 \p{Other_Math} — 134 ranges, 1362 code points.
 
constexpr code_range binprop_Other_Uppercase_ranges []
 \p{Other_Uppercase} — 5 ranges, 120 code points.
 
constexpr code_range binprop_Pattern_Syntax_ranges []
 \p{Pattern_Syntax} — 28 ranges, 2760 code points.
 
constexpr code_range binprop_Pattern_White_Space_ranges []
 \p{Pattern_White_Space} — 5 ranges, 11 code points.
 
constexpr code_range binprop_Prepended_Concatenation_Mark_ranges []
 \p{Prepended_Concatenation_Mark} — 7 ranges, 13 code points.
 
constexpr code_range binprop_Quotation_Mark_ranges []
 \p{Quotation_Mark} — 13 ranges, 30 code points.
 
constexpr code_range binprop_Radical_ranges []
 \p{Radical} — 3 ranges, 329 code points.
 
constexpr code_range binprop_Regional_Indicator_ranges []
 \p{Regional_Indicator} — 1 ranges, 26 code points.
 
constexpr code_range binprop_Sentence_Terminal_ranges []
 \p{Sentence_Terminal} — 88 ranges, 170 code points.
 
constexpr code_range binprop_Soft_Dotted_ranges []
 \p{Soft_Dotted} — 34 ranges, 50 code points.
 
constexpr code_range binprop_Terminal_Punctuation_ranges []
 \p{Terminal_Punctuation} — 116 ranges, 291 code points.
 
constexpr code_range binprop_Unified_Ideograph_ranges []
 \p{Unified_Ideograph} — 17 ranges, 97680 code points.
 
constexpr code_range binprop_Uppercase_ranges []
 \p{Uppercase} — 656 ranges, 1978 code points.
 
constexpr code_range binprop_Variation_Selector_ranges []
 \p{Variation_Selector} — 4 ranges, 260 code points.
 
constexpr code_range binprop_White_Space_ranges []
 \p{White_Space} — 10 ranges, 25 code points.
 
constexpr code_range binprop_XID_Continue_ranges []
 \p{XID_Continue} — 800 ranges, 144522 code points.
 
constexpr code_range binprop_XID_Start_ranges []
 \p{XID_Start} — 684 ranges, 141246 code points.
 
constexpr std::span< const code_rangebinprop_ranges []
 Range table indexed by binprop (parallel to the enum order).
 
constexpr binprop_alias_entry binprop_aliases []
 Binary-property names, loose-keyed; for the \p{...} parser (no namespace prefix, same as PCRE2: \p{Alphabetic}, not \p{bp=Alphabetic}).
 
constexpr const char * unicode_fold_unidata_version {"16.0.0"}
 The Unicode data version these orbits were generated from.
 
constexpr fold_entry unicode_fold_table []
 Fold orbits, sorted by fold_entry::cp for binary search.
 
constexpr std::size_t unicode_fold_table_size {2940}
 Number of entries in unicode_fold_table.
 
constexpr const char * unicode_property_unidata_version {"16.0.0"}
 The Unicode data version these tables were generated from.
 
constexpr code_range gc_Lu_ranges []
 \p{Lu} — 651 ranges, 1858 code points.
 
constexpr code_range gc_Ll_ranges []
 \p{Ll} — 662 ranges, 2258 code points.
 
constexpr code_range gc_Lt_ranges []
 \p{Lt} — 10 ranges, 31 code points.
 
constexpr code_range gc_Lm_ranges []
 \p{Lm} — 75 ranges, 404 code points.
 
constexpr code_range gc_Lo_ranges []
 \p{Lo} — 528 ranges, 136477 code points.
 
constexpr code_range gc_Mn_ranges []
 \p{Mn} — 357 ranges, 2020 code points.
 
constexpr code_range gc_Mc_ranges []
 \p{Mc} — 190 ranges, 468 code points.
 
constexpr code_range gc_Me_ranges []
 \p{Me} — 5 ranges, 13 code points.
 
constexpr code_range gc_Nd_ranges []
 \p{Nd} — 71 ranges, 760 code points.
 
constexpr code_range gc_Nl_ranges []
 \p{Nl} — 12 ranges, 236 code points.
 
constexpr code_range gc_No_ranges []
 \p{No} — 72 ranges, 915 code points.
 
constexpr code_range gc_Pc_ranges []
 \p{Pc} — 6 ranges, 10 code points.
 
constexpr code_range gc_Pd_ranges []
 \p{Pd} — 20 ranges, 27 code points.
 
constexpr code_range gc_Ps_ranges []
 \p{Ps} — 79 ranges, 79 code points.
 
constexpr code_range gc_Pe_ranges []
 \p{Pe} — 76 ranges, 77 code points.
 
constexpr code_range gc_Pi_ranges []
 \p{Pi} — 11 ranges, 12 code points.
 
constexpr code_range gc_Pf_ranges []
 \p{Pf} — 10 ranges, 10 code points.
 
constexpr code_range gc_Po_ranges []
 \p{Po} — 193 ranges, 640 code points.
 
constexpr code_range gc_Sm_ranges []
 \p{Sm} — 65 ranges, 950 code points.
 
constexpr code_range gc_Sc_ranges []
 \p{Sc} — 21 ranges, 63 code points.
 
constexpr code_range gc_Sk_ranges []
 \p{Sk} — 31 ranges, 125 code points.
 
constexpr code_range gc_So_ranges []
 \p{So} — 187 ranges, 7376 code points.
 
constexpr code_range gc_Zs_ranges []
 \p{Zs} — 7 ranges, 17 code points.
 
constexpr code_range gc_Zl_ranges []
 \p{Zl} — 1 ranges, 1 code points.
 
constexpr code_range gc_Zp_ranges []
 \p{Zp} — 1 ranges, 1 code points.
 
constexpr code_range gc_Cc_ranges []
 \p{Cc} — 2 ranges, 65 code points.
 
constexpr code_range gc_Cf_ranges []
 \p{Cf} — 21 ranges, 170 code points.
 
constexpr code_range gc_Co_ranges []
 \p{Co} — 3 ranges, 137468 code points.
 
constexpr code_range gc_Cn_ranges []
 \p{Cn} — 731 ranges, 819533 code points.
 
constexpr code_range gc_L_ranges []
 \p{L} — 677 ranges, 141028 code points.
 
constexpr code_range gc_M_ranges []
 \p{M} — 321 ranges, 2501 code points.
 
constexpr code_range gc_N_ranges []
 \p{N} — 144 ranges, 1911 code points.
 
constexpr code_range gc_P_ranges []
 \p{P} — 198 ranges, 855 code points.
 
constexpr code_range gc_S_ranges []
 \p{S} — 236 ranges, 8514 code points.
 
constexpr code_range gc_Z_ranges []
 \p{Z} — 8 ranges, 19 code points.
 
constexpr code_range gc_C_ranges []
 \p{C} — 737 ranges, 957236 code points.
 
constexpr std::span< const code_rangegc_property_ranges []
 Range table indexed by gc_property (parallel to the enum order).
 
constexpr gc_alias_entry gc_aliases []
 Short codes (Lu) and long names (Uppercase_Letter), loose-keyed; for the \p{...} parser.
 
constexpr const char * unicode_props_unidata_version {"16.0.0"}
 The Unicode data version these tables were generated from.
 
constexpr code_range word_ranges []
 Code-point ranges matched by \w (771 ranges, 142940 code points).
 
constexpr std::size_t word_ranges_size {771}
 Number of ranges in word_ranges.
 
constexpr code_range digit_ranges []
 Code-point ranges matched by \d (71 ranges, 760 code points).
 
constexpr std::size_t digit_ranges_size {71}
 Number of ranges in digit_ranges.
 
constexpr code_range space_ranges []
 Code-point ranges matched by \s (10 ranges, 29 code points).
 
constexpr std::size_t space_ranges_size {10}
 Number of ranges in space_ranges.
 
constexpr const char * unicode_script_unidata_version {"16.0.0"}
 The Unicode data version these tables were generated from.
 
constexpr script_range script_ranges []
 Script partition — 979 ranges, sorted and disjoint.
 
constexpr script_alias_entry script_aliases []
 Script names, loose-keyed; for the \p{sc=...} / \p{scx=...} parsers. Both the long name (Latin) and the short UAX24/ISO 15924 code (Latn) resolve to the same value – \p{scx=...} states its overrides in short codes only, and since this table is shared, \p{sc=...} gains the short form too.
 
constexpr const char * unicode_scx_unidata_version {"16.0.0"}
 The Unicode data version these tables were generated from.
 
constexpr code_range scx_Adlam_ranges []
 \p{scx=Adlam} — 7 ranges, 92 code points.
 
constexpr code_range scx_Ahom_ranges []
 \p{scx=Ahom} — 3 ranges, 65 code points.
 
constexpr code_range scx_Anatolian_Hieroglyphs_ranges []
 \p{scx=Anatolian_Hieroglyphs} — 1 ranges, 583 code points.
 
constexpr code_range scx_Arabic_ranges []
 \p{scx=Arabic} — 55 ranges, 1421 code points.
 
constexpr code_range scx_Armenian_ranges []
 \p{scx=Armenian} — 5 ranges, 97 code points.
 
constexpr code_range scx_Avestan_ranges []
 \p{scx=Avestan} — 4 ranges, 64 code points.
 
constexpr code_range scx_Balinese_ranges []
 \p{scx=Balinese} — 2 ranges, 127 code points.
 
constexpr code_range scx_Bamum_ranges []
 \p{scx=Bamum} — 2 ranges, 657 code points.
 
constexpr code_range scx_Bassa_Vah_ranges []
 \p{scx=Bassa_Vah} — 2 ranges, 36 code points.
 
constexpr code_range scx_Batak_ranges []
 \p{scx=Batak} — 2 ranges, 56 code points.
 
constexpr code_range scx_Bengali_ranges []
 \p{scx=Bengali} — 27 ranges, 114 code points.
 
constexpr code_range scx_Bhaiksuki_ranges []
 \p{scx=Bhaiksuki} — 4 ranges, 97 code points.
 
constexpr code_range scx_Bopomofo_ranges []
 \p{scx=Bopomofo} — 15 ranges, 122 code points.
 
constexpr code_range scx_Brahmi_ranges []
 \p{scx=Brahmi} — 3 ranges, 115 code points.
 
constexpr code_range scx_Braille_ranges []
 \p{scx=Braille} — 1 ranges, 256 code points.
 
constexpr code_range scx_Buginese_ranges []
 \p{scx=Buginese} — 3 ranges, 31 code points.
 
constexpr code_range scx_Buhid_ranges []
 \p{scx=Buhid} — 2 ranges, 22 code points.
 
constexpr code_range scx_Canadian_Aboriginal_ranges []
 \p{scx=Canadian_Aboriginal} — 3 ranges, 726 code points.
 
constexpr code_range scx_Carian_ranges []
 \p{scx=Carian} — 5 ranges, 53 code points.
 
constexpr code_range scx_Caucasian_Albanian_ranges []
 \p{scx=Caucasian_Albanian} — 5 ranges, 56 code points.
 
constexpr code_range scx_Chakma_ranges []
 \p{scx=Chakma} — 4 ranges, 91 code points.
 
constexpr code_range scx_Cham_ranges []
 \p{scx=Cham} — 4 ranges, 83 code points.
 
constexpr code_range scx_Cherokee_ranges []
 \p{scx=Cherokee} — 8 ranges, 182 code points.
 
constexpr code_range scx_Chorasmian_ranges []
 \p{scx=Chorasmian} — 1 ranges, 28 code points.
 
constexpr code_range scx_Common_ranges []
 \p{scx=Common} — 159 ranges, 8585 code points.
 
constexpr code_range scx_Coptic_ranges []
 \p{scx=Coptic} — 10 ranges, 173 code points.
 
constexpr code_range scx_Cuneiform_ranges []
 \p{scx=Cuneiform} — 4 ranges, 1234 code points.
 
constexpr code_range scx_Cypriot_ranges []
 \p{scx=Cypriot} — 9 ranges, 112 code points.
 
constexpr code_range scx_Cypro_Minoan_ranges []
 \p{scx=Cypro_Minoan} — 2 ranges, 101 code points.
 
constexpr code_range scx_Cyrillic_ranges []
 \p{scx=Cyrillic} — 18 ranges, 521 code points.
 
constexpr code_range scx_Deseret_ranges []
 \p{scx=Deseret} — 1 ranges, 80 code points.
 
constexpr code_range scx_Devanagari_ranges []
 \p{scx=Devanagari} — 9 ranges, 221 code points.
 
constexpr code_range scx_Dives_Akuru_ranges []
 \p{scx=Dives_Akuru} — 8 ranges, 72 code points.
 
constexpr code_range scx_Dogra_ranges []
 \p{scx=Dogra} — 3 ranges, 82 code points.
 
constexpr code_range scx_Duployan_ranges []
 \p{scx=Duployan} — 10 ranges, 154 code points.
 
constexpr code_range scx_Egyptian_Hieroglyphs_ranges []
 \p{scx=Egyptian_Hieroglyphs} — 2 ranges, 5105 code points.
 
constexpr code_range scx_Elbasan_ranges []
 \p{scx=Elbasan} — 3 ranges, 42 code points.
 
constexpr code_range scx_Elymaic_ranges []
 \p{scx=Elymaic} — 1 ranges, 23 code points.
 
constexpr code_range scx_Ethiopic_ranges []
 \p{scx=Ethiopic} — 37 ranges, 524 code points.
 
constexpr code_range scx_Garay_ranges []
 \p{scx=Garay} — 6 ranges, 72 code points.
 
constexpr code_range scx_Georgian_ranges []
 \p{scx=Georgian} — 13 ranges, 178 code points.
 
constexpr code_range scx_Glagolitic_ranges []
 \p{scx=Glagolitic} — 16 ranges, 144 code points.
 
constexpr code_range scx_Gothic_ranges []
 \p{scx=Gothic} — 5 ranges, 32 code points.
 
constexpr code_range scx_Grantha_ranges []
 \p{scx=Grantha} — 25 ranges, 116 code points.
 
constexpr code_range scx_Greek_ranges []
 \p{scx=Greek} — 44 ranges, 531 code points.
 
constexpr code_range scx_Gujarati_ranges []
 \p{scx=Gujarati} — 17 ranges, 105 code points.
 
constexpr code_range scx_Gunjala_Gondi_ranges []
 \p{scx=Gunjala_Gondi} — 8 ranges, 66 code points.
 
constexpr code_range scx_Gurmukhi_ranges []
 \p{scx=Gurmukhi} — 19 ranges, 94 code points.
 
constexpr code_range scx_Gurung_Khema_ranges []
 \p{scx=Gurung_Khema} — 2 ranges, 59 code points.
 
constexpr code_range scx_Han_ranges []
 \p{scx=Han} — 42 ranges, 99338 code points.
 
constexpr code_range scx_Hangul_ranges []
 \p{scx=Hangul} — 21 ranges, 11775 code points.
 
constexpr code_range scx_Hanifi_Rohingya_ranges []
 \p{scx=Hanifi_Rohingya} — 7 ranges, 55 code points.
 
constexpr code_range scx_Hanunoo_ranges []
 \p{scx=Hanunoo} — 1 ranges, 23 code points.
 
constexpr code_range scx_Hatran_ranges []
 \p{scx=Hatran} — 3 ranges, 26 code points.
 
constexpr code_range scx_Hebrew_ranges []
 \p{scx=Hebrew} — 10 ranges, 136 code points.
 
constexpr code_range scx_Hiragana_ranges []
 \p{scx=Hiragana} — 17 ranges, 433 code points.
 
constexpr code_range scx_Imperial_Aramaic_ranges []
 \p{scx=Imperial_Aramaic} — 2 ranges, 31 code points.
 
constexpr code_range scx_Inherited_ranges []
 \p{scx=Inherited} — 28 ranges, 558 code points.
 
constexpr code_range scx_Inscriptional_Pahlavi_ranges []
 \p{scx=Inscriptional_Pahlavi} — 2 ranges, 27 code points.
 
constexpr code_range scx_Inscriptional_Parthian_ranges []
 \p{scx=Inscriptional_Parthian} — 2 ranges, 30 code points.
 
constexpr code_range scx_Javanese_ranges []
 \p{scx=Javanese} — 3 ranges, 91 code points.
 
constexpr code_range scx_Kaithi_ranges []
 \p{scx=Kaithi} — 5 ranges, 89 code points.
 
constexpr code_range scx_Kannada_ranges []
 \p{scx=Kannada} — 21 ranges, 107 code points.
 
constexpr code_range scx_Katakana_ranges []
 \p{scx=Katakana} — 22 ranges, 375 code points.
 
constexpr code_range scx_Kawi_ranges []
 \p{scx=Kawi} — 3 ranges, 87 code points.
 
constexpr code_range scx_Kayah_Li_ranges []
 \p{scx=Kayah_Li} — 1 ranges, 48 code points.
 
constexpr code_range scx_Kharoshthi_ranges []
 \p{scx=Kharoshthi} — 8 ranges, 68 code points.
 
constexpr code_range scx_Khitan_Small_Script_ranges []
 \p{scx=Khitan_Small_Script} — 3 ranges, 472 code points.
 
constexpr code_range scx_Khmer_ranges []
 \p{scx=Khmer} — 4 ranges, 146 code points.
 
constexpr code_range scx_Khojki_ranges []
 \p{scx=Khojki} — 4 ranges, 85 code points.
 
constexpr code_range scx_Khudawadi_ranges []
 \p{scx=Khudawadi} — 4 ranges, 81 code points.
 
constexpr code_range scx_Kirat_Rai_ranges []
 \p{scx=Kirat_Rai} — 1 ranges, 58 code points.
 
constexpr code_range scx_Lao_ranges []
 \p{scx=Lao} — 11 ranges, 83 code points.
 
constexpr code_range scx_Latin_ranges []
 \p{scx=Latin} — 65 ranges, 1555 code points.
 
constexpr code_range scx_Lepcha_ranges []
 \p{scx=Lepcha} — 3 ranges, 74 code points.
 
constexpr code_range scx_Limbu_ranges []
 \p{scx=Limbu} — 6 ranges, 69 code points.
 
constexpr code_range scx_Linear_A_ranges []
 \p{scx=Linear_A} — 4 ranges, 386 code points.
 
constexpr code_range scx_Linear_B_ranges []
 \p{scx=Linear_B} — 10 ranges, 268 code points.
 
constexpr code_range scx_Lisu_ranges []
 \p{scx=Lisu} — 5 ranges, 53 code points.
 
constexpr code_range scx_Lycian_ranges []
 \p{scx=Lycian} — 2 ranges, 30 code points.
 
constexpr code_range scx_Lydian_ranges []
 \p{scx=Lydian} — 4 ranges, 29 code points.
 
constexpr code_range scx_Mahajani_ranges []
 \p{scx=Mahajani} — 4 ranges, 62 code points.
 
constexpr code_range scx_Makasar_ranges []
 \p{scx=Makasar} — 1 ranges, 25 code points.
 
constexpr code_range scx_Malayalam_ranges []
 \p{scx=Malayalam} — 12 ranges, 127 code points.
 
constexpr code_range scx_Mandaic_ranges []
 \p{scx=Mandaic} — 3 ranges, 30 code points.
 
constexpr code_range scx_Manichaean_ranges []
 \p{scx=Manichaean} — 3 ranges, 52 code points.
 
constexpr code_range scx_Marchen_ranges []
 \p{scx=Marchen} — 3 ranges, 68 code points.
 
constexpr code_range scx_Masaram_Gondi_ranges []
 \p{scx=Masaram_Gondi} — 8 ranges, 77 code points.
 
constexpr code_range scx_Medefaidrin_ranges []
 \p{scx=Medefaidrin} — 1 ranges, 91 code points.
 
constexpr code_range scx_Meetei_Mayek_ranges []
 \p{scx=Meetei_Mayek} — 3 ranges, 79 code points.
 
constexpr code_range scx_Mende_Kikakui_ranges []
 \p{scx=Mende_Kikakui} — 2 ranges, 213 code points.
 
constexpr code_range scx_Meroitic_Cursive_ranges []
 \p{scx=Meroitic_Cursive} — 3 ranges, 90 code points.
 
constexpr code_range scx_Meroitic_Hieroglyphs_ranges []
 \p{scx=Meroitic_Hieroglyphs} — 2 ranges, 33 code points.
 
constexpr code_range scx_Miao_ranges []
 \p{scx=Miao} — 3 ranges, 149 code points.
 
constexpr code_range scx_Modi_ranges []
 \p{scx=Modi} — 3 ranges, 89 code points.
 
constexpr code_range scx_Mongolian_ranges []
 \p{scx=Mongolian} — 7 ranges, 178 code points.
 
constexpr code_range scx_Mro_ranges []
 \p{scx=Mro} — 3 ranges, 43 code points.
 
constexpr code_range scx_Multani_ranges []
 \p{scx=Multani} — 6 ranges, 48 code points.
 
constexpr code_range scx_Myanmar_ranges []
 \p{scx=Myanmar} — 5 ranges, 244 code points.
 
constexpr code_range scx_Nabataean_ranges []
 \p{scx=Nabataean} — 2 ranges, 40 code points.
 
constexpr code_range scx_Nag_Mundari_ranges []
 \p{scx=Nag_Mundari} — 1 ranges, 42 code points.
 
constexpr code_range scx_Nandinagari_ranges []
 \p{scx=Nandinagari} — 9 ranges, 86 code points.
 
constexpr code_range scx_New_Tai_Lue_ranges []
 \p{scx=New_Tai_Lue} — 4 ranges, 83 code points.
 
constexpr code_range scx_Newa_ranges []
 \p{scx=Newa} — 2 ranges, 97 code points.
 
constexpr code_range scx_Nko_ranges []
 \p{scx=Nko} — 6 ranges, 67 code points.
 
constexpr code_range scx_Nushu_ranges []
 \p{scx=Nushu} — 2 ranges, 397 code points.
 
constexpr code_range scx_Nyiakeng_Puachue_Hmong_ranges []
 \p{scx=Nyiakeng_Puachue_Hmong} — 4 ranges, 71 code points.
 
constexpr code_range scx_Ogham_ranges []
 \p{scx=Ogham} — 1 ranges, 29 code points.
 
constexpr code_range scx_Ol_Chiki_ranges []
 \p{scx=Ol_Chiki} — 1 ranges, 48 code points.
 
constexpr code_range scx_Ol_Onal_ranges []
 \p{scx=Ol_Onal} — 3 ranges, 46 code points.
 
constexpr code_range scx_Old_Hungarian_ranges []
 \p{scx=Old_Hungarian} — 7 ranges, 112 code points.
 
constexpr code_range scx_Old_Italic_ranges []
 \p{scx=Old_Italic} — 2 ranges, 39 code points.
 
constexpr code_range scx_Old_North_Arabian_ranges []
 \p{scx=Old_North_Arabian} — 1 ranges, 32 code points.
 
constexpr code_range scx_Old_Permic_ranges []
 \p{scx=Old_Permic} — 6 ranges, 50 code points.
 
constexpr code_range scx_Old_Persian_ranges []
 \p{scx=Old_Persian} — 2 ranges, 50 code points.
 
constexpr code_range scx_Old_Sogdian_ranges []
 \p{scx=Old_Sogdian} — 1 ranges, 40 code points.
 
constexpr code_range scx_Old_South_Arabian_ranges []
 \p{scx=Old_South_Arabian} — 1 ranges, 32 code points.
 
constexpr code_range scx_Old_Turkic_ranges []
 \p{scx=Old_Turkic} — 3 ranges, 75 code points.
 
constexpr code_range scx_Old_Uyghur_ranges []
 \p{scx=Old_Uyghur} — 3 ranges, 28 code points.
 
constexpr code_range scx_Oriya_ranges []
 \p{scx=Oriya} — 18 ranges, 97 code points.
 
constexpr code_range scx_Osage_ranges []
 \p{scx=Osage} — 6 ranges, 76 code points.
 
constexpr code_range scx_Osmanya_ranges []
 \p{scx=Osmanya} — 2 ranges, 40 code points.
 
constexpr code_range scx_Pahawh_Hmong_ranges []
 \p{scx=Pahawh_Hmong} — 5 ranges, 127 code points.
 
constexpr code_range scx_Palmyrene_ranges []
 \p{scx=Palmyrene} — 1 ranges, 32 code points.
 
constexpr code_range scx_Pau_Cin_Hau_ranges []
 \p{scx=Pau_Cin_Hau} — 1 ranges, 57 code points.
 
constexpr code_range scx_Phags_Pa_ranges []
 \p{scx=Phags_Pa} — 5 ranges, 61 code points.
 
constexpr code_range scx_Phoenician_ranges []
 \p{scx=Phoenician} — 2 ranges, 29 code points.
 
constexpr code_range scx_Psalter_Pahlavi_ranges []
 \p{scx=Psalter_Pahlavi} — 4 ranges, 30 code points.
 
constexpr code_range scx_Rejang_ranges []
 \p{scx=Rejang} — 2 ranges, 37 code points.
 
constexpr code_range scx_Runic_ranges []
 \p{scx=Runic} — 1 ranges, 89 code points.
 
constexpr code_range scx_Samaritan_ranges []
 \p{scx=Samaritan} — 3 ranges, 62 code points.
 
constexpr code_range scx_Saurashtra_ranges []
 \p{scx=Saurashtra} — 2 ranges, 82 code points.
 
constexpr code_range scx_Sharada_ranges []
 \p{scx=Sharada} — 8 ranges, 109 code points.
 
constexpr code_range scx_Shavian_ranges []
 \p{scx=Shavian} — 2 ranges, 49 code points.
 
constexpr code_range scx_Siddham_ranges []
 \p{scx=Siddham} — 2 ranges, 92 code points.
 
constexpr code_range scx_SignWriting_ranges []
 \p{scx=SignWriting} — 3 ranges, 672 code points.
 
constexpr code_range scx_Sinhala_ranges []
 \p{scx=Sinhala} — 15 ranges, 114 code points.
 
constexpr code_range scx_Sogdian_ranges []
 \p{scx=Sogdian} — 2 ranges, 43 code points.
 
constexpr code_range scx_Sora_Sompeng_ranges []
 \p{scx=Sora_Sompeng} — 2 ranges, 35 code points.
 
constexpr code_range scx_Soyombo_ranges []
 \p{scx=Soyombo} — 1 ranges, 83 code points.
 
constexpr code_range scx_Sundanese_ranges []
 \p{scx=Sundanese} — 2 ranges, 72 code points.
 
constexpr code_range scx_Sunuwar_ranges []
 \p{scx=Sunuwar} — 8 ranges, 51 code points.
 
constexpr code_range scx_Syloti_Nagri_ranges []
 \p{scx=Syloti_Nagri} — 3 ranges, 57 code points.
 
constexpr code_range scx_Syriac_ranges []
 \p{scx=Syriac} — 19 ranges, 119 code points.
 
constexpr code_range scx_Tagalog_ranges []
 \p{scx=Tagalog} — 3 ranges, 25 code points.
 
constexpr code_range scx_Tagbanwa_ranges []
 \p{scx=Tagbanwa} — 4 ranges, 20 code points.
 
constexpr code_range scx_Tai_Le_ranges []
 \p{scx=Tai_Le} — 6 ranges, 50 code points.
 
constexpr code_range scx_Tai_Tham_ranges []
 \p{scx=Tai_Tham} — 5 ranges, 127 code points.
 
constexpr code_range scx_Tai_Viet_ranges []
 \p{scx=Tai_Viet} — 2 ranges, 72 code points.
 
constexpr code_range scx_Takri_ranges []
 \p{scx=Takri} — 4 ranges, 80 code points.
 
constexpr code_range scx_Tamil_ranges []
 \p{scx=Tamil} — 25 ranges, 133 code points.
 
constexpr code_range scx_Tangsa_ranges []
 \p{scx=Tangsa} — 2 ranges, 89 code points.
 
constexpr code_range scx_Tangut_ranges []
 \p{scx=Tangut} — 6 ranges, 6931 code points.
 
constexpr code_range scx_Telugu_ranges []
 \p{scx=Telugu} — 17 ranges, 106 code points.
 
constexpr code_range scx_Thaana_ranges []
 \p{scx=Thaana} — 7 ranges, 66 code points.
 
constexpr code_range scx_Thai_ranges []
 \p{scx=Thai} — 6 ranges, 90 code points.
 
constexpr code_range scx_Tibetan_ranges []
 \p{scx=Tibetan} — 8 ranges, 211 code points.
 
constexpr code_range scx_Tifinagh_ranges []
 \p{scx=Tifinagh} — 7 ranges, 63 code points.
 
constexpr code_range scx_Tirhuta_ranges []
 \p{scx=Tirhuta} — 6 ranges, 97 code points.
 
constexpr code_range scx_Todhri_ranges []
 \p{scx=Todhri} — 7 ranges, 58 code points.
 
constexpr code_range scx_Toto_ranges []
 \p{scx=Toto} — 2 ranges, 32 code points.
 
constexpr code_range scx_Tulu_Tigalari_ranges []
 \p{scx=Tulu_Tigalari} — 16 ranges, 99 code points.
 
constexpr code_range scx_Ugaritic_ranges []
 \p{scx=Ugaritic} — 2 ranges, 31 code points.
 
constexpr code_range scx_Vai_ranges []
 \p{scx=Vai} — 1 ranges, 300 code points.
 
constexpr code_range scx_Vithkuqi_ranges []
 \p{scx=Vithkuqi} — 8 ranges, 70 code points.
 
constexpr code_range scx_Wancho_ranges []
 \p{scx=Wancho} — 2 ranges, 59 code points.
 
constexpr code_range scx_Warang_Citi_ranges []
 \p{scx=Warang_Citi} — 2 ranges, 84 code points.
 
constexpr code_range scx_Yezidi_ranges []
 \p{scx=Yezidi} — 7 ranges, 60 code points.
 
constexpr code_range scx_Yi_ranges []
 \p{scx=Yi} — 7 ranges, 1246 code points.
 
constexpr code_range scx_Zanabazar_Square_ranges []
 \p{scx=Zanabazar_Square} — 1 ranges, 72 code points.
 
constexpr std::span< const code_rangescx_ranges []
 Range table indexed by script (parallel to the enum order, Unknown empty – no code point's scx is ever explicitly Unknown, see the generator).
 

Detailed Description

DFA construction internals: subset construction over a flattened NFA. Not a stable API.

Storage-policy internals shared by real::regex and real::static_regex.

REAL's internal implementation. Not a stable API: anything here may change between releases.

Enumeration Type Documentation

◆ ac_verdict

enum class real::detail::ac_verdict : std::uint8_t
strong

What the AC density gate last decided; ac_density_last_verdict() below reports it.

Enumerator
not_consulted 

The gate has not run since the last reset.

cascade 

Candidates too sparse: keep the memchr cascade.

automaton 

Candidates dense enough: take the Aho-Corasick walk.

◆ anchor_kind

enum class real::detail::anchor_kind : std::uint8_t
strong

The specific zero-width assertion of an anchor node (see node_kind::anchor).

Enumerator
caret 

^ (text or line start, depending on multiline).

dollar 

$ (end, before a trailing \n, or line end with m).

text_start 

\A.

text_end 

\Z.

word_boundary 

\b.

not_word_boundary 

\B.

word_start 

\< (start of word; REAL extension, not in Python re).

word_end 

\> (end of word; REAL extension, not in Python re).

◆ assert_kind

enum class real::detail::assert_kind : std::uint8_t
strongprivate

Kind of zero-width assertion carried in assert_position's arg8.

Multiline and trailing-newline subtleties are resolved at compile time; the engine only evaluates these predicates at a position.

Enumerator
text_start 

\A, and ^ without multiline.

text_end 

\Z.

text_end_or_final_newline 

$ without multiline (Python semantics).

line_start 

^ with multiline.

line_end 

$ with multiline.

word_boundary 

\b (Unicode word-ness in text mode; ASCII in bytes / re.A).

not_word_boundary 

\B.

word_start 

\< (non-word/start on the left, word on the right).

word_end 

\> (word on the left, non-word/end on the right).

◆ digit_escape_kind

enum class real::detail::digit_escape_kind : std::uint8_t
strong

What a \<digit> escape decoded to (see decode_digit_escape()).

Enumerator
octal 

An octal byte escape; value is the byte (0-255).

group_ref 

A decimal group number; value is the group (a back-reference in a pattern).

octal_overflow 

A 3-octal-digit escape greater than 0o377 (an error in CPython).

◆ look_dir

enum class real::detail::look_dir : std::uint8_t
strongprivate

Direction of a lookaround sub-pattern.

Enumerator
ahead 

(?= / (?! — the sub matches starting at the position.

behind 

(?<= / (?<! — the sub matches ending exactly at the position.

◆ node_kind

enum class real::detail::node_kind : std::uint8_t
strong

Kind of an AST node; selects which fields of real::detail::ast_node are meaningful.

Enumerator
empty 

Matches the empty string.

byte 

One exact byte.

klass 

One codepoint constrained by classes[klass] (a class_def; negated or not).

any 

One codepoint, except newline (the . metacharacter).

concat 

Children matched in sequence.

repeat 

Child repeated [min, max] times (max -1 = unbounded).

alternation 

Children are branches, leftmost preferred.

group 

Child wrapped in a group; group >= 0 when capturing.

anchor 

Zero-width assertion; kind in real::detail::ast_node::anchor.

lookaround 

Bounded lookaround: child = sub-pattern, negated = (?!/(?<!), direction = ahead/behind.

◆ opcode

enum class real::detail::opcode : std::uint8_t
strongprivate

NFA instruction opcodes executed by the Pike VM.

Enumerator
byte 

Consume one byte equal to arg8; fall through to pc+1.

klass 

Consume one byte in classes[arg16]; fall through to pc+1.

klass_cp 

Consume one code point tested against cp_classes[arg16] (decode + range bsearch); enters a 3-instr continuation chain via a computed skip. See pike.hpp.

split 

Epsilon-branch to x (preferred) and y.

jump 

Epsilon-jump to x.

save 

Store current position in slot arg16; fall through (epsilon).

assert_position 

Epsilon; proceeds only if assertion arg8 holds here.

match 

Accept.

assert_lookaround 

Epsilon; proceeds only if the lookaround sub-program arg16 holds here.

byte_loop_possessive 

Consume one byte == arg8. See the opcode-family note above.

klass_loop_possessive 

Consume one byte in classes[arg16]. See the opcode-family note above.

klass_cp_loop_possessive 

Consume one code point in cp_classes[arg16] (direct decode; emits the ordinary 3-slot UTF-8 continuation chain right after itself, identical layout to klass_cp — the membership decision is already fully made at the first byte). See the opcode-family note above.

◆ run_mode

enum class real::detail::run_mode : std::uint8_t
strong

How a VM run is anchored.

Enumerator
prefix 

Anchored at the start position (Python re.match).

full 

Anchored at both ends (Python re.fullmatch).

search 

First match anywhere (Python re.search).

Function Documentation

◆ ac_density_gate_disabled()

bool & real::detail::ac_density_gate_disabled ( )
inline

Test seam : take the Aho-Corasick DENSITY gate out, so the route is chosen on branch count alone — the behaviour that shipped before the gate existed.

Distinct from aho_corasick_route_disabled, and both are needed to say anything about the gate: that one answers "cascade or automaton", this one answers "who decided". Without it a harness setting aho_corasick_route_disabled() = false is not forcing the automaton at all, it is merely declining to forbid it, and the gate then routes the subject wherever it likes — so a column labelled "AC on" silently becomes a column measuring the gate. That happened, and the numbers looked like a regression in the automaton rather than a mislabelled arm.

Returns
Reference to the process-wide seam flag; set it to true to route on branch count alone.

◆ ac_density_last_verdict()

ac_verdict & real::detail::ac_density_last_verdict ( )
inline

Test observability : the AC density gate's most recent verdict.

The gate decides only which of two routes runs, and both produce identical spans by contract – which is exactly what makes it untestable from the outside. The obvious substitute, asserting that the guarded run is much faster than the forced one, is not portable across build configurations: the margin is ~5.9x optimised and 1.4x under ASan/UBSan, because sanitizer overhead is additive per operation and so dilutes the advantage of a route whose whole merit is SKIPPING bytes. That assertion turned the sanitize leg red while the engine was correct. Timing belongs in benchmarks/ac_regime.cpp; a test asserts the decision.

One store per haystack, on the same path as the guard fields it reports on.

Returns
Reference to the process-wide verdict; assign ac_verdict::not_consulted to arm it.

◆ aho_corasick_route_disabled()

bool & real::detail::aho_corasick_route_disabled ( )
inline

Test seam : force the matcher off the Aho-Corasick multi-literal route (past the branch-count threshold) onto the existing pattern_hints::fixed_alternation run_alternation path, so a differential can assert routed and unrouted searches agree. Not for production use — same contract as the other route-disabled seams.

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ analyze_program()

constexpr pattern_hints real::detail::analyze_program ( std::span< const instr code,
std::span< const char_class classes,
std::span< const cp_class cp_classes,
std::span< const code_range cp_ranges,
std::int32_t  cp_mark_ascii,
std::int32_t  cp_mark_offset,
std::int32_t  cp_mark_end,
std::span< const lookaround_sub lookarounds = {} 
)
constexpr

Walks a compiled program once to derive its search hints.

Parameters
[in]codeThe instruction stream.
[in]classesThe interned character classes referenced by code.
[in]cp_classesThe match-time code-point classes referenced by klass_cp.
[in]cp_rangesFlat range buffer the cp_classes slices index into.
[in]cp_mark_asciiASCII sub-class index of an emitted codepoint-class block (-1 = none), as recorded by emit_any_codepoint_class.
[in]cp_mark_offsetProgram offset where that block starts (-1 = none); the whole-pattern codepoint fast path requires it to be 1.
[in]cp_mark_endProgram offset right after that block ends (-1 = none) – the block's own instruction count is not fixed, so this locates its end instead of a hardcoded size.
[in]lookaroundsBounded lookaround subs (trailing-LA class+ detection).
Returns
The pattern_hints (anchoring, literal prefix, first-byte set, and the class+ / exact-literal fast-path flags).

◆ assertion_holds()

constexpr bool real::detail::assertion_holds ( assert_kind  kind,
std::string_view  text,
std::size_t  pos,
bool  ascii_word 
)
constexpr

Evaluates a zero-width assertion at pos in text.

Parameters
[in]kindThe assertion to evaluate.
[in]textThe full subject (assertions read pos - 1 and pos, so never a substring).
[in]posThe position at which to evaluate it.
[in]ascii_wordWord-ness mode for \b \B \< \>: byte-level ASCII when true, Unicode when false.
Returns
true if the assertion holds there.

◆ ast_has_nullable_captured_repeat()

constexpr bool real::detail::ast_has_nullable_captured_repeat ( const ast tree,
std::int32_t  idx 
)
constexpr

True if the AST rooted at idx contains a capturing group with a nullable body, transitively under a quantifier (any quantifier, ? included) — the frontend source of pattern_hints::nullable_captured_repeat (compiler::compile() reads this after analyze_program, the same AST-derived-hint slot as the inner-literal fields below). At each repeat node, checks its whole subtree for a nullable capturing group (subtree_has_nullable_capturing_group) — the group need not be the repeat's immediate child — and independently keeps walking for any other repeat elsewhere in the tree. Safe over-approximation: it does not prove the loop's empty iteration actually surfaces a divergent capture, only that the shape can (e.g. (\b|x)+ counts: \b is nullable by node_nullable, conservatively, same posture as empty_match_possible).

Parameters
[in]treeThe AST.
[in]idxRoot to walk from.
Returns
Whether some quantifier in the tree has a nullable capturing group under it.

◆ build_ac_automaton()

std::optional< ac_automaton > real::detail::build_ac_automaton ( std::span< const instr code,
std::span< const char_class classes,
std::size_t  body_pc 
)
inline

Builds an ac_automaton from a fixed_alternation-shaped program's branch set.

code and classes are the program's own instruction stream and class table; body_pc is pattern_hints::body_pc (the first branch/split pc, already validated by is_fixed_alternation — this function trusts that shape and does not re-validate it: every branch is a run of byte/klass ops terminated by either a jump (non-final branch) or falling straight through (final branch), exactly the shape is_fixed_alternation already proved the program has).

Parameters
[in]codeThe program's instruction stream.
[in]classesIts byte classes.
[in]body_pcThe first branch/split pc, per pattern_hints::body_pc.
Returns
The built automaton, or std::nullopt if any branch's icase-fold expansion would exceed ac_max_branch_expansion — the caller then takes the general alternation route.

◆ build_byte_program()

constexpr byte_program real::detail::build_byte_program ( const program_view prog,
bool  keep_assertions = false,
std::size_t  max_size = max_byte_program_size 
)
constexpr

Builds the byte-level DFA program for prog (see byte_program). A klass_cp at P (a four- instruction construct: the op plus three utf8_cont continuation slots) is replaced by the deterministic UTF-8 trie recognising its code-point class (build_utf8_trie), converging on the mapped P+4; every other op is copied with its branch targets remapped. Two passes: the first builds each trie and sizes it to form the old→new pc map, the second emits. The first pass also enforces max_size (see max_byte_program_size) as it accumulates cur, so a large repeated class declines before building any trie past the one that crosses the cap.

Parameters
[in]progThe Pike program to expand.
[in]keep_assertionsTier-B: keep assert_position ops as edge conditions instead of declining them (Tier-A's default).
[in]max_sizeExpanded-program-size cap. Defaults to max_byte_program_size; a smaller value is a test hook to exercise the decline without a pattern that takes seconds to build.
Returns
The expanded program, with byte_program::eligible false when it declined.

◆ build_prefix_ast()

ast real::detail::build_prefix_ast ( const ast tree,
std::int32_t  count,
std::int32_t  skip = 0 
)
inline

Build the prefix sub-AST: count top-level concat children starting after skip lead children.

Copies the tree, re-roots the concat chain at the skip-th child, and truncates after count body children — later siblings (literal + suffix + trail wb) become unreferenced.

Parameters
[in]treeThe pattern whose prefix is wanted.
[in]countHow many body children the prefix keeps; must be >= 1.
[in]skipPeeled-lead count (inner_literal::prefix_skip); 0 means nothing was peeled, so the prefix is simply the first count children.
Returns
A copy of tree re-rooted and truncated to that prefix.

◆ build_utf8_trie()

constexpr utf8_trie real::detail::build_utf8_trie ( const cp_class cc,
std::span< const code_range cp_ranges 
)
constexpr

Builds the minimal deterministic trie recognising a code-point class's UTF-8 byte sequences.

The naive expansion emits one alternation branch per UTF-8 range, and different ranges can share a lead byte with different continuations — two threads then cross that lead byte, which is byte-level non-determinism (a Unicode \w is thus never one-pass). This instead splits overlapping ranges into disjoint per-node transitions and hash-conses identical suffix sub-tries (Daciuk), yielding a deterministic automaton: it makes Unicode \w \d \s one-pass, and shrinks the byte-program dramatically (a \w collapses from thousands of instructions to a few hundred shared nodes, which the lazy DFA also profits from).

Parameters
[in]ccThe code-point class to recognise.
[in]cp_rangesThe program's range pool, which cc slices.
Returns
The trie; its utf8_trie::root is -1 when the class is empty.

A sequence's remaining byte ranges, as a view. The sequences in seqs outlive the whole recursion, so a suffix needs no copy – subspan(1) replaces what would otherwise be a fresh vector per candidate per interval, once per level of a recursion over a whole class.

◆ byte_frequency()

constexpr std::uint16_t real::detail::byte_frequency ( std::uint8_t  b)
constexpr

Approximate static frequency of a byte in mixed English + source text (occurrences per 10000; higher = more common). No text is ever scanned — this only ranks candidate prefilter bytes against one another. Punctuation like - @ . is far rarer than any letter, digit or space, which is the whole point: a required rare byte makes a far more selective memchr target than a common first-byte class.

Parameters
[in]bThe byte to rank.
Returns
Its approximate frequency, in occurrences per 10000.

◆ capture_free_walk_structural()

constexpr bool real::detail::capture_free_walk_structural ( std::span< const instr code)
constexprnoexcept

The STRUCTURAL half of pattern_hints::capture_free_walksave 0 is the program's first instruction.

Split out because the two halves have different owners. This half is a property of the PROGRAM and is never negotiable: the capture-free walk keeps group 0's start in one std::size_t local shared by a whole epsilon closure, which is only correct while save 0 cannot be skipped. Behind a split, a branch that bypassed it would inherit its sibling's start — a wrong ANSWER, not a slow one. The other half (no save past slot 1, and slot_count == 2) is a property of what the CALLER WANTS: it says the pattern has no user groups, so ignoring their writes costs nothing. A caller that does not read captures — real::basic_regex::count_matches — may set the flag on its own view of the program on this condition alone.

Parameters
[in]codeThe instruction stream.
Returns
True when the capture-free walk's single-scalar start is sound for code.

◆ class_fastpath_disabled()

bool & real::detail::class_fastpath_disabled ( )
inline

Test/profile seam: skip dedicated class-scan fast paths (byte class-loop, cp-class-loop, and codepoint_class / negated-class ./[^,]+) so a pattern that would take them falls through to lazy-DFA / general (dispatch-optimality audit; matrix4d class-scan rows). Not for production — same contract as the other route-disabled seams.

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ class_range_count()

constexpr int real::detail::class_range_count ( const char_class klass,
std::uint8_t &  lo0,
std::uint8_t &  hi0,
std::uint8_t &  lo1,
std::uint8_t &  hi1 
)
constexpr

Reports klass as up to two contiguous byte ranges.

[lo0, hi0] is always the first run found scanning byte 0..255; [lo1, hi1] the second, if any (lo1 > hi1 when there is none). Used to test whether a class qualifies for the SIMD range-compare fast path in run_fixed_shape.

Parameters
[in]klassThe class to scan.
[out]lo0Lower bound of the first run.
[out]hi0Upper bound of the first run.
[out]lo1Lower bound of the second run (unset – 1 – when none).
[out]hi1Upper bound of the second run (unset – 0 – when none).
Returns
The number of contiguous runs found; the caller should treat any count outside [1, 2] (an empty class, or three or more runs) as ineligible.

◆ coalesce_ranges()

constexpr std::vector< code_range > real::detail::coalesce_ranges ( std::vector< code_range ranges)
constexpr

Sorts ranges and merges overlapping / adjacent ones into a minimal, sorted set (the same set of code points, the fewest ranges). Used to keep folded / property classes compact.

Parameters
[in]rangesThe ranges to normalise; may be unsorted and overlapping.
Returns
The minimal sorted equivalent.

◆ codepoint_advance()

constexpr std::size_t real::detail::codepoint_advance ( std::string_view  text,
std::size_t  pos 
)
constexpr

Number of bytes from pos to the next code-point boundary, for advancing past an empty match during iteration.

A code-point boundary is any byte that is not a UTF-8 continuation byte (10xxxxxx). This advances over the byte at pos and every continuation byte that follows, landing on the next boundary (or the end). It is deliberately the SAME notion of "boundary" the matcher uses to seed search positions (seed_viable in pike.hpp only starts a match at a non-continuation byte), so empty-match stepping and match starts stay in lock-step. For well-formed text this is exactly the code point's length (1–4). For malformed text (an overlong such as C0 80, a truncated or lone continuation, an invalid lead) the continuation run is stepped over as one unit — the documented code-point-alignment policy, not a special case. Forward progress is always >= 1 byte.

Parameters
[in]textThe subject text.
[in]posIndex of the lead byte; must be < text.size().
Returns
The advance in bytes (>= 1).

◆ codepoint_retreat()

constexpr std::size_t real::detail::codepoint_retreat ( std::string_view  text,
std::size_t  end,
std::size_t  floor 
)
constexpr

Number of bytes from the code-point boundary immediately before end back to end – the mirror of codepoint_advance, for the width of the LAST code point in a well-formed run ending at end (a possessive cp-class loop's own last iteration: the loop only ever advanced by codepoint_advance-consistent steps, so walking backward over continuation bytes lands on the same boundary walking forward would have stopped at). Capped at 4 (the longest valid UTF-8 sequence) and never walks past floor, so a malformed/truncated run can never read out of the caller's own known-valid range.

Parameters
[in]textThe subject text.
[in]endIndex one past the last consumed byte; must be <= text.size() and > floor.
[in]floorNever walk back past this index (the run's own known start).
Returns
The retreat in bytes (>= 1, <= min(4, end - floor)).

◆ compile()

constexpr dynamic_program real::detail::compile ( const ast tree,
flags  compile_flags 
)
constexpr

Compiles tree to an NFA program (convenience over compiler).

Parameters
[in]treeThe parsed AST.
[in]compile_flagsThe effective compilation flags.
Returns
The compiled dynamic_program.
Exceptions
real::regex_errorif the program exceeds max_program_size.

◆ complement_code_ranges()

constexpr std::vector< code_range > real::detail::complement_code_ranges ( std::vector< code_range ranges)
constexpr

Complements a set of code-point ranges within [0x80, 0x10FFFF] (used by negated classes and by an in-class \W/\D/\S). Input may be unsorted/overlapping; the gaps come sorted.

Parameters
[in]rangesThe ranges to complement.
Returns
The gaps between them within [0x80, 0x10FFFF], sorted.

◆ compute_first_bytes()

constexpr void real::detail::compute_first_bytes ( std::span< const instr code,
std::span< const char_class classes,
std::span< const cp_class cp_classes,
pattern_hints hints 
)
constexpr

Computes the possible first-byte set by a DFS over the epsilon closure of pc 0.

Assertions are crossed conservatively (they constrain positions, not bytes; a lookaround yields a sound SUPERSET so ⑤ never wrongly rejects a valid start). If match is reachable without consuming, an empty match is possible and no byte-based skipping is sound.

Parameters
[in]codeThe program's instruction stream.
[in]classesIts byte classes.
[in]cp_classesIts code-point classes.
[in,out]hintsHints to record the first-byte set in.

◆ compute_lazy_alphabet()

constexpr lazy_byte_alphabet real::detail::compute_lazy_alphabet ( std::span< const instr code,
std::span< const char_class classes 
)
inlineconstexpr

Partition 0..255 by the program's consuming predicates (every klass test, every byte literal). Bytes with an identical signature collapse to one class.

Parameters
[in]codeThe program's instruction stream.
[in]classesThe byte classes it indexes.
Returns
The alphabet: a byte-to-class map plus the class count.

◆ cp_class_may_contain_ascii_byte()

constexpr bool real::detail::cp_class_may_contain_ascii_byte ( const cp_class cc,
std::uint8_t  b 
)
constexprnoexcept

safety check: true if the ASCII byte b could be a member of code-point class cc — used only to test whether a single-byte delimiter (a "quoted"-shape prefix or suffix) could hide inside a klass_cp_loop_possessive body, in which case the delimited fast path must decline (see pattern_hints::possessive_prefix). A non-ASCII b (>= 0x80) is conservatively treated as a member (unsafe, declines) — this shape's corpus is single-byte ASCII delimiters (", ;, …), so a multi-byte delimiter simply stays general.

Parameters
[in]ccThe loop body's code-point class.
[in]bThe candidate delimiter byte.
Returns
True when b could be a member — including for any b >= 0x80, conservatively.

◆ cp_in_ranges()

constexpr bool real::detail::cp_in_ranges ( std::span< const code_range ranges,
char32_t  cp 
)
constexpr

Binary-searches a sorted, non-overlapping range table for cp. Returns a bool (not a pointer into the table) so it stays constant-evaluable on every compiler.

Parameters
[in]rangesSorted, non-overlapping ranges to search.
[in]cpThe code point to look for.
Returns
Whether cp falls inside one of them.

◆ decode_codepoint_strict()

constexpr decoded_codepoint real::detail::decode_codepoint_strict ( std::string_view  text,
std::size_t  pos 
)
constexpr

Strictly decodes and validates the UTF-8 sequence at text[pos].

Unlike codepoint_advance (a lenient forward-progress helper for match iteration), this validates: it rejects a lone continuation byte, a truncated sequence, an overlong encoding (e.g. C0 80 for NUL), a UTF-16 surrogate, and any code point above U+10FFFF (which also covers the invalid lead bytes 0xC0/0xC1 and 0xF50xFF). It is the pattern-side decoder for raw UTF-8 literals; a rejection is a malformed pattern, not a silent literal.

Note
The three mask tests below have been replaced by a lead-byte lookup table (256 entries, then folded to 32) and reverted both times. The table is exactly equivalent — a differential over every 1- and 2-byte sequence, comparing cp, length and valid, found zero divergence — and it wins when measured in a binary of its own. It loses in the published harness, and it loses on ASCII rows that never call this function: this header is included everywhere and its translation unit sits at a codegen cliff (docs/design.dox §10.1), so a change here moves unrelated rows by more than it moves its own. An isolated probe cannot see that. Measure any change to this file in make bench-engines, never in a probe alone.
Nor can the function be moved out of that blast radius. A dedicated translation unit is foreclosed by the header-only design, so the only remaining lever is the inlining decision, and the two supported compilers want it in OPPOSITE directions: noinline costs one heavily on the code-point loops and does not buy the other. It also regresses builds where this function was already emitted out of line, which places the cost in the unit's inlining budget rather than in this function's own body. What the decoder costs the slowest code-point rows is therefore not reachable by rewriting it: it needs the header-only constraint relaxed or the call sites specialised, and neither is a decode problem.
Parameters
[in]textA byte sequence.
[in]posIndex of the lead byte; must be < text.size().
Returns
The decoded code point with valid == true, or valid == false on any malformation.

◆ decode_digit_escape()

constexpr digit_escape_result real::detail::decode_digit_escape ( std::string_view  text,
std::size_t  first 
)
constexpr

Decodes a \<digit> escape per CPython's exact rule (shared by the pattern parser and the replacement-template parser, so the two never drift).

first indexes the first digit (just past the backslash). A \0 prefix, or any 1-7 digit immediately followed by two more octal digits, is an OCTAL escape (\0: value & 0xff; the 3-octal form errors above 0o377). Otherwise the digits are a decimal group number — a back-reference in a pattern, a group reference in a replacement template.

Parameters
[in]textThe pattern or template text.
[in]firstOffset of the first digit.
Returns
The decoded kind, value and consumed length.

◆ detect_fast_shapes()

constexpr void real::detail::detect_fast_shapes ( std::span< const instr code,
std::span< const char_class classes,
std::span< const cp_class cp_classes,
std::span< const code_range cp_ranges,
std::int32_t  cp_mark_ascii,
std::int32_t  cp_mark_offset,
std::int32_t  cp_mark_end,
std::span< const lookaround_sub lookarounds,
pattern_hints hints 
)
constexpr

Detects the whole-pattern fast-path shapes and sets their hint flags: class+, fixed-shape straight runs, a single codepoint class (./negated, optional +), an alternation of straight-line branches, and trailing-lookaround class+.

Parameters
[in]codeThe instruction stream.
[in]classesInterned character classes referenced by code.
[in]cp_classesMatch-time code-point classes (for \w/\d/\s word-class tests).
[in]cp_rangesFlat range buffer the cp_classes slices index into.
[in]cp_mark_asciiASCII sub-class index of an emitted codepoint-class block (-1 = none).
[in]cp_mark_offsetProgram offset where that block starts (-1 = none).
[in]cp_mark_endProgram offset right after that block ends (-1 = none) – the block's instruction count is not fixed, so this locates its end.
[in]lookaroundsBounded lookaround subs (for trailing-LA eligibility); may be empty.
[in,out]hintsHint bag to fill (class-loop, fixed-shape, trailing-LA, …).

◆ dfa_accept_mask_of()

std::vector< std::uint64_t > real::detail::dfa_accept_mask_of ( const dfa_nfa nfa,
const dfa_set set 
)
inline

Bitset of ALL accepting rule indices in set (which-matched; word-packed). Empty vector when no rule accepts (or rule_count == 0).

Parameters
[in]nfaThe union NFA.
[in]setThe state's PC set.
Returns
The word-packed mask, or an empty vector when nothing accepts.

◆ dfa_accept_of()

std::int64_t real::detail::dfa_accept_of ( const dfa_nfa nfa,
const dfa_set set 
)
inline

The accepting rule of a state set: the SMALLEST rule index among its match PCs (the order tie-break), or -1 if none accept.

Parameters
[in]nfaThe union NFA.
[in]setThe state's PC set.
Returns
The winning rule index, or -1 when the state does not accept.

◆ dfa_build()

dfa_tables real::detail::dfa_build ( std::span< const program_view programs,
std::size_t  state_cap = max_dfa_states,
bool  unanchored = false 
)
inline

Subset construction over byte-classes, then Moore minimization.

Initial partition keys on the full accept mask (which-matched), not only the min-rule munch tag — two states with the same earliest rule but different accept sets must not merge. unanchored unions mid-stream pattern starts into every post-move set (self-restart) so a single scan can discover matches at any offset.

Parameters
[in]programsThe flattened NFA programs.
[in]state_capMaximum DFA states before dfa_error.
[in]unanchoredMid-stream restart for which-matched (Stage-2); munch uses false.
Returns
The baked tables.
Exceptions
real::dfa_errorwhen construction exceeds state_cap, or when dfa_flatten refuses a pattern.

◆ dfa_closure()

dfa_set real::detail::dfa_closure ( const dfa_nfa nfa,
const std::vector< std::uint32_t > &  seeds,
bool  at_start 
)
inline

The epsilon-closure of seeds (a PC list), as a canonical PC bitset. at_start follows a text_start assertion (true only at offset 0).

Parameters
[in]nfaThe union NFA.
[in]seedsPCs to close over.
[in]at_startWhether a head text_start assertion may be crossed.
Returns
The closure as a canonical bitset.

◆ dfa_compute_classes()

dfa_byte_classes real::detail::dfa_compute_classes ( const dfa_nfa nfa)
inline

Partition 0..255 by the union NFA's consuming predicates.

Parameters
[in]nfaThe union NFA.
Returns
The byte-to-class map, its representatives and their count.

◆ dfa_flatten()

dfa_nfa real::detail::dfa_flatten ( std::span< const program_view programs)
inline

Flattens programs into one union NFA, auditing DFA-ability.

Parameters
[in]programsThe compiled patterns, one per rule, in rule order.
Returns
The union NFA in one address space.
Exceptions
real::dfa_errorif any program holds an assertion other than a head text_start, a lookaround, a code-point class, or a possessive/atomic construct.

◆ dfa_mask_min_rule()

std::int64_t real::detail::dfa_mask_min_rule ( const std::vector< std::uint64_t > &  mask)
inline

Smallest rule index set in mask, or -1 if empty (munch tag derivation).

Parameters
[in]maskA word-packed which-matched bitset.
Returns
The lowest rule index present, or -1 for an empty mask.

◆ dfa_mask_words()

std::size_t real::detail::dfa_mask_words ( std::size_t  rule_count)
inlinenoexcept

Word count for a which-matched bitset over rule_count rules.

Parameters
[in]rule_countRules the bitset must hold.
Returns
64-bit words needed.

◆ dfa_move()

dfa_set real::detail::dfa_move ( const dfa_nfa nfa,
const dfa_set set,
std::uint8_t  rep 
)
inline

The move on the byte rep: ε-closure of the successors of every PC in set that consumes rep.

Parameters
[in]nfaThe union NFA.
[in]setThe source state's PC set.
[in]repThe representative byte of the class being stepped over.
Returns
The successor state's PC set.

◆ dfa_set_bit()

void real::detail::dfa_set_bit ( dfa_set s,
std::size_t  i 
)
inline

Set bit i in s. Indices past the set's size are ignored (it is sized to fit).

Parameters
[in,out]sThe PC bitset.
[in]iThe PC to mark present.

◆ dfa_test_bit()

bool real::detail::dfa_test_bit ( const dfa_set s,
std::size_t  i 
)
inline

Whether bit i is set in s.

Parameters
[in]sThe PC bitset.
[in]iThe PC to test.
Returns
True when present; false for any index beyond the set.

◆ digit_set()

constexpr char_class real::detail::digit_set ( )
constexpr

The ASCII digit set behind \d (Python re.ASCII semantics).

Returns
The set [0-9].

◆ emit_utf8_trie()

constexpr void real::detail::emit_utf8_trie ( byte_program bp,
const utf8_trie trie,
std::int32_t  after,
range_intern_table seen 
)
constexpr

Emits trie into bp as a deterministic split/klass/jump fragment, interning each edge's byte range through seen.

Accept edges jump to after (the construct's successor); the root is emitted first, so the fragment's entry is its base pc, and disjoint ranges mean at most one branch matches any byte.

Every edge class here is a SINGLE range (set_range below), so (lo, hi) is an exact key and two edges with the same range can share one interned class. Without that sharing a UTF-8 trie interns the same range once per edge – the continuation range 0x80..0xBF sits on nearly every node – and the redundancy compounds across occurrences, since each \w+ emits its own full trie. The caller owns seen so it spans every occurrence in one program, which is where most of the duplication lives.

Sharing an index is safe because a class index is only ever read as "which byte set" – the alphabet, onepass's class_cover_, and the DFA all treat it that way; nothing uses it to tell two klass instructions apart.

Parameters
[in,out]bpByte program the fragment is appended to.
[in]trieThe trie to emit.
[in]afterProgram counter the accept edges jump to (the construct's successor).
[in,out]seenByte-range intern table, shared across every occurrence in one program.

◆ encode_utf8_bytes()

constexpr std::size_t real::detail::encode_utf8_bytes ( std::uint32_t  cp,
std::uint8_t(&)  out[4] 
)
constexpr

Encodes cp to its UTF-8 bytes in out, returning the length (1–4).

Parameters
[in]cpThe code point to encode. A scalar value is assumed: nothing here rejects a surrogate or a value above U+10FFFF, both being excluded by the caller.
[out]outReceives the bytes; only the first n are written, n being the return value.
Returns
The encoded length, 1 to 4.

◆ erase_shared_dfas()

void real::detail::erase_shared_dfas ( const regex_immutables immut)
inline

Retire this regex's slot (called from ~regex_immutables). Concurrent scans that still hold a shared_ptr via TLS keep the slot object alive until they release; clearing shared_dfa_slot::owner is what makes their cached copy stop matching, so a new regex landing on this address can never be served the retired slot.

The owner store is release and shared_dfa_for's check is acquire. That pairing is what a new regex at a REUSED address relies on: the allocator handing the address out again orders this erase before that construction, and a thread can only reach the new regex through some synchronization with its constructor, so the null is visible by the time it asks. The map entry drops under the lock; the last shared_ptr reference is released outside it.

Parameters
[in]immutThe regex being destroyed, whose slot is retired.

◆ extract_anchoring()

constexpr void real::detail::extract_anchoring ( std::span< const instr code,
pattern_hints hints 
)
constexpr

Records start anchoring: the first non-save instruction tells whether every match must begin at position 0 (\A/^ non-multiline) or at a line start.

Parameters
[in]codeThe program's instruction stream.
[in,out]hintsHints to record the anchoring in.

◆ extract_inner_literal()

constexpr inner_literal real::detail::extract_inner_literal ( const ast tree)
constexpr

Extract the best required inner literal from a pattern's AST (a pure function on the node pool).

Routed on by pike_vm::run in search mode, via its run_inner_literal.

Leading and trailing top-level \b/\B are peeled — recorded in inner_literal::wb_lead, inner_literal::wb_trail and inner_literal::prefix_skip — so \b\w+@\w+\b keeps the @ route; a mid-body wb anchor still declines. confirm_at on the full program re-checks the boundaries.

Parameters
[in]treeThe parsed pattern.
Returns
The best required literal, or a default-constructed inner_literal (len == 0) when the pattern declines.

◆ extract_prefix()

constexpr void real::detail::extract_prefix ( std::span< const instr code,
pattern_hints hints 
)
constexpr

Collects the required literal prefix and the exact-literal fast-path length.

The prefix is the consecutive leading byte instructions (saves and assertions do not consume, so they are crossed: every match still has to begin with the collected bytes; hints only ever filter candidate positions, the engine verifies). The exact-literal hint fires when those bytes ARE the whole match — no assertion appears after the first byte up to match (only saves may be crossed). Trailing/inter assertions ($, after, …) are post-filters that must go through the normal VM; leading assertions are fine.

Parameters
[in]codeThe program's instruction stream.
[in,out]hintsHints to record the prefix and the exact-literal length in.

◆ extract_rare_byte()

constexpr void real::detail::extract_rare_byte ( std::span< const instr code,
pattern_hints hints 
)
constexpr

Finds a required literal byte at a FIXED offset that is statically far rarer than the pattern's first-byte set, and records it (pattern_hints::rare_byte / rare_offset) so the search can memchr that one byte instead of scanning a common first-byte class per byte.

Walks the leading FIXED-WIDTH shape from the start: save/assert_position are crossed (no width), byte and klass each advance the byte offset by exactly one, and any byte is a candidate. It stops at the first variable-width or branching op — klass_cp (a code point is 1–4 bytes, so offsets past it are not fixed), split, jump, match. The chosen byte must be below an absolute rarity threshold and several times rarer than the first-byte set, or the existing first-byte scan already suffices. The hint only filters candidate starts; the VM still verifies, so it is always sound.

Parameters
[in]codeThe program's instruction stream.
[in,out]hintsHints to record the rare byte and its offset in.

◆ extract_rare_discriminant()

constexpr void real::detail::extract_rare_discriminant ( std::span< const instr code,
pattern_hints hints 
)
constexpr

Arms the rare-discriminant prefilter for shapes like https?://…: fixed prefix (http) + optional mono-byte (s?) + fixed mid with a rare disc (://).

Unlike extract_rare_byte, the disc need not sit at a fixed match offset (the optional changes it). Search memchr's the disc and back-verifies the optional shape — never memmem. Supersedes a weak literal-prefix scan when the disc is several times rarer than the first byte. Always sound: only filters candidates; the VM confirms.

Parameters
[in]codeThe program's instruction stream.
[in,out]hintsHints to record the discriminant and its surrounding shape in.

◆ find_byte()

constexpr std::size_t real::detail::find_byte ( std::string_view  text,
std::size_t  pos,
char  byte 
)
constexpr

Index of byte in text[pos..), or real::npos.

Uses memchr at run time and a plain loop during constant evaluation.

Parameters
[in]textThe subject text.
[in]posIndex to start scanning from.
[in]byteThe byte to find.
Returns
The index of the first occurrence at or after pos, else npos.

◆ find_bytes_cascade()

constexpr std::size_t real::detail::find_bytes_cascade ( std::string_view  text,
std::size_t  pos,
const char *  set,
std::uint8_t  n 
)
constexpr

Index of the first byte in text[pos..) that belongs to a small (2..4) first-byte set.

A cascade of std::memchr — one per set member — taking the minimum hit position. After each hit the scan window is narrowed to [pos, best), so later members only search the shorter prefix and a near hit makes the remaining calls cheap. This beats the one-test-per-byte bitmap loop when the set is small: memchr is vectorised in libc, so even four sparse scans cover ground far faster than a scalar byte loop. During constant evaluation the plain member-wise scan runs instead (the home-made path — the same shape the bitmap loop takes).

THE QUADRATIC FIX: for 2+ members, the window is grown exponentially (galloping search) from a modest initial probe, doubling each round, rather than handed the full remaining haystack up front. A caller that invokes this once per rejected candidate (next_candidate's icase small-set route) would otherwise pay one memchr per set member over text.size() - pos on EVERY such call; a set with an asymmetrically rare or entirely absent member (e.g. (?i)cafe's {c, C} on an all-lowercase haystack) turned that into a full remaining-text scan on every rejected candidate — O(n) candidates x O(n) scan = O(n^2), same family as A2's unbounded-reach fix but one level upstream (the candidate SEARCH, not the anchored walk once a candidate is found). The geometric series bounds one call's total scanned bytes to at most ~2x the distance to the actual hit (or the remaining text, on a true miss) — the standard galloping-search argument — independent of any one member's frequency.

FIX (mono/multi split): a single-member call (run_cascade_stop's class-loop stop-byte scan is the hot one — its stop_set_size is frequently 1) cannot exhibit the O(n^2) above by construction: one memchr call's own cost already equals its progress (the distance to the hit, or the whole range on a miss) — there is no second member whose scan could redundantly re-cover ground the first one already paid for. Windowing a mono-member call therefore adds pure overhead (per-round setup, the narrowing compare, the doubling arithmetic) for zero safety benefit, measured as a real x86 regression on stop-set-shaped patterns ([^\x01]+- style) once the general galloping fix landed. So n == 1 takes the direct pre-fix path — one unbounded memchr over [pos, text.size()) — and every n >= 2 call keeps the galloping loop exactly as the galloping fix landed it, untouched.

Parameters
[in]textThe subject text.
[in]posIndex to start scanning from.
[in]setPointer to the enumerated set members (first n valid).
[in]nNumber of valid members (1..6 — run_cascade_stop's stop_set allows up to 6).
Returns
The least index at or after pos whose byte is in the set, else npos.

◆ find_fold_index()

constexpr std::size_t real::detail::find_fold_index ( std::uint32_t  cp)
constexpr

Binary-searches unicode_fold_table for cp; returns its index, or unicode_fold_table_size if cp is not cased. An index (not a pointer into the table) keeps this usable in a constant expression on every compiler — g++ rejects a &table[i] != nullptr comparison inside a static_regex. Shared by the parser (is a literal cased?) and the compiler (its fold partners).

Parameters
[in]cpThe code point to look up.
Returns
Its index in unicode_fold_table, or unicode_fold_table_size when uncased.

◆ find_fold_lower_bound()

constexpr std::size_t real::detail::find_fold_lower_bound ( std::uint32_t  cp)
constexpr

Index of the first entry whose code point is at or after cp, or unicode_fold_table_size if none is. The seek half of find_fold_index, exposed on its own so a caller holding a RANGE enters the table once and walks forward instead of scanning it whole – see real::detail::unicode_casefold.

Parameters
[in]cpThe code point to seek.
Returns
The index of the first entry at or after cp; unicode_fold_table_size when none is.

◆ find_literal()

constexpr std::size_t real::detail::find_literal ( std::string_view  text,
std::size_t  pos,
std::string_view  literal 
)
constexpr

Index of the first occurrence of literal in text[pos..), or real::npos.

The substring search behind the inner-literal prefilter. A single byte delegates to find_byte (one memchr). For a multi-byte literal it scans for the lead byte with memchr (SIMD at run time) and verifies the tail — a portable substring search that needs no memmem (absent on MSVC), and stays a plain loop during constant evaluation.

Parameters
[in]textThe subject text.
[in]posIndex to start searching from.
[in]literalThe literal to locate.
Returns
The index of the first occurrence at or after pos, else npos.

◆ find_members()

std::size_t real::detail::find_members ( std::string_view  text,
std::size_t  pos,
const std::array< std::uint8_t, 8 > &  mem,
std::uint8_t  n 
)
inline

Least index at or after pos whose byte is one of n members, in ONE pass.

The difference from find_bytes_cascade is the whole reason this exists: that function runs one memchr PER member, so an eight-member set costs eight sweeps of the subject. A consumer that wants to skip N per-member searches by scanning once therefore gains nothing from it – measured: a six-byte union over a 8 KB subject cost what the six searches it replaced cost, for no net gain at all. This loop tests all n members against sixteen bytes at a time, which is what the engine's own small_set band (2..8) is served by.

Parameters
[in]textThe subject.
[in]posIndex to start scanning from.
[in]memThe member bytes, already in the mask load's layout (first n valid).
[in]nHow many members, 1..8.
Returns
The least index at or after pos whose byte is a member, else npos.

◆ find_prefix()

constexpr std::size_t real::detail::find_prefix ( std::string_view  text,
std::size_t  pos,
std::string_view  prefix 
)
constexpr

First position >= pos where prefix occurs in text, or npos.

A thin wrapper over the platform's substring search, which is correct and well tuned for the short prefixes (<= 16 bytes) the analyzer extracts.

Parameters
[in]textThe subject text.
[in]posIndex to start searching from.
[in]prefixThe literal to locate (empty matches at pos).
Returns
The index of the first occurrence at or after pos, else npos.

◆ find_rare_disc_candidate()

constexpr std::size_t real::detail::find_rare_disc_candidate ( std::string_view  text,
std::size_t  pos,
const pattern_hints hints,
bool *  density_abandon = nullptr 
)
constexpr

Next candidate start for the rare-discriminant prefilter, or real::npos.

Scans for hints.rare_disc with find_byte (memchr/SIMD), then back-verifies [prefix][opt?][disc][after]. Returns the verified match start if it is ≥ pos.

Density abandon: when the disc is dense (many hits that fail back-verify), sets density_abandon and returns npos so the caller can sticky-switch to the prefix path for the rest of the haystack (same contract as the IL density gate — never miss a match).

Parameters
[in]textSubject.
[in]posLower bound on the returned start.
[in]hintsThe armed hints, read for the discriminant and its shape.
[out]density_abandonWhen non-null, set if the disc proved too dense to be worth scanning.
Returns
The verified candidate start, or real::npos when there is none.

◆ fingerprint_cp_class_content()

constexpr std::uint64_t real::detail::fingerprint_cp_class_content ( const char_class ascii,
const code_range ranges,
std::uint32_t  range_count 
)
constexprprivate

FNV-1a 64-bit content fingerprint of an ASCII bitmap + a contiguous range span. Used once at intern_cp_class (compile time / first intern); match time only reads cp_class::fingerprint. Constexpr so static_regex stays happy.

Parameters
[in]asciiThe class's ASCII bitmap.
[in]rangesPointer to its first non-ASCII range.
[in]range_countRanges belonging to it.
Returns
The content hash, equal for two classes holding the same code points.

◆ first_high_byte()

constexpr std::size_t real::detail::first_high_byte ( std::string_view  text,
std::size_t  pos,
std::size_t  end 
)
constexpr

Index of the first byte >= 0x80 in text[pos, end), or end if the range is pure ASCII.

A SWAR scan for the high bit: load eight bytes at a time (a memcpy into a std::uint64_t, so it is alignment- and aliasing-safe) and test & 0x8080…; a clear word skips eight ASCII bytes at once. On a hit the eight bytes are re-checked scalarly (endianness-free, and only for the one straddling word); the head/tail run scalar. During constant evaluation the plain scalar loop runs.

Parameters
[in]textThe subject text.
[in]posStart of the range.
[in]endExclusive end of the range (<= text.size()).
Returns
The least index in [pos, end) whose byte is >= 0x80, else end.

◆ fixed_run_width()

constexpr std::int32_t real::detail::fixed_run_width ( std::span< const instr code)
constexpr

Total consuming width (in bytes) of a straight-line byte/klass program: save 0, an interleaved byte/klass/save sequence with no nested capturing groups, save 1, match – the same shape detect_fast_shapes's fixed_shape check recognizes, factored out so a SEPARATE complete program (e.g. the inner-literal prefix sub-program, compiled on its own AST) can be measured the same way without re-deriving the walk.

Parameters
[in]codeA complete instruction stream (save 0 ... save 1, match).
Returns
The number of byte/klass ops consumed, or -1 if code is not this shape.

◆ fixed_shape_pair_route_disabled()

bool & real::detail::fixed_shape_pair_route_disabled ( )
inline

Test seam: force the matcher off the heterogeneous fixed-shape pair-filter route onto the ordinary run_fixed_shape walk, so a differential can assert routed and unrouted agree. The route is transparent by contract (it only filters candidates; the same match_fixed_body_wb verify decides every one of them), and this seam is what proves it. Not for production use.

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ fixed_shape_route_disabled()

bool & real::detail::fixed_shape_route_disabled ( )
inline

Test seam: force the matcher off the fixed-shape walk (run_fixed_shape) onto the general Pike loop, so a differential can assert routed and unrouted agree.

This route had NO seam, and that gap was not harmless: it is what date ([0-9]{4}-[0-9]{2}-[0-9]{2}, docs/BENCHMARKS.md §A's weakest row) actually takes, and the test that claimed to cover the shape reached for inner_literal_route_disabled instead – which does nothing for a fixed_shape pattern, because the inner-literal gate excludes them. Both arms of that differential therefore ran the same code and asserted nothing. Verified with the route counters: routed and unrouted both billed fixed_shape 3092 times over 3091 matches. Not for production use.

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ fold_ascii_case()

constexpr void real::detail::fold_ascii_case ( char_class klass)
constexpr

Closes klass under ASCII case folding.

Whenever a letter is present its other-case twin is added. Applied to a class before negation, so [^a] with icase rejects both 'a' and 'A', matching Python.

Parameters
[in,out]klassThe class to fold in place.

◆ il_density_last_abandoned()

bool & real::detail::il_density_last_abandoned ( )
inline

Test observability : whether the inner-literal density gate last abandoned the route.

The gate decides only which of two routes runs, and both produce identical spans by contract – which is what leaves tests/engine/test_il_density_gate.cpp unable to see it at all. That file pins semantic transparency, correctly and thoroughly, and therefore cannot react to real::detail::pike_vm::il_density_milli_threshold moving: the spans are equal whichever way the gate goes. That is why the constant has no test guarding its value – there is nothing semantic to assert, and this seam is what makes the two routes comparable at all.

One store, on a path that already writes two sticky fields beside it.

Returns
Reference to the process-wide flag; clear it before a search to arm it.

◆ immut_build_mu()

std::mutex & real::detail::immut_build_mu ( const regex_immutables immut)
inline

Striped rebuild lock for pike_vm::ensure_immutables (not on regex_immutables — layout isolation). Distinct from shared_dfa_map_mu / slot.mu so reset_shared_dfas cannot self-deadlock. Different immutables rarely share a stripe.

Parameters
[in]immutThe cache whose stripe is wanted; hashed by address, never dereferenced.
Returns
The stripe guarding that cache's build.

◆ inner_literal_guard_disabled()

bool & real::detail::inner_literal_guard_disabled ( )
inline

Test seam: force the inner-literal small-haystack guard off, so the route fires on any size. In production the guard uses a cold floor (regex_immutables::il_min_haystack) on the first candidate-scan and il_warm_floor thereafter (shared reverse DFA in shared_dfa_slot). Correctness suites use tiny inputs, so they set this to exercise the route rather than the core fallback. Not for production use.

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ inner_literal_route_disabled()

bool & real::detail::inner_literal_route_disabled ( )
inline

Test seam: force the matcher off the inner-literal search route onto the core search, so a differential can assert routed and unrouted searches agree. Not for production use — the route is transparent by contract (its reverse bound never advances mid-search, so it cannot miss a leftmost match), and this only exists to prove it.

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ is_any_non_ascii()

constexpr bool real::detail::is_any_non_ascii ( const std::vector< code_range > &  ranges)
constexpr

Whether ranges is exactly the whole non-ASCII space [U+0080, U+10FFFF] — the "any non-ASCII code point" shape emitted by compiler::emit_any_codepoint_class.

Parameters
[in]rangesThe class's non-ASCII ranges.
Returns
Whether they are exactly the one range covering all of non-ASCII.

◆ is_ascii_word_byte()

constexpr bool real::detail::is_ascii_word_byte ( std::uint8_t  byte)
constexpr

Reports whether byte is an ASCII "word" byte ([0-9A-Za-z_]).

Parameters
[in]byteThe byte to classify.
Returns
true for ASCII word bytes, used by \b / \w.

◆ is_ascii_word_subset_class()

constexpr bool real::detail::is_ascii_word_subset_class ( const char_class cls)
constexprnoexcept

True if every member of cls is an ASCII word byte (subset of \w under bytes/re.A).

Parameters
[in]clsThe byte class under test.
Returns
Whether it is non-empty and every member is an ASCII word byte.

◆ is_binprop_cp()

constexpr bool real::detail::is_binprop_cp ( binprop  prop,
char32_t  cp 
)
constexpr

Whether cp has the binary property prop (== the UCD).

Parameters
[in]propThe property to test for.
[in]cpThe code point to test.
Returns
Whether cp has prop.

◆ is_digit_cp()

constexpr bool real::detail::is_digit_cp ( char32_t  cp)
constexpr

Whether cp is a Unicode digit code point (== re \d).

Parameters
[in]cpThe code point to test.
Returns
Whether it is a member of digit_ranges.

◆ is_fixed_alternation()

constexpr bool real::detail::is_fixed_alternation ( std::span< const instr code,
std::uint8_t *  out_wb_lead = nullptr,
std::uint8_t *  out_wb_trail = nullptr,
std::uint8_t *  out_body_pc = nullptr,
std::int32_t *  out_branch_count = nullptr 
)
constexpr

Alternation of straight-line byte/klass branches, optionally wrapped in \b/\B.

Layout: save 0, optional lead word-boundary assert, split chain of branches, optional trail word-boundary assert, save 1, match. Branch jumps target the first instruction after the last branch (trail assert or save 1). Captures other than group 0, nested branches, empty branches, and non-wb assertions all disqualify.

Parameters
[in]codeThe instruction stream.
[out]out_wb_leadOptional; receives lead wb hint (0/1/2).
[out]out_wb_trailOptional; receives trail wb hint (0/1/2).
[out]out_body_pcOptional; receives first branch/split pc after lead wrap.
[out]out_branch_countOptional; receives the branch count (already tracked internally to enforce the ">= 2 branches" rule below) – lets a caller pick a runtime STRATEGY (e.g. Aho-Corasick past a literal-count threshold) without re-walking the split chain a second time. Does not change eligibility: still requires >= 2 branches.
Returns
true if the program has that shape with at least two branches.

◆ is_full_ascii_word_class()

constexpr bool real::detail::is_full_ascii_word_class ( const char_class cls)
constexprnoexcept

True if cls is exactly the ASCII word set [0-9A-Za-z_] (\w under bytes/re.A).

Parameters
[in]clsThe byte class under test.
Returns
Whether it is exactly \w, neither a subset nor a superset.

◆ is_full_unicode_word_cp_class()

constexpr bool real::detail::is_full_unicode_word_cp_class ( const cp_class cc,
std::span< const code_range all_ranges 
)
constexprnoexcept

True if cc is exactly the canonical Unicode \w class (not a user superset).

Compares the ASCII bitmap to is_ascii_word_byte and the non-ASCII range slice to word_ranges (generated, same table the compiler uses for \w). A threshold on range_count alone is unsound: [\w😀] has the \w ASCII half plus one extra range and would pass >= 200, but \b[\w😀]+\b is NOT equivalent to [\w😀]+.

Parameters
[in]ccThe code-point class under test.
[in]all_rangesProgram flat range buffer (cc indexes a slice of it).
Returns
Whether cc is exactly Unicode \w.

◆ is_gc_cp()

constexpr bool real::detail::is_gc_cp ( gc_property  prop,
char32_t  cp 
)
constexpr

Whether cp is in the General_Category property prop (== the UCD).

Parameters
[in]propThe General_Category to test for.
[in]cpThe code point to test.
Returns
Whether cp is in prop.

◆ is_script_cp()

constexpr bool real::detail::is_script_cp ( script  sc,
char32_t  cp 
)
constexpr

Whether cp belongs to Script sc (== the UCD).

Parameters
[in]scThe Script to test for.
[in]cpThe code point to test.
Returns
Whether script_of answers sc. Exclusive: a code point has exactly one Script.

◆ is_scx_cp()

constexpr bool real::detail::is_scx_cp ( script  sc,
char32_t  cp 
)
constexpr

Whether cp is in the Script_Extensions of sc (== the UCD). NOT exclusive: a code point can satisfy this for several script values at once.

Parameters
[in]scThe Script to test for.
[in]cpThe code point to test.
Returns
Whether sc is in cp's Script_Extensions set.

◆ is_space_cp()

constexpr bool real::detail::is_space_cp ( char32_t  cp)
constexpr

Whether cp is a Unicode whitespace code point (== re \s).

Parameters
[in]cpThe code point to test.
Returns
Whether it is a member of space_ranges.

◆ is_unicode_word_subset_cp_class()

constexpr bool real::detail::is_unicode_word_subset_cp_class ( const cp_class cc,
std::span< const code_range all_ranges 
)
constexprnoexcept

True if cc is a non-empty subset of Unicode \w (safe for maximal-run + \b wrap).

Supersets like [\w😀] must NOT take the WRAP rule: a maximal class run can start on a non-word member and skip over a later word-bounded sub-run.

Parameters
[in]ccThe code-point class under test.
[in]all_rangesProgram flat range buffer (cc indexes a slice of it).
Returns
Whether cc is non-empty and wholly inside Unicode \w.

◆ is_word_boundary_kind()

constexpr bool real::detail::is_word_boundary_kind ( assert_kind  kind)
constexprnoexcept

True if kind is \b or \B (the only position asserts a fast path wraps).

Parameters
[in]kindAssertion kind from assert_position.
Returns
Whether it is a word-boundary assertion.

◆ is_word_cp()

constexpr bool real::detail::is_word_cp ( char32_t  cp)
constexpr

Whether cp is a Unicode word code point (== re \w).

Parameters
[in]cpThe code point to test.
Returns
Whether it is a member of word_ranges.

◆ lazy_dfa_route_disabled()

bool & real::detail::lazy_dfa_route_disabled ( )
inline

Test seam: force the matcher off the lazy-DFA route onto the pure Pike VM, so a differential can assert that routed and unrouted searches give identical results within one binary. Not for production use — the routing is transparent by contract, and this only exists to prove it.

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ make_utf8_second_byte_bounds_table()

constexpr std::array< utf8_second_byte_bounds, 256 > real::detail::make_utf8_second_byte_bounds_table ( )
constexpr

Builds utf8_second_byte_bounds_table (a plain function so the 256-entry table is four lines of exceptions, not a 256-line literal).

Returns
The table, indexed by lead byte.

◆ node_nullable()

constexpr bool real::detail::node_nullable ( const ast tree,
std::int32_t  idx 
)
constexpr

True if the AST subtree rooted at idx can match the empty string. concat: every child nullable; alternation: some branch nullable; group: its body nullable; repeat: min == 0 or its body nullable; byte/klass/any: never (they always consume exactly one unit). empty/anchor/lookaround are always zero-width by construction — never consuming input as part of the surrounding match — so they are always nullable here; not an approximation for those three, the exact contribution of those node kinds to the enclosing match's width. Used by ast_has_nullable_captured_repeat to decide whether a capturing group's body is nullable.

Parameters
[in]treeThe AST.
[in]idxRoot of the subtree; a negative index reads as nullable (an absent body).
Returns
Whether the subtree can match the empty string.

◆ parse()

constexpr ast real::detail::parse ( std::string_view  pattern,
flags  initial_flags = flags::none 
)
constexpr

Parses pattern into an ast (convenience over parser).

Parameters
[in]patternThe pattern text.
[in]initial_flagsConstructor flags; only verbose affects parsing.
Returns
The parsed AST.
Exceptions
real::regex_erroron unsupported or malformed syntax.

◆ parse_shape_close()

constexpr shape_close real::detail::parse_shape_close ( std::span< const instr code,
std::size_t  from 
)
constexprnoexcept

Peels a fixed shape's optional trail \b/\B, then its save 1 and match.

Parameters
[in]codeThe program's instruction stream.
[in]fromProgram counter just past the body.
Returns
Which trail wrap was found; ok false when the tail is not exactly save 1, match.

◆ parse_shape_lead()

constexpr shape_lead real::detail::parse_shape_lead ( std::span< const instr code)
constexprnoexcept

Peels a fixed shape's save 0 and its optional lead \b/\B.

Parameters
[in]codeThe program's instruction stream.
Returns
Where the body begins and which lead wrap was found; ok false when the shape disqualifies.

◆ peel_optional_wb()

constexpr bool real::detail::peel_optional_wb ( std::span< const instr code,
std::size_t &  p,
std::uint8_t &  hint 
)
constexprnoexcept

Peel an optional \b/\B assertion at p.

If p is not an assert, leaves hint at 0 and returns true. If it is a word-boundary assert, records the hint, advances p, returns true. If it is any other assert, returns false (shape disqualified for wb-wrapping fast paths).

Lead and trail are the same operation. This was two functions, peel_optional_lead_wb and peel_optional_trail_wb, byte-identical but for the out-parameter's name — nothing here looks at WHERE p points, so the position is entirely the caller's. Their doc comments already said "same contract as", and the risk was not the duplicate lines but a fix landing on one of two copies that both feed load-bearing hint decisions.

Parameters
[in]codeInstruction stream.
[in,out]pProgram counter (advanced past the assert when peeled).
[out]hintHint 0/1/2 — see wb_hint_of.
Returns
false if a non-wb assert blocks the shape.

◆ possessive_fastpath_disabled()

bool & real::detail::possessive_fastpath_disabled ( )
inline

Test/profile seam : force the matcher off the possessive-loop fast paths (bare/suffixed/delimited X*+/X++) onto the general VM, so a differential can assert route-auto and forced-general agree on every input — the route-agreement pattern applied to the new recognizers. Not for production use — same contract as the other route-disabled seams.

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ prefilter_note_scan()

void real::detail::prefilter_note_scan ( std::size_t  n)
inlinenoexcept

Bill n scanned bytes to prefilter_work_units. A no-op unless the test binary defines REAL_TEST_INSTRUMENT.

Parameters
[in]nBytes the caller just scanned.

◆ prefilter_work_units()

std::uint64_t & real::detail::prefilter_work_units ( )
inlinenoexcept

Prefilter work counter for the O(n) vs O(n²) smoke test. Always declared (clang-tidy / tests see the symbol). Billing is a no-op unless REAL_TEST_INSTRUMENT is defined on the test binary — wheel/prod pay nothing.

Returns
A reference to the process-wide counter.

◆ prefix_reverse_start()

std::size_t real::detail::prefix_reverse_start ( const ast tree,
std::int32_t  count,
flags  compile_flags,
std::string_view  text,
std::size_t  h,
std::size_t  min_start 
)
inline

The match start for a literal candidate at h: reverse-match the prefix (the first count top-level children) ending at h, bounded below by min_start. count == 0 means the literal is at the head, so the reverse is the identity (the match starts at the candidate). Returns npos when the prefix cannot reach a start (an orphan candidate). Runtime only — the reverse DFA is not constexpr; a static_regex would keep the inner-literal path dynamic.

The prefix is compiled through the normal path: its capturing groups become save ops, which build_byte_program drops as zero-width, so the byte program (and the reverse over it) is capture-free by construction — no separate capture-free compile is needed. Top-level \b/\B are peeled before the prefix is built (extract_inner_literal / build_prefix_ast with skip); other anchors and lookarounds still decline extraction, so an extracted pattern's prefix stays byte-program eligible.

Parameters
[in]treeThe pattern's AST, which the prefix is rebuilt from.
[in]countTop-level children forming the prefix; 0 means the literal is at the head.
[in]compile_flagsFlags to compile the prefix with, matching the whole pattern's.
[in]textSubject.
[in]hOffset of the literal candidate (the prefix must end here).
[in]min_startLower bound the reverse walk will not cross.
Returns
The match start, or real::npos when the prefix cannot reach one.

◆ rare_disc_route_disabled()

bool & real::detail::rare_disc_route_disabled ( )
inline

Test seam: force off the rare-discriminant prefilter (https?:// memchr-: route) onto prefix/first-byte search, so a differential can assert routed and unrouted agree.

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ reset_shared_dfas()

void real::detail::reset_shared_dfas ( regex_immutables immut)
inline

Drop any DFAs cached for immut (caller holds nothing; takes map + slot locks). Invoked from pike_vm's ensure_immutables rebuild so a reused immutables address — or the same address under a new program — cannot keep a previous pattern's DFAs.

Parameters
[in]immutThe regex whose cached DFAs are dropped.

◆ resolve_binprop()

constexpr binprop real::detail::resolve_binprop ( std::string_view  loose)
constexpr

Resolve a loose-normalized binary-property name to its value, or count if unknown.

Parameters
[in]looseA name already put through the parser's loose normalization.
Returns
The property, or binprop::count when no alias matches.

◆ resolve_class_wb_hints()

constexpr bool real::detail::resolve_class_wb_hints ( bool  full_word,
bool  word_sub,
bool  maximal_run,
std::uint8_t  lead,
std::uint8_t  trail,
std::uint8_t &  out_lead,
std::uint8_t &  out_trail 
)
constexprnoexcept

DROP / WRAP policy for class / cp-class loops under optional \b/\B wraps.

  • Full word + \b on a maximal (+) run: drop the boundaries (the DROP rule); see wb_redundant_for_full_word.
  • Proper word subset + \b, or full word + \b on a single atom: keep the wrap (the WRAP rule).
  • \B on a maximal run: unarm — the runner skips whole class runs on a failed lead check, but \B legitimately starts mid-run (\B\w+ on "hello" → "ello"). That skip is unsound; stay on the general VM (nothing here invents a mid-run scanner).
  • \B on a single atom (\B\w, \B\d, …): keep the wrap — each candidate is one code point, so a failed lead check advances one atom and mid-run hits are found.
  • Non-word-subset class under any wb: unarm (superset maximal-run is unsound).
  • Bare (no wb): arm with zero wb hints.
Parameters
[in]full_wordExact \w class (ASCII or Unicode table identity).
[in]word_subNon-empty subset of \w.
[in]maximal_runWhether the class loop is a greedy + (a maximal run, so any valid start already sits at a word/non-word transition) rather than a single code point (which may start anywhere inside a word run, where the DROP rule's redundancy argument does not hold).
[in]leadPeeled lead hint.
[in]trailPeeled trail hint.
[out]out_leadHints to store (0 when dropped).
[out]out_trailHints to store (0 when dropped).
Returns
true if the fast path should arm.

◆ resolve_gc()

constexpr gc_property real::detail::resolve_gc ( std::string_view  loose)
constexpr

Resolve a loose-normalized General_Category name to its property, or count if unknown.

Parameters
[in]looseA name already put through the parser's loose normalization.
Returns
The property, or gc_property::count when no alias matches.

◆ resolve_script()

constexpr script real::detail::resolve_script ( std::string_view  loose)
constexpr

Resolve a loose-normalized Script name to its value, or count if unknown.

Parameters
[in]looseA name already put through the parser's loose normalization.
Returns
The Script, or script::count when no alias matches.

◆ scratch_code_tier()

constexpr std::size_t real::detail::scratch_code_tier ( std::size_t  code_size)
constexpr

Rounds a program length up to the scratch capacity tier it shares with its neighbours.

Sharing static_pike_scratch is by exact template arguments, so keying it on the exact code_size means two patterns one instruction apart still instantiate every Pike VM route twice. Rounding to powers of two collapses neighbours onto one type while keeping the over-allocation bounded by a factor of two, where a coarse ladder would multiply the smallest patterns' scratch several times over. The floor of 8 keeps the ladder from splintering at the bottom, where the patterns are densest and the absolute sizes smallest.

Rounding UP only: every capacity derived from this is a bound the exact size must not exceed, so a tier is always safe where the measured value was.

Parameters
[in]code_sizeThe program's exact instruction count.
Returns
The tier capacity, a power of two and at least 8.

◆ script_of()

constexpr script real::detail::script_of ( char32_t  cp)
constexpr

The Script of cp (binary search; Unknown when no range covers it).

Parameters
[in]cpThe code point to look up.
Returns
Its Script, or script::Unknown when no range covers it.

◆ shared_dfa_for()

shared_dfa_slot & real::detail::shared_dfa_for ( regex_immutables immut)
inline

Resolve the process-wide DFA slot for this regex (map insert under shared_dfa_map_mu).

A thread-local last-hit cache stands in front of the map, because a dense inner-literal scan would otherwise take the map mutex once per candidate. The cache does not live on regex_immutables — that struct sits on the class-loop path's own cache lines, and widening it is measurable there. It holds a shared_ptr rather than a raw pointer, so an erase cannot free a slot a scan is still walking, and it validates the hit against the slot's own shared_dfa_slot::owner — ownership being per slot, one regex's destruction costs only the threads that were using it, where a process-wide epoch counter would send every thread back to the map.

Parameters
[in]immutThe regex whose slot is wanted.
Returns
Its slot, created on first use; never null.

◆ shared_dfa_map()

std::unordered_map< const regex_immutables *, std::shared_ptr< shared_dfa_slot > > & real::detail::shared_dfa_map ( )
inline

Process-wide map. Intentionally never destroyed (leaky singleton): a static map would tear down at exit while other statics' ~regex_immutables still call erase_shared_dfas. The OS reclaims the map at process exit — not an accumulating leak; entries are erased on dtor.

THE ONE PLACE these headers use std::unordered_map, and the exception is stated rather than silent. The rule (lazy_dfa.hpp's hash_trans) avoids std::hash/std::unordered_map because their out-of-line libc++ symbols drift across toolchains, which matters for anything a scan touches. This map is consulted once per WALK to find a process-wide DFA slot, never per match and never in constant evaluation, so a drifting symbol costs a call it already pays. Anything on a scan path still uses the in-house FNV hash-consing. check-layers enforces the rule and accepts REAL_ALLOW_STD_HASH on the lines below as this exception.

Returns
The map, keyed by regex_immutables address.

◆ shared_dfa_map_mu()

std::mutex & real::detail::shared_dfa_map_mu ( )
inline

The mutex guarding insert/erase on the process-wide shared_dfa_slot map.

   Distinct from \ref shared_dfa_slot::mu, which guards a slot's DFAs: holding a slot never
   requires holding the map, which is what lets \ref erase_shared_dfas run without deadlocking
   a thread mid-scan.
Returns
The process-wide map mutex.

◆ shared_dfa_map_size_for_test()

std::size_t real::detail::shared_dfa_map_size_for_test ( )
inline

Test/audit: number of live shared-DFA map entries (process-wide). Not for production.

Returns
The live entry count.

◆ single_codepoint_atom()

constexpr std::uint32_t real::detail::single_codepoint_atom ( const ast tree,
std::int32_t  index 
)
constexpr

The code point a node spells, when it is exactly one non-ASCII literal character.

A non-ASCII literal in text mode is parsed to its UTF-8 bytes wrapped in a concat (emit_codepoint_utf8), so é is concat(byte C3, byte A9). Two places need to recognise that shape and treat it as the single atom it is – the parser, so a POSSESSIVE quantifier over it is Tier-1 eligible, and the compiler, so an UNBOUNDED one routes as a code-point class – and they ask here rather than each restating the test.

The strict decode is the whole guard: it must consume every byte the chain holds, so a concat of MORE than one code point ((?:éé), (?:ab)) is refused. Treating those as one atom would change what a quantifier repeats.

Parameters
[in]treeThe AST holding index.
[in]indexThe node to inspect.
Returns
The code point, or not_a_single_codepoint.

◆ space_set()

constexpr char_class real::detail::space_set ( )
constexpr

The ASCII whitespace set behind \s under flags::ascii / flags::bytes.

Returns
The set [ \t\n\r\f\v].
Note
NOT str.isspace(), which is the broader Unicode-aware predicate and agrees instead with Python's text-mode \s. The difference is FS/GS/RS/US (U+001CU+001F): text mode accepts them, ASCII mode does not. They belong in the generated space_ranges table, which lists them; adding them here would make ASCII-mode \s accept four bytes Python's own ASCII \s rejects.

◆ subtree_has_nullable_capturing_group()

constexpr bool real::detail::subtree_has_nullable_capturing_group ( const ast tree,
std::int32_t  idx 
)
constexpr

True if the AST subtree rooted at idx contains a CAPTURING group (group >= 0, i.e. not (?:...)) whose own body is nullable (node_nullable). Descends through every node kind that can nest a group (including a further repeat/lookaround) so a group need not be the direct child of the repeat this is called from — only transitively underneath it. Used only from ast_has_nullable_captured_repeat, on a repeat node's subtree.

Parameters
[in]treeThe AST.
[in]idxRoot of the subtree.
Returns
Whether a capturing group with a nullable body sits anywhere underneath.

◆ trailing_la_route_disabled()

bool & real::detail::trailing_la_route_disabled ( )
inline

Test seam: force the matcher off the trailing-lookaround class+ route onto the pure Pike VM, so a differential can assert routed and unrouted searches agree. Not for production use — the route is transparent by contract (same leftmost-first spans as the general loop on the eligible shape).

Returns
Reference to the process-wide seam flag; set it to true to take the route out.

◆ unicode_casefold()

constexpr class_def real::detail::unicode_casefold ( const class_def in)
constexpr

Expands a character class to its Unicode simple case-fold closure (text-mode icase).

The fold acts on the WHOLE class, cross-boundary in both directions, before negation:

  • Bitmap (iterate-members-lookup): each ASCII member (< 0x80) contributes its fold partners (ASCII partners re-enter the bitmap; non-ASCII partners like k↦Kelvin become code-point ranges). This is also the path the ASCII-letter literal fold takes, so there is one route.
  • Ranges (intersect-entries): every fold entry whose code point falls inside a class range contributes its partners (so a range attracts its ASCII partners, e.g. [K…]k, and [U+0080-U+10FFFF] attracts k/K back into the bitmap).

Idempotent on ASCII-only orbits ([a]{a, A}, no non-ASCII contamination). Partners that are already present are harmlessly re-added (the compiler tolerates redundant ranges).

Parameters
[in]inThe class as written.
Returns
Its case-fold closure: the folded ASCII bitmap plus the coalesced non-ASCII ranges.

◆ utf8_cont_set()

constexpr char_class real::detail::utf8_cont_set ( )
constexpr

The UTF-8 continuation-byte set 10xxxxxx.

Returns
The set [0x80, 0xBF].

◆ utf8_lead2_set()

constexpr char_class real::detail::utf8_lead2_set ( )
constexpr

The lead-byte set of a 2-byte UTF-8 sequence.

Returns
The set [0xC2, 0xDF].

◆ utf8_lead3_set()

constexpr char_class real::detail::utf8_lead3_set ( )
constexpr

The lead-byte set of a 3-byte UTF-8 sequence.

Returns
The set [0xE0, 0xEF].

◆ utf8_lead4_set()

constexpr char_class real::detail::utf8_lead4_set ( )
constexpr

The lead-byte set of a 4-byte UTF-8 sequence.

Returns
The set [0xF0, 0xF4].

◆ utf8_push_range()

constexpr void real::detail::utf8_push_range ( std::uint32_t  start,
std::uint32_t  end,
std::vector< utf8_byte_seq > &  out 
)
constexpr

Appends to out the byte-range sequences recognising exactly the UTF-8 encodings of [start, end] (RE2 / rust regex-syntax Utf8Sequences).

Recurses on two splits until the range encodes to a single tuple of byte ranges: first at a UTF-8 length boundary, so every sequence has one length; then at a continuation-byte boundary, so each byte position of a sequence covers a contiguous range. What comes out is canonical by construction — no overlong form, no surrogate encoding — which is what keeps a . or a negated class expanded through it from accepting malformed bytes as the character they resemble.

Parameters
[in]startFirst code point of the range.
[in]endLast code point of the range, inclusive; an inverted range appends nothing.
[in,out]outReceives the sequences, appended.

◆ utf8_range_sequences()

constexpr std::vector< utf8_byte_seq > real::detail::utf8_range_sequences ( std::uint32_t  lo,
std::uint32_t  hi 
)
constexpr

Canonical UTF-8 byte-range sequences for the code-point range [lo, hi], excluding the surrogate block [U+D800, U+DFFF] (so a negated class never matches a surrogate encoding).

Parameters
[in]loFirst code point of the range.
[in]hiLast code point of the range, inclusive.
Returns
The canonical sequences covering it, surrogates excluded — empty for an inverted range, or for one lying wholly inside the surrogate block.

◆ utf8_trie_emit_size()

constexpr std::size_t real::detail::utf8_trie_emit_size ( const utf8_trie trie)
constexpr

The instruction count emit_utf8_trie writes: an empty class is one dead klass; otherwise each node is a split-guarded chain of k byte ranges (3k - 1 instructions).

Parameters
[in]trieThe trie to measure.
Returns
Instructions the emission will occupy.

◆ wb_hint_of()

constexpr std::uint8_t real::detail::wb_hint_of ( assert_kind  kind)
constexprnoexcept

Encodes kind as a wb_lead/wb_trail hint value (1 = \b, 2 = \B); 0 if not a word boundary.

Parameters
[in]kindAssertion kind from assert_position.
Returns
1 for \b, 2 for \B, 0 for anything else.

◆ wb_redundant_for_full_word()

constexpr bool real::detail::wb_redundant_for_full_word ( std::uint8_t  lead,
std::uint8_t  trail 
)
constexprnoexcept

The DROP rule: \b next to a full-\w MAXIMAL run is redundant (\B never is). Only sound when the match is a greedy + run: a maximal run of \w can only ever START where the character before it is non-word (or absent) – that IS \b (or the text edge), so checking it again is redundant. A SINGLE code point (no +) has no such guarantee: \b\w may legally start mid-run (any word code point qualifies as a candidate start), so dropping the boundary there is unsound, not just conservative. The caller is responsible for only calling this when lead / trail came from a provably maximal-run shape (see resolve_class_wb_hints's maximal_run).

Parameters
[in]leadThe lead wrap hint (0/1/2, see wb_hint_of).
[in]trailThe trail wrap hint, same encoding.
Returns
True when at least one side is \b and neither is \B, so both may be dropped.

◆ word_after()

constexpr bool real::detail::word_after ( std::string_view  text,
std::size_t  pos,
bool  ascii_word 
)
constexpr

Word-ness of the code point starting at pos — the right side of a boundary. False at the text end or on a malformed sequence; ASCII / bytes / re.A stay byte-level.

Parameters
[in]textSubject.
[in]posBoundary position.
[in]ascii_wordRestrict word-ness to ASCII.
Returns
Whether the following code point is a word character.

◆ word_before()

constexpr bool real::detail::word_before ( std::string_view  text,
std::size_t  pos,
bool  ascii_word 
)
constexpr

Word-ness of the code point ending at pos — the left side of a boundary. False at the text start or on a malformed sequence; ASCII / bytes / re.A (ascii_word) stay byte-level.

Parameters
[in]textSubject.
[in]posBoundary position.
[in]ascii_wordRestrict word-ness to ASCII.
Returns
Whether the preceding code point is a word character.

◆ word_ranges_cover_interval()

constexpr bool real::detail::word_ranges_cover_interval ( char32_t  lo,
char32_t  hi 
)
constexprnoexcept

True if every code point in [lo, hi] is a Unicode word char (covered by word_ranges). Standalone form of word_ranges_cover_interval_from.

Parameters
[in]loFirst code point of the interval.
[in]hiLast code point of the interval, inclusive.
Returns
Whether every code point in it is a Unicode word character.

◆ word_ranges_cover_interval_from()

constexpr bool real::detail::word_ranges_cover_interval_from ( char32_t  lo,
char32_t  hi,
std::size_t &  cursor 
)
constexprnoexcept

True if every code point in [lo, hi] is a Unicode word char (word_ranges), resuming the scan at cursor and leaving it past the last range consulted.

word_ranges is sorted and disjoint, so a caller testing intervals in ascending order never needs to look at a range it has already passed — that is what cursor carries. Without it the scan restarts at index 0 on every step, and an interval spanning the whole word set then costs O(word_ranges_size^2): for \w (whose class IS the word set) that is 771^2 steps, measured at 1.79M instructions and 95 % of the cost of compiling \b\w+\b. With the cursor the whole subset test is one merge of two sorted lists.

cursor is a hint, never a precondition: if a range before it could still cover lo — a caller passing intervals out of order — the scan rewinds. So the answer never depends on the order the caller happens to use, only the speed does.

Parameters
[in]loFirst code point of the interval.
[in]hiLast code point of the interval (inclusive).
[in,out]cursorIndex to resume from, advanced in place.
Returns
true if every code point in the interval is a Unicode word character.

◆ word_set()

constexpr char_class real::detail::word_set ( )
constexpr

The ASCII word set behind \w.

Returns
The set [0-9A-Za-z_].

Variable Documentation

◆ ac_max_branch_expansion

constexpr std::size_t real::detail::ac_max_branch_expansion = 64
inlineconstexpr

Maximum concrete literal strings a single branch may expand into (icase klass fan-out).

A branch whose combinatorial expansion would exceed this declines AC for the WHOLE pattern, which then takes the ordinary pattern_hints::fixed_alternation route. The alternative is a trie whose size is the product of the branch's per-position member counts, with no bound.

◆ binprop_ASCII_Hex_Digit_ranges

constexpr code_range real::detail::binprop_ASCII_Hex_Digit_ranges[]
inlineconstexpr
Initial value:
{
{0x0030, 0x0039},
{0x0041, 0x0046},
{0x0061, 0x0066},
}

\p{ASCII_Hex_Digit} — 3 ranges, 22 code points.

◆ binprop_Bidi_Control_ranges

constexpr code_range real::detail::binprop_Bidi_Control_ranges[]
inlineconstexpr
Initial value:
{
{0x061C, 0x061C},
{0x200E, 0x200F},
{0x202A, 0x202E},
{0x2066, 0x2069},
}

\p{Bidi_Control} — 4 ranges, 12 code points.

◆ binprop_Dash_ranges

constexpr code_range real::detail::binprop_Dash_ranges[]
inlineconstexpr
Initial value:
{
{0x002D, 0x002D},
{0x058A, 0x058A},
{0x05BE, 0x05BE},
{0x1400, 0x1400},
{0x1806, 0x1806},
{0x2010, 0x2015},
{0x2053, 0x2053},
{0x207B, 0x207B},
{0x208B, 0x208B},
{0x2212, 0x2212},
{0x2E17, 0x2E17},
{0x2E1A, 0x2E1A},
{0x2E3A, 0x2E3B},
{0x2E40, 0x2E40},
{0x2E5D, 0x2E5D},
{0x301C, 0x301C},
{0x3030, 0x3030},
{0x30A0, 0x30A0},
{0xFE31, 0xFE32},
{0xFE58, 0xFE58},
{0xFE63, 0xFE63},
{0xFF0D, 0xFF0D},
{0x10D6E, 0x10D6E},
{0x10EAD, 0x10EAD},
}

\p{Dash} — 24 ranges, 31 code points.

◆ binprop_Default_Ignorable_Code_Point_ranges

constexpr code_range real::detail::binprop_Default_Ignorable_Code_Point_ranges[]
inlineconstexpr
Initial value:
{
{0x00AD, 0x00AD},
{0x034F, 0x034F},
{0x061C, 0x061C},
{0x115F, 0x1160},
{0x17B4, 0x17B5},
{0x180B, 0x180F},
{0x200B, 0x200F},
{0x202A, 0x202E},
{0x2060, 0x206F},
{0x3164, 0x3164},
{0xFE00, 0xFE0F},
{0xFEFF, 0xFEFF},
{0xFFA0, 0xFFA0},
{0xFFF0, 0xFFF8},
{0x1BCA0, 0x1BCA3},
{0x1D173, 0x1D17A},
{0xE0000, 0xE0FFF},
}

\p{Default_Ignorable_Code_Point} — 17 ranges, 4174 code points.

◆ binprop_Deprecated_ranges

constexpr code_range real::detail::binprop_Deprecated_ranges[]
inlineconstexpr
Initial value:
{
{0x0149, 0x0149},
{0x0673, 0x0673},
{0x0F77, 0x0F77},
{0x0F79, 0x0F79},
{0x17A3, 0x17A4},
{0x206A, 0x206F},
{0x2329, 0x232A},
{0xE0001, 0xE0001},
}

\p{Deprecated} — 8 ranges, 15 code points.

◆ binprop_Emoji_Component_ranges

constexpr code_range real::detail::binprop_Emoji_Component_ranges[]
inlineconstexpr
Initial value:
{
{0x0023, 0x0023},
{0x002A, 0x002A},
{0x0030, 0x0039},
{0x200D, 0x200D},
{0x20E3, 0x20E3},
{0xFE0F, 0xFE0F},
{0x1F1E6, 0x1F1FF},
{0x1F3FB, 0x1F3FF},
{0x1F9B0, 0x1F9B3},
{0xE0020, 0xE007F},
}

\p{Emoji_Component} — 10 ranges, 146 code points.

◆ binprop_Emoji_Modifier_ranges

constexpr code_range real::detail::binprop_Emoji_Modifier_ranges[]
inlineconstexpr
Initial value:
{
{0x1F3FB, 0x1F3FF},
}

\p{Emoji_Modifier} — 1 ranges, 5 code points.

◆ binprop_Hex_Digit_ranges

constexpr code_range real::detail::binprop_Hex_Digit_ranges[]
inlineconstexpr
Initial value:
{
{0x0030, 0x0039},
{0x0041, 0x0046},
{0x0061, 0x0066},
{0xFF10, 0xFF19},
{0xFF21, 0xFF26},
{0xFF41, 0xFF46},
}

\p{Hex_Digit} — 6 ranges, 44 code points.

◆ binprop_Hyphen_ranges

constexpr code_range real::detail::binprop_Hyphen_ranges[]
inlineconstexpr
Initial value:
{
{0x002D, 0x002D},
{0x00AD, 0x00AD},
{0x058A, 0x058A},
{0x1806, 0x1806},
{0x2010, 0x2011},
{0x2E17, 0x2E17},
{0x30FB, 0x30FB},
{0xFE63, 0xFE63},
{0xFF0D, 0xFF0D},
{0xFF65, 0xFF65},
}

\p{Hyphen} — 10 ranges, 11 code points.

◆ binprop_ID_Compat_Math_Continue_ranges

constexpr code_range real::detail::binprop_ID_Compat_Math_Continue_ranges[]
inlineconstexpr
Initial value:
{
{0x00B2, 0x00B3},
{0x00B9, 0x00B9},
{0x2070, 0x2070},
{0x2074, 0x207E},
{0x2080, 0x208E},
{0x2202, 0x2202},
{0x2207, 0x2207},
{0x221E, 0x221E},
{0x1D6C1, 0x1D6C1},
{0x1D6DB, 0x1D6DB},
{0x1D6FB, 0x1D6FB},
{0x1D715, 0x1D715},
{0x1D735, 0x1D735},
{0x1D74F, 0x1D74F},
{0x1D76F, 0x1D76F},
{0x1D789, 0x1D789},
{0x1D7A9, 0x1D7A9},
{0x1D7C3, 0x1D7C3},
}

\p{ID_Compat_Math_Continue} — 18 ranges, 43 code points.

◆ binprop_ID_Compat_Math_Start_ranges

constexpr code_range real::detail::binprop_ID_Compat_Math_Start_ranges[]
inlineconstexpr
Initial value:
{
{0x2202, 0x2202},
{0x2207, 0x2207},
{0x221E, 0x221E},
{0x1D6C1, 0x1D6C1},
{0x1D6DB, 0x1D6DB},
{0x1D6FB, 0x1D6FB},
{0x1D715, 0x1D715},
{0x1D735, 0x1D735},
{0x1D74F, 0x1D74F},
{0x1D76F, 0x1D76F},
{0x1D789, 0x1D789},
{0x1D7A9, 0x1D7A9},
{0x1D7C3, 0x1D7C3},
}

\p{ID_Compat_Math_Start} — 13 ranges, 13 code points.

◆ binprop_Ideographic_ranges

constexpr code_range real::detail::binprop_Ideographic_ranges[]
inlineconstexpr
Initial value:
{
{0x3006, 0x3007},
{0x3021, 0x3029},
{0x3038, 0x303A},
{0x3400, 0x4DBF},
{0x4E00, 0x9FFF},
{0xF900, 0xFA6D},
{0xFA70, 0xFAD9},
{0x16FE4, 0x16FE4},
{0x17000, 0x187F7},
{0x18800, 0x18CD5},
{0x18CFF, 0x18D08},
{0x1B170, 0x1B2FB},
{0x20000, 0x2A6DF},
{0x2A700, 0x2B739},
{0x2B740, 0x2B81D},
{0x2B820, 0x2CEA1},
{0x2CEB0, 0x2EBE0},
{0x2EBF0, 0x2EE5D},
{0x2F800, 0x2FA1D},
{0x30000, 0x3134A},
{0x31350, 0x323AF},
}

\p{Ideographic} — 21 ranges, 106477 code points.

◆ binprop_IDS_Binary_Operator_ranges

constexpr code_range real::detail::binprop_IDS_Binary_Operator_ranges[]
inlineconstexpr
Initial value:
{
{0x2FF0, 0x2FF1},
{0x2FF4, 0x2FFD},
{0x31EF, 0x31EF},
}

\p{IDS_Binary_Operator} — 3 ranges, 13 code points.

◆ binprop_IDS_Trinary_Operator_ranges

constexpr code_range real::detail::binprop_IDS_Trinary_Operator_ranges[]
inlineconstexpr
Initial value:
{
{0x2FF2, 0x2FF3},
}

\p{IDS_Trinary_Operator} — 1 ranges, 2 code points.

◆ binprop_IDS_Unary_Operator_ranges

constexpr code_range real::detail::binprop_IDS_Unary_Operator_ranges[]
inlineconstexpr
Initial value:
{
{0x2FFE, 0x2FFF},
}

\p{IDS_Unary_Operator} — 1 ranges, 2 code points.

◆ binprop_Join_Control_ranges

constexpr code_range real::detail::binprop_Join_Control_ranges[]
inlineconstexpr
Initial value:
{
{0x200C, 0x200D},
}

\p{Join_Control} — 1 ranges, 2 code points.

◆ binprop_Logical_Order_Exception_ranges

constexpr code_range real::detail::binprop_Logical_Order_Exception_ranges[]
inlineconstexpr
Initial value:
{
{0x0E40, 0x0E44},
{0x0EC0, 0x0EC4},
{0x19B5, 0x19B7},
{0x19BA, 0x19BA},
{0xAAB5, 0xAAB6},
{0xAAB9, 0xAAB9},
{0xAABB, 0xAABC},
}

\p{Logical_Order_Exception} — 7 ranges, 19 code points.

◆ binprop_Modifier_Combining_Mark_ranges

constexpr code_range real::detail::binprop_Modifier_Combining_Mark_ranges[]
inlineconstexpr
Initial value:
{
{0x0654, 0x0655},
{0x0658, 0x0658},
{0x06DC, 0x06DC},
{0x06E3, 0x06E3},
{0x06E7, 0x06E8},
{0x08CA, 0x08CB},
{0x08CD, 0x08CF},
{0x08D3, 0x08D3},
{0x08F3, 0x08F3},
}

\p{Modifier_Combining_Mark} — 9 ranges, 14 code points.

◆ binprop_Noncharacter_Code_Point_ranges

constexpr code_range real::detail::binprop_Noncharacter_Code_Point_ranges[]
inlineconstexpr
Initial value:
{
{0xFDD0, 0xFDEF},
{0xFFFE, 0xFFFF},
{0x1FFFE, 0x1FFFF},
{0x2FFFE, 0x2FFFF},
{0x3FFFE, 0x3FFFF},
{0x4FFFE, 0x4FFFF},
{0x5FFFE, 0x5FFFF},
{0x6FFFE, 0x6FFFF},
{0x7FFFE, 0x7FFFF},
{0x8FFFE, 0x8FFFF},
{0x9FFFE, 0x9FFFF},
{0xAFFFE, 0xAFFFF},
{0xBFFFE, 0xBFFFF},
{0xCFFFE, 0xCFFFF},
{0xDFFFE, 0xDFFFF},
{0xEFFFE, 0xEFFFF},
{0xFFFFE, 0xFFFFF},
{0x10FFFE, 0x10FFFF},
}

\p{Noncharacter_Code_Point} — 18 ranges, 66 code points.

◆ binprop_Other_Default_Ignorable_Code_Point_ranges

constexpr code_range real::detail::binprop_Other_Default_Ignorable_Code_Point_ranges[]
inlineconstexpr
Initial value:
{
{0x034F, 0x034F},
{0x115F, 0x1160},
{0x17B4, 0x17B5},
{0x2065, 0x2065},
{0x3164, 0x3164},
{0xFFA0, 0xFFA0},
{0xFFF0, 0xFFF8},
{0xE0000, 0xE0000},
{0xE0002, 0xE001F},
{0xE0080, 0xE00FF},
{0xE01F0, 0xE0FFF},
}

\p{Other_Default_Ignorable_Code_Point} — 11 ranges, 3776 code points.

◆ binprop_Other_ID_Continue_ranges

constexpr code_range real::detail::binprop_Other_ID_Continue_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0387, 0x0387},
{0x1369, 0x1371},
{0x19DA, 0x19DA},
{0x200C, 0x200D},
{0x30FB, 0x30FB},
{0xFF65, 0xFF65},
}

\p{Other_ID_Continue} — 7 ranges, 16 code points.

◆ binprop_Other_ID_Start_ranges

constexpr code_range real::detail::binprop_Other_ID_Start_ranges[]
inlineconstexpr
Initial value:
{
{0x1885, 0x1886},
{0x2118, 0x2118},
{0x212E, 0x212E},
{0x309B, 0x309C},
}

\p{Other_ID_Start} — 4 ranges, 6 code points.

◆ binprop_Other_Lowercase_ranges

constexpr code_range real::detail::binprop_Other_Lowercase_ranges[]
inlineconstexpr
Initial value:
{
{0x00AA, 0x00AA},
{0x00BA, 0x00BA},
{0x02B0, 0x02B8},
{0x02C0, 0x02C1},
{0x02E0, 0x02E4},
{0x0345, 0x0345},
{0x037A, 0x037A},
{0x10FC, 0x10FC},
{0x1D2C, 0x1D6A},
{0x1D78, 0x1D78},
{0x1D9B, 0x1DBF},
{0x2071, 0x2071},
{0x207F, 0x207F},
{0x2090, 0x209C},
{0x2170, 0x217F},
{0x24D0, 0x24E9},
{0x2C7C, 0x2C7D},
{0xA69C, 0xA69D},
{0xA770, 0xA770},
{0xA7F2, 0xA7F4},
{0xA7F8, 0xA7F9},
{0xAB5C, 0xAB5F},
{0xAB69, 0xAB69},
{0x10780, 0x10780},
{0x10783, 0x10785},
{0x10787, 0x107B0},
{0x107B2, 0x107BA},
{0x1E030, 0x1E06D},
}

\p{Other_Lowercase} — 28 ranges, 311 code points.

◆ binprop_Other_Uppercase_ranges

constexpr code_range real::detail::binprop_Other_Uppercase_ranges[]
inlineconstexpr
Initial value:
{
{0x2160, 0x216F},
{0x24B6, 0x24CF},
{0x1F130, 0x1F149},
{0x1F150, 0x1F169},
{0x1F170, 0x1F189},
}

\p{Other_Uppercase} — 5 ranges, 120 code points.

◆ binprop_Pattern_Syntax_ranges

constexpr code_range real::detail::binprop_Pattern_Syntax_ranges[]
inlineconstexpr
Initial value:
{
{0x0021, 0x002F},
{0x003A, 0x0040},
{0x005B, 0x005E},
{0x0060, 0x0060},
{0x007B, 0x007E},
{0x00A1, 0x00A7},
{0x00A9, 0x00A9},
{0x00AB, 0x00AC},
{0x00AE, 0x00AE},
{0x00B0, 0x00B1},
{0x00B6, 0x00B6},
{0x00BB, 0x00BB},
{0x00BF, 0x00BF},
{0x00D7, 0x00D7},
{0x00F7, 0x00F7},
{0x2010, 0x2027},
{0x2030, 0x203E},
{0x2041, 0x2053},
{0x2055, 0x205E},
{0x2190, 0x245F},
{0x2500, 0x2775},
{0x2794, 0x2BFF},
{0x2E00, 0x2E7F},
{0x3001, 0x3003},
{0x3008, 0x3020},
{0x3030, 0x3030},
{0xFD3E, 0xFD3F},
{0xFE45, 0xFE46},
}

\p{Pattern_Syntax} — 28 ranges, 2760 code points.

◆ binprop_Pattern_White_Space_ranges

constexpr code_range real::detail::binprop_Pattern_White_Space_ranges[]
inlineconstexpr
Initial value:
{
{0x0009, 0x000D},
{0x0020, 0x0020},
{0x0085, 0x0085},
{0x200E, 0x200F},
{0x2028, 0x2029},
}

\p{Pattern_White_Space} — 5 ranges, 11 code points.

◆ binprop_Prepended_Concatenation_Mark_ranges

constexpr code_range real::detail::binprop_Prepended_Concatenation_Mark_ranges[]
inlineconstexpr
Initial value:
{
{0x0600, 0x0605},
{0x06DD, 0x06DD},
{0x070F, 0x070F},
{0x0890, 0x0891},
{0x08E2, 0x08E2},
{0x110BD, 0x110BD},
{0x110CD, 0x110CD},
}

\p{Prepended_Concatenation_Mark} — 7 ranges, 13 code points.

◆ binprop_Quotation_Mark_ranges

constexpr code_range real::detail::binprop_Quotation_Mark_ranges[]
inlineconstexpr
Initial value:
{
{0x0022, 0x0022},
{0x0027, 0x0027},
{0x00AB, 0x00AB},
{0x00BB, 0x00BB},
{0x2018, 0x201F},
{0x2039, 0x203A},
{0x2E42, 0x2E42},
{0x300C, 0x300F},
{0x301D, 0x301F},
{0xFE41, 0xFE44},
{0xFF02, 0xFF02},
{0xFF07, 0xFF07},
{0xFF62, 0xFF63},
}

\p{Quotation_Mark} — 13 ranges, 30 code points.

◆ binprop_Radical_ranges

constexpr code_range real::detail::binprop_Radical_ranges[]
inlineconstexpr
Initial value:
{
{0x2E80, 0x2E99},
{0x2E9B, 0x2EF3},
{0x2F00, 0x2FD5},
}

\p{Radical} — 3 ranges, 329 code points.

◆ binprop_Regional_Indicator_ranges

constexpr code_range real::detail::binprop_Regional_Indicator_ranges[]
inlineconstexpr
Initial value:
{
{0x1F1E6, 0x1F1FF},
}

\p{Regional_Indicator} — 1 ranges, 26 code points.

◆ binprop_Unified_Ideograph_ranges

constexpr code_range real::detail::binprop_Unified_Ideograph_ranges[]
inlineconstexpr
Initial value:
{
{0x3400, 0x4DBF},
{0x4E00, 0x9FFF},
{0xFA0E, 0xFA0F},
{0xFA11, 0xFA11},
{0xFA13, 0xFA14},
{0xFA1F, 0xFA1F},
{0xFA21, 0xFA21},
{0xFA23, 0xFA24},
{0xFA27, 0xFA29},
{0x20000, 0x2A6DF},
{0x2A700, 0x2B739},
{0x2B740, 0x2B81D},
{0x2B820, 0x2CEA1},
{0x2CEB0, 0x2EBE0},
{0x2EBF0, 0x2EE5D},
{0x30000, 0x3134A},
{0x31350, 0x323AF},
}

\p{Unified_Ideograph} — 17 ranges, 97680 code points.

◆ binprop_Variation_Selector_ranges

constexpr code_range real::detail::binprop_Variation_Selector_ranges[]
inlineconstexpr
Initial value:
{
{0x180B, 0x180D},
{0x180F, 0x180F},
{0xFE00, 0xFE0F},
{0xE0100, 0xE01EF},
}

\p{Variation_Selector} — 4 ranges, 260 code points.

◆ binprop_White_Space_ranges

constexpr code_range real::detail::binprop_White_Space_ranges[]
inlineconstexpr
Initial value:
{
{0x0009, 0x000D},
{0x0020, 0x0020},
{0x0085, 0x0085},
{0x00A0, 0x00A0},
{0x1680, 0x1680},
{0x2000, 0x200A},
{0x2028, 0x2029},
{0x202F, 0x202F},
{0x205F, 0x205F},
{0x3000, 0x3000},
}

\p{White_Space} — 10 ranges, 25 code points.

◆ gc_Cc_ranges

constexpr code_range real::detail::gc_Cc_ranges[]
inlineconstexpr
Initial value:
{
{0x0000, 0x001F},
{0x007F, 0x009F},
}

\p{Cc} — 2 ranges, 65 code points.

◆ gc_Cf_ranges

constexpr code_range real::detail::gc_Cf_ranges[]
inlineconstexpr
Initial value:
{
{0x00AD, 0x00AD},
{0x0600, 0x0605},
{0x061C, 0x061C},
{0x06DD, 0x06DD},
{0x070F, 0x070F},
{0x0890, 0x0891},
{0x08E2, 0x08E2},
{0x180E, 0x180E},
{0x200B, 0x200F},
{0x202A, 0x202E},
{0x2060, 0x2064},
{0x2066, 0x206F},
{0xFEFF, 0xFEFF},
{0xFFF9, 0xFFFB},
{0x110BD, 0x110BD},
{0x110CD, 0x110CD},
{0x13430, 0x1343F},
{0x1BCA0, 0x1BCA3},
{0x1D173, 0x1D17A},
{0xE0001, 0xE0001},
{0xE0020, 0xE007F},
}

\p{Cf} — 21 ranges, 170 code points.

◆ gc_Co_ranges

constexpr code_range real::detail::gc_Co_ranges[]
inlineconstexpr
Initial value:
{
{0xE000, 0xF8FF},
{0xF0000, 0xFFFFD},
{0x100000, 0x10FFFD},
}

\p{Co} — 3 ranges, 137468 code points.

◆ gc_Lt_ranges

constexpr code_range real::detail::gc_Lt_ranges[]
inlineconstexpr
Initial value:
{
{0x01C5, 0x01C5},
{0x01C8, 0x01C8},
{0x01CB, 0x01CB},
{0x01F2, 0x01F2},
{0x1F88, 0x1F8F},
{0x1F98, 0x1F9F},
{0x1FA8, 0x1FAF},
{0x1FBC, 0x1FBC},
{0x1FCC, 0x1FCC},
{0x1FFC, 0x1FFC},
}

\p{Lt} — 10 ranges, 31 code points.

◆ gc_Me_ranges

constexpr code_range real::detail::gc_Me_ranges[]
inlineconstexpr
Initial value:
{
{0x0488, 0x0489},
{0x1ABE, 0x1ABE},
{0x20DD, 0x20E0},
{0x20E2, 0x20E4},
{0xA670, 0xA672},
}

\p{Me} — 5 ranges, 13 code points.

◆ gc_Nl_ranges

constexpr code_range real::detail::gc_Nl_ranges[]
inlineconstexpr
Initial value:
{
{0x16EE, 0x16F0},
{0x2160, 0x2182},
{0x2185, 0x2188},
{0x3007, 0x3007},
{0x3021, 0x3029},
{0x3038, 0x303A},
{0xA6E6, 0xA6EF},
{0x10140, 0x10174},
{0x10341, 0x10341},
{0x1034A, 0x1034A},
{0x103D1, 0x103D5},
{0x12400, 0x1246E},
}

\p{Nl} — 12 ranges, 236 code points.

◆ gc_Pc_ranges

constexpr code_range real::detail::gc_Pc_ranges[]
inlineconstexpr
Initial value:
{
{0x005F, 0x005F},
{0x203F, 0x2040},
{0x2054, 0x2054},
{0xFE33, 0xFE34},
{0xFE4D, 0xFE4F},
{0xFF3F, 0xFF3F},
}

\p{Pc} — 6 ranges, 10 code points.

◆ gc_Pd_ranges

constexpr code_range real::detail::gc_Pd_ranges[]
inlineconstexpr
Initial value:
{
{0x002D, 0x002D},
{0x058A, 0x058A},
{0x05BE, 0x05BE},
{0x1400, 0x1400},
{0x1806, 0x1806},
{0x2010, 0x2015},
{0x2E17, 0x2E17},
{0x2E1A, 0x2E1A},
{0x2E3A, 0x2E3B},
{0x2E40, 0x2E40},
{0x2E5D, 0x2E5D},
{0x301C, 0x301C},
{0x3030, 0x3030},
{0x30A0, 0x30A0},
{0xFE31, 0xFE32},
{0xFE58, 0xFE58},
{0xFE63, 0xFE63},
{0xFF0D, 0xFF0D},
{0x10D6E, 0x10D6E},
{0x10EAD, 0x10EAD},
}

\p{Pd} — 20 ranges, 27 code points.

◆ gc_Pf_ranges

constexpr code_range real::detail::gc_Pf_ranges[]
inlineconstexpr
Initial value:
{
{0x00BB, 0x00BB},
{0x2019, 0x2019},
{0x201D, 0x201D},
{0x203A, 0x203A},
{0x2E03, 0x2E03},
{0x2E05, 0x2E05},
{0x2E0A, 0x2E0A},
{0x2E0D, 0x2E0D},
{0x2E1D, 0x2E1D},
{0x2E21, 0x2E21},
}

\p{Pf} — 10 ranges, 10 code points.

◆ gc_Pi_ranges

constexpr code_range real::detail::gc_Pi_ranges[]
inlineconstexpr
Initial value:
{
{0x00AB, 0x00AB},
{0x2018, 0x2018},
{0x201B, 0x201C},
{0x201F, 0x201F},
{0x2039, 0x2039},
{0x2E02, 0x2E02},
{0x2E04, 0x2E04},
{0x2E09, 0x2E09},
{0x2E0C, 0x2E0C},
{0x2E1C, 0x2E1C},
{0x2E20, 0x2E20},
}

\p{Pi} — 11 ranges, 12 code points.

◆ gc_Sc_ranges

constexpr code_range real::detail::gc_Sc_ranges[]
inlineconstexpr
Initial value:
{
{0x0024, 0x0024},
{0x00A2, 0x00A5},
{0x058F, 0x058F},
{0x060B, 0x060B},
{0x07FE, 0x07FF},
{0x09F2, 0x09F3},
{0x09FB, 0x09FB},
{0x0AF1, 0x0AF1},
{0x0BF9, 0x0BF9},
{0x0E3F, 0x0E3F},
{0x17DB, 0x17DB},
{0x20A0, 0x20C0},
{0xA838, 0xA838},
{0xFDFC, 0xFDFC},
{0xFE69, 0xFE69},
{0xFF04, 0xFF04},
{0xFFE0, 0xFFE1},
{0xFFE5, 0xFFE6},
{0x11FDD, 0x11FE0},
{0x1E2FF, 0x1E2FF},
{0x1ECB0, 0x1ECB0},
}

\p{Sc} — 21 ranges, 63 code points.

◆ gc_Z_ranges

constexpr code_range real::detail::gc_Z_ranges[]
inlineconstexpr
Initial value:
{
{0x0020, 0x0020},
{0x00A0, 0x00A0},
{0x1680, 0x1680},
{0x2000, 0x200A},
{0x2028, 0x2029},
{0x202F, 0x202F},
{0x205F, 0x205F},
{0x3000, 0x3000},
}

\p{Z} — 8 ranges, 19 code points.

◆ gc_Zl_ranges

constexpr code_range real::detail::gc_Zl_ranges[]
inlineconstexpr
Initial value:
{
{0x2028, 0x2028},
}

\p{Zl} — 1 ranges, 1 code points.

◆ gc_Zp_ranges

constexpr code_range real::detail::gc_Zp_ranges[]
inlineconstexpr
Initial value:
{
{0x2029, 0x2029},
}

\p{Zp} — 1 ranges, 1 code points.

◆ gc_Zs_ranges

constexpr code_range real::detail::gc_Zs_ranges[]
inlineconstexpr
Initial value:
{
{0x0020, 0x0020},
{0x00A0, 0x00A0},
{0x1680, 0x1680},
{0x2000, 0x200A},
{0x202F, 0x202F},
{0x205F, 0x205F},
{0x3000, 0x3000},
}

\p{Zs} — 7 ranges, 17 code points.

◆ have_members_scan

constexpr bool real::detail::have_members_scan {false}
inlineconstexpr

Whether a consumer should ARM a filter on find_members – one ISA only, and measured.

Not "does the scan compile" but "does it beat what it replaces", which is per-ISA, exactly as simd_literal_scan's own ISA note already found for the two-byte literal filter (named as code, not cross-referenced: it lives behind an #if and Doxygen builds with no vector ISA defined). A set that skips N per-member searches by scanning their first-byte union once is competing against the platform's memchr, once per member – and it wins on the ISA where that memchr is no wider than this loop, while losing by a comparable factor on the ISA where it is twice as wide.

The asymmetry is structural, not a stray reading: a miss over an eight-byte union does roughly twice the vector compares of eight sweeps on registers half as wide again. No amount of tuning a 128-bit loop closes that. A leg with a wider mask_t is the honest way to carry this across.

find_members itself stays compiled under SSE2: the test suite exercises it on either leg, and a future AVX2 leg plugs in there. What this constant gates is whether a consumer builds a mechanism on top of it. Shipping the SSE2 leg armed would only invite someone to keep it.

◆ max_byte_program_size

constexpr std::size_t real::detail::max_byte_program_size {20000}
inlineconstexpr

Cap on the expanded byte-program's instruction count (the running cur total below, checked as it grows). Each klass_cp occurrence gets its OWN freshly-built UTF-8 trie here (unshared even when many occurrences reference the identical class — e.g. every copy of a {k}-repeated \w), so a large repeat count multiplies the trie's several-hundred-to-thousand-node size by k with no cache to amortize it. Left unbounded, that is O(k x trie size) wall-clock BEFORE onepass or the lazy DFA ever run (their own caps — onepass::max_nodes, onepass::max_minimize_work — sit downstream of this and never get a chance to bound it). The binding constraint is the sanitizer-instrumented fuzzing build, whose per-input timeout a \w{k} reaches while k is still small; the cap is set to keep that build's worst case well inside its timeout while comfortably exceeding every legitimate pattern. Exceeding it declines Tier-A/Tier-B (and so onepass/lazy-DFA) entirely, falling back to the general Pike VM, which matches straight off the (small, unexpanded) compiled program and needs no trie expansion at all.

◆ max_dfa_byte_program

constexpr std::size_t real::detail::max_dfa_byte_program {512}
inlineconstexpr

Cap on a pattern's expanded byte program before subset construction runs on it.

max_dfa_states bounds the RESULT; this bounds the WORK to reach it. Subset construction is superlinear in its input, so an expansion an order of magnitude larger costs two orders of magnitude more time – a text-mode \w+ expands into thousands of byte instructions and turns a sub-millisecond build into a fraction of a second, which under a sanitized fuzzing build is a timeout rather than a slow test.

The cap sits above every shape that builds in about a millisecond and below the ones that do not. A pattern past it declines with a message naming the cause, which is what the caller needs to keep that rule on the Pike VM.

◆ max_dfa_states

constexpr std::size_t real::detail::max_dfa_states {65536}
inlineconstexpr

Maximum DFA states (opt-in real::dfa).

Subset construction is 2^NFA in the worst case; this caps it so a pathological pattern throws real::dfa_error instead of exhausting memory. Generous — a lexer DFA uses far fewer.

◆ max_program_size

constexpr std::size_t real::detail::max_program_size {262144}
inlineconstexpr

Maximum number of NFA instructions in a compiled program — 256 Ki.

Bounds the compiler's bounded-repeat unrolling: without it, nested {1000} quantifiers expand to hundreds of millions of instructions. Caps peak match-state memory to a few MiB at the limit.

◆ scx_Adlam_ranges

constexpr code_range real::detail::scx_Adlam_ranges[]
inlineconstexpr
Initial value:
{
{0x061F, 0x061F},
{0x0640, 0x0640},
{0x204F, 0x204F},
{0x2E41, 0x2E41},
{0x1E900, 0x1E94B},
{0x1E950, 0x1E959},
{0x1E95E, 0x1E95F},
}

\p{scx=Adlam} — 7 ranges, 92 code points.

◆ scx_Ahom_ranges

constexpr code_range real::detail::scx_Ahom_ranges[]
inlineconstexpr
Initial value:
{
{0x11700, 0x1171A},
{0x1171D, 0x1172B},
{0x11730, 0x11746},
}

\p{scx=Ahom} — 3 ranges, 65 code points.

◆ scx_Anatolian_Hieroglyphs_ranges

constexpr code_range real::detail::scx_Anatolian_Hieroglyphs_ranges[]
inlineconstexpr
Initial value:
{
{0x14400, 0x14646},
}

\p{scx=Anatolian_Hieroglyphs} — 1 ranges, 583 code points.

◆ scx_Armenian_ranges

constexpr code_range real::detail::scx_Armenian_ranges[]
inlineconstexpr
Initial value:
{
{0x0308, 0x0308},
{0x0531, 0x0556},
{0x0559, 0x058A},
{0x058D, 0x058F},
{0xFB13, 0xFB17},
}

\p{scx=Armenian} — 5 ranges, 97 code points.

◆ scx_Avestan_ranges

constexpr code_range real::detail::scx_Avestan_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x2E30, 0x2E31},
{0x10B00, 0x10B35},
{0x10B39, 0x10B3F},
}

\p{scx=Avestan} — 4 ranges, 64 code points.

◆ scx_Balinese_ranges

constexpr code_range real::detail::scx_Balinese_ranges[]
inlineconstexpr
Initial value:
{
{0x1B00, 0x1B4C},
{0x1B4E, 0x1B7F},
}

\p{scx=Balinese} — 2 ranges, 127 code points.

◆ scx_Bamum_ranges

constexpr code_range real::detail::scx_Bamum_ranges[]
inlineconstexpr
Initial value:
{
{0xA6A0, 0xA6F7},
{0x16800, 0x16A38},
}

\p{scx=Bamum} — 2 ranges, 657 code points.

◆ scx_Bassa_Vah_ranges

constexpr code_range real::detail::scx_Bassa_Vah_ranges[]
inlineconstexpr
Initial value:
{
{0x16AD0, 0x16AED},
{0x16AF0, 0x16AF5},
}

\p{scx=Bassa_Vah} — 2 ranges, 36 code points.

◆ scx_Batak_ranges

constexpr code_range real::detail::scx_Batak_ranges[]
inlineconstexpr
Initial value:
{
{0x1BC0, 0x1BF3},
{0x1BFC, 0x1BFF},
}

\p{scx=Batak} — 2 ranges, 56 code points.

◆ scx_Bengali_ranges

constexpr code_range real::detail::scx_Bengali_ranges[]
inlineconstexpr
Initial value:
{
{0x02BC, 0x02BC},
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x0980, 0x0983},
{0x0985, 0x098C},
{0x098F, 0x0990},
{0x0993, 0x09A8},
{0x09AA, 0x09B0},
{0x09B2, 0x09B2},
{0x09B6, 0x09B9},
{0x09BC, 0x09C4},
{0x09C7, 0x09C8},
{0x09CB, 0x09CE},
{0x09D7, 0x09D7},
{0x09DC, 0x09DD},
{0x09DF, 0x09E3},
{0x09E6, 0x09FE},
{0x1CD0, 0x1CD0},
{0x1CD2, 0x1CD2},
{0x1CD5, 0x1CD6},
{0x1CD8, 0x1CD8},
{0x1CE1, 0x1CE1},
{0x1CEA, 0x1CEA},
{0x1CED, 0x1CED},
{0x1CF2, 0x1CF2},
{0x1CF5, 0x1CF7},
{0xA8F1, 0xA8F1},
}

\p{scx=Bengali} — 27 ranges, 114 code points.

◆ scx_Bhaiksuki_ranges

constexpr code_range real::detail::scx_Bhaiksuki_ranges[]
inlineconstexpr
Initial value:
{
{0x11C00, 0x11C08},
{0x11C0A, 0x11C36},
{0x11C38, 0x11C45},
{0x11C50, 0x11C6C},
}

\p{scx=Bhaiksuki} — 4 ranges, 97 code points.

◆ scx_Bopomofo_ranges

constexpr code_range real::detail::scx_Bopomofo_ranges[]
inlineconstexpr
Initial value:
{
{0x02C7, 0x02C7},
{0x02C9, 0x02CB},
{0x02D9, 0x02D9},
{0x02EA, 0x02EB},
{0x3001, 0x3003},
{0x3008, 0x3011},
{0x3013, 0x301F},
{0x302A, 0x302D},
{0x3030, 0x3030},
{0x3037, 0x3037},
{0x30FB, 0x30FB},
{0x3105, 0x312F},
{0x31A0, 0x31BF},
{0xFE45, 0xFE46},
{0xFF61, 0xFF65},
}

\p{scx=Bopomofo} — 15 ranges, 122 code points.

◆ scx_Brahmi_ranges

constexpr code_range real::detail::scx_Brahmi_ranges[]
inlineconstexpr
Initial value:
{
{0x11000, 0x1104D},
{0x11052, 0x11075},
{0x1107F, 0x1107F},
}

\p{scx=Brahmi} — 3 ranges, 115 code points.

◆ scx_Braille_ranges

constexpr code_range real::detail::scx_Braille_ranges[]
inlineconstexpr
Initial value:
{
{0x2800, 0x28FF},
}

\p{scx=Braille} — 1 ranges, 256 code points.

◆ scx_Buginese_ranges

constexpr code_range real::detail::scx_Buginese_ranges[]
inlineconstexpr
Initial value:
{
{0x1A00, 0x1A1B},
{0x1A1E, 0x1A1F},
{0xA9CF, 0xA9CF},
}

\p{scx=Buginese} — 3 ranges, 31 code points.

◆ scx_Buhid_ranges

constexpr code_range real::detail::scx_Buhid_ranges[]
inlineconstexpr
Initial value:
{
{0x1735, 0x1736},
{0x1740, 0x1753},
}

\p{scx=Buhid} — 2 ranges, 22 code points.

◆ scx_Canadian_Aboriginal_ranges

constexpr code_range real::detail::scx_Canadian_Aboriginal_ranges[]
inlineconstexpr
Initial value:
{
{0x1400, 0x167F},
{0x18B0, 0x18F5},
{0x11AB0, 0x11ABF},
}

\p{scx=Canadian_Aboriginal} — 3 ranges, 726 code points.

◆ scx_Carian_ranges

constexpr code_range real::detail::scx_Carian_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x205A, 0x205A},
{0x205D, 0x205D},
{0x2E31, 0x2E31},
{0x102A0, 0x102D0},
}

\p{scx=Carian} — 5 ranges, 53 code points.

◆ scx_Caucasian_Albanian_ranges

constexpr code_range real::detail::scx_Caucasian_Albanian_ranges[]
inlineconstexpr
Initial value:
{
{0x0304, 0x0304},
{0x0331, 0x0331},
{0x035E, 0x035E},
{0x10530, 0x10563},
{0x1056F, 0x1056F},
}

\p{scx=Caucasian_Albanian} — 5 ranges, 56 code points.

◆ scx_Chakma_ranges

constexpr code_range real::detail::scx_Chakma_ranges[]
inlineconstexpr
Initial value:
{
{0x09E6, 0x09EF},
{0x1040, 0x1049},
{0x11100, 0x11134},
{0x11136, 0x11147},
}

\p{scx=Chakma} — 4 ranges, 91 code points.

◆ scx_Cham_ranges

constexpr code_range real::detail::scx_Cham_ranges[]
inlineconstexpr
Initial value:
{
{0xAA00, 0xAA36},
{0xAA40, 0xAA4D},
{0xAA50, 0xAA59},
{0xAA5C, 0xAA5F},
}

\p{scx=Cham} — 4 ranges, 83 code points.

◆ scx_Cherokee_ranges

constexpr code_range real::detail::scx_Cherokee_ranges[]
inlineconstexpr
Initial value:
{
{0x0300, 0x0302},
{0x0304, 0x0304},
{0x030B, 0x030C},
{0x0323, 0x0324},
{0x0330, 0x0331},
{0x13A0, 0x13F5},
{0x13F8, 0x13FD},
{0xAB70, 0xABBF},
}

\p{scx=Cherokee} — 8 ranges, 182 code points.

◆ scx_Chorasmian_ranges

constexpr code_range real::detail::scx_Chorasmian_ranges[]
inlineconstexpr
Initial value:
{
{0x10FB0, 0x10FCB},
}

\p{scx=Chorasmian} — 1 ranges, 28 code points.

◆ scx_Coptic_ranges

constexpr code_range real::detail::scx_Coptic_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0300, 0x0300},
{0x0304, 0x0305},
{0x0307, 0x0307},
{0x0374, 0x0375},
{0x03E2, 0x03EF},
{0x2C80, 0x2CF3},
{0x2CF9, 0x2CFF},
{0x2E17, 0x2E17},
{0x102E0, 0x102FB},
}

\p{scx=Coptic} — 10 ranges, 173 code points.

◆ scx_Cuneiform_ranges

constexpr code_range real::detail::scx_Cuneiform_ranges[]
inlineconstexpr
Initial value:
{
{0x12000, 0x12399},
{0x12400, 0x1246E},
{0x12470, 0x12474},
{0x12480, 0x12543},
}

\p{scx=Cuneiform} — 4 ranges, 1234 code points.

◆ scx_Cypriot_ranges

constexpr code_range real::detail::scx_Cypriot_ranges[]
inlineconstexpr
Initial value:
{
{0x10100, 0x10102},
{0x10107, 0x10133},
{0x10137, 0x1013F},
{0x10800, 0x10805},
{0x10808, 0x10808},
{0x1080A, 0x10835},
{0x10837, 0x10838},
{0x1083C, 0x1083C},
{0x1083F, 0x1083F},
}

\p{scx=Cypriot} — 9 ranges, 112 code points.

◆ scx_Cypro_Minoan_ranges

constexpr code_range real::detail::scx_Cypro_Minoan_ranges[]
inlineconstexpr
Initial value:
{
{0x10100, 0x10101},
{0x12F90, 0x12FF2},
}

\p{scx=Cypro_Minoan} — 2 ranges, 101 code points.

◆ scx_Cyrillic_ranges

constexpr code_range real::detail::scx_Cyrillic_ranges[]
inlineconstexpr
Initial value:
{
{0x02BC, 0x02BC},
{0x0300, 0x0302},
{0x0304, 0x0304},
{0x0306, 0x0306},
{0x0308, 0x0308},
{0x030B, 0x030B},
{0x0311, 0x0311},
{0x0400, 0x052F},
{0x1C80, 0x1C8A},
{0x1D2B, 0x1D2B},
{0x1D78, 0x1D78},
{0x1DF8, 0x1DF8},
{0x2DE0, 0x2DFF},
{0x2E43, 0x2E43},
{0xA640, 0xA69F},
{0xFE2E, 0xFE2F},
{0x1E030, 0x1E06D},
{0x1E08F, 0x1E08F},
}

\p{scx=Cyrillic} — 18 ranges, 521 code points.

◆ scx_Deseret_ranges

constexpr code_range real::detail::scx_Deseret_ranges[]
inlineconstexpr
Initial value:
{
{0x10400, 0x1044F},
}

\p{scx=Deseret} — 1 ranges, 80 code points.

◆ scx_Devanagari_ranges

constexpr code_range real::detail::scx_Devanagari_ranges[]
inlineconstexpr
Initial value:
{
{0x02BC, 0x02BC},
{0x0900, 0x0952},
{0x0955, 0x097F},
{0x1CD0, 0x1CF6},
{0x1CF8, 0x1CF9},
{0x20F0, 0x20F0},
{0xA830, 0xA839},
{0xA8E0, 0xA8FF},
{0x11B00, 0x11B09},
}

\p{scx=Devanagari} — 9 ranges, 221 code points.

◆ scx_Dives_Akuru_ranges

constexpr code_range real::detail::scx_Dives_Akuru_ranges[]
inlineconstexpr
Initial value:
{
{0x11900, 0x11906},
{0x11909, 0x11909},
{0x1190C, 0x11913},
{0x11915, 0x11916},
{0x11918, 0x11935},
{0x11937, 0x11938},
{0x1193B, 0x11946},
{0x11950, 0x11959},
}

\p{scx=Dives_Akuru} — 8 ranges, 72 code points.

◆ scx_Dogra_ranges

constexpr code_range real::detail::scx_Dogra_ranges[]
inlineconstexpr
Initial value:
{
{0x0964, 0x096F},
{0xA830, 0xA839},
{0x11800, 0x1183B},
}

\p{scx=Dogra} — 3 ranges, 82 code points.

◆ scx_Duployan_ranges

constexpr code_range real::detail::scx_Duployan_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0307, 0x0308},
{0x030A, 0x030A},
{0x0323, 0x0324},
{0x2E3C, 0x2E3C},
{0x1BC00, 0x1BC6A},
{0x1BC70, 0x1BC7C},
{0x1BC80, 0x1BC88},
{0x1BC90, 0x1BC99},
{0x1BC9C, 0x1BCA3},
}

\p{scx=Duployan} — 10 ranges, 154 code points.

◆ scx_Egyptian_Hieroglyphs_ranges

constexpr code_range real::detail::scx_Egyptian_Hieroglyphs_ranges[]
inlineconstexpr
Initial value:
{
{0x13000, 0x13455},
{0x13460, 0x143FA},
}

\p{scx=Egyptian_Hieroglyphs} — 2 ranges, 5105 code points.

◆ scx_Elbasan_ranges

constexpr code_range real::detail::scx_Elbasan_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0305, 0x0305},
{0x10500, 0x10527},
}

\p{scx=Elbasan} — 3 ranges, 42 code points.

◆ scx_Elymaic_ranges

constexpr code_range real::detail::scx_Elymaic_ranges[]
inlineconstexpr
Initial value:
{
{0x10FE0, 0x10FF6},
}

\p{scx=Elymaic} — 1 ranges, 23 code points.

◆ scx_Garay_ranges

constexpr code_range real::detail::scx_Garay_ranges[]
inlineconstexpr
Initial value:
{
{0x060C, 0x060C},
{0x061B, 0x061B},
{0x061F, 0x061F},
{0x10D40, 0x10D65},
{0x10D69, 0x10D85},
{0x10D8E, 0x10D8F},
}

\p{scx=Garay} — 6 ranges, 72 code points.

◆ scx_Georgian_ranges

constexpr code_range real::detail::scx_Georgian_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0589, 0x0589},
{0x10A0, 0x10C5},
{0x10C7, 0x10C7},
{0x10CD, 0x10CD},
{0x10D0, 0x10FF},
{0x1C90, 0x1CBA},
{0x1CBD, 0x1CBF},
{0x205A, 0x205A},
{0x2D00, 0x2D25},
{0x2D27, 0x2D27},
{0x2D2D, 0x2D2D},
{0x2E31, 0x2E31},
}

\p{scx=Georgian} — 13 ranges, 178 code points.

◆ scx_Glagolitic_ranges

constexpr code_range real::detail::scx_Glagolitic_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0303, 0x0303},
{0x0305, 0x0305},
{0x0484, 0x0484},
{0x0487, 0x0487},
{0x0589, 0x0589},
{0x10FB, 0x10FB},
{0x205A, 0x205A},
{0x2C00, 0x2C5F},
{0x2E43, 0x2E43},
{0xA66F, 0xA66F},
{0x1E000, 0x1E006},
{0x1E008, 0x1E018},
{0x1E01B, 0x1E021},
{0x1E023, 0x1E024},
{0x1E026, 0x1E02A},
}

\p{scx=Glagolitic} — 16 ranges, 144 code points.

◆ scx_Gothic_ranges

constexpr code_range real::detail::scx_Gothic_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0304, 0x0305},
{0x0308, 0x0308},
{0x0331, 0x0331},
{0x10330, 0x1034A},
}

\p{scx=Gothic} — 5 ranges, 32 code points.

◆ scx_Grantha_ranges

constexpr code_range real::detail::scx_Grantha_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x0BE6, 0x0BF3},
{0x1CD0, 0x1CD0},
{0x1CD2, 0x1CD3},
{0x1CF2, 0x1CF4},
{0x1CF8, 0x1CF9},
{0x20F0, 0x20F0},
{0x11300, 0x11303},
{0x11305, 0x1130C},
{0x1130F, 0x11310},
{0x11313, 0x11328},
{0x1132A, 0x11330},
{0x11332, 0x11333},
{0x11335, 0x11339},
{0x1133B, 0x11344},
{0x11347, 0x11348},
{0x1134B, 0x1134D},
{0x11350, 0x11350},
{0x11357, 0x11357},
{0x1135D, 0x11363},
{0x11366, 0x1136C},
{0x11370, 0x11374},
{0x11FD0, 0x11FD1},
{0x11FD3, 0x11FD3},
}

\p{scx=Grantha} — 25 ranges, 116 code points.

◆ scx_Gujarati_ranges

constexpr code_range real::detail::scx_Gujarati_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x0A81, 0x0A83},
{0x0A85, 0x0A8D},
{0x0A8F, 0x0A91},
{0x0A93, 0x0AA8},
{0x0AAA, 0x0AB0},
{0x0AB2, 0x0AB3},
{0x0AB5, 0x0AB9},
{0x0ABC, 0x0AC5},
{0x0AC7, 0x0AC9},
{0x0ACB, 0x0ACD},
{0x0AD0, 0x0AD0},
{0x0AE0, 0x0AE3},
{0x0AE6, 0x0AF1},
{0x0AF9, 0x0AFF},
{0xA830, 0xA839},
}

\p{scx=Gujarati} — 17 ranges, 105 code points.

◆ scx_Gunjala_Gondi_ranges

constexpr code_range real::detail::scx_Gunjala_Gondi_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0964, 0x0965},
{0x11D60, 0x11D65},
{0x11D67, 0x11D68},
{0x11D6A, 0x11D8E},
{0x11D90, 0x11D91},
{0x11D93, 0x11D98},
{0x11DA0, 0x11DA9},
}

\p{scx=Gunjala_Gondi} — 8 ranges, 66 code points.

◆ scx_Gurmukhi_ranges

constexpr code_range real::detail::scx_Gurmukhi_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x0A01, 0x0A03},
{0x0A05, 0x0A0A},
{0x0A0F, 0x0A10},
{0x0A13, 0x0A28},
{0x0A2A, 0x0A30},
{0x0A32, 0x0A33},
{0x0A35, 0x0A36},
{0x0A38, 0x0A39},
{0x0A3C, 0x0A3C},
{0x0A3E, 0x0A42},
{0x0A47, 0x0A48},
{0x0A4B, 0x0A4D},
{0x0A51, 0x0A51},
{0x0A59, 0x0A5C},
{0x0A5E, 0x0A5E},
{0x0A66, 0x0A76},
{0xA830, 0xA839},
}

\p{scx=Gurmukhi} — 19 ranges, 94 code points.

◆ scx_Gurung_Khema_ranges

constexpr code_range real::detail::scx_Gurung_Khema_ranges[]
inlineconstexpr
Initial value:
{
{0x0965, 0x0965},
{0x16100, 0x16139},
}

\p{scx=Gurung_Khema} — 2 ranges, 59 code points.

◆ scx_Hangul_ranges

constexpr code_range real::detail::scx_Hangul_ranges[]
inlineconstexpr
Initial value:
{
{0x1100, 0x11FF},
{0x3001, 0x3003},
{0x3008, 0x3011},
{0x3013, 0x301F},
{0x302E, 0x3030},
{0x3037, 0x3037},
{0x30FB, 0x30FB},
{0x3131, 0x318E},
{0x3200, 0x321E},
{0x3260, 0x327E},
{0xA960, 0xA97C},
{0xAC00, 0xD7A3},
{0xD7B0, 0xD7C6},
{0xD7CB, 0xD7FB},
{0xFE45, 0xFE46},
{0xFF61, 0xFF65},
{0xFFA0, 0xFFBE},
{0xFFC2, 0xFFC7},
{0xFFCA, 0xFFCF},
{0xFFD2, 0xFFD7},
{0xFFDA, 0xFFDC},
}

\p{scx=Hangul} — 21 ranges, 11775 code points.

◆ scx_Hanifi_Rohingya_ranges

constexpr code_range real::detail::scx_Hanifi_Rohingya_ranges[]
inlineconstexpr
Initial value:
{
{0x060C, 0x060C},
{0x061B, 0x061B},
{0x061F, 0x061F},
{0x0640, 0x0640},
{0x06D4, 0x06D4},
{0x10D00, 0x10D27},
{0x10D30, 0x10D39},
}

\p{scx=Hanifi_Rohingya} — 7 ranges, 55 code points.

◆ scx_Hanunoo_ranges

constexpr code_range real::detail::scx_Hanunoo_ranges[]
inlineconstexpr
Initial value:
{
{0x1720, 0x1736},
}

\p{scx=Hanunoo} — 1 ranges, 23 code points.

◆ scx_Hatran_ranges

constexpr code_range real::detail::scx_Hatran_ranges[]
inlineconstexpr
Initial value:
{
{0x108E0, 0x108F2},
{0x108F4, 0x108F5},
{0x108FB, 0x108FF},
}

\p{scx=Hatran} — 3 ranges, 26 code points.

◆ scx_Hebrew_ranges

constexpr code_range real::detail::scx_Hebrew_ranges[]
inlineconstexpr
Initial value:
{
{0x0307, 0x0308},
{0x0591, 0x05C7},
{0x05D0, 0x05EA},
{0x05EF, 0x05F4},
{0xFB1D, 0xFB36},
{0xFB38, 0xFB3C},
{0xFB3E, 0xFB3E},
{0xFB40, 0xFB41},
{0xFB43, 0xFB44},
{0xFB46, 0xFB4F},
}

\p{scx=Hebrew} — 10 ranges, 136 code points.

◆ scx_Hiragana_ranges

constexpr code_range real::detail::scx_Hiragana_ranges[]
inlineconstexpr
Initial value:
{
{0x3001, 0x3003},
{0x3008, 0x3011},
{0x3013, 0x301F},
{0x3030, 0x3035},
{0x3037, 0x3037},
{0x303C, 0x303D},
{0x3041, 0x3096},
{0x3099, 0x30A0},
{0x30FB, 0x30FC},
{0xFE45, 0xFE46},
{0xFF61, 0xFF65},
{0xFF70, 0xFF70},
{0xFF9E, 0xFF9F},
{0x1B001, 0x1B11F},
{0x1B132, 0x1B132},
{0x1B150, 0x1B152},
{0x1F200, 0x1F200},
}

\p{scx=Hiragana} — 17 ranges, 433 code points.

◆ scx_Imperial_Aramaic_ranges

constexpr code_range real::detail::scx_Imperial_Aramaic_ranges[]
inlineconstexpr
Initial value:
{
{0x10840, 0x10855},
{0x10857, 0x1085F},
}

\p{scx=Imperial_Aramaic} — 2 ranges, 31 code points.

◆ scx_Inherited_ranges

constexpr code_range real::detail::scx_Inherited_ranges[]
inlineconstexpr
Initial value:
{
{0x030F, 0x030F},
{0x0312, 0x0312},
{0x0314, 0x031F},
{0x0321, 0x0322},
{0x0326, 0x032C},
{0x032F, 0x032F},
{0x0332, 0x0341},
{0x0343, 0x0344},
{0x0346, 0x0357},
{0x0359, 0x035D},
{0x035F, 0x0362},
{0x0953, 0x0954},
{0x1AB0, 0x1ACE},
{0x1DC2, 0x1DF7},
{0x1DF9, 0x1DF9},
{0x1DFB, 0x1DFF},
{0x200C, 0x200D},
{0x20D0, 0x20EF},
{0xFE00, 0xFE0F},
{0xFE20, 0xFE2D},
{0x101FD, 0x101FD},
{0x1CF00, 0x1CF2D},
{0x1CF30, 0x1CF46},
{0x1D167, 0x1D169},
{0x1D17B, 0x1D182},
{0x1D185, 0x1D18B},
{0x1D1AA, 0x1D1AD},
{0xE0100, 0xE01EF},
}

\p{scx=Inherited} — 28 ranges, 558 code points.

◆ scx_Inscriptional_Pahlavi_ranges

constexpr code_range real::detail::scx_Inscriptional_Pahlavi_ranges[]
inlineconstexpr
Initial value:
{
{0x10B60, 0x10B72},
{0x10B78, 0x10B7F},
}

\p{scx=Inscriptional_Pahlavi} — 2 ranges, 27 code points.

◆ scx_Inscriptional_Parthian_ranges

constexpr code_range real::detail::scx_Inscriptional_Parthian_ranges[]
inlineconstexpr
Initial value:
{
{0x10B40, 0x10B55},
{0x10B58, 0x10B5F},
}

\p{scx=Inscriptional_Parthian} — 2 ranges, 30 code points.

◆ scx_Javanese_ranges

constexpr code_range real::detail::scx_Javanese_ranges[]
inlineconstexpr
Initial value:
{
{0xA980, 0xA9CD},
{0xA9CF, 0xA9D9},
{0xA9DE, 0xA9DF},
}

\p{scx=Javanese} — 3 ranges, 91 code points.

◆ scx_Kaithi_ranges

constexpr code_range real::detail::scx_Kaithi_ranges[]
inlineconstexpr
Initial value:
{
{0x0966, 0x096F},
{0x2E31, 0x2E31},
{0xA830, 0xA839},
{0x11080, 0x110C2},
{0x110CD, 0x110CD},
}

\p{scx=Kaithi} — 5 ranges, 89 code points.

◆ scx_Kannada_ranges

constexpr code_range real::detail::scx_Kannada_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x0C80, 0x0C8C},
{0x0C8E, 0x0C90},
{0x0C92, 0x0CA8},
{0x0CAA, 0x0CB3},
{0x0CB5, 0x0CB9},
{0x0CBC, 0x0CC4},
{0x0CC6, 0x0CC8},
{0x0CCA, 0x0CCD},
{0x0CD5, 0x0CD6},
{0x0CDD, 0x0CDE},
{0x0CE0, 0x0CE3},
{0x0CE6, 0x0CEF},
{0x0CF1, 0x0CF3},
{0x1CD0, 0x1CD0},
{0x1CD2, 0x1CD3},
{0x1CDA, 0x1CDA},
{0x1CF2, 0x1CF2},
{0x1CF4, 0x1CF4},
{0xA830, 0xA835},
}

\p{scx=Kannada} — 21 ranges, 107 code points.

◆ scx_Katakana_ranges

constexpr code_range real::detail::scx_Katakana_ranges[]
inlineconstexpr
Initial value:
{
{0x0305, 0x0305},
{0x0323, 0x0323},
{0x3001, 0x3003},
{0x3008, 0x3011},
{0x3013, 0x301F},
{0x3030, 0x3035},
{0x3037, 0x3037},
{0x303C, 0x303D},
{0x3099, 0x309C},
{0x30A0, 0x30FF},
{0x31F0, 0x31FF},
{0x32D0, 0x32FE},
{0x3300, 0x3357},
{0xFE45, 0xFE46},
{0xFF61, 0xFF9F},
{0x1AFF0, 0x1AFF3},
{0x1AFF5, 0x1AFFB},
{0x1AFFD, 0x1AFFE},
{0x1B000, 0x1B000},
{0x1B120, 0x1B122},
{0x1B155, 0x1B155},
{0x1B164, 0x1B167},
}

\p{scx=Katakana} — 22 ranges, 375 code points.

◆ scx_Kawi_ranges

constexpr code_range real::detail::scx_Kawi_ranges[]
inlineconstexpr
Initial value:
{
{0x11F00, 0x11F10},
{0x11F12, 0x11F3A},
{0x11F3E, 0x11F5A},
}

\p{scx=Kawi} — 3 ranges, 87 code points.

◆ scx_Kayah_Li_ranges

constexpr code_range real::detail::scx_Kayah_Li_ranges[]
inlineconstexpr
Initial value:
{
{0xA900, 0xA92F},
}

\p{scx=Kayah_Li} — 1 ranges, 48 code points.

◆ scx_Kharoshthi_ranges

constexpr code_range real::detail::scx_Kharoshthi_ranges[]
inlineconstexpr
Initial value:
{
{0x10A00, 0x10A03},
{0x10A05, 0x10A06},
{0x10A0C, 0x10A13},
{0x10A15, 0x10A17},
{0x10A19, 0x10A35},
{0x10A38, 0x10A3A},
{0x10A3F, 0x10A48},
{0x10A50, 0x10A58},
}

\p{scx=Kharoshthi} — 8 ranges, 68 code points.

◆ scx_Khitan_Small_Script_ranges

constexpr code_range real::detail::scx_Khitan_Small_Script_ranges[]
inlineconstexpr
Initial value:
{
{0x16FE4, 0x16FE4},
{0x18B00, 0x18CD5},
{0x18CFF, 0x18CFF},
}

\p{scx=Khitan_Small_Script} — 3 ranges, 472 code points.

◆ scx_Khmer_ranges

constexpr code_range real::detail::scx_Khmer_ranges[]
inlineconstexpr
Initial value:
{
{0x1780, 0x17DD},
{0x17E0, 0x17E9},
{0x17F0, 0x17F9},
{0x19E0, 0x19FF},
}

\p{scx=Khmer} — 4 ranges, 146 code points.

◆ scx_Khojki_ranges

constexpr code_range real::detail::scx_Khojki_ranges[]
inlineconstexpr
Initial value:
{
{0x0AE6, 0x0AEF},
{0xA830, 0xA839},
{0x11200, 0x11211},
{0x11213, 0x11241},
}

\p{scx=Khojki} — 4 ranges, 85 code points.

◆ scx_Khudawadi_ranges

constexpr code_range real::detail::scx_Khudawadi_ranges[]
inlineconstexpr
Initial value:
{
{0x0964, 0x0965},
{0xA830, 0xA839},
{0x112B0, 0x112EA},
{0x112F0, 0x112F9},
}

\p{scx=Khudawadi} — 4 ranges, 81 code points.

◆ scx_Kirat_Rai_ranges

constexpr code_range real::detail::scx_Kirat_Rai_ranges[]
inlineconstexpr
Initial value:
{
{0x16D40, 0x16D79},
}

\p{scx=Kirat_Rai} — 1 ranges, 58 code points.

◆ scx_Lao_ranges

constexpr code_range real::detail::scx_Lao_ranges[]
inlineconstexpr
Initial value:
{
{0x0E81, 0x0E82},
{0x0E84, 0x0E84},
{0x0E86, 0x0E8A},
{0x0E8C, 0x0EA3},
{0x0EA5, 0x0EA5},
{0x0EA7, 0x0EBD},
{0x0EC0, 0x0EC4},
{0x0EC6, 0x0EC6},
{0x0EC8, 0x0ECE},
{0x0ED0, 0x0ED9},
{0x0EDC, 0x0EDF},
}

\p{scx=Lao} — 11 ranges, 83 code points.

◆ scx_Lepcha_ranges

constexpr code_range real::detail::scx_Lepcha_ranges[]
inlineconstexpr
Initial value:
{
{0x1C00, 0x1C37},
{0x1C3B, 0x1C49},
{0x1C4D, 0x1C4F},
}

\p{scx=Lepcha} — 3 ranges, 74 code points.

◆ scx_Limbu_ranges

constexpr code_range real::detail::scx_Limbu_ranges[]
inlineconstexpr
Initial value:
{
{0x0965, 0x0965},
{0x1900, 0x191E},
{0x1920, 0x192B},
{0x1930, 0x193B},
{0x1940, 0x1940},
{0x1944, 0x194F},
}

\p{scx=Limbu} — 6 ranges, 69 code points.

◆ scx_Linear_A_ranges

constexpr code_range real::detail::scx_Linear_A_ranges[]
inlineconstexpr
Initial value:
{
{0x10107, 0x10133},
{0x10600, 0x10736},
{0x10740, 0x10755},
{0x10760, 0x10767},
}

\p{scx=Linear_A} — 4 ranges, 386 code points.

◆ scx_Linear_B_ranges

constexpr code_range real::detail::scx_Linear_B_ranges[]
inlineconstexpr
Initial value:
{
{0x10000, 0x1000B},
{0x1000D, 0x10026},
{0x10028, 0x1003A},
{0x1003C, 0x1003D},
{0x1003F, 0x1004D},
{0x10050, 0x1005D},
{0x10080, 0x100FA},
{0x10100, 0x10102},
{0x10107, 0x10133},
{0x10137, 0x1013F},
}

\p{scx=Linear_B} — 10 ranges, 268 code points.

◆ scx_Lisu_ranges

constexpr code_range real::detail::scx_Lisu_ranges[]
inlineconstexpr
Initial value:
{
{0x02BC, 0x02BC},
{0x02CD, 0x02CD},
{0x300A, 0x300B},
{0xA4D0, 0xA4FF},
{0x11FB0, 0x11FB0},
}

\p{scx=Lisu} — 5 ranges, 53 code points.

◆ scx_Lycian_ranges

constexpr code_range real::detail::scx_Lycian_ranges[]
inlineconstexpr
Initial value:
{
{0x205A, 0x205A},
{0x10280, 0x1029C},
}

\p{scx=Lycian} — 2 ranges, 30 code points.

◆ scx_Lydian_ranges

constexpr code_range real::detail::scx_Lydian_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x2E31, 0x2E31},
{0x10920, 0x10939},
{0x1093F, 0x1093F},
}

\p{scx=Lydian} — 4 ranges, 29 code points.

◆ scx_Mahajani_ranges

constexpr code_range real::detail::scx_Mahajani_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0964, 0x096F},
{0xA830, 0xA839},
{0x11150, 0x11176},
}

\p{scx=Mahajani} — 4 ranges, 62 code points.

◆ scx_Makasar_ranges

constexpr code_range real::detail::scx_Makasar_ranges[]
inlineconstexpr
Initial value:
{
{0x11EE0, 0x11EF8},
}

\p{scx=Makasar} — 1 ranges, 25 code points.

◆ scx_Malayalam_ranges

constexpr code_range real::detail::scx_Malayalam_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x0D00, 0x0D0C},
{0x0D0E, 0x0D10},
{0x0D12, 0x0D44},
{0x0D46, 0x0D48},
{0x0D4A, 0x0D4F},
{0x0D54, 0x0D63},
{0x0D66, 0x0D7F},
{0x1CDA, 0x1CDA},
{0x1CF2, 0x1CF2},
{0xA830, 0xA832},
}

\p{scx=Malayalam} — 12 ranges, 127 code points.

◆ scx_Mandaic_ranges

constexpr code_range real::detail::scx_Mandaic_ranges[]
inlineconstexpr
Initial value:
{
{0x0640, 0x0640},
{0x0840, 0x085B},
{0x085E, 0x085E},
}

\p{scx=Mandaic} — 3 ranges, 30 code points.

◆ scx_Manichaean_ranges

constexpr code_range real::detail::scx_Manichaean_ranges[]
inlineconstexpr
Initial value:
{
{0x0640, 0x0640},
{0x10AC0, 0x10AE6},
{0x10AEB, 0x10AF6},
}

\p{scx=Manichaean} — 3 ranges, 52 code points.

◆ scx_Marchen_ranges

constexpr code_range real::detail::scx_Marchen_ranges[]
inlineconstexpr
Initial value:
{
{0x11C70, 0x11C8F},
{0x11C92, 0x11CA7},
{0x11CA9, 0x11CB6},
}

\p{scx=Marchen} — 3 ranges, 68 code points.

◆ scx_Masaram_Gondi_ranges

constexpr code_range real::detail::scx_Masaram_Gondi_ranges[]
inlineconstexpr
Initial value:
{
{0x0964, 0x0965},
{0x11D00, 0x11D06},
{0x11D08, 0x11D09},
{0x11D0B, 0x11D36},
{0x11D3A, 0x11D3A},
{0x11D3C, 0x11D3D},
{0x11D3F, 0x11D47},
{0x11D50, 0x11D59},
}

\p{scx=Masaram_Gondi} — 8 ranges, 77 code points.

◆ scx_Medefaidrin_ranges

constexpr code_range real::detail::scx_Medefaidrin_ranges[]
inlineconstexpr
Initial value:
{
{0x16E40, 0x16E9A},
}

\p{scx=Medefaidrin} — 1 ranges, 91 code points.

◆ scx_Meetei_Mayek_ranges

constexpr code_range real::detail::scx_Meetei_Mayek_ranges[]
inlineconstexpr
Initial value:
{
{0xAAE0, 0xAAF6},
{0xABC0, 0xABED},
{0xABF0, 0xABF9},
}

\p{scx=Meetei_Mayek} — 3 ranges, 79 code points.

◆ scx_Mende_Kikakui_ranges

constexpr code_range real::detail::scx_Mende_Kikakui_ranges[]
inlineconstexpr
Initial value:
{
{0x1E800, 0x1E8C4},
{0x1E8C7, 0x1E8D6},
}

\p{scx=Mende_Kikakui} — 2 ranges, 213 code points.

◆ scx_Meroitic_Cursive_ranges

constexpr code_range real::detail::scx_Meroitic_Cursive_ranges[]
inlineconstexpr
Initial value:
{
{0x109A0, 0x109B7},
{0x109BC, 0x109CF},
{0x109D2, 0x109FF},
}

\p{scx=Meroitic_Cursive} — 3 ranges, 90 code points.

◆ scx_Meroitic_Hieroglyphs_ranges

constexpr code_range real::detail::scx_Meroitic_Hieroglyphs_ranges[]
inlineconstexpr
Initial value:
{
{0x205D, 0x205D},
{0x10980, 0x1099F},
}

\p{scx=Meroitic_Hieroglyphs} — 2 ranges, 33 code points.

◆ scx_Miao_ranges

constexpr code_range real::detail::scx_Miao_ranges[]
inlineconstexpr
Initial value:
{
{0x16F00, 0x16F4A},
{0x16F4F, 0x16F87},
{0x16F8F, 0x16F9F},
}

\p{scx=Miao} — 3 ranges, 149 code points.

◆ scx_Modi_ranges

constexpr code_range real::detail::scx_Modi_ranges[]
inlineconstexpr
Initial value:
{
{0xA830, 0xA839},
{0x11600, 0x11644},
{0x11650, 0x11659},
}

\p{scx=Modi} — 3 ranges, 89 code points.

◆ scx_Mongolian_ranges

constexpr code_range real::detail::scx_Mongolian_ranges[]
inlineconstexpr
Initial value:
{
{0x1800, 0x1819},
{0x1820, 0x1878},
{0x1880, 0x18AA},
{0x202F, 0x202F},
{0x3001, 0x3002},
{0x3008, 0x300B},
{0x11660, 0x1166C},
}

\p{scx=Mongolian} — 7 ranges, 178 code points.

◆ scx_Mro_ranges

constexpr code_range real::detail::scx_Mro_ranges[]
inlineconstexpr
Initial value:
{
{0x16A40, 0x16A5E},
{0x16A60, 0x16A69},
{0x16A6E, 0x16A6F},
}

\p{scx=Mro} — 3 ranges, 43 code points.

◆ scx_Multani_ranges

constexpr code_range real::detail::scx_Multani_ranges[]
inlineconstexpr
Initial value:
{
{0x0A66, 0x0A6F},
{0x11280, 0x11286},
{0x11288, 0x11288},
{0x1128A, 0x1128D},
{0x1128F, 0x1129D},
{0x1129F, 0x112A9},
}

\p{scx=Multani} — 6 ranges, 48 code points.

◆ scx_Myanmar_ranges

constexpr code_range real::detail::scx_Myanmar_ranges[]
inlineconstexpr
Initial value:
{
{0x1000, 0x109F},
{0xA92E, 0xA92E},
{0xA9E0, 0xA9FE},
{0xAA60, 0xAA7F},
{0x116D0, 0x116E3},
}

\p{scx=Myanmar} — 5 ranges, 244 code points.

◆ scx_Nabataean_ranges

constexpr code_range real::detail::scx_Nabataean_ranges[]
inlineconstexpr
Initial value:
{
{0x10880, 0x1089E},
{0x108A7, 0x108AF},
}

\p{scx=Nabataean} — 2 ranges, 40 code points.

◆ scx_Nag_Mundari_ranges

constexpr code_range real::detail::scx_Nag_Mundari_ranges[]
inlineconstexpr
Initial value:
{
{0x1E4D0, 0x1E4F9},
}

\p{scx=Nag_Mundari} — 1 ranges, 42 code points.

◆ scx_Nandinagari_ranges

constexpr code_range real::detail::scx_Nandinagari_ranges[]
inlineconstexpr
Initial value:
{
{0x0964, 0x0965},
{0x0CE6, 0x0CEF},
{0x1CE9, 0x1CE9},
{0x1CF2, 0x1CF2},
{0x1CFA, 0x1CFA},
{0xA830, 0xA835},
{0x119A0, 0x119A7},
{0x119AA, 0x119D7},
{0x119DA, 0x119E4},
}

\p{scx=Nandinagari} — 9 ranges, 86 code points.

◆ scx_New_Tai_Lue_ranges

constexpr code_range real::detail::scx_New_Tai_Lue_ranges[]
inlineconstexpr
Initial value:
{
{0x1980, 0x19AB},
{0x19B0, 0x19C9},
{0x19D0, 0x19DA},
{0x19DE, 0x19DF},
}

\p{scx=New_Tai_Lue} — 4 ranges, 83 code points.

◆ scx_Newa_ranges

constexpr code_range real::detail::scx_Newa_ranges[]
inlineconstexpr
Initial value:
{
{0x11400, 0x1145B},
{0x1145D, 0x11461},
}

\p{scx=Newa} — 2 ranges, 97 code points.

◆ scx_Nko_ranges

constexpr code_range real::detail::scx_Nko_ranges[]
inlineconstexpr
Initial value:
{
{0x060C, 0x060C},
{0x061B, 0x061B},
{0x061F, 0x061F},
{0x07C0, 0x07FA},
{0x07FD, 0x07FF},
{0xFD3E, 0xFD3F},
}

\p{scx=Nko} — 6 ranges, 67 code points.

◆ scx_Nushu_ranges

constexpr code_range real::detail::scx_Nushu_ranges[]
inlineconstexpr
Initial value:
{
{0x16FE1, 0x16FE1},
{0x1B170, 0x1B2FB},
}

\p{scx=Nushu} — 2 ranges, 397 code points.

◆ scx_Nyiakeng_Puachue_Hmong_ranges

constexpr code_range real::detail::scx_Nyiakeng_Puachue_Hmong_ranges[]
inlineconstexpr
Initial value:
{
{0x1E100, 0x1E12C},
{0x1E130, 0x1E13D},
{0x1E140, 0x1E149},
{0x1E14E, 0x1E14F},
}

\p{scx=Nyiakeng_Puachue_Hmong} — 4 ranges, 71 code points.

◆ scx_Ogham_ranges

constexpr code_range real::detail::scx_Ogham_ranges[]
inlineconstexpr
Initial value:
{
{0x1680, 0x169C},
}

\p{scx=Ogham} — 1 ranges, 29 code points.

◆ scx_Ol_Chiki_ranges

constexpr code_range real::detail::scx_Ol_Chiki_ranges[]
inlineconstexpr
Initial value:
{
{0x1C50, 0x1C7F},
}

\p{scx=Ol_Chiki} — 1 ranges, 48 code points.

◆ scx_Ol_Onal_ranges

constexpr code_range real::detail::scx_Ol_Onal_ranges[]
inlineconstexpr
Initial value:
{
{0x0964, 0x0965},
{0x1E5D0, 0x1E5FA},
{0x1E5FF, 0x1E5FF},
}

\p{scx=Ol_Onal} — 3 ranges, 46 code points.

◆ scx_Old_Hungarian_ranges

constexpr code_range real::detail::scx_Old_Hungarian_ranges[]
inlineconstexpr
Initial value:
{
{0x205A, 0x205A},
{0x205D, 0x205D},
{0x2E31, 0x2E31},
{0x2E41, 0x2E41},
{0x10C80, 0x10CB2},
{0x10CC0, 0x10CF2},
{0x10CFA, 0x10CFF},
}

\p{scx=Old_Hungarian} — 7 ranges, 112 code points.

◆ scx_Old_Italic_ranges

constexpr code_range real::detail::scx_Old_Italic_ranges[]
inlineconstexpr
Initial value:
{
{0x10300, 0x10323},
{0x1032D, 0x1032F},
}

\p{scx=Old_Italic} — 2 ranges, 39 code points.

◆ scx_Old_North_Arabian_ranges

constexpr code_range real::detail::scx_Old_North_Arabian_ranges[]
inlineconstexpr
Initial value:
{
{0x10A80, 0x10A9F},
}

\p{scx=Old_North_Arabian} — 1 ranges, 32 code points.

◆ scx_Old_Permic_ranges

constexpr code_range real::detail::scx_Old_Permic_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x0300, 0x0300},
{0x0306, 0x0308},
{0x0313, 0x0313},
{0x0483, 0x0483},
{0x10350, 0x1037A},
}

\p{scx=Old_Permic} — 6 ranges, 50 code points.

◆ scx_Old_Persian_ranges

constexpr code_range real::detail::scx_Old_Persian_ranges[]
inlineconstexpr
Initial value:
{
{0x103A0, 0x103C3},
{0x103C8, 0x103D5},
}

\p{scx=Old_Persian} — 2 ranges, 50 code points.

◆ scx_Old_Sogdian_ranges

constexpr code_range real::detail::scx_Old_Sogdian_ranges[]
inlineconstexpr
Initial value:
{
{0x10F00, 0x10F27},
}

\p{scx=Old_Sogdian} — 1 ranges, 40 code points.

◆ scx_Old_South_Arabian_ranges

constexpr code_range real::detail::scx_Old_South_Arabian_ranges[]
inlineconstexpr
Initial value:
{
{0x10A60, 0x10A7F},
}

\p{scx=Old_South_Arabian} — 1 ranges, 32 code points.

◆ scx_Old_Turkic_ranges

constexpr code_range real::detail::scx_Old_Turkic_ranges[]
inlineconstexpr
Initial value:
{
{0x205A, 0x205A},
{0x2E30, 0x2E30},
{0x10C00, 0x10C48},
}

\p{scx=Old_Turkic} — 3 ranges, 75 code points.

◆ scx_Old_Uyghur_ranges

constexpr code_range real::detail::scx_Old_Uyghur_ranges[]
inlineconstexpr
Initial value:
{
{0x0640, 0x0640},
{0x10AF2, 0x10AF2},
{0x10F70, 0x10F89},
}

\p{scx=Old_Uyghur} — 3 ranges, 28 code points.

◆ scx_Oriya_ranges

constexpr code_range real::detail::scx_Oriya_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x0B01, 0x0B03},
{0x0B05, 0x0B0C},
{0x0B0F, 0x0B10},
{0x0B13, 0x0B28},
{0x0B2A, 0x0B30},
{0x0B32, 0x0B33},
{0x0B35, 0x0B39},
{0x0B3C, 0x0B44},
{0x0B47, 0x0B48},
{0x0B4B, 0x0B4D},
{0x0B55, 0x0B57},
{0x0B5C, 0x0B5D},
{0x0B5F, 0x0B63},
{0x0B66, 0x0B77},
{0x1CDA, 0x1CDA},
{0x1CF2, 0x1CF2},
}

\p{scx=Oriya} — 18 ranges, 97 code points.

◆ scx_Osage_ranges

constexpr code_range real::detail::scx_Osage_ranges[]
inlineconstexpr
Initial value:
{
{0x0301, 0x0301},
{0x0304, 0x0304},
{0x030B, 0x030B},
{0x0358, 0x0358},
{0x104B0, 0x104D3},
{0x104D8, 0x104FB},
}

\p{scx=Osage} — 6 ranges, 76 code points.

◆ scx_Osmanya_ranges

constexpr code_range real::detail::scx_Osmanya_ranges[]
inlineconstexpr
Initial value:
{
{0x10480, 0x1049D},
{0x104A0, 0x104A9},
}

\p{scx=Osmanya} — 2 ranges, 40 code points.

◆ scx_Pahawh_Hmong_ranges

constexpr code_range real::detail::scx_Pahawh_Hmong_ranges[]
inlineconstexpr
Initial value:
{
{0x16B00, 0x16B45},
{0x16B50, 0x16B59},
{0x16B5B, 0x16B61},
{0x16B63, 0x16B77},
{0x16B7D, 0x16B8F},
}

\p{scx=Pahawh_Hmong} — 5 ranges, 127 code points.

◆ scx_Palmyrene_ranges

constexpr code_range real::detail::scx_Palmyrene_ranges[]
inlineconstexpr
Initial value:
{
{0x10860, 0x1087F},
}

\p{scx=Palmyrene} — 1 ranges, 32 code points.

◆ scx_Pau_Cin_Hau_ranges

constexpr code_range real::detail::scx_Pau_Cin_Hau_ranges[]
inlineconstexpr
Initial value:
{
{0x11AC0, 0x11AF8},
}

\p{scx=Pau_Cin_Hau} — 1 ranges, 57 code points.

◆ scx_Phags_Pa_ranges

constexpr code_range real::detail::scx_Phags_Pa_ranges[]
inlineconstexpr
Initial value:
{
{0x1802, 0x1803},
{0x1805, 0x1805},
{0x202F, 0x202F},
{0x3002, 0x3002},
{0xA840, 0xA877},
}

\p{scx=Phags_Pa} — 5 ranges, 61 code points.

◆ scx_Phoenician_ranges

constexpr code_range real::detail::scx_Phoenician_ranges[]
inlineconstexpr
Initial value:
{
{0x10900, 0x1091B},
{0x1091F, 0x1091F},
}

\p{scx=Phoenician} — 2 ranges, 29 code points.

◆ scx_Psalter_Pahlavi_ranges

constexpr code_range real::detail::scx_Psalter_Pahlavi_ranges[]
inlineconstexpr
Initial value:
{
{0x0640, 0x0640},
{0x10B80, 0x10B91},
{0x10B99, 0x10B9C},
{0x10BA9, 0x10BAF},
}

\p{scx=Psalter_Pahlavi} — 4 ranges, 30 code points.

◆ scx_Rejang_ranges

constexpr code_range real::detail::scx_Rejang_ranges[]
inlineconstexpr
Initial value:
{
{0xA930, 0xA953},
{0xA95F, 0xA95F},
}

\p{scx=Rejang} — 2 ranges, 37 code points.

◆ scx_Runic_ranges

constexpr code_range real::detail::scx_Runic_ranges[]
inlineconstexpr
Initial value:
{
{0x16A0, 0x16F8},
}

\p{scx=Runic} — 1 ranges, 89 code points.

◆ scx_Samaritan_ranges

constexpr code_range real::detail::scx_Samaritan_ranges[]
inlineconstexpr
Initial value:
{
{0x0800, 0x082D},
{0x0830, 0x083E},
{0x2E31, 0x2E31},
}

\p{scx=Samaritan} — 3 ranges, 62 code points.

◆ scx_Saurashtra_ranges

constexpr code_range real::detail::scx_Saurashtra_ranges[]
inlineconstexpr
Initial value:
{
{0xA880, 0xA8C5},
{0xA8CE, 0xA8D9},
}

\p{scx=Saurashtra} — 2 ranges, 82 code points.

◆ scx_Sharada_ranges

constexpr code_range real::detail::scx_Sharada_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0951},
{0x1CD7, 0x1CD7},
{0x1CD9, 0x1CD9},
{0x1CDC, 0x1CDD},
{0x1CE0, 0x1CE0},
{0xA830, 0xA835},
{0xA838, 0xA838},
{0x11180, 0x111DF},
}

\p{scx=Sharada} — 8 ranges, 109 code points.

◆ scx_Shavian_ranges

constexpr code_range real::detail::scx_Shavian_ranges[]
inlineconstexpr
Initial value:
{
{0x00B7, 0x00B7},
{0x10450, 0x1047F},
}

\p{scx=Shavian} — 2 ranges, 49 code points.

◆ scx_Siddham_ranges

constexpr code_range real::detail::scx_Siddham_ranges[]
inlineconstexpr
Initial value:
{
{0x11580, 0x115B5},
{0x115B8, 0x115DD},
}

\p{scx=Siddham} — 2 ranges, 92 code points.

◆ scx_SignWriting_ranges

constexpr code_range real::detail::scx_SignWriting_ranges[]
inlineconstexpr
Initial value:
{
{0x1D800, 0x1DA8B},
{0x1DA9B, 0x1DA9F},
{0x1DAA1, 0x1DAAF},
}

\p{scx=SignWriting} — 3 ranges, 672 code points.

◆ scx_Sinhala_ranges

constexpr code_range real::detail::scx_Sinhala_ranges[]
inlineconstexpr
Initial value:
{
{0x0964, 0x0965},
{0x0D81, 0x0D83},
{0x0D85, 0x0D96},
{0x0D9A, 0x0DB1},
{0x0DB3, 0x0DBB},
{0x0DBD, 0x0DBD},
{0x0DC0, 0x0DC6},
{0x0DCA, 0x0DCA},
{0x0DCF, 0x0DD4},
{0x0DD6, 0x0DD6},
{0x0DD8, 0x0DDF},
{0x0DE6, 0x0DEF},
{0x0DF2, 0x0DF4},
{0x1CF2, 0x1CF2},
{0x111E1, 0x111F4},
}

\p{scx=Sinhala} — 15 ranges, 114 code points.

◆ scx_Sogdian_ranges

constexpr code_range real::detail::scx_Sogdian_ranges[]
inlineconstexpr
Initial value:
{
{0x0640, 0x0640},
{0x10F30, 0x10F59},
}

\p{scx=Sogdian} — 2 ranges, 43 code points.

◆ scx_Sora_Sompeng_ranges

constexpr code_range real::detail::scx_Sora_Sompeng_ranges[]
inlineconstexpr
Initial value:
{
{0x110D0, 0x110E8},
{0x110F0, 0x110F9},
}

\p{scx=Sora_Sompeng} — 2 ranges, 35 code points.

◆ scx_Soyombo_ranges

constexpr code_range real::detail::scx_Soyombo_ranges[]
inlineconstexpr
Initial value:
{
{0x11A50, 0x11AA2},
}

\p{scx=Soyombo} — 1 ranges, 83 code points.

◆ scx_Sundanese_ranges

constexpr code_range real::detail::scx_Sundanese_ranges[]
inlineconstexpr
Initial value:
{
{0x1B80, 0x1BBF},
{0x1CC0, 0x1CC7},
}

\p{scx=Sundanese} — 2 ranges, 72 code points.

◆ scx_Sunuwar_ranges

constexpr code_range real::detail::scx_Sunuwar_ranges[]
inlineconstexpr
Initial value:
{
{0x0300, 0x0301},
{0x0303, 0x0303},
{0x030D, 0x030D},
{0x0310, 0x0310},
{0x032D, 0x032D},
{0x0331, 0x0331},
{0x11BC0, 0x11BE1},
{0x11BF0, 0x11BF9},
}

\p{scx=Sunuwar} — 8 ranges, 51 code points.

◆ scx_Syloti_Nagri_ranges

constexpr code_range real::detail::scx_Syloti_Nagri_ranges[]
inlineconstexpr
Initial value:
{
{0x0964, 0x0965},
{0x09E6, 0x09EF},
{0xA800, 0xA82C},
}

\p{scx=Syloti_Nagri} — 3 ranges, 57 code points.

◆ scx_Syriac_ranges

constexpr code_range real::detail::scx_Syriac_ranges[]
inlineconstexpr
Initial value:
{
{0x0303, 0x0304},
{0x0307, 0x0308},
{0x030A, 0x030A},
{0x0320, 0x0320},
{0x0323, 0x0325},
{0x032D, 0x032E},
{0x0330, 0x0330},
{0x060C, 0x060C},
{0x061B, 0x061C},
{0x061F, 0x061F},
{0x0640, 0x0640},
{0x064B, 0x0655},
{0x0670, 0x0670},
{0x0700, 0x070D},
{0x070F, 0x074A},
{0x074D, 0x074F},
{0x0860, 0x086A},
{0x1DF8, 0x1DF8},
{0x1DFA, 0x1DFA},
}

\p{scx=Syriac} — 19 ranges, 119 code points.

◆ scx_Tagalog_ranges

constexpr code_range real::detail::scx_Tagalog_ranges[]
inlineconstexpr
Initial value:
{
{0x1700, 0x1715},
{0x171F, 0x171F},
{0x1735, 0x1736},
}

\p{scx=Tagalog} — 3 ranges, 25 code points.

◆ scx_Tagbanwa_ranges

constexpr code_range real::detail::scx_Tagbanwa_ranges[]
inlineconstexpr
Initial value:
{
{0x1735, 0x1736},
{0x1760, 0x176C},
{0x176E, 0x1770},
{0x1772, 0x1773},
}

\p{scx=Tagbanwa} — 4 ranges, 20 code points.

◆ scx_Tai_Le_ranges

constexpr code_range real::detail::scx_Tai_Le_ranges[]
inlineconstexpr
Initial value:
{
{0x0300, 0x0301},
{0x0307, 0x0308},
{0x030C, 0x030C},
{0x1040, 0x1049},
{0x1950, 0x196D},
{0x1970, 0x1974},
}

\p{scx=Tai_Le} — 6 ranges, 50 code points.

◆ scx_Tai_Tham_ranges

constexpr code_range real::detail::scx_Tai_Tham_ranges[]
inlineconstexpr
Initial value:
{
{0x1A20, 0x1A5E},
{0x1A60, 0x1A7C},
{0x1A7F, 0x1A89},
{0x1A90, 0x1A99},
{0x1AA0, 0x1AAD},
}

\p{scx=Tai_Tham} — 5 ranges, 127 code points.

◆ scx_Tai_Viet_ranges

constexpr code_range real::detail::scx_Tai_Viet_ranges[]
inlineconstexpr
Initial value:
{
{0xAA80, 0xAAC2},
{0xAADB, 0xAADF},
}

\p{scx=Tai_Viet} — 2 ranges, 72 code points.

◆ scx_Takri_ranges

constexpr code_range real::detail::scx_Takri_ranges[]
inlineconstexpr
Initial value:
{
{0x0964, 0x0965},
{0xA830, 0xA839},
{0x11680, 0x116B9},
{0x116C0, 0x116C9},
}

\p{scx=Takri} — 4 ranges, 80 code points.

◆ scx_Tamil_ranges

constexpr code_range real::detail::scx_Tamil_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x0B82, 0x0B83},
{0x0B85, 0x0B8A},
{0x0B8E, 0x0B90},
{0x0B92, 0x0B95},
{0x0B99, 0x0B9A},
{0x0B9C, 0x0B9C},
{0x0B9E, 0x0B9F},
{0x0BA3, 0x0BA4},
{0x0BA8, 0x0BAA},
{0x0BAE, 0x0BB9},
{0x0BBE, 0x0BC2},
{0x0BC6, 0x0BC8},
{0x0BCA, 0x0BCD},
{0x0BD0, 0x0BD0},
{0x0BD7, 0x0BD7},
{0x0BE6, 0x0BFA},
{0x1CDA, 0x1CDA},
{0xA8F3, 0xA8F3},
{0x11301, 0x11301},
{0x11303, 0x11303},
{0x1133B, 0x1133C},
{0x11FC0, 0x11FF1},
{0x11FFF, 0x11FFF},
}

\p{scx=Tamil} — 25 ranges, 133 code points.

◆ scx_Tangsa_ranges

constexpr code_range real::detail::scx_Tangsa_ranges[]
inlineconstexpr
Initial value:
{
{0x16A70, 0x16ABE},
{0x16AC0, 0x16AC9},
}

\p{scx=Tangsa} — 2 ranges, 89 code points.

◆ scx_Tangut_ranges

constexpr code_range real::detail::scx_Tangut_ranges[]
inlineconstexpr
Initial value:
{
{0x2FF0, 0x2FFF},
{0x31EF, 0x31EF},
{0x16FE0, 0x16FE0},
{0x17000, 0x187F7},
{0x18800, 0x18AFF},
{0x18D00, 0x18D08},
}

\p{scx=Tangut} — 6 ranges, 6931 code points.

◆ scx_Telugu_ranges

constexpr code_range real::detail::scx_Telugu_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x0C00, 0x0C0C},
{0x0C0E, 0x0C10},
{0x0C12, 0x0C28},
{0x0C2A, 0x0C39},
{0x0C3C, 0x0C44},
{0x0C46, 0x0C48},
{0x0C4A, 0x0C4D},
{0x0C55, 0x0C56},
{0x0C58, 0x0C5A},
{0x0C5D, 0x0C5D},
{0x0C60, 0x0C63},
{0x0C66, 0x0C6F},
{0x0C77, 0x0C7F},
{0x1CDA, 0x1CDA},
{0x1CF2, 0x1CF2},
}

\p{scx=Telugu} — 17 ranges, 106 code points.

◆ scx_Thaana_ranges

constexpr code_range real::detail::scx_Thaana_ranges[]
inlineconstexpr
Initial value:
{
{0x060C, 0x060C},
{0x061B, 0x061C},
{0x061F, 0x061F},
{0x0660, 0x0669},
{0x0780, 0x07B1},
{0xFDF2, 0xFDF2},
{0xFDFD, 0xFDFD},
}

\p{scx=Thaana} — 7 ranges, 66 code points.

◆ scx_Thai_ranges

constexpr code_range real::detail::scx_Thai_ranges[]
inlineconstexpr
Initial value:
{
{0x02BC, 0x02BC},
{0x02D7, 0x02D7},
{0x0303, 0x0303},
{0x0331, 0x0331},
{0x0E01, 0x0E3A},
{0x0E40, 0x0E5B},
}

\p{scx=Thai} — 6 ranges, 90 code points.

◆ scx_Tibetan_ranges

constexpr code_range real::detail::scx_Tibetan_ranges[]
inlineconstexpr
Initial value:
{
{0x0F00, 0x0F47},
{0x0F49, 0x0F6C},
{0x0F71, 0x0F97},
{0x0F99, 0x0FBC},
{0x0FBE, 0x0FCC},
{0x0FCE, 0x0FD4},
{0x0FD9, 0x0FDA},
{0x3008, 0x300B},
}

\p{scx=Tibetan} — 8 ranges, 211 code points.

◆ scx_Tifinagh_ranges

constexpr code_range real::detail::scx_Tifinagh_ranges[]
inlineconstexpr
Initial value:
{
{0x0302, 0x0302},
{0x0304, 0x0304},
{0x0307, 0x0307},
{0x0309, 0x0309},
{0x2D30, 0x2D67},
{0x2D6F, 0x2D70},
{0x2D7F, 0x2D7F},
}

\p{scx=Tifinagh} — 7 ranges, 63 code points.

◆ scx_Tirhuta_ranges

constexpr code_range real::detail::scx_Tirhuta_ranges[]
inlineconstexpr
Initial value:
{
{0x0951, 0x0952},
{0x0964, 0x0965},
{0x1CF2, 0x1CF2},
{0xA830, 0xA839},
{0x11480, 0x114C7},
{0x114D0, 0x114D9},
}

\p{scx=Tirhuta} — 6 ranges, 97 code points.

◆ scx_Todhri_ranges

constexpr code_range real::detail::scx_Todhri_ranges[]
inlineconstexpr
Initial value:
{
{0x0301, 0x0301},
{0x0304, 0x0304},
{0x0307, 0x0307},
{0x0311, 0x0311},
{0x0313, 0x0313},
{0x035E, 0x035E},
{0x105C0, 0x105F3},
}

\p{scx=Todhri} — 7 ranges, 58 code points.

◆ scx_Toto_ranges

constexpr code_range real::detail::scx_Toto_ranges[]
inlineconstexpr
Initial value:
{
{0x02BC, 0x02BC},
{0x1E290, 0x1E2AE},
}

\p{scx=Toto} — 2 ranges, 32 code points.

◆ scx_Tulu_Tigalari_ranges

constexpr code_range real::detail::scx_Tulu_Tigalari_ranges[]
inlineconstexpr
Initial value:
{
{0x0CE6, 0x0CEF},
{0x1CF2, 0x1CF2},
{0x1CF4, 0x1CF4},
{0xA830, 0xA835},
{0xA8F1, 0xA8F1},
{0x11380, 0x11389},
{0x1138B, 0x1138B},
{0x1138E, 0x1138E},
{0x11390, 0x113B5},
{0x113B7, 0x113C0},
{0x113C2, 0x113C2},
{0x113C5, 0x113C5},
{0x113C7, 0x113CA},
{0x113CC, 0x113D5},
{0x113D7, 0x113D8},
{0x113E1, 0x113E2},
}

\p{scx=Tulu_Tigalari} — 16 ranges, 99 code points.

◆ scx_Ugaritic_ranges

constexpr code_range real::detail::scx_Ugaritic_ranges[]
inlineconstexpr
Initial value:
{
{0x10380, 0x1039D},
{0x1039F, 0x1039F},
}

\p{scx=Ugaritic} — 2 ranges, 31 code points.

◆ scx_Vai_ranges

constexpr code_range real::detail::scx_Vai_ranges[]
inlineconstexpr
Initial value:
{
{0xA500, 0xA62B},
}

\p{scx=Vai} — 1 ranges, 300 code points.

◆ scx_Vithkuqi_ranges

constexpr code_range real::detail::scx_Vithkuqi_ranges[]
inlineconstexpr
Initial value:
{
{0x10570, 0x1057A},
{0x1057C, 0x1058A},
{0x1058C, 0x10592},
{0x10594, 0x10595},
{0x10597, 0x105A1},
{0x105A3, 0x105B1},
{0x105B3, 0x105B9},
{0x105BB, 0x105BC},
}

\p{scx=Vithkuqi} — 8 ranges, 70 code points.

◆ scx_Wancho_ranges

constexpr code_range real::detail::scx_Wancho_ranges[]
inlineconstexpr
Initial value:
{
{0x1E2C0, 0x1E2F9},
{0x1E2FF, 0x1E2FF},
}

\p{scx=Wancho} — 2 ranges, 59 code points.

◆ scx_Warang_Citi_ranges

constexpr code_range real::detail::scx_Warang_Citi_ranges[]
inlineconstexpr
Initial value:
{
{0x118A0, 0x118F2},
{0x118FF, 0x118FF},
}

\p{scx=Warang_Citi} — 2 ranges, 84 code points.

◆ scx_Yezidi_ranges

constexpr code_range real::detail::scx_Yezidi_ranges[]
inlineconstexpr
Initial value:
{
{0x060C, 0x060C},
{0x061B, 0x061B},
{0x061F, 0x061F},
{0x0660, 0x0669},
{0x10E80, 0x10EA9},
{0x10EAB, 0x10EAD},
{0x10EB0, 0x10EB1},
}

\p{scx=Yezidi} — 7 ranges, 60 code points.

◆ scx_Yi_ranges

constexpr code_range real::detail::scx_Yi_ranges[]
inlineconstexpr
Initial value:
{
{0x3001, 0x3002},
{0x3008, 0x3011},
{0x3014, 0x301B},
{0x30FB, 0x30FB},
{0xA000, 0xA48C},
{0xA490, 0xA4C6},
{0xFF61, 0xFF65},
}

\p{scx=Yi} — 7 ranges, 1246 code points.

◆ scx_Zanabazar_Square_ranges

constexpr code_range real::detail::scx_Zanabazar_Square_ranges[]
inlineconstexpr
Initial value:
{
{0x11A00, 0x11A47},
}

\p{scx=Zanabazar_Square} — 1 ranges, 72 code points.

◆ space_ranges

constexpr code_range real::detail::space_ranges[]
inlineconstexpr
Initial value:
{
{0x0009, 0x000D},
{0x001C, 0x0020},
{0x0085, 0x0085},
{0x00A0, 0x00A0},
{0x1680, 0x1680},
{0x2000, 0x200A},
{0x2028, 0x2029},
{0x202F, 0x202F},
{0x205F, 0x205F},
{0x3000, 0x3000},
}

Code-point ranges matched by \s (10 ranges, 29 code points).

◆ utf8_second_byte_bounds_table

constexpr std::array<utf8_second_byte_bounds, 256> real::detail::utf8_second_byte_bounds_table
inlineconstexpr
Initial value:
{
constexpr std::array< utf8_second_byte_bounds, 256 > make_utf8_second_byte_bounds_table()
Builds utf8_second_byte_bounds_table (a plain function so the 256-entry table is four lines of except...
Definition charclass.hpp:276

First-continuation-byte bounds indexed by lead byte (0–255; only 0xC2–0xF4 are ever consulted). inline constexpr: computed once at compile time, one instance across TUs.

Every lead byte defaults to the generic continuation range [0x80, 0xBF]; four narrow it (Unicode Table 3-7) to exclude an overlong, surrogate, or beyond-U+10FFFF encoding: 0xE0 (3-byte, excludes the 3-byte overlong region [0x80, 0x9F]), 0xED (3-byte, excludes the U+D800-U+DFFF surrogate block [0xA0, 0xBF]), 0xF0 (4-byte, excludes the 4-byte overlong region [0x80, 0x8F]), 0xF4 (4-byte, excludes code points past U+10FFFF, [0x90, 0xBF]). The 2-byte case needs no narrowing here: excluding 0xC0/0xC1 from utf8_lead2_set already rules out every 2-byte overlong encoding.

This is the single source of truth for rejecting those four encodings WITHOUT decoding the full code point (unlike real::detail::decode_codepoint_strict, which accumulates the code point via shifts and checks it against min_cp/the surrogate block after the fact – correct, but too costly for a hot per-byte scan). Shared by every consumer that needs the rejection at scan speed: pike.hpp's . fast path and compiler.hpp's canonical byte-range expansion both read this table, so a narrowing here can never diverge between routes.