public String SimpleExpCode(SimpleExp n,ARGU argu,int vRegister)/////////////////////////// { Proc currProc=(Proc)argu; switch(n.f0.which) { case 0: return ReadTemp((Temp)n.f0.choice,argu, vRegister); case 1: return ((IntegerLiteral)n.f0.choice).f0.toString(); case 2:return currProc.GetLab(((Label)n.f0.choice).f0.toString()); } return null; }
public void visit(Label n, ARGU argu) { String s = n.f0.toString(); if (argu==null) { OutPut.con(" "+s+" "); } else { Proc currProc=(Proc)argu; OutPut.con(" " +currProc.GetLab( s )+ " "); } }