title: ANTLR: Get token name?
body: <p>I've got a grammar rule,</p>
  
  <pre><code>OR
      : '|';
  </code></pre>
  
  <p>But when I print the AST using,</p>
  
  <pre><code>public static void Preorder(ITree tree, int depth)
  {
      if (tree == null)
      {
          return;
      }
  
      for (int i = 0; i &lt; depth; i++)
      {
          Console.Write("  ");
      }
  
      Console.WriteLine(tree);
  
      for(int i=0; i&lt;tree.ChildCount; ++i)
          Preorder(tree.GetChild(i), depth + 1);
  }
  </code></pre>
  
  <p>(Thanks <a href="https://stackoverflow.com/users/50476/bart-kiers">Bart</a>) it displays the actual <code>|</code> character. Is there a way I can get it to say "OR" instead?</p>