Text this: The Logic of Grammar