| Modifier and Type | Field and Description |
|---|---|
| protected TokenStream | |
| protected int | |
| protected int | |
| protected int | |
| protected int | conflictingAltResolvedBySLL
At the point of LL failover, we record how SLL would resolve the conflict so that we can determine whether or not a decision / input pair is context-sensitive. |
| protected int | |
| protected SimulatorState | |
| protected final DecisionInfo[] | |
| protected int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | adaptivePredict(TokenStream input, int decision, ParserRuleContext outerContext)
Overrides org. |
| protected SimulatorState | computeReachSet(DFA dfa, SimulatorState previous, int t, PredictionContextCache contextCache)
Overrides org. |
| protected SimulatorState | computeStartState(DFA dfa, ParserRuleContext globalContext, boolean useContext)
Overrides org. |
| protected Tuple2 | computeTargetState(DFA dfa, DFAState
The current DFA state s, ParserRuleContext remainingGlobalContext, int The next input symbol t, boolean useContext, PredictionContextCache contextCache)Overrides org. |
| protected boolean | evalSemanticContext(SemanticContext
The semantic context to evaluate pred, ParserRuleContext The parser context in which to evaluate the
semantic context parserCallStack, int The alternative which is guarded by alt)predOverrides org. |
| public SimulatorState | |
| public DecisionInfo[] | |
| protected DFAState | getExistingTargetState(DFAState
The current DFA state previousD, int The next input symbol t)Overrides org. |
| protected SimulatorState | getStartState(DFA dfa, TokenStream input, ParserRuleContext outerContext, boolean useContext)
Overrides org. |
| protected void | reportAmbiguity(DFA dfa, DFAState D, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs)
Overrides org. |
| protected void | reportAttemptingFullContext(DFA dfa, BitSet conflictingAlts, SimulatorState conflictState, int startIndex, int stopIndex)
Overrides org. |
| protected void | reportContextSensitivity(DFA dfa, int prediction, SimulatorState acceptState, int startIndex, int stopIndex)
Overrides org. |
| _input | back to summary |
|---|---|
| protected TokenStream _input | |
| _llStopIndex | back to summary |
|---|---|
| protected int _llStopIndex | |
| _sllStopIndex | back to summary |
|---|---|
| protected int _sllStopIndex | |
| _startIndex | back to summary |
|---|---|
| protected int _startIndex | |
| conflictingAltResolvedBySLL | back to summary |
|---|---|
| protected int conflictingAltResolvedBySLL At the point of LL failover, we record how SLL would resolve the conflict so that we can determine whether or not a decision / input pair is context-sensitive. If LL gives a different result than SLL's predicted alternative, we have a context sensitivity for sure. The converse is not necessarily true, however. It's possible that after conflict resolution chooses minimum alternatives, SLL could get the same answer as LL. Regardless of whether or not the result indicates an ambiguity, it is not treated as a context sensitivity because LL prediction was not required in order to produce a correct prediction for this decision and input sequence. It may in fact still be a context sensitivity but we don't know by looking at the minimum alternatives for the current input. | |
| currentDecision | back to summary |
|---|---|
| protected int currentDecision | |
| currentState | back to summary |
|---|---|
| protected SimulatorState currentState | |
| decisions | back to summary |
|---|---|
| protected final DecisionInfo[] decisions | |
| numDecisions | back to summary |
|---|---|
| protected int numDecisions | |
| ProfilingATNSimulator | back to summary |
|---|---|
| public ProfilingATNSimulator(Parser parser) | |
| adaptivePredict | back to summary |
|---|---|
| public int adaptivePredict(TokenStream input, int decision, ParserRuleContext outerContext) Overrides org.
| |
| computeReachSet | back to summary |
|---|---|
| protected SimulatorState computeReachSet(DFA dfa, SimulatorState previous, int t, PredictionContextCache contextCache) Overrides org.
| |
| computeStartState | back to summary |
|---|---|
| protected SimulatorState computeStartState(DFA dfa, ParserRuleContext globalContext, boolean useContext) Overrides org.
| |
| computeTargetState | back to summary |
|---|---|
| protected Tuple2 Overrides org. Doc from org. Compute a target state for an edge in the DFA, and attempt to add the computed state and corresponding edge to the DFA. | |
| evalSemanticContext | back to summary |
|---|---|
| protected boolean evalSemanticContext(SemanticContext pred, ParserRuleContext parserCallStack, int alt) Overrides org. Doc from org. Evaluate a semantic context within a specific parser context. This method might not be called for every semantic context evaluated during the prediction process. In particular, we currently do not evaluate the following but it may change in the future:
| |
| getCurrentState | back to summary |
|---|---|
| public SimulatorState getCurrentState() | |
| getDecisionInfo | back to summary |
|---|---|
| public DecisionInfo[] getDecisionInfo() | |
| getExistingTargetState | back to summary |
|---|---|
| protected DFAState getExistingTargetState(DFAState previousD, int t) Overrides org. Doc from org. Get an existing target state for an edge in the DFA. If the target state
for the edge has not yet been computed or is otherwise not available,
this method returns | |
| getStartState | back to summary |
|---|---|
| protected SimulatorState getStartState(DFA dfa, TokenStream input, ParserRuleContext outerContext, boolean useContext) Overrides org.
| |
| reportAmbiguity | back to summary |
|---|---|
| protected void reportAmbiguity(DFA dfa, DFAState D, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) Overrides org. Doc from org. If context sensitive parsing, we know it's ambiguity not conflict
| |
| reportAttemptingFullContext | back to summary |
|---|---|
| protected void reportAttemptingFullContext(DFA dfa, BitSet conflictingAlts, SimulatorState conflictState, int startIndex, int stopIndex) Overrides org.
| |
| reportContextSensitivity | back to summary |
|---|---|
| protected void reportContextSensitivity(DFA dfa, int prediction, SimulatorState acceptState, int startIndex, int stopIndex) Overrides org.
| |