Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ size_t ParserATNSimulator::execATNWithFullContext(dfa::DFA &dfa, dfa::DFAState *
}
throw e;
}
if (previous != s0) // Don't delete the start set.
delete previous;
previous = nullptr;

std::vector<BitSet> altSubSets = PredictionModeClass::getConflictingAltSubsets(reach.get());
reach->uniqueAlt = getUniqueAlt(reach.get());
Expand All @@ -382,9 +385,6 @@ size_t ParserATNSimulator::execATNWithFullContext(dfa::DFA &dfa, dfa::DFAState *
// we're not sure what the ambiguity is yet.
// So, keep going.
}

if (previous != s0) // Don't delete the start set.
delete previous;
previous = reach.release();

if (t != Token::EOF) {
Expand Down