integration of the calculation based on the syntax tree