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

A bounded lookaround sub-program, referenced by assert_lookaround's arg16. More...

Public Attributes

std::int32_t code_offset {}
 First instruction of the sub-program in code.
 
std::int32_t code_length {}
 Instruction count of the sub-program.
 
std::int32_t l_max {}
 Max bytes the sub-pattern can consume (bounded).
 
look_dir direction {look_dir::ahead}
 Ahead or behind.
 
bool negative {}
 (?! / (?<! (negated assertion).
 

Detailed Description

A bounded lookaround sub-program, referenced by assert_lookaround's arg16.

The sub-pattern's bytecode lives as a region inside the main code buffer (appended after the main program), so it survives copy/move of dynamic_program with no stored pointers — the views are rebuilt on demand from these offsets. l_max bounds the bytes the sub can consume (unbounded sub-patterns are rejected at compile time): the source of the strict linear-time guarantee.


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