//--------------------------------------------------------------------- //--------------------------------------------------------------------- List<Exp*>* subprogram_prolog(SubprogramSymbol* S) { List<Exp*>* L=new List<Exp*>; PCode* P=new PCode(S->ELabel(),"ent","sp",S->SPLabel()); Exp* E=new Exp(ST.TVoid(),P); L->Insert(E); P=new PCode("","ent","ep",S->EPLabel()); E=new Exp(ST.TVoid(),P); L->Insert(E); return L; }
//-------------------------------------------------------------------- //Function statement implements the rule //statement -> procedure_statement List<Exp*>* statement(Exp* procedure_statement) { List<Exp*>* L=new List<Exp*>; L->Insert(procedure_statement); return L; }