From 6987ee5e678a8aaf7101253d06828061b048839e Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Sat, 25 Oct 2014 12:30:52 +0200 Subject: [PATCH] do not consider BottomOTS symbols in RHDNPDA->NPDA --- alib2algo/src/automaton/transform/RHPDAToPDA.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/alib2algo/src/automaton/transform/RHPDAToPDA.cpp b/alib2algo/src/automaton/transform/RHPDAToPDA.cpp index 3f320e1adc..cb28fba1be 100644 --- a/alib2algo/src/automaton/transform/RHPDAToPDA.cpp +++ b/alib2algo/src/automaton/transform/RHPDAToPDA.cpp @@ -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 { -- GitLab