public void dump() { #if DUMMY Console.WriteLine("[Dfa begin dump]"); Console.WriteLine("group=" + Int32.ToString(group)); Console.WriteLine("mark=" + Boolean.ToString(mark)); if (accept == null) { Console.WriteLine("accept=null"); } else { accept.dump(); } Console.WriteLine("anchor=" + Int32.ToString(anchor)); if (nfa_set == null) { Console.WriteLine("nfa_set=null"); } else { int n1 = nfa_set.Count; for (int i = 0; i < n1; i++) { Object o2 = nfa_set[i]; Console.Write("i=" + Int32.ToString(i) + " elem="); if (o2 == null) { Console.WriteLine("null"); } else { Nfa elem = (CNfa)o2; elem.dump(); } } } if (nfa_bit == null) { Console.WriteLine("nfa_bit=null"); } else { Console.Write("nfa_bit(" + Int32.ToString(nfa_bit.GetLength()) + ")="); for (int i = 0; i < nfa_bit.GetLength(); i++) { if (nfa_bit.Get(i)) { Console.Write("1"); } else { Console.Write("0"); } } Console.WriteLine(""); } Console.WriteLine("[Dfa end dump]"); #endif }
public void dump() { Console.WriteLine("[CBunch Dump Begin]"); if (this.nfa_set == null) { Console.WriteLine("nfa_set=null"); } else { int count = this.nfa_set.Count; for (int i = 0; i < count; i++) { object obj = this.nfa_set[i]; Console.Write("i={0} elem=", i); if (obj == null) { Console.WriteLine("null"); } else { Nfa nfa = (Nfa)obj; nfa.dump(); } } } if (this.nfa_bit == null) { Console.WriteLine("nfa_bit=null"); } else { Console.Write("nfa_bit(" + this.nfa_bit.GetLength().ToString() + ")="); for (int j = 0; j < this.nfa_bit.GetLength(); j++) { if (this.nfa_bit.Get(j)) { Console.Write("1"); } else { Console.Write("0"); } } Console.WriteLine(""); } if (this.accept == null) { Console.WriteLine("accept=null"); } else { this.accept.Dump(); } Console.WriteLine("anchor=" + this.anchor.ToString()); Console.WriteLine("accept_index=" + this.accept_index.ToString()); }