REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
real::detail::utf8_trie_node Struct Reference

One node of a minimal deterministic UTF-8 trie for a code-point class. Its byte-range transitions are pairwise disjoint (at most one edge matches a byte), which makes the byte-program one-pass-friendly. A target >= 0 is a node id; -1 is accept (the run continues at the construct's successor). More...

#include <lazy_dfa.hpp>

Public Attributes

std::vector< std::pair< utf8_byte_range, std::int32_t > > trans
 Outgoing edges: a byte range paired with its target, -1 meaning accept. Pairwise disjoint.
 

Detailed Description

One node of a minimal deterministic UTF-8 trie for a code-point class. Its byte-range transitions are pairwise disjoint (at most one edge matches a byte), which makes the byte-program one-pass-friendly. A target >= 0 is a node id; -1 is accept (the run continues at the construct's successor).

Member Data Documentation

◆ trans

std::vector<std::pair<utf8_byte_range, std::int32_t> > real::detail::utf8_trie_node::trans

Outgoing edges: a byte range paired with its target, -1 meaning accept. Pairwise disjoint.

Note
One heap block per node, most of build_byte_program's allocations (a cold first search's cost). A pool needs a stack-disciplined arena for the recursive builder; an ASCII-first expansion would remove the work instead (see build_byte_program).

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