Esempio n. 1
0
 public PlaceHoldersPredictAssociation(RegExpState state)
 {
     this._PlaceHolders       = new object[0];
     this._State              = state;
     this._PassedStatesSource = null;
     this._OptimisticHint     = string.Empty;
 }
Esempio n. 2
0
 public PlaceHoldersPredictAssociation(RegExpDfaWave.PlaceHoldersPredictAssociation prevHolder, Transition transition)
 {
     if (transition.IsEmpty)
     {
         this._PlaceHolders   = prevHolder._PlaceHolders;
         this._OptimisticHint = prevHolder._OptimisticHint;
     }
     else
     {
         this._PlaceHolders = new object[prevHolder._PlaceHolders.Length + 1];
         prevHolder._PlaceHolders.CopyTo(this._PlaceHolders, 0);
         if (transition.IsExact)
         {
             this._PlaceHolders[this._PlaceHolders.Length - 1] = transition.GetSampleChar();
         }
         this._OptimisticHint = prevHolder._OptimisticHint + transition.GetSampleChar();
     }
     this._State = transition.Target;
     this._PassedStatesSource = prevHolder;
 }