public override void Build(Nfa nfa) { int j, n = m_str.Length; NfaNode p, pp = nfa; for (j = 0; j < n; pp = p, j++) { p = new NfaNode(nfa.m_tks); pp.AddArc(m_str[j], p); } pp.AddEps(nfa.m_end); }
public override void Build(Nfa nfa) { int length = this.m_str.Length; NfaNode nfaNode = (NfaNode)nfa; for (int index = 0; index < length; ++index) { NfaNode next = new NfaNode(nfa.m_tks); nfaNode.AddUArc(this.m_str[index], next); nfaNode = next; } nfaNode.AddEps(nfa.m_end); }