Example #1
0
        void DataInstruction()
        {
            var dat = new DataInstruction();

            while (!(la.kind == 0 || la.kind == 19))
            {
                SynErr(35); Get();
            }
            Expect(19);
            Expect(16);
            DataPayload(dat);
            while (WeakSeparator(20, 3, 4))
            {
                DataPayload(dat);
            }
            Expect(17);
            instructions.Add(dat); instr_idx++;
        }
Example #2
0
        void DataPayload(DataInstruction dat)
        {
            int?val = 0;

            if (la.kind == 3)
            {
                Get();
                dat.Append(EscapeChars(t.val));
            }
            else if (la.kind == 1 || la.kind == 2)
            {
                Constant(ref val);
                dat.Append(val.Value);
            }
            else
            {
                SynErr(34);
            }
        }
Example #3
0
        void RDataInstruction()
        {
            var dat = new DataInstruction(); int?val = 0, rep = 0;

            while (!(la.kind == 0 || la.kind == 21))
            {
                SynErr(36); Get();
            }
            Expect(21);
            Expect(16);
            Constant(ref val);
            ExpectWeak(20, 5);
            Constant(ref rep);
            Expect(17);
            for (int i = 0; i < rep.Value; i++)
            {
                dat.Append(val.Value);
            }
            instructions.Add(dat); instr_idx++;
        }