Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Unbounded regular expression represents regular expression. It describes regular languages. The expression consists of the following nodes: More...
#include <UnboundedRegExp.h>
Public Types | |
using | symbol_type = SymbolType |
Public Member Functions | |
UnboundedRegExp () | |
Creates a new instance of the expression. The default constructor creates expression describing empty language. More... | |
UnboundedRegExp (ext::set< SymbolType > alphabet, UnboundedRegExpStructure< SymbolType > regExp) | |
Creates a new instance of the expression with a concrete alphabet and initial content. More... | |
UnboundedRegExp (UnboundedRegExpStructure< SymbolType > regExp) | |
Creates a new instance of the expression based on initial content. The alphabet is derived from the content. More... | |
UnboundedRegExp (const FormalRegExp< SymbolType > &other) | |
Created a new instance of the expression based on the FormalRegExp representation. More... | |
const ext::set< SymbolType > & | getAlphabet () const & |
ext::set< SymbolType > && | getAlphabet () && |
const UnboundedRegExpStructure< SymbolType > & | getRegExp () const & |
UnboundedRegExpStructure< SymbolType > && | getRegExp () && |
void | setRegExp (UnboundedRegExpStructure< SymbolType > param) |
auto | operator<=> (const UnboundedRegExp &other) const |
bool | operator== (const UnboundedRegExp &other) const |
![]() | |
void | accessComponent () |
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const UnboundedRegExp &instance) |
Additional Inherited Members | |
![]() | |
static void | registerComponent () |
static void | unregisterComponent () |
Unbounded regular expression represents regular expression. It describes regular languages. The expression consists of the following nodes:
The unbounded representation allows nodes of concatenation and alternation to have any number of children.
Alternation of nothing is equivalent to empty regular expression. Concatenation of nothing is equivalent to empty word.
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::UnboundedRegExp< 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 FormalRegExp representation.
|
inline |
Getter of the alphabet.
|
inline |
Getter of the alphabet.
UnboundedRegExpStructure< SymbolType > && regexp::UnboundedRegExp< SymbolType >::getRegExp | ( | ) | && |
Get the structure of the expression.
const UnboundedRegExpStructure< SymbolType > & regexp::UnboundedRegExp< 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::UnboundedRegExp< SymbolType >::setRegExp | ( | UnboundedRegExpStructure< SymbolType > | param | ) |
Set the structure of the expression.
regExp | the new structure of the expression. |
|
friend |
Print this object as raw representation to ostream.
os | ostream where to print |
instance | object to print |