Beispiel #1
0
 public override byte compare(ExpressionPart x)
 {
     if (x.priority >= this.priority)
     {
         return(2);
     }
     else
     {
         return(1);
     }
 }
Beispiel #2
0
 public override byte compare(ExpressionPart x)
 {
     if (x.priority == 1)
     {
         throw new FormatException("Brackets position is incorrect");
     }
     if (x.priority != 0)
     {
         return(2);
     }
     return(4);
 }
Beispiel #3
0
 /*Function returns a code of comparing another part of expression
  * 0 -- put argument value into the solve stack
  * 1 -- put argument value into the buffer stack
  * 2 -- put this value into the solve stack
  * 3 -- take away this and argument value
  * 4 -- start symbol of expression and end symbol have met
  */
 public abstract byte compare(ExpressionPart x);
Beispiel #4
0
 public override byte compare(ExpressionPart x)
 {
     return(0);
 }