@Override
protected SimulatorState computeReachSet(DFA dfa, SimulatorState previous, int t, PredictionContextCache contextCache) {
if (previous.useContext) {
totalTransitions[decision]++;
computedTransitions[decision]++;
fullContextTransitions[decision]++;
}
return super.computeReachSet(dfa, previous, t, contextCache);
}
java类org.antlr.v4.runtime.atn.PredictionContextCache的实例源码
StatisticsParserATNSimulator.java 文件源码
项目:goworks
阅读 23
收藏 0
点赞 0
评论 0
TreeCorrectionParserATNSimulator.java 文件源码
项目:goworks
阅读 23
收藏 0
点赞 0
评论 0
@Override
protected DFAState addDFAEdge(DFA dfa, DFAState fromState, int t, IntegerList contextTransitions, ATNConfigSet toConfigs, PredictionContextCache contextCache) {
if (!getSuppressedSet(startIndex).isNil()) {
DFAState to = addDFAState(dfa, toConfigs, contextCache);
return to;
}
return super.addDFAEdge(dfa, fromState, t, contextTransitions, toConfigs, contextCache);
}
StatisticsParserATNSimulator.java 文件源码
项目:antlrworks2
阅读 22
收藏 0
点赞 0
评论 0
@Override
protected Tuple2<DFAState, ParserRuleContext> computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) {
computedTransitions[decision]++;
long startTime = System.nanoTime();
try {
return super.computeTargetState(dfa, s, remainingGlobalContext, t, useContext, contextCache);
} finally {
long totalTime = System.nanoTime() - startTime;
decisionCost[dfa.decision] += totalTime;
if (useContext) {
decisionLlCost[dfa.decision] += totalTime;
}
}
}
StatisticsParserATNSimulator.java 文件源码
项目:antlrworks2
阅读 21
收藏 0
点赞 0
评论 0
@Override
protected SimulatorState computeReachSet(DFA dfa, SimulatorState previous, int t, PredictionContextCache contextCache) {
if (previous.useContext) {
totalTransitions[decision]++;
computedTransitions[decision]++;
fullContextTransitions[decision]++;
}
return super.computeReachSet(dfa, previous, t, contextCache);
}
PositionAdjustingLexerATNSimulator.java 文件源码
项目:beaker-notebook-archive
阅读 20
收藏 0
点赞 0
评论 0
public PositionAdjustingLexerATNSimulator(Lexer recog, ATN atn, DFA[] decisionToDFA, PredictionContextCache sharedContextCache) {
super(recog, atn, decisionToDFA, sharedContextCache);
}
StatisticsParserATNSimulator.java 文件源码
项目:goworks
阅读 25
收藏 0
点赞 0
评论 0
@Override
protected Tuple2<DFAState, ParserRuleContext> computeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, boolean useContext, PredictionContextCache contextCache) {
computedTransitions[decision]++;
return super.computeTargetState(dfa, s, remainingGlobalContext, t, useContext, contextCache);
}
AbstractCompletionParserATNSimulator.java 文件源码
项目:goworks
阅读 20
收藏 0
点赞 0
评论 0
@Override
protected void closure(ATNConfigSet sourceConfigs, ATNConfigSet configs, boolean collectPredicates, boolean hasMoreContext, PredictionContextCache contextCache, boolean treatEofAsEpsilon) {
super.closure(sourceConfigs, configs, collectPredicates, hasMoreContext, contextCache, treatEofAsEpsilon);
}
PositionAdjustingLexerATNSimulator.java 文件源码
项目:beakerx
阅读 25
收藏 0
点赞 0
评论 0
public PositionAdjustingLexerATNSimulator(Lexer recog, ATN atn, DFA[] decisionToDFA, PredictionContextCache sharedContextCache) {
super(recog, atn, decisionToDFA, sharedContextCache);
}
AbstractCompletionParserATNSimulator.java 文件源码
项目:antlrworks2
阅读 21
收藏 0
点赞 0
评论 0
@Override
protected void closure(ATNConfigSet sourceConfigs, ATNConfigSet configs, boolean collectPredicates, boolean hasMoreContext, PredictionContextCache contextCache, boolean treatEofAsEpsilon) {
super.closure(sourceConfigs, configs, collectPredicates, hasMoreContext, contextCache, treatEofAsEpsilon);
}