flush-all implementation.
Basic input parser.