getLhs() 공개 메소드

public getLhs ( ) : Element,
리턴 Element,
 public override void VisitAdditionOperationElement(AdditionOperationElement element)
 {
     VisitElement(element.getLhs());
     Console.Write("+ ");
     VisitElement(element.getRhs());
     Console.Write(" ");
 }
예제 #2
0
 public override void VisitAdditionOperationElement(AdditionOperationElement element){
   VisitElement(element.getLhs());
   VisitElement(element.getRhs());
   int rhs = mStack.Pop();
   int lhs = mStack.Pop();
   int result = rhs + lhs;
   mStack.Push(result);    
 }
예제 #3
0
 //----< visit Addition Operation >------------------------------
 public override void VisitAdditionOperationElement(AdditionOperationElement element)
 {
     VisitElement(element.getLhs());
       VisitElement(element.getRhs());
       int rhs = int.Parse(mIntStack.Pop().getText());
       int lhs = int.Parse(mIntStack.Pop().getText());
       IntegerElement result = new IntegerElement();
       result.setText((lhs + rhs).ToString());
       mIntStack.Push(result);
 }
 public override void VisitAdditionOperationElement(AdditionOperationElement element)
 {
     VisitElement(element.getLhs());
       VisitElement(element.getRhs());
       resultMessage += "performing addition operation on scalar"+"\n";
       int rhs = mStack.Pop();
       int lhs = mStack.Pop();
       int result = rhs + lhs;
       mStack.Push(result);
 }