Exemplo n.º 1
0
 public override void VisitMultiplicationOperationElement(MultiplicationOperationElement element)
 {
     VisitElement(element.getLhs());
     Console.Write("* ");
     VisitElement(element.getRhs());
     Console.Write(";\n ");
 }
 public override void VisitMultiplicationOperationElement(MultiplicationOperationElement element)
 {
     VisitElement(element.getLhs());
     VisitElement(element.getRhs());
     resultMessage += "performing multiplication operation"+"\n";
     int rhs = mStack.Pop();
     int lhs = mStack.Pop();
     int result = rhs * lhs;
     mStack.Push(result);
 }
Exemplo n.º 3
0
 public abstract void VisitMultiplicationOperationElement(MultiplicationOperationElement element);
Exemplo n.º 4
0
 public override void VisitMultiplicationOperationElement(MultiplicationOperationElement element)
 {
     VisitElement(element.getLhs());
       VisitElement(element.getRhs());
       int rhs = mStack.Pop();
       int lhs = mStack.Pop();
       int result = rhs * lhs;
       mStack.Push(result);
 }