Avoid creating PredicateEvalInfo events for precedence predicates
This commit is contained in:
parent
244c8ee0c7
commit
5e93d5f7b7
|
@ -164,11 +164,14 @@ public class ProfilingATNSimulator extends ParserATNSimulator {
|
||||||
@Override
|
@Override
|
||||||
protected boolean evalSemanticContext(SemanticContext pred, ParserRuleContext parserCallStack, int alt, boolean fullCtx) {
|
protected boolean evalSemanticContext(SemanticContext pred, ParserRuleContext parserCallStack, int alt, boolean fullCtx) {
|
||||||
boolean result = super.evalSemanticContext(pred, parserCallStack, alt, fullCtx);
|
boolean result = super.evalSemanticContext(pred, parserCallStack, alt, fullCtx);
|
||||||
boolean fullContext = _llStopIndex >= 0;
|
if (!(pred instanceof SemanticContext.PrecedencePredicate)) {
|
||||||
int stopIndex = fullContext ? _llStopIndex : _sllStopIndex;
|
boolean fullContext = _llStopIndex >= 0;
|
||||||
decisions[currentDecision].predicateEvals.add(
|
int stopIndex = fullContext ? _llStopIndex : _sllStopIndex;
|
||||||
new PredicateEvalInfo(currentDecision, _input, _startIndex, stopIndex, pred, result, alt, fullCtx)
|
decisions[currentDecision].predicateEvals.add(
|
||||||
);
|
new PredicateEvalInfo(currentDecision, _input, _startIndex, stopIndex, pred, result, alt, fullCtx)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue