예제 #1
0
파일: Arithmetic.cs 프로젝트: xiongeee/BBX
 public static Arithmetic.OperatorMap.Map GetMap(string Operator)
 {
     if (Arithmetic.OperatorMap.CheckOperator(Operator))
     {
         Arithmetic.OperatorMap.Map[] array = Arithmetic.OperatorMap.map();
         for (int i = 0; i < array.Length; i++)
         {
             Arithmetic.OperatorMap.Map result = array[i];
             if (result.Operator == Operator)
             {
                 return(result);
             }
         }
     }
     return(new Arithmetic.OperatorMap.Map(99, Operator));
 }
예제 #2
0
파일: Arithmetic.cs 프로젝트: xiongeee/BBX
 public static Arithmetic.OperatorMap.Map[] map()
 {
     Arithmetic.OperatorMap.Map[] array = new Arithmetic.OperatorMap.Map[]
     {
         new Arithmetic.OperatorMap.Map(5, "*"),
         new Arithmetic.OperatorMap.Map(5, "/"),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         default(Arithmetic.OperatorMap.Map),
         new Arithmetic.OperatorMap.Map(5, "%")
     };
     array[2]  = new Arithmetic.OperatorMap.Map(10, "+");
     array[3]  = new Arithmetic.OperatorMap.Map(10, "-");
     array[4]  = new Arithmetic.OperatorMap.Map(20, ">");
     array[5]  = new Arithmetic.OperatorMap.Map(20, ">=");
     array[6]  = new Arithmetic.OperatorMap.Map(20, "<");
     array[7]  = new Arithmetic.OperatorMap.Map(20, "<=");
     array[8]  = new Arithmetic.OperatorMap.Map(20, "<>");
     array[9]  = new Arithmetic.OperatorMap.Map(20, "!=");
     array[10] = new Arithmetic.OperatorMap.Map(20, "==");
     array[11] = new Arithmetic.OperatorMap.Map(20, "=");
     array[12] = new Arithmetic.OperatorMap.Map(41, "!");
     array[13] = new Arithmetic.OperatorMap.Map(42, "||");
     array[14] = new Arithmetic.OperatorMap.Map(43, "&&");
     array[15] = new Arithmetic.OperatorMap.Map(40, "++");
     array[16] = new Arithmetic.OperatorMap.Map(40, "--");
     array[17] = new Arithmetic.OperatorMap.Map(40, "+=");
     array[18] = new Arithmetic.OperatorMap.Map(40, "-=");
     array[19] = new Arithmetic.OperatorMap.Map(40, "*=");
     array[20] = new Arithmetic.OperatorMap.Map(40, "/=");
     array[21] = new Arithmetic.OperatorMap.Map(40, "&");
     array[22] = new Arithmetic.OperatorMap.Map(40, "|");
     array[23] = new Arithmetic.OperatorMap.Map(40, "&=");
     array[24] = new Arithmetic.OperatorMap.Map(40, "|=");
     array[25] = new Arithmetic.OperatorMap.Map(40, ">>");
     array[26] = new Arithmetic.OperatorMap.Map(40, "<<");
     array[27] = new Arithmetic.OperatorMap.Map(3, "(");
     array[28] = new Arithmetic.OperatorMap.Map(3, ")");
     return(array);
 }