In linguistics, grammar refers to the logical and structural rules that govern the composition of clauses, phrases, and words in any given natural language. The term refers also to the study of such rules, and this field includes morphology and syntax, often complemented by phonetics, phonology, semantics, and pragmatics.