public virtual void OutAModuloBinop(AModuloBinop node) { DefaultOut(node); }
public virtual void CaseAModuloBinop(AModuloBinop node) { DefaultCase(node); }
public override void CaseAModuloBinop(AModuloBinop node) { InAModuloBinop(node); if (node.GetToken() != null) { node.GetToken().Apply(this); } OutAModuloBinop(node); }
public virtual void InAModuloBinop(AModuloBinop node) { DefaultIn(node); }
public override void OutASAssignmentExp(ASAssignmentExp node) { AAssignmentExp replacer = null; PAssignop assignop = node.GetAssignop(); Token token = null; PBinop binop = null; if (assignop is AAddAssignop) { token = ((AAddAssignop)assignop).GetToken(); binop = new APlusBinop(new TPlus("+", token.Line, token.Pos)); } else if (assignop is ASubAssignop) { token = ((ASubAssignop)assignop).GetToken(); binop = new AMinusBinop(new TMinus("-", token.Line, token.Pos)); } else if (assignop is AMulAssignop) { token = ((AMulAssignop)assignop).GetToken(); binop = new ATimesBinop(new TStar("*", token.Line, token.Pos)); } else if (assignop is ADivAssignop) { token = ((ADivAssignop)assignop).GetToken(); binop = new ADivideBinop(new TDiv("/", token.Line, token.Pos)); } else if (assignop is AModAssignop) { token = ((AModAssignop)assignop).GetToken(); binop = new AModuloBinop(new TMod("%", token.Line, token.Pos)); } else// if (assignop is AAssignAssignop) { token = ((AAssignAssignop)assignop).GetToken(); } PExp rightSide; if (binop != null) rightSide = new ABinopExp(new ALvalueExp((PLvalue)node.GetLvalue().Clone()), binop, (PExp)node.GetExp().Clone()); else rightSide = (PExp)node.GetExp().Clone(); replacer = new AAssignmentExp(new TAssign("=", token.Line, token.Pos), (PLvalue)node.GetLvalue().Clone(), rightSide); node.ReplaceBy(replacer); replacer.Apply(this); }
public override void CaseAModuloBinop(AModuloBinop node) { Write("%"); }
ArrayList New481() { ArrayList nodeList = new ArrayList(); ArrayList nodeArrayList3 = (ArrayList) Pop(); ArrayList nodeArrayList2 = (ArrayList) Pop(); ArrayList nodeArrayList1 = (ArrayList) Pop(); PExp pexpNode2 = (PExp)nodeArrayList1[0]; TMod tmodNode4 = (TMod)nodeArrayList2[0]; AModuloBinop pbinopNode3 = new AModuloBinop ( tmodNode4 ); PExp pexpNode5 = (PExp)nodeArrayList3[0]; ABinopExp pexpNode1 = new ABinopExp ( pexpNode2, pbinopNode3, pexpNode5 ); nodeList.Add(pexpNode1); return nodeList; }
ArrayList New42() { ArrayList nodeList = new ArrayList(); ArrayList nodeArrayList1 = (ArrayList) Pop(); TMod tmodNode2 = (TMod)nodeArrayList1[0]; AModuloBinop pbinopNode1 = new AModuloBinop ( tmodNode2 ); nodeList.Add(pbinopNode1); return nodeList; }
public override void CaseAModuloBinop(AModuloBinop node) { Value += "%"; }