'hm'
This commit is contained in:
parent
32021fb533
commit
d0fabf2933
@ -37,7 +37,7 @@ class automata:
|
||||
text = text.replace('\n', '')
|
||||
for i in text:
|
||||
for q in self.state:
|
||||
self.state = self.get_node_transition(state, i)
|
||||
self.state = self.get_node_transition(q, i)
|
||||
if not self.state:
|
||||
return False
|
||||
return self.check_if_accepted()
|
||||
@ -49,10 +49,7 @@ class automata:
|
||||
for i in self.storage:
|
||||
if i[0] == query:
|
||||
return i[1]
|
||||
return []
|
||||
|
||||
def sort(self):
|
||||
self.storage = sorted(self.storage, key = lambda x: (x[0][0], x[0][1]))
|
||||
return []
|
||||
|
||||
|
||||
auto = automata()
|
||||
|
Loading…
Reference in New Issue
Block a user