Package org.antlr.analysis
Class LL1DFA
- java.lang.Object
-
- org.antlr.analysis.DFA
-
- org.antlr.analysis.LL1DFA
-
public class LL1DFA extends DFA
A special DFA that is exactly LL(1) or LL(1) with backtracking mode predicates to resolve edge set collisions.
-
-
Field Summary
-
Fields inherited from class org.antlr.analysis.DFA
accept, altToAcceptState, cyclic, CYCLIC_BUSY, CYCLIC_DONE, CYCLIC_UNKNOWN, decisionNFAStartState, decisionNumber, description, edgeTransitionClass, edgeTransitionClassMap, eof, eot, generator, hasPredicateBlockedByAction, max, max_k, MAX_STATE_TRANSITIONS_FOR_TABLE, MAX_TIME_PER_DFA_CREATION, min, nAlts, nfa, nfaConverter, numberOfStates, predicateVisible, probe, REACHABLE_BUSY, REACHABLE_NO, REACHABLE_UNKNOWN, REACHABLE_YES, recursiveAltSet, reduced, special, specialStates, specialStateSTs, startState, stateCounter, states, transition, transitionEdgeTables, uniqueCompressedSpecialStateNum, uniqueStates, unreachableAlts, user_k
-
-
Constructor Summary
Constructors Constructor Description LL1DFA(int decisionNumber, NFAState decisionStartState, LookaheadSet[] altLook)
From list of lookahead sets (one per alt in decision), create an LL(1) DFA.LL1DFA(int decisionNumber, NFAState decisionStartState, MultiMap<IntervalSet,java.lang.Integer> edgeMap)
From a set of edgeset→list-of-alts mappings, create a DFA that uses syn preds for all |list-of-alts|>1.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Label
getLabelForSet(IntervalSet edgeSet)
protected SemanticContext.Predicate
getSynPredForAlt(NFAState decisionStartState, int alt)
-
Methods inherited from class org.antlr.analysis.DFA
addState, canInlineDecision, createEOTAndEOFTables, createMinMaxTables, createSpecialTable, createStateTables, createTransitionTableEntryForState, doesStateReachAcceptState, findAllGatedSynPredsUsedInDFAAcceptStates, getAcceptState, getAutoBacktrackMode, getDecisionASTNode, getDecisionNumber, getDescription, getHasSynPred, getJavaCompressedAccept, getJavaCompressedEOF, getJavaCompressedEOT, getJavaCompressedMax, getJavaCompressedMin, getJavaCompressedSpecial, getJavaCompressedTransition, getMaxLookaheadDepth, getMaxStateNumber, getNFADecisionStartState, getNumberOfAlts, getNumberOfStates, getReasonForFailure, getRunLengthEncoding, getState, getUniqueStates, getUnreachableAlts, getUserMaxLookahead, hasCycle, hasSemPred, hasSynPred, initAltRelatedInfo, isClassicDFA, isCyclic, isGreedy, isReduced, isTokensRuleDecision, newState, okToRetryDFAWithK1, predict, removeState, resetStateNumbersToBeContiguous, setAcceptState, setState, setUserMaxLookahead, toString, verify
-
-
-
-
Constructor Detail
-
LL1DFA
public LL1DFA(int decisionNumber, NFAState decisionStartState, LookaheadSet[] altLook)
From list of lookahead sets (one per alt in decision), create an LL(1) DFA. One edge per set. s0-{alt1}->:o=>1 | \ | -{alt2}->:o=>2 | ...
-
LL1DFA
public LL1DFA(int decisionNumber, NFAState decisionStartState, MultiMap<IntervalSet,java.lang.Integer> edgeMap)
From a set of edgeset→list-of-alts mappings, create a DFA that uses syn preds for all |list-of-alts|>1.
-
-
Method Detail
-
getLabelForSet
protected Label getLabelForSet(IntervalSet edgeSet)
-
getSynPredForAlt
protected SemanticContext.Predicate getSynPredForAlt(NFAState decisionStartState, int alt)
-
-