Pergunta de entrevista da empresa Amazon

Parse a string that is a mathematical expression and calculate its total value