public virtual void InADivideBinop(ADivideBinop node) { DefaultIn(node); }
public virtual void OutADivideBinop(ADivideBinop node) { DefaultOut(node); }
public override void CaseADivideBinop(ADivideBinop node) { InADivideBinop(node); if (node.GetToken() != null) { node.GetToken().Apply(this); } OutADivideBinop(node); }
public virtual void CaseADivideBinop(ADivideBinop node) { DefaultCase(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 CaseADivideBinop(ADivideBinop node) { Write("/"); }
ArrayList New480() { ArrayList nodeList = new ArrayList(); ArrayList nodeArrayList3 = (ArrayList) Pop(); ArrayList nodeArrayList2 = (ArrayList) Pop(); ArrayList nodeArrayList1 = (ArrayList) Pop(); PExp pexpNode2 = (PExp)nodeArrayList1[0]; TDiv tdivNode4 = (TDiv)nodeArrayList2[0]; ADivideBinop pbinopNode3 = new ADivideBinop ( tdivNode4 ); PExp pexpNode5 = (PExp)nodeArrayList3[0]; ABinopExp pexpNode1 = new ABinopExp ( pexpNode2, pbinopNode3, pexpNode5 ); nodeList.Add(pexpNode1); return nodeList; }
ArrayList New41() { ArrayList nodeList = new ArrayList(); ArrayList nodeArrayList1 = (ArrayList) Pop(); TDiv tdivNode2 = (TDiv)nodeArrayList1[0]; ADivideBinop pbinopNode1 = new ADivideBinop ( tdivNode2 ); nodeList.Add(pbinopNode1); return nodeList; }
public override void CaseADivideBinop(ADivideBinop node) { Value += "/"; }