Allow determining the end-of-input for possible restarts

This allow the caller to take the input and add more if in interactive
mode (i.e., parsing from readline).