drive the state machine entirely via newlines