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

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

#include <prefilter.hpp>

Public Attributes

std::size_t body_start {}
 pc where the shape-specific body begins.
 
std::uint8_t wb_lead {}
 
bool anchored_start {}
 A leading \A/^ (NOT multiline ^) was peeled — the shape may only match at 0.
 
bool ok {}
 false: no leading save 0, or a non-wb lead assert disqualifies.
 

Detailed Description

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).

Member Data Documentation

◆ anchored_start

bool real::detail::shape_lead::anchored_start {}

A leading \A/^ (NOT multiline ^) was peeled — the shape may only match at 0.

Reported rather than rejected, but every recognizer that does not itself honour the anchor MUST refuse the shape when this is set – arming a fast path that scans forward for a pattern pinned to position 0 would return matches the program forbids. Only the class-loop recognizer accepts it today, and the route it arms reads pattern_hints::anchored_start.

◆ wb_lead

std::uint8_t real::detail::shape_lead::wb_lead {}

0/1/2, see wb_hint_of.


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