Example #1
0
        void OutAction(out Action action, string locality)
        {
            Expression exp = null; action = new OutAction(); action.Locality = locality;

            Expect(17);
            Expect(14);
            OutParam(out exp);
            action.AddExpression(exp);
            while (la.kind == 8)
            {
                Get();
                OutParam(out exp);
                action.AddExpression(exp);
            }
            Expect(15);
            Expect(18);
            if (la.kind == 1)
            {
                Get();
                action.At = new PLRString(t.val);
            }
            else if (la.kind == 2)
            {
                Get();
                action.At = new Variable(t.val);
            }
            else
            {
                SynErr(29);
            }
        }
Example #2
0
 void Action(out Action act)
 {
     act = null; Expression exp = null; Variable v = null;
     if (la.kind == 3)
     {
         Get();
         InAction inAct = new InAction(t.val);
         if (la.kind == 10)
         {
             Get();
             Expect(3);
             v = new Variable(t.val); SetPos(v, t); inAct.AddVariable(v);
             while (la.kind == 11)
             {
                 Get();
                 Expect(3);
                 v = new Variable(t.val); SetPos(v, t); inAct.AddVariable(v);
             }
             Expect(12);
         }
         act = inAct;
     }
     else if (la.kind == 5)
     {
         Get();
         OutAction outAct = new OutAction(t.val);
         if (la.kind == 10)
         {
             Get();
             ArithmeticExpression(out exp);
             outAct.AddExpression(exp);
             while (la.kind == 11)
             {
                 Get();
                 ArithmeticExpression(out exp);
                 outAct.AddExpression(exp);
             }
             Expect(12);
         }
         act = outAct;
     }
     else if (la.kind == 6)
     {
         MethodCall(out exp, true);
         act = new Call((MethodCallExpression)exp);
     }
     else
     {
         SynErr(43);
     }
 }