Skip to content
Snippets Groups Projects
Commit d7ead3a5 authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

GlushkovRTE: Simplify code after variant fix

parent a790d839
No related branches found
No related tags found
Loading
Pipeline #
......@@ -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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment