reglibcpp  2.0.0
A C++ implementation of models for regular languages
Public Member Functions | Public Attributes | List of all members
reg::expression::parser::tree Struct Reference

Represents the table entries as binary trees. More...

Public Member Functions

pair< unique_ptr< tree >, unique_ptr< tree > > findNextPair (token symbol, size_t row, size_t diag, parser const *p)
 Finds the child trees that can be derived from a given entry. More...
 
 tree (size_t row, size_t diag, parser const *p)
 Initializes a tree with a given table entry as root. More...
 
exptr operator() (bool optimized, bool aggressive)
 Gives the RE encoded in this tree. More...
 

Public Attributes

parser const * p
 Points to the parser this tree belongs to. More...
 
token symbol
 This tree's root symbol. More...
 
pair< unique_ptr< tree >, unique_ptr< tree > > children
 Trees with the symbols of the entry's derived pair as root. More...
 

Detailed Description

Represents the table entries as binary trees.

Definition at line 580 of file expression.cpp.

Constructor & Destructor Documentation

◆ tree()

reg::expression::parser::tree::tree ( size_t  row,
size_t  diag,
parser const *  p 
)
inline

Initializes a tree with a given table entry as root.

Parameters
rowthe row of the entry
diagthe diagonal of the entry
ppointer to the calling parser

Definition at line 618 of file expression.cpp.

Member Function Documentation

◆ findNextPair()

pair<unique_ptr<tree>, unique_ptr<tree> > reg::expression::parser::tree::findNextPair ( token  symbol,
size_t  row,
size_t  diag,
parser const *  p 
)
inline

Finds the child trees that can be derived from a given entry.

Parameters
symbolthe entry's symbol
rowthe row of the entry
diagthe diagonal of the entry
ppoints to this tree's owning parser
Returns
pair of trees, both of which can be derived from the entry (may both be
nullptr
if the entry is nullable)

Definition at line 595 of file expression.cpp.

◆ operator()()

exptr reg::expression::parser::tree::operator() ( bool  optimized,
bool  aggressive 
)
inline

Gives the RE encoded in this tree.

Definition at line 631 of file expression.cpp.

Member Data Documentation

◆ children

pair<unique_ptr<tree>, unique_ptr<tree> > reg::expression::parser::tree::children

Trees with the symbols of the entry's derived pair as root.

Definition at line 583 of file expression.cpp.

◆ p

parser const* reg::expression::parser::tree::p

Points to the parser this tree belongs to.

Definition at line 581 of file expression.cpp.

◆ symbol

token reg::expression::parser::tree::symbol

This tree's root symbol.

Definition at line 582 of file expression.cpp.


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