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

A parsed character class: its ASCII bitmap plus its non-ASCII code-point ranges, bundled so the two cannot desynchronize. More...

#include <ast.hpp>

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

Public Attributes

char_class ascii
 ASCII members as a bitmap (all 256 bytes in bytes mode); pre-negation.
 
std::vector< code_range > ranges
 Non-ASCII code-point ranges (code-point mode only; empty otherwise).
 
bool codepoint_predicate {}
 Emit as a match-time klass_cp (a Unicode shorthand \w/\d/\s in text mode), not the byte-NFA.
 
bool has_sets {}
 
std::vector< code_range > cased_ranges {}
 

Detailed Description

A parsed character class: its ASCII bitmap plus its non-ASCII code-point ranges, bundled so the two cannot desynchronize.

Member Data Documentation

◆ cased_ranges

std::vector<code_range> real::detail::class_def::cased_ranges {}

When has_sets holds, the non-ASCII members a fold expands (characters, ranges, properties). Its {} spares a caller writing {.ascii = ..., .ranges = ...} a missing-initializer warning.

◆ has_sets

bool real::detail::class_def::has_sets {}

A shorthand (\w, \d, \s, negated or not) is a member: a case fold expands only cased_ranges past ASCII.


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