Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <UnboundedRegExpElement.h>
Data Structures | |
class | RvalueVisitor |
class | RvalueVisitorContext |
class | Visitor |
class | VisitorContext |
Public Member Functions | |
virtual UnboundedRegExpElement< SymbolType > * | clone () const &=0 |
virtual UnboundedRegExpElement< SymbolType > * | clone () &&=0 |
template<class ReturnType , class Visitorr , class ... Params> | |
ReturnType | accept (Params &&... params) const & |
template<class ReturnType , class Visitorr , class ... Params> | |
ReturnType | accept (Params &&... params) && |
virtual ext::smart_ptr< FormalRegExpElement< SymbolType > > | asFormal () const =0 |
virtual bool | testSymbol (const SymbolType &symbol) const =0 |
virtual void | computeMinimalAlphabet (ext::set< SymbolType > &alphabet) const =0 |
virtual bool | checkAlphabet (const ext::set< SymbolType > &alphabet) const =0 |
ext::set< SymbolType > | computeMinimalAlphabet () const |
virtual ext::smart_ptr< UnboundedRegExpElement< DefaultSymbolType > > | normalize () &&=0 |
Traverses the regexp tree and normalizes the symbols to DefaultSymbolType. More... | |
virtual void | operator>> (ext::ostream &) const =0 |
virtual std::strong_ordering | operator<=> (const UnboundedRegExpElement< SymbolType > &other) const =0 |
Three way comparison helper method evaluating allowing possibly deeper comparison of this with other class of the same hierarchy. More... | |
virtual bool | operator== (const UnboundedRegExpElement< SymbolType > &other) const =0 |
Comparison helper method evaluating allowing possibly deeper comparison of this with other class of the same hierarchy. More... | |
![]() | |
BaseNode () | |
Constructor of the tree hierarchy base class. More... | |
BaseNode (const BaseNode &) | |
Copy construction does not copy the parent pointer. More... | |
BaseNode (BaseNode &&) noexcept | |
Move construction does not copy the parent pointer. More... | |
virtual | ~BaseNode () noexcept=default |
Destructor of the tree hierarchy base class. More... | |
BaseNode & | operator= (const BaseNode &) |
Copy assignment does not change the parent pointer. More... | |
BaseNode & | operator= (BaseNode &&) noexcept |
Move assignment does not change the parent pointer. More... | |
UnboundedRegExpElement< SymbolType > * | getParent () |
Getter of the parent of the node. More... | |
const UnboundedRegExpElement< SymbolType > * | getParent () const |
Getter of the parent of the node. More... | |
Protected Member Functions | |
virtual void | accept (UnboundedRegExpElement::Visitor &visitor) const &=0 |
Accept method of the visitor pattern. This is where the actual type of this object is evaluated. More... | |
virtual void | accept (UnboundedRegExpElement::RvalueVisitor &visitor) &&=0 |
Accept method of the visitor pattern. This is where the actual type of this object is evaluated. More... | |
Friends | |
ext::ostream & | operator<< (ext::ostream &os, const UnboundedRegExpElement< SymbolType > &instance) |
Abstract class representing element in the unbounded regular expression. Can be an operator, special node, or a symbol.
SymbolType | used for the terminal alphabet |
|
inline |
Visitor interface method.
ReturnType | the return type of the result of the visit |
Visitorr | the type of the actuall visitor |
Params | ... types of data passed with the visitor call |
\params params ... Additional params passed to visited nodes
|
inline |
Visitor interface method.
ReturnType | the return type of the result of the visit |
Visitorr | the type of the actuall visitor |
Params | ... types of data passed with the visitor call |
\params params ... Additional params passed to visited nodes
|
protectedpure virtual |
Accept method of the visitor pattern. This is where the actual type of this object is evaluated.
visitor | the accepted visitor. |
|
protectedpure virtual |
Accept method of the visitor pattern. This is where the actual type of this object is evaluated.
visitor | the accepted visitor. |
|
pure virtual |
Creates copy of the element.
|
pure virtual |
Traverses the regexp tree and checks whether all symbols in the regexp tree are in the alphabet
alphabet | alphabet to check against |
|
pure virtual |
|
pure virtual |
ext::set< SymbolType > UnboundedRegExpElement::computeMinimalAlphabet |
Traverses the regexp tree and constructs the minimal alphabet of symbols used in the expression
|
pure virtual |
Traverses the regexp tree computing minimal alphabet needed by regexp
alphabet | All alphabet symbols encountered are added into this set |
|
pure virtual |
Traverses the regexp tree and normalizes the symbols to DefaultSymbolType.
|
pure virtual |
Three way comparison helper method evaluating allowing possibly deeper comparison of this with other class of the same hierarchy.
If the other class is of different type the relative order is computer by means of type_index.
other | the other class to compare with |
|
pure virtual |
Comparison helper method evaluating allowing possibly deeper comparison of this with other class of the same hierarchy.
If the other class is of different type the relative order is computer by means of type_index.
other | the other class to compare with |
|
pure virtual |
Print this instance as raw representation to ostream.
os | ostream where to print |
|
pure virtual |
Traverses the regexp tree looking if particular Symbol is used in the regexp.
symbol | to test if used in regexp element |
|
friend |
Print this object as raw representation to ostream.
os | ostream where to print |
instance | object to print |