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

Fix bug in epsilon transitions when casting EpsNFA to ExtNFA

parent b5183959
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -524,7 +524,7 @@ template < class EpsilonType >
ExtendedNFA < SymbolType, StateType >::ExtendedNFA ( const EpsilonNFA < SymbolType, EpsilonType, StateType > & other ) : ExtendedNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) {
for ( const auto & transition : other.getTransitions ( ) ) {
if ( transition.first.second.template is < EpsilonType > ( ) ) {
ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > > key = ext::make_pair ( transition.first.first, regexp::UnboundedRegExpStructure < SymbolType > ( ) );
ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > > key = ext::make_pair ( transition.first.first, regexp::UnboundedRegExpStructure < SymbolType > ( regexp::UnboundedRegExpEpsilon < SymbolType > ( ) ) );
transitions[key] = transition.second;
} else {
ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > > key = ext::make_pair ( transition.first.first, regexp::UnboundedRegExpStructure < SymbolType > ( regexp::UnboundedRegExpSymbol < SymbolType > ( transition.first.second.template get < SymbolType > ( ) ) ) );
......
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