|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
Two probe bytes per branch of a literal alternation: the branch's first byte and one byte further in it, for the pair filter an alternation's block scan turns to once the first bytes prove common. More...
#include <prefilter.hpp>
Public Attributes | |
| std::uint8_t | count {} |
| Branches planned; 0 means no plan. | |
| std::uint8_t | max_d {} |
| Largest probe offset: a block reads up to this far past its 16 starts. | |
| std::array< std::uint8_t, 16 > | lead {} |
| Each branch's first byte (valid with pairs). | |
| std::array< std::uint8_t, 16 > | probe {} |
| Each branch's second probe byte. | |
| std::array< std::uint8_t, 16 > | delta {} |
| Its offset in the branch (at most 15; 0 probes the first byte twice). | |
| std::array< byte_splat, 16 > | lead_splat {} |
| lead, each in all 16 lanes: a block loads rather than broadcasts it. | |
| std::array< byte_splat, 16 > | probe_splat {} |
| probe, likewise. | |
| bool | nibbles {} |
| nibble_lo and nibble_hi are valid: every branch is at least two bytes wide. | |
| bool | pairs {} |
| lead, probe and delta are valid: every branch starts with a byte. | |
| std::array< std::array< std::uint8_t, 16 >, 3 > | nibble_lo {} |
| Per fingerprint byte, low nibble to the bits of the buckets (branch index mod 8) it admits. | |
| std::array< std::array< std::uint8_t, 16 >, 3 > | nibble_hi {} |
| The same for the high nibble. | |
Two probe bytes per branch of a literal alternation: the branch's first byte and one byte further in it, for the pair filter an alternation's block scan turns to once the first bytes prove common.
Built from the program once per regex (not kept in the hints, which every search copies). count is 0 when a branch starts with neither a byte nor a class, or the alternation has more branches than the arrays; a nonzero count carries the pairs, the fingerprint, or both (pairs, nibbles).