finish all functions about parse, and print a tree