public String displayAST(Node node,int maxDepth,Node markNode){
  StringWriter out=new StringWriter();
  printTree(new PrintWriter(out),node,maxDepth,markNode);
  return out.toString();
}

public String displayAST ( Node node , int maxDepth , Node markNode ) { StringWriter out = new StringWriter ( ) ; printTree ( new PrintWriter ( out ) , node , maxDepth , markNode ) ; return out . toString ( ) ; }
creates a textual ast display , one line per node , with nesting .
