Building the semantic tree for expressions.