Build() public method

public Build ( Nfa nfa ) : void
nfa Nfa
return void
示例#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);
     }
 }
示例#2
0
文件: dfa.cs 项目: hdinh/OmahaBot
 // 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);
 }
示例#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);
 }