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); } }
// 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); }
// build an NFA for a given regular expression public Nfa(TokensGen tks, Regex re) : base(tks) { m_end = new NfaNode(tks); re.Build(this); }