Implementation of a simple string calculator