Name() public method

public Name ( string name ) : string
name string
return string
コード例 #1
0
ファイル: DFA.cs プロジェクト: omaragb/tlp182
 public void PrintStates()
 {
     trace.WriteLine();
     trace.WriteLine("---------- states ----------");
     for (State state = firstState; state != null; state = state.next)
     {
         bool first = true;
         if (state.endOf == null)
         {
             trace.Write("               ");
         }
         else
         {
             trace.Write("E({0,12})", tab.Name(state.endOf.name));
         }
         trace.Write("{0,3}:", state.nr);
         if (state.firstAction == null)
         {
             trace.WriteLine();
         }
         for (Action action = state.firstAction; action != null; action = action.next)
         {
             if (first)
             {
                 trace.Write(" "); first = false;
             }
             else
             {
                 trace.Write("                    ");
             }
             if (action.typ == Node.clas)
             {
                 trace.Write(((CharClass)tab.classes[action.sym]).name);
             }
             else
             {
                 trace.Write("{0, 3}", Ch(action.sym));
             }
             for (Target targ = action.target; targ != null; targ = targ.next)
             {
                 trace.Write(" {0, 3}", targ.state.nr);
             }
             if (action.tc == Node.contextTrans)
             {
                 trace.WriteLine(" context");
             }
             else
             {
                 trace.WriteLine();
             }
         }
     }
     trace.WriteLine();
     trace.WriteLine("---------- character classes ----------");
     tab.WriteCharClasses();
 }