Build() public method

public Build ( Nfa nfa ) : void
nfa Nfa
return void
Example #1
0
 public override void Build(Nfa nfa)
 {
     if (m_next != null)
     {
         if (m_sub != null)
         {
             Nfa first  = new Nfa(nfa.m_tks, m_sub);
             Nfa second = new Nfa(nfa.m_tks, m_next);
             nfa.AddEps(first);
             first.m_end.AddEps(second);
             second.m_end.AddEps(nfa.m_end);
         }
         else
         {
             m_next.Build(nfa);
         }
     }
     else
     {
         base.Build(nfa);
     }
 }
Example #2
0
 // build an NFA for a given regular expression
 /// <exclude/>
 public Nfa(TokensGen tks,Regex re)
     : base(tks)
 {
     m_end = new NfaNode(tks);
     re.Build(this);
 }
Example #3
0
 // build an NFA for a given regular expression
 public Nfa(TokensGen tks, Regex re) : base(tks)
 {
     m_end = new NfaNode(tks);
     re.Build(this);
 }