-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
45 lines (33 loc) · 967 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# ESSENTIAL LANGUAGE PACKAGES
import os
import interpreter
from interpreter import *
# EXTERNAL PACKAGES
import sys
# WRITTEN BY ZXRO 2021
# GITHUB.COM/XOZXRO
######################################
# EROS IS AN OPEN SOURCE PROGRAMMING LANGUAGE
# DEDICATED TO AUTOMATION AND EXPIREMENTAL PROJECTS
######################################
# FIND ARGUMENTS
# args = sys.argv
# DETERMIN IF CALLING A FILE
# not currently used for ease of testing
'''
if os.path.exists(args[1]):
callingFile = True
else:
callingFile = False
'''
callingFile = True
# MAIN RUNTIME
os.chdir(os.getcwd())
if callingFile:
# read lines of file into list
with open(r'test.es', 'r', encoding='utf-8') as parseFile:
fileText = [x.strip() for x in parseFile.readlines()]
parseFile.close()
# send text to intepreter
interpretStatus = interpreter.createIntepreterSpace(fileText)
print(interpretStatus)