|
| constexpr std::uint32_t | real::detail::inner_literal_detail::score_run (std::span< const std::uint8_t > run, const std::vector< bool > &folded) |
| | Selectivity of a byte run.
|
| |
| constexpr std::int32_t | real::detail::inner_literal_detail::fold_pair_letter (const ast &tree, const ast_node &n) |
| | The lower-case ASCII letter a class node matches in either case and in no other way, else -1.
|
| |
| constexpr void | real::detail::inner_literal_detail::flush (walk_state &st) |
| | Score the current byte run and keep it (with its prefix boundary) if it beats best, then clear it (capped at inner_literal_max).
|
| |
| constexpr bool | real::detail::inner_literal_detail::is_pure_byte_run (const ast &tree, std::int32_t idx) noexcept |
| | Whether idx is a pure fixed byte run: only byte / nested concat / group of the same.
|
| |
| constexpr bool | real::detail::inner_literal_detail::byte_run_is_empty (const ast &tree, std::int32_t idx) noexcept |
| | Whether a byte-run subtree can match the empty string — i.e. holds no byte at all.
|
| |
| constexpr bool | real::detail::inner_literal_detail::walk (const ast &tree, std::int32_t idx, walk_state &st, std::int32_t top_child) |
| | Walk one node, appending guaranteed-present literal bytes to walk_state::run.
|
| |
| constexpr bool | real::detail::inner_literal_detail::is_top_wb_anchor (const ast &tree, std::int32_t idx) noexcept |
| | Whether idx is a top-level \b or \B anchor — a peel candidate.
|
| |
| constexpr std::uint8_t | real::detail::inner_literal_detail::wb_hint_from_anchor (anchor_kind k) noexcept |
| | Encodes a peeled word-boundary anchor as the hint value inner_literal::wb_lead and inner_literal::wb_trail carry.
|
| |
| constexpr bool | real::detail::inner_literal_detail::is_word_only_run (const ast &tree, std::int32_t k) |
| | Whether node k is a repetition, at least once, of a class every member of which is a word character (groups around it looked through).
|
| |
| constexpr std::size_t | real::detail::inner_literal_detail::byte_run_width (const ast &tree, std::int32_t idx) noexcept |
| | Width in bytes of a subtree is_pure_byte_run accepted.
|
| |
| constexpr bool | real::detail::inner_literal_detail::is_unit (const ast &tree, std::int32_t idx) noexcept |
| | Whether a subtree matches exactly one unit: a byte, a class or ., groups looked through.
|
| |
| constexpr bool | real::detail::inner_literal_detail::scan_prefix (const ast &tree, std::int32_t idx, std::array< bool, 256 > &bytes) |
| | Marks in bytes every byte a match of the subtree can contain, and says whether the subtree has a RIGID variable width: an alternation whose branches differ in width, or a repeat of anything wider than one unit whose count is not fixed.
|
| |
| constexpr bool | real::detail::inner_literal_detail::can_occur_in_prefix (const inner_literal &lit, const std::array< bool, 256 > &bytes) noexcept |
| | Whether an occurrence of lit can begin inside a prefix whose matches hold only the bytes flagged in bytes.
|
| |
| constexpr inner_literal | real::detail::extract_inner_literal (const ast &tree) |
| | Extract the best required inner literal from a pattern's AST (a pure function on the node pool).
|
| |
| ast | real::detail::build_prefix_ast (const ast &tree, std::int32_t count, std::int32_t skip=0) |
| | Build the prefix sub-AST: count top-level concat children starting after skip lead children.
|
| |
Extracts a required inner literal from a pattern's AST — the substring that every match must contain ((\w+)@(\w+) -> @, key=(\w+) -> key=, \d{4}-\d{2} -> -). It is the memmem candidate an inner-literal prefilter scans for: find the literal, then confirm the surrounding pattern from that candidate. A pure function over the node pool: compiler.hpp records the result in pattern_hints, and pike_vm::run dispatches to run_inner_literal on it.