An extension of semantics to include an analysis of the relation between a sentence and the context or discourse in which it is embedded. For example, the reference of pronouns or other indexical elements within a sentence may only be derived from its relation to surrounding sayings.