20template <
class SymbolType >
64template <
class SymbolType >
73template <
class SymbolType >
75 return alternationCont(input, substitution(input));
78template <
class SymbolType >
83 return alternationCont ( input, std::move (
res ) );
90template <
class SymbolType >
92 return substitutionCont(input, factor(input));
95template <
class SymbolType >
101 return substitutionCont ( input, std::move (
res ) );
107template <
class SymbolType >
115 unsigned rank = ext::from_string < unsigned > ( token.value );
123template <
class SymbolType >
130 return star(input, std::move ( base ) );
142 unsigned rank = ext::from_string < unsigned > ( token.value );
147 return star ( input, std::move (
res ) );
153template <
class SymbolType >
159 return star ( input, std::move ( iter ) );
166template <
class SymbolType >
191template <
class SymbolType >
193 std::optional < rte::FormalRTESymbolSubst < SymbolType > > left = alternation.
getLeftElement ( ).template accept < std::optional < rte::FormalRTESymbolSubst < SymbolType > >, stringApi < rte::FormalRTEStructure < SymbolType > >::FormalReplace > ( constants );
197 std::optional < rte::FormalRTESymbolSubst < SymbolType > > right = alternation.
getRightElement ( ).template accept < std::optional < rte::FormalRTESymbolSubst < SymbolType > >, stringApi < rte::FormalRTEStructure < SymbolType > >::FormalReplace > ( constants );
204template <
class SymbolType >
206 std::optional < rte::FormalRTESymbolSubst < SymbolType > > left = substitution.
getLeftElement ( ).template accept < std::optional < rte::FormalRTESymbolSubst < SymbolType > >, stringApi < rte::FormalRTEStructure < SymbolType > >::FormalReplace > ( constants );
210 std::optional < rte::FormalRTESymbolSubst < SymbolType > > right = substitution.
getRightElement ( ).template accept < std::optional < rte::FormalRTESymbolSubst < SymbolType > >, stringApi < rte::FormalRTEStructure < SymbolType > >::FormalReplace > ( constants );
217template <
class SymbolType >
219 std::optional < rte::FormalRTESymbolSubst < SymbolType > > element = iteration.
getElement ( ).template accept < std::optional < rte::FormalRTESymbolSubst < SymbolType > >, stringApi < rte::FormalRTEStructure < SymbolType > >::FormalReplace > ( constants );
221 iteration.
setElement ( std::move ( element.value ( ) ) );
226template <
class SymbolType >
228 if ( constants.count ( symbol.
getSymbol ( ) ) )
231 for (
unsigned i = 0;
i < symbol.
getElements ( ).size ( ); ++
i ) {
233 std::optional < rte::FormalRTESymbolSubst < SymbolType > >
res = elem.template accept < std::optional < rte::FormalRTESymbolSubst < SymbolType > >, stringApi < rte::FormalRTEStructure < SymbolType > >::FormalReplace > ( constants );
241template <
class SymbolType >
246template <
class SymbolType >
251template <
class SymbolType >
256template <
class SymbolType >
258 Priority tmp = Priority::ALTERNATION;
260 rte.getStructure ( ).template accept < void, stringApi < rte::FormalRTEStructure < SymbolType > >::Formal > ( out );
263template <
class SymbolType >
265 Priority outerPriorityMinimum = std::get < 0 > ( output );
266 if ( outerPriorityMinimum == Priority::CONCATENATION || outerPriorityMinimum == Priority::FACTOR ) std::get < 1 > ( output ) <<
'(';
268 std::get < 0 > ( output ) = Priority::ALTERNATION;
269 alternation.
getLeftElement ( ).template accept < void, stringApi < rte::FormalRTEStructure < SymbolType > >::Formal > ( output );
270 std::get < 1 > ( output ) <<
'+';
271 alternation.
getRightElement ( ).template accept < void, stringApi < rte::FormalRTEStructure < SymbolType > >::Formal > ( output );
273 if ( outerPriorityMinimum == Priority::CONCATENATION || outerPriorityMinimum == Priority::FACTOR ) std::get < 1 > ( output ) <<
')';
276template <
class SymbolType >
278 Priority outerPriorityMinimum = std::get < 0 > ( output );
279 if ( outerPriorityMinimum == Priority::FACTOR ) std::get < 1 > ( output ) <<
'(';
281 std::get < 0 > ( output ) = Priority::CONCATENATION;
282 substitution.
getLeftElement ( ).template accept < void, stringApi < rte::FormalRTEStructure < SymbolType > >::Formal > ( output );
283 std::get < 1 > ( output ) <<
'.';
285 std::get < 1 > ( output ) <<
' ';
286 std::get < 0 > ( output ) = Priority::CONCATENATION;
287 substitution.
getRightElement ( ).template accept < void, stringApi < rte::FormalRTEStructure < SymbolType > >::Formal > ( output );
289 if ( outerPriorityMinimum == Priority::FACTOR ) std::get < 1 > ( output ) <<
')';
292template <
class SymbolType >
294 std::get < 0 > ( output ) = Priority::FACTOR;
295 iteration.
getElement ( ).template accept < void, stringApi < rte::FormalRTEStructure < SymbolType > >::Formal > ( output );
296 std::get < 1 > ( output ) <<
"*";
300template <
class SymbolType >
309 std::get < 1 > ( output ) <<
" ( ";
316 std::get < 1 > ( output ) <<
", ";
318 std::get < 0 > ( output ) = Priority::ALTERNATION;
319 c.template accept < void, stringApi < rte::FormalRTEStructure < SymbolType > >::Formal > ( output );
322 std::get < 1 > ( output ) <<
")";
325template <
class SymbolType >
332template <
class SymbolType >
334 std::get < 1 > ( output ) <<
"#0";
337template <
class SymbolType >
344template <
class SymbolType >
349template <
class SymbolType >
354template <
class SymbolType >
Definition: ranked_symbol.hpp:20
Basic exception from which all other exceptions are derived.
Definition: CommonException.h:21
static void putback(ext::istream &input, const Token &token)
Definition: lexer.hpp:61
Class representing wrapper of dynamically allocated object behaving like rvalue reference.
Definition: ptr_value.hpp:40
Implementation of vector storing dynamicaly allocated instances of given type. The class mimicks the ...
Definition: ptr_vector.hpp:44
Class extending the tuple class from the standard library. Original reason is to allow printing of th...
Definition: tuple.hpp:42
static Token next(ext::istream &input)
Definition: RTEFromStringLexer.cpp:10
int i
Definition: AllEpsilonClosure.h:118
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
return res
Definition: MinimizeByPartitioning.h:145
Definition: normalize.hpp:10
constexpr tuple< Elements &... > tie(Elements &... args) noexcept
Helper of extended tuple of references construction. The tuple is constructed to reffer to values in ...
Definition: tuple.hpp:218
std::string to_string(const T &value)
To string method designated for objects that can be casted to string.
Definition: string.hpp:131
constexpr auto visit(Visitor &&vis, Variants &&... vars)
Definition: variant.hpp:42
Definition: ToFTAGlushkov.h:22
Definition: stringApi.hpp:26