Added ability to order the execution of dictionary adapter behaviors.
[castle.git] / Experiments / Attic / Rook / Castle.Rook.Compiler / Parser / antlr / debug / Tracer.cs
blob1e474575c2f501e33ac8920db48ecb6b8da2969b
1 namespace antlr.debug
3 using System;
5 public class Tracer : TraceListenerBase, TraceListener
7 protected string indentString = "";
8 // TBD: should be StringBuffer
11 protected internal virtual void dedent()
13 if (indentString.Length < 2)
14 indentString = "";
15 else
16 indentString = indentString.Substring(2);
18 public override void enterRule(object source, TraceEventArgs e)
20 System.Console.Out.WriteLine(indentString + e);
21 indent();
23 public override void exitRule(object source, TraceEventArgs e)
25 dedent();
26 System.Console.Out.WriteLine(indentString + e);
28 protected internal virtual void indent()
30 indentString += " ";