Merge pull request #1822 from mike-lischke/master

Small fix in cmake file. Fixes #1809.
This commit is contained in:
Terence Parr 2017-04-17 09:56:49 -07:00 committed by GitHub
commit 43e73c548b
2 changed files with 7 additions and 3 deletions

View File

@ -28,6 +28,10 @@ if(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
CMAKE_POLICY(SET CMP0026 OLD)
CMAKE_POLICY(SET CMP0045 OLD)
CMAKE_POLICY(SET CMP0042 OLD)
endif()
if(CMAKE_VERSION VERSION_EQUAL "3.3.0" OR
CMAKE_VERSION VERSION_GREATER "3.3.0")
CMAKE_POLICY(SET CMP0059 OLD)
endif()

View File

@ -510,7 +510,7 @@ std::unique_ptr<ATNConfigSet> ParserATNSimulator::computeReachSet(ATNConfigSet *
}
}
if (t == Token::EOF) {
if (t == IntStream::EOF) {
/* After consuming EOF no additional input is possible, so we are
* only interested in configurations which reached the end of the
* decision rule (local context) or end of the start rule (full
@ -528,7 +528,7 @@ std::unique_ptr<ATNConfigSet> ParserATNSimulator::computeReachSet(ATNConfigSet *
* already guaranteed to meet this condition whether or not it's
* required.
*/
ATNConfigSet * temp = removeAllConfigsNotInRuleStopState(reach.get(), reach == intermediate);
ATNConfigSet *temp = removeAllConfigsNotInRuleStopState(reach.get(), *reach == *intermediate);
if (temp != reach.get())
reach.reset(temp); // We got a new set, so use that.
}
@ -954,7 +954,7 @@ bool ParserATNSimulator::canDropLoopEntryEdgeInLeftRecursiveRule(ATNConfig *conf
// left-recursion elimination. For efficiency, also check if
// the context has an empty stack case. If so, it would mean
// global FOLLOW so we can't perform optimization
if ( p->getStateType() != ATNState::STAR_LOOP_ENTRY ||
if (p->getStateType() != ATNState::STAR_LOOP_ENTRY ||
!((StarLoopEntryState *)p)->isPrecedenceDecision || // Are we the special loop entry/exit state?
config->context->isEmpty() || // If SLL wildcard
config->context->hasEmptyPath())