Added necessary stacks for translation

This commit is contained in:
Mariano Uvalle 2019-04-11 23:46:23 +00:00
parent 743ea07796
commit a64bd11a78
2 changed files with 4 additions and 2 deletions

View file

@ -9,8 +9,9 @@ quadrupletIndex = 1
# Auxiliary stacks.
operandsStack = []
operatorsStack = []
typesStack = []
jumpsStack = []
auxStack = []
exitsStack = []
avail = []
for i in range(50):
avail.append('T' + str(i))
@ -24,7 +25,7 @@ def addSymbol(name, symbolType):
global currentIndex
initialValue = 0 if symbolType == 'integer' else 0.0
symbols[name] = {
'symbolType': symbolType,
'type': symbolType,
'value': initialValue,
'direction': currentIndex
}