Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Formal regular tree expression represents regular tree expression. It describes regular tree languages. The expression consists of the following nodes: More...
#include <FormalRTE.h>
Public Member Functions | |
FormalRTE () | |
Creates a new instance of the expression. The default constructor creates expression describing empty language. More... | |
FormalRTE (ext::set< common::ranked_symbol< SymbolType > > alphabetF, ext::set< common::ranked_symbol< SymbolType > > alphabetK, FormalRTEStructure< SymbolType > rte) | |
Creates a new instance of the expression with a concrete terminal alphabet, substitution alphabet, and initial content. More... | |
FormalRTE (std::pair< ext::set< common::ranked_symbol< SymbolType > >, ext::set< common::ranked_symbol< SymbolType > > > alphabets, FormalRTEStructure< SymbolType > rte) | |
Creates a new instance of the expression with a concrete terminal alphabet, substitution alphabet, and initial content. More... | |
FormalRTE (FormalRTEStructure< SymbolType > rte) | |
Creates a new instance of the expression based on the initial content. Alphabets are deduced from the content. More... | |
const ext::set< common::ranked_symbol< SymbolType > > & | getAlphabet () const & |
ext::set< common::ranked_symbol< SymbolType > > && | getAlphabet () && |
void | addAlphabetSymbols (common::ranked_symbol< SymbolType > symbol) |
void | addAlphabetSymbols (ext::set< common::ranked_symbol< SymbolType > > symbols) |
void | setAlphabetSymbols (ext::set< common::ranked_symbol< SymbolType > > symbols) |
void | removeAlphabetSymbol (const common::ranked_symbol< SymbolType > &symbol) |
const ext::set< common::ranked_symbol< SymbolType > > & | getSubstitutionAlphabet () const & |
ext::set< common::ranked_symbol< SymbolType > > && | getSubstitutionAlphabet () && |
void | addConstantSymbol (common::ranked_symbol< SymbolType > symbol) |
void | addConstantSymbols (ext::set< common::ranked_symbol< SymbolType > > symbols) |
void | setConstantSymbols (ext::set< common::ranked_symbol< SymbolType > > symbols) |
void | removeConstantSymbol (const common::ranked_symbol< SymbolType > &symbol) |
const FormalRTEStructure< SymbolType > & | getRTE () const & |
FormalRTEStructure< SymbolType > && | getRTE () && |
void | setRTE (FormalRTEStructure< SymbolType > param) |
auto | operator<=> (const FormalRTE &other) const |
bool | operator== (const FormalRTE &other) const |
![]() | |
void | accessComponent () |
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const FormalRTE &instance) |
Additional Inherited Members | |
![]() | |
static void | registerComponent () |
static void | unregisterComponent () |
Formal regular tree expression represents regular tree expression. It describes regular tree languages. The expression consists of the following nodes:
The formal representation allows nodes of alternation to have exactly two children.
The structure of the regular tree expression is wrapped in a structure class to allow separate the alphabets from the structure
Definition is unbounded definition of regular expressions. E = (T, S, C), T (TerminalAlphabet) = finite set of terminal symbols S (SubstitutionAlphabet) = finite set of substitution symbols C (Content) = representation of the regular expression
SymbolType | used for the symbol part of the ranked symbol |
|
explicit |
Creates a new instance of the expression. The default constructor creates expression describing empty language.
|
explicit |
Creates a new instance of the expression with a concrete terminal alphabet, substitution alphabet, and initial content.
alphabetF | the initial terminal alphabet |
alphabetK | the initial substitution alphabet |
rte | the initial rte content |
|
explicit |
Creates a new instance of the expression with a concrete terminal alphabet, substitution alphabet, and initial content.
alphabets | the pair of terminal alphabet and substitution alphabet |
rte | the initial rte content |
|
explicit |
Creates a new instance of the expression based on the initial content. Alphabets are deduced from the content.
rte | the initial rte content |
|
inline |
Adder of a terminal symbol.
symbol | the new symbol to be added to a terminal alphabet |
|
inline |
Adder of terminal symbols.
symbols | new symbols to be added to a terminal alphabet |
|
inline |
Adder of a substitution symbol.
symbol | the new symbol to be added to a substitution alphabet |
|
inline |
Adder of substitution symbols.
symbols | new symbols to be added to a substitution alphabet |
|
inline |
Getter of the terminal alphabet.
|
inline |
Getter of the terminal alphabet.
FormalRTEStructure< SymbolType > && rte::FormalRTE< SymbolType >::getRTE | ( | ) | && |
Get the structure of the expression.
const FormalRTEStructure< SymbolType > & rte::FormalRTE< SymbolType >::getRTE | ( | ) | const & |
Get the structure of the expression.
|
inline |
Getter of the substitution alphabet.
|
inline |
Getter of the substitution alphabet.
|
inline |
The three way comparison implementation
other | the other instance |
other
.
|
inline |
The equality comparison implementation.
other | the other object to compare with. |
|
inline |
Remover of a terminal symbol.
symbol | a symbol to be removed from a terminal alphabet |
|
inline |
Remover of a substitution symbol.
symbol | a symbol to be removed from a substitution alphabet |
|
inline |
Setter of terminal alphabet.
symbols | completely new terminal alphabet |
|
inline |
Setter of substitution alphabet.
symbols | completely new substitution alphabet |
void rte::FormalRTE< SymbolType >::setRTE | ( | FormalRTEStructure< SymbolType > | param | ) |
Set the structure of the expression.
regExp | the new structure of the expression. |
|
friend |
Print this object as raw representation to ostream.
out | ostream where to print |
instance | object to print |