def __init__(self, translating_file):
     self.OP_LIST = []  # Generate empty FINAL list of operations
     self.blocks_dict = get_block_dict(
         translating_file)  # Generate block map
     self.translating_file = translating_file  # Source file
     self.unique_counter = 0  # Unique counter for commands
     self.reporter = errors.ErrorReporter("__translator.py__")
Esempio n. 2
0
 def __init__(self):
     self.MEM = memory.VAR_MEM()
     self.OP_LIST = []
     self.reporter = errors.ErrorReporter('__executor.py__')
Esempio n. 3
0
 def __init__(self, input_path, output_path):
     self.input_path = input_path
     self.output_path = output_path
     self.content = ""
     self.reporter = errors.ErrorReporter("__converter.py__")
Esempio n. 4
0
import converter
import translator
import memory
import errors
import executor

Reporter = errors.ErrorReporter('__main.py__')

Converter = converter.Converter('example.cpp', 'example.intpr')
Converter.start_convertation()
Translator = translator.Translator('example.intpr')
OP_LIST = Translator.translate()
Executor = executor.Executor()
Executor.execute(OP_LIST)
print(Executor.dump_mem())
Esempio n. 5
0
 def __init__(self):
     self.IN_MEM = dict(
     )  # variable memory dictionary, which contains data as {'variable': (type, content)}
     self.FULL_MODE = False
     self.reporter = errors.ErrorReporter("__memory.py__")