Esempio n. 1
0
 void multiplyExpr(out IDeclaration exprs)
 {
     IDeclaration a = null, b = null; exprs = null; string op = string.Empty;
     addExpr(out a);
     exprs = a;
     while (la.kind == 14 || la.kind == 15 || la.kind == 16) {
         op = la.val;
         if (la.kind == 14) {
             Get();
         } else if (la.kind == 15) {
             Get();
         } else {
             Get();
         }
         addExpr(out b);
         var c = new MultiplyDeclaration() { Operator = op, A = a, B = b }; a = c;
     }
     exprs = a;
 }
Esempio n. 2
0
 void condExpr(out IDeclaration exprs)
 {
     IDeclaration a = null, b = null; exprs = null; string op = string.Empty;
     multiplyExpr(out a);
     exprs = a;
     while (StartOf(4)) {
         op = la.val;
         if (la.kind == 17) {
             Get();
         } else if (la.kind == 18) {
             Get();
         } else if (la.kind == 6) {
             Get();
         } else {
             Get();
         }
         multiplyExpr(out b);
         var c = new MultiplyDeclaration() { Operator = op, A = a, B = b }; a = c;
     }
     exprs = a;
 }