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.

Definition at line 238 of file program.hpp.

Member Data Documentation

◆ code_length

std::int32_t real::detail::lookaround_sub::code_length {}

Instruction count of the sub-program.

Definition at line 241 of file program.hpp.

◆ code_offset

std::int32_t real::detail::lookaround_sub::code_offset {}

First instruction of the sub-program in code.

Definition at line 240 of file program.hpp.

◆ direction

look_dir real::detail::lookaround_sub::direction {look_dir::ahead}

Ahead or behind.

Definition at line 243 of file program.hpp.

◆ l_max

std::int32_t real::detail::lookaround_sub::l_max {}

Max bytes the sub-pattern can consume (bounded).

Definition at line 242 of file program.hpp.

◆ negative

bool real::detail::lookaround_sub::negative {}

(?! / (?<! (negated assertion).

Definition at line 244 of file program.hpp.


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