'hm'
This commit is contained in:
parent
2dfadfd588
commit
1793c0db37
@ -6,7 +6,7 @@ import re
|
||||
class automata:
|
||||
# class variables init
|
||||
def __init__(self):
|
||||
# dictionary of between nodes
|
||||
# dictionary of connections between nodes
|
||||
self.graph = {}
|
||||
# list of accepting states
|
||||
self.accepting_states = []
|
||||
@ -76,9 +76,10 @@ auto = automata()
|
||||
for line in sys.stdin:
|
||||
auto.add_node(line)
|
||||
|
||||
print(auto)
|
||||
|
||||
f = open(sys.argv[1], 'r')
|
||||
|
||||
for line in f:
|
||||
print(auto.test_string(line))
|
||||
if auto.test_string(line):
|
||||
print("TRUE %s" % line)
|
||||
else:
|
||||
print("FALSE %s" % line)
|
||||
|
Loading…
Reference in New Issue
Block a user