Loading lib/dfa.py +5 −0 Original line number Original line Diff line number Diff line Loading @@ -330,6 +330,11 @@ class DFA: if tgt is not None and tgt not in state_map.keys(): if tgt is not None and tgt not in state_map.keys(): queue.append(tgt) queue.append(tgt) for st, _ in self.transition.keys(): if st not in state_map: raise Exception("Automaton cannot be canonised, it has " "unreachable states") return DFA(set(state_map.values()), return DFA(set(state_map.values()), deepcopy(self.characters), deepcopy(self.characters), {(state_map[st], ch): state_map[tgt] {(state_map[st], ch): state_map[tgt] Loading Loading
lib/dfa.py +5 −0 Original line number Original line Diff line number Diff line Loading @@ -330,6 +330,11 @@ class DFA: if tgt is not None and tgt not in state_map.keys(): if tgt is not None and tgt not in state_map.keys(): queue.append(tgt) queue.append(tgt) for st, _ in self.transition.keys(): if st not in state_map: raise Exception("Automaton cannot be canonised, it has " "unreachable states") return DFA(set(state_map.values()), return DFA(set(state_map.values()), deepcopy(self.characters), deepcopy(self.characters), {(state_map[st], ch): state_map[tgt] {(state_map[st], ch): state_map[tgt] Loading