|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use DFAState | |
---|---|
org.antlr.analysis | |
org.antlr.codegen | |
org.antlr.tool |
Uses of DFAState in org.antlr.analysis |
---|
Fields in org.antlr.analysis declared as DFAState | |
---|---|
protected DFAState[] |
DFA.altToAcceptState
We only want one accept state per predicted alt; track here |
DFAState |
AnalysisRecursionOverflowException.ovfState
|
DFAState |
DFA.startState
What's the start state for this DFA? |
Fields in org.antlr.analysis with type parameters of type DFAState | |
---|---|
protected java.util.Set<DFAState> |
DecisionProbe.danglingStates
The set of states w/o emanating edges and w/o resolving sem preds. |
protected java.util.Vector<DFAState> |
DFA.states
Maps the state number to the actual DFAState. |
protected java.util.Set<DFAState> |
DecisionProbe.statesResolvedWithSemanticPredicatesSet
Was a syntactic ambiguity resolved with predicates? Any DFA state that predicts more than one alternative, must be resolved with predicates or it should be reported to the user. |
protected java.util.Set<DFAState> |
DecisionProbe.statesWithSyntacticallyAmbiguousAltsSet
Track all DFA states with nondeterministic alternatives. |
protected java.util.Map<DFAState,java.util.Map<java.lang.Integer,SemanticContext>> |
DecisionProbe.stateToAltSetWithSemanticPredicatesMap
Track the predicates for each alt per DFA state; more than one DFA state might have syntactically ambig alt prediction. |
protected java.util.Map<DFAState,java.util.Map<java.lang.Integer,java.util.Set<antlr.Token>>> |
DecisionProbe.stateToIncompletelyCoveredAltsMap
Tracks alts insufficiently covered. |
protected java.util.Map<DFAState,java.util.Set<java.lang.Integer>> |
DecisionProbe.stateToSyntacticallyAmbiguousTokensRuleAltsMap
Track just like stateToSyntacticallyAmbiguousAltsMap, but only for nondeterminisms that arise in the Tokens rule such as keyword vs ID rule. |
protected java.util.Map<DFAState,DFAState> |
DFA.uniqueStates
A set of all uniquely-numbered DFA states. |
protected java.util.Map<DFAState,DFAState> |
DFA.uniqueStates
A set of all uniquely-numbered DFA states. |
Methods in org.antlr.analysis that return DFAState | |
---|---|
protected DFAState |
NFAToDFAConverter.addDFAStateToWorkList(DFAState d)
Add a new DFA state to the DFA if not already present. |
protected DFAState |
DFA.addState(DFAState d)
Add a new DFA state to this DFA if not already present. |
protected DFAState |
NFAToDFAConverter.computeStartState()
From this first NFA state of a decision, create a DFA. |
protected DFAState |
NFAToDFAConverter.convertToAcceptState(DFAState d,
int alt)
|
DFAState |
DFA.getAcceptState(int alt)
|
DFAState |
DFA.getState(int stateNumber)
|
DFAState |
DFA.newState()
|
DFAState |
NFAToDFAConverter.reach(DFAState d,
Label label)
Given the set of NFA states in DFA state d, find all NFA states reachable traversing label arcs. |
Methods in org.antlr.analysis that return types with arguments of type DFAState | |
---|---|
java.util.Map<DFAState,DFAState> |
DFA.getUniqueStates()
|
java.util.Map<DFAState,DFAState> |
DFA.getUniqueStates()
|
Methods in org.antlr.analysis with parameters of type DFAState | |
---|---|
protected DFAState |
NFAToDFAConverter.addDFAStateToWorkList(DFAState d)
Add a new DFA state to the DFA if not already present. |
protected void |
NFAToDFAConverter.addPredicateTransitions(DFAState d)
for each NFA config in d, look for "predicate required" sign set during nondeterminism resolution. |
protected DFAState |
DFA.addState(DFAState d)
Add a new DFA state to this DFA if not already present. |
int |
DFAState.addTransition(DFAState target,
Label label)
Add a transition from this state to target with label. |
protected static int |
NFAToDFAConverter.addTransition(DFAState d,
Label label,
DFAState targetState,
java.util.Map targetToLabelMap)
Add a transition from state d to targetState with label in normal case. |
void |
NFAToDFAConverter.closure(DFAState d)
For all NFA states (configurations) merged in d, compute the epsilon closure; that is, find all NFA states reachable from the NFA states in d via purely epsilon transitions. |
void |
NFAToDFAConverter.closure(NFAState p,
int alt,
NFAContext context,
SemanticContext semanticContext,
DFAState d,
boolean collectPredicates)
Where can we get from NFA state p traversing only epsilon transitions? Add new NFA states + context to DFA state d. |
static boolean |
NFAToDFAConverter.closureIsBusy(DFAState d,
NFAConfiguration proposedNFAConfiguration)
A closure operation should abort if that computation has already been done or a computation with a conflicting context has already been done. |
protected DFAState |
NFAToDFAConverter.convertToAcceptState(DFAState d,
int alt)
|
protected void |
NFAToDFAConverter.convertToEOTAcceptState(DFAState d)
Walk the configurations of this DFA state d looking for the configuration, c, that has a transition on EOT. |
protected void |
DFA.createEOTAndEOFTables(DFAState s)
Set up the EOT and EOF tables; we cannot put -1 min/max values so we need another way to test that in the DFA transition function. |
protected void |
DFA.createMinMaxTables(DFAState s)
|
protected void |
DFA.createSpecialTable(DFAState s)
|
protected void |
DFA.createTransitionTableEntryForState(DFAState s)
|
protected boolean |
DFA.doesStateReachAcceptState(DFAState d)
figure out if this state eventually reaches an accept state and modify the instance variable 'reduced' to indicate if we find at least one state that cannot reach an accept state. |
protected void |
NFAToDFAConverter.findNewDFAStatesAndAddDFATransitions(DFAState d)
From this node, add a d--a-->t transition for all labels 'a' where t is a DFA node created from the set of NFA states reachable from any NFA state in DFA state d. |
protected java.util.Set |
DecisionProbe.getDFAPathStatesToTarget(DFAState targetState)
|
java.util.Set |
DecisionProbe.getDisabledAlternatives(DFAState d)
Which alts were specifically turned off to resolve nondeterminisms? This is different than the unreachable alts. |
java.util.Map<java.lang.Integer,java.util.Set<antlr.Token>> |
DecisionProbe.getIncompletelyCoveredAlts(DFAState d)
Return a list of alts whose predicate context was insufficient to resolve a nondeterminism for state d. |
java.util.List |
DecisionProbe.getNonDeterministicAltsForState(DFAState targetState)
Return the sorted list of alts that conflict within a single state. |
protected java.util.Map<java.lang.Integer,SemanticContext> |
NFAToDFAConverter.getPredicatesPerNonDeterministicAlt(DFAState d,
java.util.Set nondeterministicAlts)
Return a mapping from nondeterministc alt to combined list of predicates. |
java.util.List<Label> |
DecisionProbe.getSampleNonDeterministicInputSequence(DFAState targetState)
Return a List |
SemanticContext |
DecisionProbe.getSemanticContextForAlt(DFAState d,
int alt)
Each state in the DFA represents a different input sequence for an alt of the decision. |
protected void |
DFAOptimizer.optimizeEOTBranches(DFAState d)
|
protected void |
DFAOptimizer.optimizeExitBranches(DFAState d)
|
DFAState |
NFAToDFAConverter.reach(DFAState d,
Label label)
Given the set of NFA states in DFA state d, find all NFA states reachable traversing label arcs. |
protected boolean |
DecisionProbe.reachesState(DFAState startState,
DFAState targetState,
java.util.Set states)
Given a start state and a target state, return true if start can reach target state. |
void |
DecisionProbe.removeRecursiveOverflowState(DFAState d)
If a recursion overflow is resolve with predicates, then we need to shut off the warning that would be generated. |
void |
DFA.removeState(DFAState d)
|
void |
DecisionProbe.reportAltPredicateContext(DFAState d,
java.util.Map altPredicateContext)
Report the list of predicates found for each alternative; copy the list because this set gets altered later by the method tryToResolveWithSemanticPredicates() while flagging NFA configurations in d as resolved. |
void |
DecisionProbe.reportDanglingState(DFAState d)
Report the fact that DFA state d is not a state resolved with predicates and yet it has no emanating edges. |
void |
DecisionProbe.reportIncompletelyCoveredAlts(DFAState d,
java.util.Map<java.lang.Integer,java.util.Set<antlr.Token>> altToLocationsReachableWithoutPredicate)
|
void |
DecisionProbe.reportLexerRuleNondeterminism(DFAState d,
java.util.Set<java.lang.Integer> nondeterministicAlts)
Currently the analysis reports issues between token definitions, but we don't print out warnings in favor of just picking the first token definition found in the grammar ala lex/flex. |
void |
DecisionProbe.reportNondeterminism(DFAState d,
java.util.Set<java.lang.Integer> nondeterministicAlts)
|
void |
DecisionProbe.reportNondeterminismResolvedWithSemanticPredicate(DFAState d)
|
void |
DecisionProbe.reportRecursionOverflow(DFAState d,
NFAConfiguration recursionNFAConfiguration)
|
protected int |
NFAToDFAConverter.resolveByChoosingFirstAlt(DFAState d,
java.util.Set nondeterministicAlts)
|
protected int |
NFAToDFAConverter.resolveByPickingExitAlt(DFAState d,
java.util.Set nondeterministicAlts)
Resolve state d by choosing exit alt, which is same value as the number of alternatives. |
protected int |
NFAToDFAConverter.resolveByPickingMinAlt(DFAState d,
java.util.Set nondeterministicAlts)
Turn off all configurations associated with the set of incoming nondeterministic alts except the min alt number. |
void |
NFAToDFAConverter.resolveNonDeterminisms(DFAState d)
If > 1 NFA configurations within this DFA state have identical NFA state and context, but differ in their predicted TODO update for new context suffix stuff 3-9-2005 alternative then a single input sequence predicts multiple alts. |
void |
DFA.setAcceptState(int alt,
DFAState acceptState)
|
void |
DFA.setState(int stateNumber,
DFAState d)
|
protected boolean |
NFAToDFAConverter.tryToResolveWithSemanticPredicates(DFAState d,
java.util.Set nondeterministicAlts)
See if a set of nondeterministic alternatives can be disambiguated with the semantic predicate contexts of the alternatives. |
protected static void |
NFAToDFAConverter.turnOffOtherAlts(DFAState d,
int min,
java.util.Set<java.lang.Integer> nondeterministicAlts)
turn off all states associated with alts other than the good one (as long as they are one of the nondeterministic ones) |
Constructors in org.antlr.analysis with parameters of type DFAState | |
---|---|
AnalysisRecursionOverflowException(DFAState ovfState,
NFAConfiguration proposedNFAConfiguration)
|
Uses of DFAState in org.antlr.codegen |
---|
Methods in org.antlr.codegen with parameters of type DFAState | |
---|---|
protected boolean |
CodeGenerator.canGenerateSwitch(DFAState s)
You can generate a switch rather than if-then-else for a DFA state if there are no semantic predicates and the number of edge label values is small enough; e.g., don't generate a switch for a state containing an edge label such as 20..52330 (the resulting byte codes would overflow the method 65k limit probably). |
org.antlr.stringtemplate.StringTemplate |
CodeGenerator.generateSpecialState(DFAState s)
A special state is huge (too big for state tables) or has a predicated edge. |
protected org.antlr.stringtemplate.StringTemplate |
ACyclicDFACodeGenerator.walkFixedDFAGeneratingStateMachine(org.antlr.stringtemplate.StringTemplateGroup templates,
DFA dfa,
DFAState s,
int k)
|
Uses of DFAState in org.antlr.tool |
---|
Fields in org.antlr.tool declared as DFAState | |
---|---|
DFAState |
GrammarInsufficientPredicatesMessage.problemState
|
DFAState |
GrammarDanglingStateMessage.problemState
|
DFAState |
GrammarNonDeterminismMessage.problemState
|
DFAState |
RecursionOverflowMessage.sampleBadState
|
Methods in org.antlr.tool with parameters of type DFAState | |
---|---|
static void |
ErrorManager.danglingState(DecisionProbe probe,
DFAState d)
|
static void |
ErrorManager.insufficientPredicates(DecisionProbe probe,
DFAState d,
java.util.Map<java.lang.Integer,java.util.Set<antlr.Token>> altToUncoveredLocations)
|
static void |
ErrorManager.nondeterminism(DecisionProbe probe,
DFAState d)
|
static void |
ErrorManager.recursionOverflow(DecisionProbe probe,
DFAState sampleBadState,
int alt,
java.util.Collection targetRules,
java.util.Collection callSiteStates)
|
protected void |
DOTGenerator.walkCreatingDFADOT(org.antlr.stringtemplate.StringTemplate dot,
DFAState s)
Do a depth-first walk of the state machine graph and fill a DOT description template. |
Constructors in org.antlr.tool with parameters of type DFAState | |
---|---|
GrammarDanglingStateMessage(DecisionProbe probe,
DFAState problemState)
|
|
GrammarInsufficientPredicatesMessage(DecisionProbe probe,
DFAState problemState,
java.util.Map<java.lang.Integer,java.util.Set<antlr.Token>> altToLocations)
|
|
GrammarNonDeterminismMessage(DecisionProbe probe,
DFAState problemState)
|
|
RecursionOverflowMessage(DecisionProbe probe,
DFAState sampleBadState,
int alt,
java.util.Collection targetRules,
java.util.Collection callSiteStates)
|
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |