public DFA(ATNState atnStartState, int decision) { this.atnStartState = atnStartState; this.decision = decision; if (this.atnStartState.atn.grammarType == ATNType.Lexer) { minDfaEdge = LexerATNSimulator.MinDfaEdge; maxDfaEdge = LexerATNSimulator.MaxDfaEdge; } else { minDfaEdge = TokenConstants.Eof; maxDfaEdge = atnStartState.atn.maxTokenType; } this.emptyEdgeMap = new Antlr4.Runtime.Dfa.EmptyEdgeMap <DFAState>(minDfaEdge, maxDfaEdge); this.emptyContextEdgeMap = new Antlr4.Runtime.Dfa.EmptyEdgeMap <DFAState>(-1, atnStartState.atn.states.Count - 1); bool isPrecedenceDfa = false; if (atnStartState is StarLoopEntryState) { if (((StarLoopEntryState)atnStartState).precedenceRuleDecision) { isPrecedenceDfa = true; this.s0.Set(new DFAState(emptyPrecedenceEdges, EmptyContextEdgeMap, new ATNConfigSet())); this.s0full.Set(new DFAState(emptyPrecedenceEdges, EmptyContextEdgeMap, new ATNConfigSet())); } } this.precedenceDfa = isPrecedenceDfa; }
public DFA(ATNState atnStartState, int decision) { this.atnStartState = atnStartState; this.decision = decision; if (this.atnStartState.atn.grammarType == ATNType.Lexer) { minDfaEdge = LexerATNSimulator.MinDfaEdge; maxDfaEdge = LexerATNSimulator.MaxDfaEdge; } else { minDfaEdge = TokenConstants.Eof; maxDfaEdge = atnStartState.atn.maxTokenType; } this.emptyEdgeMap = new Antlr4.Runtime.Dfa.EmptyEdgeMap <DFAState>(minDfaEdge, maxDfaEdge); this.emptyContextEdgeMap = new Antlr4.Runtime.Dfa.EmptyEdgeMap <DFAState>(-1, atnStartState.atn.states.Count - 1); }
public DFA(ATNState atnStartState, int decision) { this.atnStartState = atnStartState; this.decision = decision; if (this.atnStartState.atn.grammarType == ATNType.Lexer) { minDfaEdge = LexerATNSimulator.MinDfaEdge; maxDfaEdge = LexerATNSimulator.MaxDfaEdge; } else { minDfaEdge = TokenConstants.Eof; maxDfaEdge = atnStartState.atn.maxTokenType; } this.emptyEdgeMap = new Antlr4.Runtime.Dfa.EmptyEdgeMap<DFAState>(minDfaEdge, maxDfaEdge); this.emptyContextEdgeMap = new Antlr4.Runtime.Dfa.EmptyEdgeMap<DFAState>(-1, atnStartState.atn.states.Count - 1); }
public DFA(ATNState atnStartState, int decision) { this.atnStartState = atnStartState; this.decision = decision; if (this.atnStartState.atn.grammarType == ATNType.Lexer) { minDfaEdge = LexerATNSimulator.MinDfaEdge; maxDfaEdge = LexerATNSimulator.MaxDfaEdge; } else { minDfaEdge = TokenConstants.Eof; maxDfaEdge = atnStartState.atn.maxTokenType; } this.emptyEdgeMap = new Antlr4.Runtime.Dfa.EmptyEdgeMap<DFAState>(minDfaEdge, maxDfaEdge); this.emptyContextEdgeMap = new Antlr4.Runtime.Dfa.EmptyEdgeMap<DFAState>(-1, atnStartState.atn.states.Count - 1); bool isPrecedenceDfa = false; if (atnStartState is StarLoopEntryState) { if (((StarLoopEntryState)atnStartState).precedenceRuleDecision) { isPrecedenceDfa = true; this.s0.Set(new DFAState(emptyPrecedenceEdges, EmptyContextEdgeMap, new ATNConfigSet())); this.s0full.Set(new DFAState(emptyPrecedenceEdges, EmptyContextEdgeMap, new ATNConfigSet())); } } this.precedenceDfa = isPrecedenceDfa; }