Parses and evaluates a given equation.