예제 #1
0
        // Adds a new instruction to this program, with operator |op| and |pc| equal
        // to |numInst()|.
        public void addInst(Inst.InstOp op)
        {
            if (instSize >= inst.Length)
            {
                Array.Resize(ref inst, inst.Length * 2);
            }

            inst[instSize] = new Inst(op);
            instSize++;
        }
예제 #2
0
파일: Compiler.cs 프로젝트: kaby76/re2cs
 private Frag newInst(Inst.InstOp op)
 {
     // TODO(rsc): impose length limit.
     prog.addInst(op);
     return(new Frag(prog.numInst() - 1));
 }
예제 #3
0
파일: Inst.cs 프로젝트: kaby76/re2cs
        public int[] runes; // length==1 => exact match
        // otherwise a list of [lo,hi] pairs.  hi is *inclusive*.
        // REVIEWERS: why not half-open intervals?

        public Inst(Inst.InstOp op)
        {
            this.op = (InstOp)op;
        }