|
Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Formal regular expression represents regular expression. It describes regular languages. The expression consists of the following nodes: More...
#include <FormalRegExp.h>
Public Types | |
| using | symbol_type = SymbolType |
Public Member Functions | |
| FormalRegExp () | |
| Creates a new instance of the expression. The default constructor creates expression describing empty language. More... | |
| FormalRegExp (ext::set< SymbolType > alphabet, FormalRegExpStructure< SymbolType > regExp) | |
| Creates a new instance of the expression with a concrete alphabet and initial content. More... | |
| FormalRegExp (FormalRegExpStructure< SymbolType > regExp) | |
| Creates a new instance of the expression based on initial content. The alphabet is derived from the content. More... | |
| FormalRegExp (const UnboundedRegExp< SymbolType > &other) | |
| Created a new instance of the expression based on the UnboundedRegExp representation. More... | |
| const ext::set< SymbolType > & | getAlphabet () const & |
| ext::set< SymbolType > && | getAlphabet () && |
| const FormalRegExpStructure< SymbolType > & | getRegExp () const & |
| FormalRegExpStructure< SymbolType > && | getRegExp () && |
| void | setRegExp (FormalRegExpStructure< SymbolType > param) |
| auto | operator<=> (const FormalRegExp &other) const |
| bool | operator== (const FormalRegExp &other) const |
Public Member Functions inherited from core::Components< FormalRegExp< SymbolType >, ext::set< SymbolType >, component::Set, GeneralAlphabet > | |
| void | accessComponent () |
Friends | |
| ext::ostream & | operator<< (ext::ostream &out, const FormalRegExp &instance) |
Additional Inherited Members | |
Static Public Member Functions inherited from core::Components< FormalRegExp< SymbolType >, ext::set< SymbolType >, component::Set, GeneralAlphabet > | |
| static void | registerComponent () |
| static void | unregisterComponent () |
Formal regular expression represents regular expression. It describes regular languages. The expression consists of the following nodes:
The formal representation allows nodes of concatenation and alternation to have exactly two children.
The structure of the regular expression is wrapped in a structure class to allow separate the alphabet from the structure for example in Extended NFA
Definition is unbounded definition of regular expressions. E = (T, C), T (Alphabet) = finite set of terminal symbols C (Content) = representation of the regular expression
| SymbolType | used for the terminal alphabet |
| using regexp::FormalRegExp< SymbolType >::symbol_type = SymbolType |
The exposed SymbolType template parameter.
|
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 alphabet and initial content.
| alphabet | the initial input alphabet |
| regExp | the initial regexp content |
|
explicit |
Creates a new instance of the expression based on initial content. The alphabet is derived from the content.
| regExp | the initial regexp content |
|
explicit |
Created a new instance of the expression based on the UnboundedRegExp representation.
|
inline |
Getter of the alphabet.
|
inline |
Getter of the alphabet.
| FormalRegExpStructure< SymbolType > && regexp::FormalRegExp< SymbolType >::getRegExp | ( | ) | && |
Get the structure of the expression.
| const FormalRegExpStructure< SymbolType > & regexp::FormalRegExp< SymbolType >::getRegExp | ( | ) | const & |
Get the structure of the expression.
|
inline |
The three way comparison implementation
| other | the other instance |
other.
|
inline |
The equality comparison implementation.
| other | the other object to compare with. |
| void regexp::FormalRegExp< SymbolType >::setRegExp | ( | FormalRegExpStructure< 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 |