// ** This class was generated with DemFGen (vers:09/27/2009) package gen; import edu.neu.ccs.demeterf.lib.*; /** Representation of CtrlOp */ public abstract class CtrlOp extends Op{ /** Construct a(n) CtrlOp Instance */ public CtrlOp(){ } /** Parse an instance of CtrlOp from the given String */ public static CtrlOp parse(String inpt) throws ParseException{ return new TheParser(new java.io.StringReader(inpt)).parse_CtrlOp(); } /** Parse an instance of CtrlOp from the given Stream */ public static CtrlOp parse(java.io.InputStream inpt) throws ParseException{ return new TheParser(inpt).parse_CtrlOp(); } /** Parse an instance of CtrlOp from the given Reader */ public static CtrlOp parse(java.io.Reader inpt) throws ParseException{ return new TheParser(inpt).parse_CtrlOp(); } abstract String id(); abstract boolean branch(ExecStack s); ExecStack eval(ExecStack s){ return s; } ExecStack eval(ExecStack s, OpList cc){ if(branch(s)) return s.labels.find(new Find(id())).pc.eval(s); return cc.eval(s); } static class Find extends List.Pred<CodeEntry>{ String id; Find(String s){ id = s; } public boolean huh(CodeEntry e){ return e.label.equals(id); } } /** DGP method from Class Print */ public String print(){ return gen.Print.PrintM(this); } }