|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
A non-owning view of everything the engine needs to run one compiled pattern: the borrowed spans, the slot count, the mode flags, the search hints, and the per-regex cache. Both storages hand one of these to the VM, which is why the engine is storage-agnostic. Valid only as long as the program it views is alive. More...
Public Attributes | |
| std::span< const instr > | code |
| The instruction stream (main + lookaround regions). | |
| std::span< const char_class > | classes |
| Interned character classes. | |
| std::span< const named_group > | names |
| Named capture groups. | |
| std::span< const lookaround_sub > | lookarounds |
| Bounded lookaround sub-programs (regions of code). | |
| std::span< const cp_class > | cp_classes |
Match-time code-point classes (for klass_cp). | |
| std::span< const code_range > | cp_ranges |
Flat range buffer the cp_class slices index into. | |
| std::span< const instr > | prefix_code |
| IL: inner-literal prefix sub-program (the reverse start-finder). Empty unless there is a required literal with a top-level prefix. Dynamic-only. | |
| std::span< const char_class > | prefix_classes |
| IL: classes for prefix_code. | |
| std::span< const cp_class > | prefix_cp_classes |
| IL: code-point classes for prefix_code. | |
| std::span< const code_range > | prefix_cp_ranges |
| IL: flat range buffer for prefix_cp_classes. | |
| std::uint16_t | slot_count {2} |
2 * (capture groups + 1). | |
| bool | byte_mode {} |
| flags::bytes mode — positions are raw bytes. | |
| bool | unicode_word {} |
\b \B \< \> use Unicode word-ness (text mode, not bytes / re.A). | |
| pattern_hints | hints |
| Search-acceleration hints. | |
| regex_immutables * | immut {nullptr} |
| const std::uint8_t * | class_tables {nullptr} |
Flat byte-class membership tables, class_tables[i * 256 + b], or null when the storage has none pre-built (dynamic, which fills them lazily through immut instead). | |
| const std::uint8_t * | cp_ascii_tables {nullptr} |
Flat ASCII tables per cp_class: [i * 256 + b]. Null as class_tables. | |
| const std::uint64_t * | cp_page_tables {nullptr} |
Flat page bitmaps per cp_class: [i * 30]. Null as class_tables. | |
A non-owning view of everything the engine needs to run one compiled pattern: the borrowed spans, the slot count, the mode flags, the search hints, and the per-regex cache. Both storages hand one of these to the VM, which is why the engine is storage-agnostic. Valid only as long as the program it views is alive.
| const std::uint8_t* real::detail::program_view::class_tables {nullptr} |
Flat byte-class membership tables, class_tables[i * 256 + b], or null when the storage has none pre-built (dynamic, which fills them lazily through immut instead).
Carried here rather than reached through the state type: a state that names the pattern's own arrays is a state that cannot be shared between patterns, and every Pike VM route is then instantiated once per pattern. Compile-time storage points these at its static constexpr arrays, so a constant-folding compiler still sees through to the same addresses.
| regex_immutables* real::detail::program_view::immut {nullptr} |
Per-regex DFA/one-pass cache (dynamic storage only; else null).