Parse logic.