Esempio n. 1
0
					writer.writePushPop(cType,par.arg_1(),par.arg_2())

			elif pop_type in cType:
				if len(par.arg_2()) == 0:
					writer.writePushPop(cType,'constant',par.arg_1())
				else:
					writer.writePushPop(cType,par.arg_1(),par.arg_2())

			elif funct_type in cType:
				writer.writeFunction(par.arg_1(),par.arg_2())

			elif if_type in cType:
				writer.writeIf(par.arg_1())

			elif goto_type in cType:
				writer.writeGoto(par.arg_1())

			elif lable_type in cType:
				writer.writeLabel(par.arg_1())

			elif call_type in cType:
				writer.writeCall(par.arg_1(),par.arg_2())

			elif ret_type in cType:
				writer.writeReturn()

	writer.Close()

#This is for a single file
else:
	writer = CodeWriter(out_file)