public static void pprintTree(Tree t, int indent)
    {
        if (t != null)
        {
            StringBuffer sb = new StringBuffer(indent);

            if (t.getParent() == null)
            {
                System.out.println(sb.toString() + t.getText().toString());
            }
            for (int i = 0; i < indent; i++)
            {
                sb = sb.append("   ");
            }
            for (int i = 0; i < t.getChildCount(); i++)
            {
                System.out.println(sb.toString() + t.getChild(i).toString());
                pprintTree((Tree) t.getChild(i), indent + 1);
            }
        }
    }