|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
The Pike VM — a Thompson NFA simulation — and its fast paths. More...
#include "real/version.hpp"#include <array>#include <cassert>#include <cstdint>#include <string_view>#include <type_traits>#include <utility>#include <vector>#include "real/core/charclass.hpp"#include "real/engine/prefilter.hpp"#include <mutex>#include <optional>#include "real/automata/lazy_dfa.hpp"#include "real/automata/onepass.hpp"#include "real/core/program.hpp"#include "real/unicode/unicode_props.hpp"#include "real/unicode/utf8.hpp"Go to the source code of this file.
Classes | |
| struct | real::detail::eps_entry |
One frame on the epsilon-closure DFS stack (OPT D1): a program counter to explore, plus the capture block the branch carries. The block travels with the branch — a split shares it and a save copies it on write — so there is no slot-restore entry and no shared working array. More... | |
| struct | real::detail::basic_capture_pool< DataVec, RefVec, FreeVec > |
| Copy-on-write pool of capture blocks (OPT D1) — the one capture-slot mechanism for both storages. More... | |
| struct | real::detail::basic_thread_list< PcVec, SlotVec, MarkVec > |
| One priority-ordered list of NFA threads (leftmost-greedy semantics). More... | |
| struct | real::detail::basic_pike_state< ThreadList, EpsVec > |
| Reusable VM scratch state. More... | |
| struct | real::detail::lookaround_scratch |
| Reusable, isolated scratch for one level of lookaround evaluation (dynamic only). More... | |
| struct | real::detail::pike_state |
| VM scratch state for the dynamic storage mode, plus the lookaround sub-scratch. More... | |
| class | real::detail::pike_vm< State > |
| The Pike VM, generic over the scratch-state container policy. More... | |
Namespaces | |
| namespace | real |
| namespace | real::detail |
Typedefs | |
| using | real::detail::capture_pool = basic_capture_pool< std::vector< std::size_t >, std::vector< std::int32_t >, std::vector< std::uint32_t > > |
| The dynamic-storage capture pool: heap vectors, grows on demand. | |
| using | real::detail::thread_list = basic_thread_list< std::vector< std::int32_t >, std::vector< std::size_t >, std::vector< std::uint64_t > > |
Thread list specialized on std::vector (the dynamic storage mode). | |
Enumerations | |
| enum class | real::detail::run_mode : std::uint8_t { real::detail::prefix , real::detail::full , real::detail::search } |
| How a VM run is anchored. More... | |
The Pike VM — a Thompson NFA simulation — and its fast paths.
Linear time in the input: every program counter is added to a list at most once per position (generation-marked dedup), so no pattern can backtrack catastrophically.
The VM is generic over its container policy — std::vector for the dynamic storage mode, fixed-capacity static_vec (storage.hpp) for compile-time sized patterns, where a whole run performs zero heap allocations.
Definition in file pike.hpp.