private Object execRequestInput() throws KeyboardInterruptException {
    waitingForInput = true;
    inputReceived = null;
    keyboardInterruption = false;
    boolean needInput = true;

    //let the busy loop from execInterpreter free and enter a busy loop
    //in this function until execInterpreter gives us an input
    nextResponse = new InterpreterResponse(false, needInput);

    notifyInputRequested();

    //busy loop until we have an input
    while (inputReceived == null) {
      if (keyboardInterruption) {
        waitingForInput = false;

        throw new KeyboardInterruptException();
      }
      synchronized (lock) {
        try {
          lock.wait(10);
        }
        catch (InterruptedException e) {
          //pass
        }
      }
    }
    return inputReceived;
  }
private Object execRequestInput()