parse tree from string