Skip to content
Snippets Groups Projects
Commit 6987ee5e authored by Jan Trávníček's avatar Jan Trávníček
Browse files

do not consider BottomOTS symbols in RHDNPDA->NPDA

parent 0816432e
No related branches found
No related tags found
No related merge requests found
......@@ -146,7 +146,6 @@ automaton::NPDA RHPDAToPDA::convert( const automaton::RealTimeHeightDeterministi
if(std::get<1>(transition.first).is<string::Epsilon>()) {
auto& epsT = epsilonTransitions[std::get<0>(transition.first)];
for(const auto& to : transition.second) {
if(to.second.getData() == alphabet::BottomOfTheStackSymbol::BOTTOM_OF_THE_STACK) throw exception::AlibException("Cannot convert");
epsT.insert(std::make_tuple(std::vector<alphabet::Symbol>{}, to.first, std::vector<alphabet::Symbol>{to.second}));
}
} else {
......@@ -172,10 +171,10 @@ automaton::NPDA RHPDAToPDA::convert( const automaton::RealTimeHeightDeterministi
}
 
for(const auto& transition : pda.getReturnTransitions()) {
if(std::get<2>(transition.first).getData() == alphabet::BottomOfTheStackSymbol::BOTTOM_OF_THE_STACK) continue;
if(std::get<1>(transition.first).is<string::Epsilon>()) {
auto& epsT = epsilonTransitions[std::get<0>(transition.first)];
for(const auto& to : transition.second) {
if(std::get<2>(transition.first).getData() == alphabet::BottomOfTheStackSymbol::BOTTOM_OF_THE_STACK) throw exception::AlibException("Cannot convert");
epsT.insert(std::make_tuple(std::vector<alphabet::Symbol>{std::get<2>(transition.first)}, to, std::vector<alphabet::Symbol>{}));
}
} else {
......
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