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

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, exactly one byte; accepted only under flags::bytes or flags::allow_raw_byte.
 
bool lazy {}
 repeat: prefer the shortest expansion.
 
bool possessive {}
 repeat: no give-back (X*+, X{n,m}+); group: atomic (?>...).
 
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 {}
 flags in force where this node was parsed, stamped from the scope stack.
 

Detailed Description

One AST node. Active fields depend on kind (noted per field).


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