Attention, intention, and the structure of discourse