|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
The best required inner literal of a pattern (the memmem candidate). len == 0 means the pattern declined: an alternation, an optional (?/*/{0,n}), a lookaround or an anchor at the level walked, or simply no literal run — anything that would make a required literal unsound.
More...
#include <inner_literal.hpp>
Public Member Functions | |
| constexpr bool | found () const |
Public Attributes | |
| std::array< std::uint8_t, 16 > | bytes {} |
| std::uint8_t | len {0} |
| std::uint32_t | score {0} |
| Selectivity: higher = rarer/longer = fewer memmem candidates. | |
| std::int32_t | prefix_child_count {-1} |
The best required inner literal of a pattern (the memmem candidate). len == 0 means the pattern declined: an alternation, an optional (?/*/{0,n}), a lookaround or an anchor at the level walked, or simply no literal run — anything that would make a required literal unsound.
Definition at line 27 of file inner_literal.hpp.
|
inlineconstexpr |
Definition at line 37 of file inner_literal.hpp.
| std::array<std::uint8_t, 16> real::detail::inner_literal::bytes {} |
Definition at line 29 of file inner_literal.hpp.
| std::uint8_t real::detail::inner_literal::len {0} |
Definition at line 30 of file inner_literal.hpp.
| std::int32_t real::detail::inner_literal::prefix_child_count {-1} |
Top-level concat children BEFORE the literal — the sub-pattern IL.1 reverse-matches from a candidate to find the match start. 0 = the literal is at the head (reverse is the identity: start = candidate). -1 = the literal is nested in a group/repeat, so no clean top-level prefix boundary exists (the prefix-reverse does not apply; the memmem candidate still does).
Definition at line 32 of file inner_literal.hpp.
| std::uint32_t real::detail::inner_literal::score {0} |
Selectivity: higher = rarer/longer = fewer memmem candidates.
Definition at line 31 of file inner_literal.hpp.