OpcodeBacktracks() static private method

static private OpcodeBacktracks ( int Op ) : bool
Op int
return bool
Beispiel #1
0
        /// <summary>
        /// Emits a zero-argument operation. Note that the emit
        /// functions all run in two modes: they can emit code, or
        /// they can just count the size of the code.
        /// </summary>
        private void Emit(int op)
        {
            if (RegexCode.OpcodeBacktracks(op))
            {
                _trackCount++;
            }

            _emitted.Append(op);
        }
Beispiel #2
0
        /// <summary>Emits a one-argument operation.</summary>
        private void Emit(RegexOpcode op, int opd1)
        {
            if (RegexCode.OpcodeBacktracks(op))
            {
                _trackCount++;
            }

            _emitted.Append((int)op);
            _emitted.Append(opd1);
        }
Beispiel #3
0
 /*
  * Emits a zero-argument operation. Note that the emit
  * functions all run in two modes: they can emit code, or
  * they can just count the size of the code.
  */
 internal void Emit(int op)
 {
     if (_counting)
     {
         _count += 1;
         if (RegexCode.OpcodeBacktracks(op))
         {
             _trackcount += 1;
         }
         return;
     }
     _emitted[_curpos++] = op;
 }
Beispiel #4
0
 /// <summary>
 /// Emits a one-argument operation.
 /// </summary>
 private void Emit(int op, int opd1)
 {
     if (_counting)
     {
         _count += 2;
         if (RegexCode.OpcodeBacktracks(op))
         {
             _trackcount += 1;
         }
         return;
     }
     _emitted[_curpos++] = op;
     _emitted[_curpos++] = opd1;
 }
Beispiel #5
0
 internal void Emit(int op)
 {
     if (this._counting)
     {
         this._count++;
         if (RegexCode.OpcodeBacktracks(op))
         {
             this._trackcount++;
         }
     }
     else
     {
         this._emitted[this._curpos++] = op;
     }
 }
Beispiel #6
0
 /*
  * Emits a three-argument operation.
  */
 internal void Emit(int op, int opd1, int opd2, int opd3)
 {
     if (_counting)
     {
         _count += 4;
         if (RegexCode.OpcodeBacktracks(op))
         {
             _trackcount += 1;
         }
         return;
     }
     _emitted[_curpos++] = op;
     _emitted[_curpos++] = opd1;
     _emitted[_curpos++] = opd2;
     _emitted[_curpos++] = opd3;
 }
Beispiel #7
0
 internal void Emit(int op, int opd1, int opd2, int opd3)
 {
     if (this._counting)
     {
         this._count += 4;
         if (RegexCode.OpcodeBacktracks(op))
         {
             this._trackcount++;
         }
     }
     else
     {
         this._emitted[this._curpos++] = op;
         this._emitted[this._curpos++] = opd1;
         this._emitted[this._curpos++] = opd2;
         this._emitted[this._curpos++] = opd3;
     }
 }