예제 #1
0
        public virtual void EmitOpIgnoreReverse(RxOp op, bool ignore, bool reverse)
        {
            int offset = 0;

            if (ignore)
            {
                offset += 1;
            }
            if (reverse)
            {
                offset += 2;
            }

            Emit((RxOp)((int)op + offset));
        }
예제 #2
0
        public virtual void EmitOpNegateReverse(RxOp op, bool negate, bool reverse)
        {
            int offset = 0;

            if (negate)
            {
                offset += 1;
            }
            if (reverse)
            {
                offset += 2;
            }

            Emit((RxOp)((int)op + offset));
        }
예제 #3
0
    private static void RunTest(int ix, bool y, string s, RxOp ot)
    {
        CodeBuf cb = new CodeBuf();

        ot.Compile(cb);

        Frame th = new Frame(null, null, TestSI);

        th.rx   = new RxFrame(Kernel.MockBox(new Cursor(s)));
        th.lex0 = cb;

        ok = false;
        while (th != null)
        {
            th = th.Continue();
        }

        Console.WriteLine((ok == y) ? "ok {0}" : "not ok {0}", ix);
    }
예제 #4
0
		public override void EmitOpNegateReverse (RxOp op, bool negate, bool reverse) {
			EmitGenericOp (op, negate, false, reverse, false);
			base.EmitOpNegateReverse (op, negate, reverse);
		}
예제 #5
0
		public override void EmitOpIgnoreReverse (RxOp op, bool ignore, bool reverse) {
			EmitGenericOp (op, false, ignore, reverse, false);
			base.EmitOpIgnoreReverse (op, ignore, reverse);
		}
예제 #6
0
		void EmitGenericOp (RxOp op, bool negate, bool ignore, bool reverse, bool lazy) {
			generic_ops [curpos] = (int)op;
			op_flags [curpos] = (int)MakeFlags (negate, ignore, reverse, false);
	    }
예제 #7
0
 void Emit(RxOp opcode)
 {
     Emit((byte)opcode);
 }
    private static void RunTest(int ix, bool y, string s, RxOp ot) {
        CodeBuf cb = new CodeBuf();
        ot.Compile(cb);

        Frame th = new Frame(null, null, TestSI);
        th.rx = new RxFrame(Kernel.MockBox(new Cursor(s)));
        th.lex0 = cb;

        ok = false;
        while (th != null)
            th = th.Continue();

        Console.WriteLine((ok == y) ? "ok {0}" : "not ok {0}", ix);
    }
 public RxSeq(RxOp[] z) { this.z = z; }
 public RxStar(RxOp inner) { this.inner = inner; }
예제 #11
0
 public RxStar(RxOp inner)
 {
     this.inner = inner;
 }
예제 #12
0
파일: RxCompiler.cs 프로젝트: nlhepler/mono
		void Emit (RxOp opcode)
		{
			Emit ((byte)opcode);
		}
예제 #13
0
파일: RxCompiler.cs 프로젝트: nlhepler/mono
		public virtual void EmitOpNegateReverse (RxOp op, bool negate, bool reverse) {
			int offset = 0;
			if (negate)
				offset += 1;
			if (reverse)
				offset += 2;

			Emit ((RxOp)((int)op + offset));
		}
예제 #14
0
파일: RxCompiler.cs 프로젝트: nlhepler/mono
		public virtual void EmitOpIgnoreReverse (RxOp op, bool ignore, bool reverse) {
			int offset = 0;
			if (ignore)
				offset += 1;
			if (reverse)
				offset += 2;

			Emit ((RxOp)((int)op + offset));
		}
예제 #15
0
파일: RxCompiler.cs 프로젝트: nlhepler/mono
		/* Overriden by CILCompiler */
		public virtual void EmitOp (RxOp op, bool negate, bool ignore, bool reverse) {
			int offset = 0;
			if (negate)
				offset += 1;
			if (ignore)
				offset += 2;
			if (reverse)
				offset += 4;

			Emit ((RxOp)((int)op + offset));
		}