Exemplo n.º 1
0
 void Condition(out ICondition cond)
 {
     cond = null; ICondition other = null;
     SimpleCondition(out cond);
     while (la.kind == 25 || la.kind == 26)
     {
         if (la.kind == 25)
         {
             Get();
             SimpleCondition(out other);
             cond = cond.Intersection(other);
         }
         else
         {
             Get();
             SimpleCondition(out other);
             cond = cond.Union(other);
         }
     }
     cond.Freeze();
     if (la.kind == 27)
     {
         Get();
         ICondition rcond;
         Condition(out rcond);
         rcond.Freeze();
         cond = new TransitionCondition(cond, rcond);
         cond.Freeze();
     }
 }
Exemplo n.º 2
0
        void Condition(out ICondition cond)
        {
            cond = null; ICondition other = null;
            SimpleCondition(out cond);
            while (la.kind == 25 || la.kind == 26) {
            if (la.kind == 25) {
                Get();
                SimpleCondition(out other);
                cond = cond.Intersection(other);
            } else {
                Get();
                SimpleCondition(out other);
                cond = cond.Union(other);
            }
            }
            cond.Freeze();
            if (la.kind == 27) {
            Get();
            ICondition rcond;
            Condition(out rcond);
            rcond.Freeze();
            cond = new TransitionCondition(cond, rcond);
            cond.Freeze();

            }
        }