This commit is contained in:
deadsmond 2019-11-25 20:37:48 +01:00
parent 0befa60e73
commit 2d5a26f214

View File

@ -6,7 +6,7 @@ import re
class automata:
# class variables init
def __init__(self):
# dictionary of connections between nodes
# dictionary of between nodes
self.graph = {}
# list of accepting states
self.accepting_states = []
@ -58,11 +58,11 @@ class automata:
result = []
# if the node exists
if self.graph[q]:
# search through all its connections to find value
# search through all its to find value
for dic in self.graph[q]:
for val in dic.values():
print(val)
for element in dic:
print(element.key, element.value)
for transition in self.graph[q]:
print(transition, i)