This commit is contained in:
Adam 2020-12-19 23:26:50 +01:00
parent 339cfbfb0e
commit b6b8e8b2f0

View File

@ -1,9 +1,9 @@
import sys
import os
# filename = sys.argv[1]
# path = os.path.join(os.getcwd(), filename)
path = os.path.join(os.getcwd(), 'test1.arg')
filename = sys.argv[1]
path = os.path.join(os.getcwd(), filename)
# path = os.path.join(os.getcwd(), 'test1.arg')
file = open(path, 'r').readlines()
@ -65,7 +65,7 @@ for line in file:
lines = ['xxyz', 'xyz']
for line in lines:
for line in sys.stdin:
line = line.rstrip('\n')
FSA.current_state = FSA.initial_state
print(FSA.check_text(line))