Esempio n. 1
0
 private void EpsilonMove(BoolSet nexts, BoolSet epsil, BoolSet enext)
 {
     epsil.Reset();
     foreach (var i in nexts)
     {
         foreach (var n in this.instances[i].Epsilons)
         {
             epsil[n] = true;
         }
     }
     foreach (var i in epsil)
     {
         nexts[i] = true;
     }
     do
     {
         enext.Reset();
         foreach (var i in epsil)
         {
             foreach (var n in this.instances[i].Epsilons.Where(d => !nexts[d]))
             {
                 nexts[n] = true;
                 enext[n] = true;
             }
         }
         epsil.Swap(enext);
     } while (epsil);
 }
Esempio n. 2
0
 private void OneStep(BoolSet flags, BoolSet nexts, BoolSet epsil, BoolSet enext, char c)
 {
     nexts.Reset();
     foreach (var i in flags)
     {
         this.instances[i].Next(nexts, c);
     }
     EpsilonMove(nexts, epsil, enext);
     flags.Swap(nexts);
 }