|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
One AST node. Active fields depend on kind (noted per field). More...
#include <ast.hpp>
Public Attributes | |
| node_kind | kind {node_kind::empty} |
| Which fields below are meaningful. | |
| std::uint8_t | byte {} |
| byte: the exact byte value. | |
| anchor_kind | anchor {anchor_kind::caret} |
| anchor: the assertion kind. | |
| bool | negated {} |
klass: written as [^...] / \D \W \S. | |
| bool | raw_byte {} |
any: \C (RE2's raw-byte escape) — always 1 byte, bypasses UTF-8 even outside bytes mode. Parser requires flags::bytes (see parse_escape). | |
| bool | lazy {} |
| repeat: prefer the shortest expansion. | |
| bool | possessive {} |
repeat: no give-back (X*+/X++/X?+/X{n,m}+). group: atomic (?>...) — same "no give-back" meaning, reused. | |
| look_dir | direction {look_dir::ahead} |
lookaround: ahead (?=/(?! or behind (?<=/(?<!. | |
| std::int32_t | klass {-1} |
| klass: index into ast::classes. | |
| std::int32_t | min {} |
| repeat: minimum count. | |
| std::int32_t | max {-1} |
| repeat: maximum count (-1 = unbounded). | |
| std::int32_t | group {-1} |
group: capture number, -1 for (?:...). | |
| std::int32_t | child {-1} |
| First child (concat, repeat, alternation, group). | |
| std::int32_t | next {-1} |
| Next sibling in the parent's child list. | |
| std::uint16_t | effective_flags {} |
| Flag set in force where this node was parsed (see flags). Stamped from the scope stack; carried for scoped-flag semantics. | |
One AST node. Active fields depend on kind (noted per field).