forked from jasder/antlr
Small fix in cmake file. Fixes #1809.
This commit is contained in:
parent
42e6b09d54
commit
1503821fa6
|
@ -28,6 +28,10 @@ if(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
|
||||||
CMAKE_POLICY(SET CMP0026 OLD)
|
CMAKE_POLICY(SET CMP0026 OLD)
|
||||||
CMAKE_POLICY(SET CMP0045 OLD)
|
CMAKE_POLICY(SET CMP0045 OLD)
|
||||||
CMAKE_POLICY(SET CMP0042 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)
|
CMAKE_POLICY(SET CMP0059 OLD)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -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
|
/* After consuming EOF no additional input is possible, so we are
|
||||||
* only interested in configurations which reached the end of the
|
* only interested in configurations which reached the end of the
|
||||||
* decision rule (local context) or end of the start rule (full
|
* 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
|
* already guaranteed to meet this condition whether or not it's
|
||||||
* required.
|
* required.
|
||||||
*/
|
*/
|
||||||
ATNConfigSet * temp = removeAllConfigsNotInRuleStopState(reach.get(), reach == intermediate);
|
ATNConfigSet *temp = removeAllConfigsNotInRuleStopState(reach.get(), *reach == *intermediate);
|
||||||
if (temp != reach.get())
|
if (temp != reach.get())
|
||||||
reach.reset(temp); // We got a new set, so use that.
|
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
|
// left-recursion elimination. For efficiency, also check if
|
||||||
// the context has an empty stack case. If so, it would mean
|
// the context has an empty stack case. If so, it would mean
|
||||||
// global FOLLOW so we can't perform optimization
|
// 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?
|
!((StarLoopEntryState *)p)->isPrecedenceDecision || // Are we the special loop entry/exit state?
|
||||||
config->context->isEmpty() || // If SLL wildcard
|
config->context->isEmpty() || // If SLL wildcard
|
||||||
config->context->hasEmptyPath())
|
config->context->hasEmptyPath())
|
||||||
|
|
Loading…
Reference in New Issue