|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
Reusable VM scratch state. More...
#include <pike.hpp>
Public Member Functions | |
| constexpr | basic_pike_state () noexcept |
| Value-initializes table and cp_page during constant evaluation only. | |
Public Attributes | |
| ThreadList | list_a |
| One of the two thread lists; the run rotates pointers, not indices. | |
| ThreadList | list_b |
| The other one — see list_a. | |
| EpsVec | stack |
| Epsilon-closure DFS stack. | |
| std::int32_t | table_class {-1} |
Class table was built for (-1 = none). One load per byte instead of the bitmap's shift-and-mask, reused across a find_all-style walk. | |
| std::array< std::uint8_t, 256 > | table |
| 1 where the byte is in table_class (filled on a class_table miss). | |
| std::int32_t | cp_page_class {-1} |
Class cp_page was built for (-1 = none): the 2-byte UTF-8 range [U+0080, U+07FF] in one load from 240 bytes. Higher code points use cp_hi_table, since widening the bitmap would inflate every pattern's hot state and slow the ASCII class loop. | |
| std::array< std::uint64_t, 30 > | cp_page |
| 1 where the code point (U+0080..U+07FF) is a member (filled on a cp_page_table miss). | |
| const void * | rows_verified_for {nullptr} |
Program whose membership rows this state verified as filled; spares class_table's two acquire loads per run(). | |
| const std::uint8_t * | row_ptr {nullptr} |
| The verified byte row, cached for the hot path. | |
| const std::uint64_t * | page_ptr {nullptr} |
| As row_ptr, for the two-byte page bitmap. | |
| std::int32_t | hi_class {-1} |
| Class hi_ptr / hi_never were resolved for; -1 while unresolved. | |
| const cp_hi_table * | hi_ptr {nullptr} |
| The resolved sparse hi table for hi_class, or null when it has none usable. | |
| bool | hi_never {false} |
| Set when hi_class has no high ranges at all, so every cp past the page bitmap misses. | |
Reusable VM scratch state.
One run allocates nothing once warm (never, with static containers); find_all-style loops reuse the state across runs. The two thread lists are flipped, never swapped.
| ThreadList | The thread-list type (a basic_thread_list). |
| EpsVec | Container for the epsilon-closure stack. |
|
inlineconstexprnoexcept |