Auto-reset for end-of-stream and end-of-parse