コード例 #1
0
ファイル: CompilationEngine.py プロジェクト: ryoua/OS
 def __init__(self, rfile, wfile, wVmFile):
     self.rfile = rfile
     self.wfile = wfile  #Write XML file
     self.vmWriter = VMWriter.VMwriter(wVmFile)  #Write VM file
     self.tokenizer = JackTokenizer.Tokenizer(self.rfile)
     self.class_symbol = SymbolTable.SymbolTable()
     self.sub_symbol = SymbolTable.SymbolTable()
     self.Stype = ''  #Stype records the type of the identifier.
     self.Skind = ''
     #ClassName records the name of the class, used to make the sub_functionName
     self.ClassName = ''
     self.expressionListNum = 0  #Record the number of expression in ExpressionList.
     self.WHILEFLAG = 0  #the index of while_loop in case of tautonomy
     self.IFFLAG = 0