15template <
class TerminalSymbolType,
class VariableSymbolType >
24template <
class TerminalSymbolType,
class VariableSymbolType >
26 for (
auto itA = this->nonterminalSymbolsByDepth.rbegin ( ); itA != this->nonterminalSymbolsByDepth.rend ( ); ++ itA ) {
27 const VariableSymbolType & a = * itA;
38 for (
auto itB = std::next ( itA ); itB != this->nonterminalSymbolsByDepth.rend ( ); ++ itB ) {
39 const VariableSymbolType & b = * itB;
46 this->equationTransition.at (
std::make_pair ( a, b ) ) = std::move ( alt );
53 concat.
appendElement ( std::move ( this->equationFinal.at ( a ) ) );
56 this->equationFinal.at ( a ) = std::move ( alt );
64 for (
auto itB = std::next ( itA ); itB != this->nonterminalSymbolsByDepth.rend ( ); ++ itB ) {
65 const VariableSymbolType & b = * itB;
67 for (
auto itC = std::next ( itA ); itC != this->nonterminalSymbolsByDepth.rend ( ); ++ itC ) {
68 const VariableSymbolType & c = * itC;
76 this->equationTransition.at (
std::make_pair ( b, c ) ) = std::move ( alt );
85 alt.
appendElement ( std::move ( this->equationFinal.at ( b ) ) );
87 this->equationFinal.at ( b ) = std::move ( alt );
Definition: RegularEquationSolver.h:27
Definition: RightRegularEquationSolver.h:16
Represents the alternation operator in the regular expression. The node can have 0 to n children in l...
Definition: UnboundedRegExpAlternation.h:44
void appendElement(UnboundedRegExpElement< SymbolType > &&element)
Definition: UnboundedRegExpAlternation.h:195
Represents the concatenation operator in the regular expression. The node can have 0 to n children in...
Definition: UnboundedRegExpConcatenation.h:44
void appendElement(UnboundedRegExpElement< SymbolType > &&element)
Definition: UnboundedRegExpConcatenation.h:195
Represents the iteration operator in the regular expression. The node has exactly one child.
Definition: UnboundedRegExpIteration.h:43
Represents unbounded regular expression structure. Regular expression is stored as a tree of Unbounde...
Definition: UnboundedRegExpStructure.h:47
Unbounded regular expression represents regular expression. It describes regular languages....
Definition: UnboundedRegExp.h:80
static regexp::UnboundedRegExp< SymbolType > optimize(const regexp::UnboundedRegExp< SymbolType > ®exp)
Definition: LeftRegularEquationSolver.h:13
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79