Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions | Friends
regexp::UnboundedRegExpStructure< SymbolType > Class Template Reference

Represents unbounded regular expression structure. Regular expression is stored as a tree of UnboundedRegExpElements. More...

#include <UnboundedRegExpStructure.h>

Public Member Functions

 UnboundedRegExpStructure ()
 Creates a new instance of the expression structure. Defaultly created structure is empty expression. More...
 
 UnboundedRegExpStructure (UnboundedRegExpElement< SymbolType > &&structure)
 Creates a new instance of the expression structure. The new instance contains structure as provided by the parameter. More...
 
 UnboundedRegExpStructure (const UnboundedRegExpElement< SymbolType > &structure)
 Creates a new instance of the expression structure. The new instance contains structure as provided by the parameter. More...
 
 UnboundedRegExpStructure (const FormalRegExpStructure< SymbolType > &other)
 Creates a new instance based on formal representation. The new instance contains structure converted to unbounded representation. More...
 
const UnboundedRegExpElement< SymbolType > & getStructure () const
 
UnboundedRegExpElement< SymbolType > & getStructure ()
 
void setStructure (UnboundedRegExpElement< SymbolType > &&param)
 
void setStructure (const UnboundedRegExpElement< SymbolType > &structure)
 
UnboundedRegExpStructure< DefaultSymbolTypenormalize () &&
 Performs the type normalization of the regexp structure. More...
 

Friends

ext::ostreamoperator<< (ext::ostream &out, const UnboundedRegExpStructure< SymbolType > &structure)
 Strucuture printer to the stream. More...
 
std::strong_ordering operator<=> (const UnboundedRegExpStructure &first, const UnboundedRegExpStructure &second)
 Three way comparison operator implementation for the expression structure. More...
 
bool operator== (const UnboundedRegExpStructure &first, const UnboundedRegExpStructure &second)
 Equality operator implementation for the expression structure. More...
 

Detailed Description

template<class SymbolType>
class regexp::UnboundedRegExpStructure< SymbolType >

Represents unbounded regular expression structure. Regular expression is stored as a tree of UnboundedRegExpElements.

Template Parameters
SymbolTypeused for the terminal alphabet

Constructor & Destructor Documentation

◆ UnboundedRegExpStructure() [1/4]

template<class SymbolType >
regexp::UnboundedRegExpStructure< SymbolType >::UnboundedRegExpStructure
explicit

Creates a new instance of the expression structure. Defaultly created structure is empty expression.

◆ UnboundedRegExpStructure() [2/4]

template<class SymbolType >
regexp::UnboundedRegExpStructure< SymbolType >::UnboundedRegExpStructure ( UnboundedRegExpElement< SymbolType > &&  structure)
explicit

Creates a new instance of the expression structure. The new instance contains structure as provided by the parameter.

Parameters
structurethe expression structure.

◆ UnboundedRegExpStructure() [3/4]

template<class SymbolType >
regexp::UnboundedRegExpStructure< SymbolType >::UnboundedRegExpStructure ( const UnboundedRegExpElement< SymbolType > &  structure)
explicit

Creates a new instance of the expression structure. The new instance contains structure as provided by the parameter.

Parameters
structurethe expression structure.

◆ UnboundedRegExpStructure() [4/4]

template<class SymbolType >
regexp::UnboundedRegExpStructure< SymbolType >::UnboundedRegExpStructure ( const FormalRegExpStructure< SymbolType > &  other)
explicit

Creates a new instance based on formal representation. The new instance contains structure converted to unbounded representation.

Parameters
otherthe structure in formal representation

Member Function Documentation

◆ getStructure() [1/2]

template<class SymbolType >
UnboundedRegExpElement< SymbolType > & regexp::UnboundedRegExpStructure< SymbolType >::getStructure

Getter of the root of the structure.

Returns
Root node of the unbounded regular expression tree

◆ getStructure() [2/2]

template<class SymbolType >
const UnboundedRegExpElement< SymbolType > & regexp::UnboundedRegExpStructure< SymbolType >::getStructure

Getter of the root of the structure.

Returns
Root node of the unbounded regular expression tree
Here is the caller graph for this function:

◆ normalize()

template<class SymbolType >
UnboundedRegExpStructure< DefaultSymbolType > regexp::UnboundedRegExpStructure< SymbolType >::normalize ( ) &&
inline

Performs the type normalization of the regexp structure.

Returns
the normalized structure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStructure() [1/2]

template<class SymbolType >
void regexp::UnboundedRegExpStructure< SymbolType >::setStructure ( const UnboundedRegExpElement< SymbolType > &  structure)

Sets the root node of the expression structure

Parameters
structurenew root node of the structure
Here is the call graph for this function:

◆ setStructure() [2/2]

template<class SymbolType >
void regexp::UnboundedRegExpStructure< SymbolType >::setStructure ( UnboundedRegExpElement< SymbolType > &&  param)

Sets the root node of the expression structure

Parameters
structurenew root node of the structure

Friends And Related Function Documentation

◆ operator<<

template<class SymbolType >
ext::ostream & operator<< ( ext::ostream out,
const UnboundedRegExpStructure< SymbolType > &  structure 
)
friend

Strucuture printer to the stream.

Parameters
outthe output stream
structurethe structure to print

◆ operator<=>

template<class SymbolType >
std::strong_ordering operator<=> ( const UnboundedRegExpStructure< SymbolType > &  first,
const UnboundedRegExpStructure< SymbolType > &  second 
)
friend

Three way comparison operator implementation for the expression structure.

Parameters
firstthe first instance
secondthe second instance
Returns
the strong ordering between the the first and the second parameter

◆ operator==

template<class SymbolType >
bool operator== ( const UnboundedRegExpStructure< SymbolType > &  first,
const UnboundedRegExpStructure< SymbolType > &  second 
)
friend

Equality operator implementation for the expression structure.

Parameters
firstthe first instance
secondthe second instance
Returns
true if the first is equal to the second, false otherwise

The documentation for this class was generated from the following files: