class_docstr: The DFAState object is the core class for pretty much anything. DFAState
  are the vertices of an ordered graph while arcs and transitions are the
  edges.
  
  Arcs are the initial edges, where most DFAStates are not connected and
  transitions are then calculated to connect the DFA state machines that have
  different nonterminals.
class_docstr_tok: ["The","DFAState","object","is","the","core","class","for","pretty","much","anything",".","DFAState","are","the","vertices","of","an","ordered","graph","while","arcs","and","transitions","are","the","edges",".","Arcs","are","the","initial","edges",",","where","most","DFAStates","are","not","connected","and","transitions","are","then","calculated","to","connect","the","DFA","state","machines","that","have","different","nonterminals","."]
code: def __init__(
      self, from_rule: str, nfa_set: Set[NFAState], final: NFAState
  ):
      assert isinstance(nfa_set, set)
      assert isinstance(next(iter(nfa_set)), NFAState)
      assert isinstance(final, NFAState)
      self.from_rule = from_rule
      self.nfa_set = nfa_set
      # map from terminals/nonterminals to DFAState
      self.arcs: Mapping[str, DFAState] = {}
      # In an intermediary step we set these nonterminal arcs (which has the
      # same structure as arcs). These don't contain terminals anymore.
      self.nonterminal_arcs: Mapping[str, DFAState] = {}
  
      # Transitions are basically the only thing that  the parser is using
      # with is_final. Everyting else is purely here to create a parser.
      self.transitions: Mapping[
          Union[_TokenTypeT, ReservedString], DFAPlan
      ] = {}
      self.is_final = final in nfa_set
  
imports: from ast import literal_eval
  from typing import TypeVar, Generic, Mapping, Sequence, Set, Union
  from parso.pgen2.grammar_parser import GrammarParser, NFAState
label_desc: Use image node_id 1 to create a new DFAState object from inherited base classes: Generic with example: obj = DFAState(from_rule, nfa_set, final)