code: public void run(InputProvider inputProvider) throws IOException {
  		Object result = null;
  		while (!(result instanceof ExitRequest)) { // Handles ExitRequest thrown from Quit command
  			Input input;
  			try {
  				input = inputProvider.readInput();
  			}
  			catch (Exception e) {
  				if (e instanceof ExitRequest) { // Handles ExitRequest thrown from hitting CTRL-C
  					break;
  				}
  				resultHandler.handleResult(e);
  				continue;
  			}
  			if (input == null) {
  				break;
  			}
  
  			result = evaluate(input);
  			if (result != NO_INPUT && !(result instanceof ExitRequest)) {
  				resultHandler.handleResult(result);
  			}
  		}
  	}
docs: The main program loop: acquire input, try to match it to a command and evaluate. Repeat
  until a {@link ResultHandler} causes the process to exit or there is no input.
  <p>
  This method has public visibility so that it can be invoked by actual commands
  (<em>e.g.</em> a {@literal script} command).
  </p>