Program to refactor that implements a simple arithmetic parser.