Expression evaluator using a tree to represent the expression