Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <FormalRegExpElement.h>
Data Structures | |
class | Visitor |
class | VisitorContext |
Public Member Functions | |
virtual FormalRegExpElement< SymbolType > * | clone () const &=0 |
virtual FormalRegExpElement< SymbolType > * | clone () &&=0 |
template<class ReturnType , class Visitor , class ... Params> | |
ReturnType | accept (Params &&... params) const |
virtual ext::smart_ptr< UnboundedRegExpElement< SymbolType > > | asUnbounded () 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< FormalRegExpElement< 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 FormalRegExpElement< 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 FormalRegExpElement< 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... | |
FormalRegExpElement< SymbolType > * | getParent () |
Getter of the parent of the node. More... | |
const FormalRegExpElement< SymbolType > * | getParent () const |
Getter of the parent of the node. More... | |
Protected Member Functions | |
virtual void | accept (FormalRegExpElement::Visitor &visitor) const =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 FormalRegExpElement< SymbolType > &instance) |
Abstract class representing element in the formal regular expression. Can be an operator, special node, or a symbol.
SymbolType | used for the terminal alphabet |
|
protectedpure virtual |
Accept method of the visitor pattern. This is where the actual type of this object is evaluated.
visitor | the accepted visitor. |
|
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
|
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 |
|
pure virtual |
|
pure virtual |
ext::set< SymbolType > regexp::FormalRegExpElement< SymbolType >::computeMinimalAlphabet |
Traverses the regexp tree computing minimal alphabet needed by regexp
|
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 |