Parsing a simple mathematical expression using tree