diff --git a/alib2algo/src/rte/convert/ToPostfixPushdownAutomatonGlushkov.cpp b/alib2algo/src/rte/convert/ToPostfixPushdownAutomatonGlushkov.cpp index a3d8158d85ff3eb8c93466531949184b7e193e00..8f1c3ea3fc72e472974f762a10cae112e448cc16 100644 --- a/alib2algo/src/rte/convert/ToPostfixPushdownAutomatonGlushkov.cpp +++ b/alib2algo/src/rte/convert/ToPostfixPushdownAutomatonGlushkov.cpp @@ -158,13 +158,9 @@ ToPostfixPushdownAutomatonGlushkov::convert ( const rte::FormalRTE < > & rte ) { for ( const GlushkovFollow::TFollowTuple < SymbolType, RankType > & followTuple : followSet [ symb ] ) { //tuple = vector < set < symb > > ext::vector < ext::variant < alphabet::BottomOfTheStackSymbol, ext::set < common::ranked_symbol < SymbolType, RankType > > > > pop, push; - /* - for ( const auto & e : symbFollowTuple ) - pop.push_back ( e ); - std::reverse ( pop.begin ( ), pop.end ( ) ); // <------------ WTF. CRASHES HERE // FIXME - */ for ( const auto & e : followTuple ) - pop.insert ( pop.begin ( ), e ); + pop.push_back ( e ); + std::reverse ( pop.begin ( ), pop.end ( ) ); push.push_back( ext::set < common::ranked_symbol < SymbolType, RankType > > { symb } ); @@ -194,7 +190,8 @@ ToPostfixPushdownAutomatonGlushkov::convert ( const rte::FormalRTE < > & rte ) { if ( ( size_t ) symb.getRank ( ) > 0 ) { for ( const auto & e : symbFollowTuple ) - pop.insert ( pop.begin ( ), e ); + pop.push_back ( e ); + std::reverse ( pop.begin ( ), pop.end ( ) ); } push.push_back( kv2.second );