Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import lexer
- txt = ''
- print("Example: (test.tst)")
- file = input('Type in the file name > ')
- with open(file, 'r') as file:
- txt = file.read()
- result, error = lexer.run(txt)
- file = open('output.tst', 'w+')
- file.write(str(result))
- file.close()
- if error: print(error.astr())
- else: print("Created file 'output.tst' in file directory")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement