Halliday & Matthiessen (1999: 568-9):
… the study of words varying in form according to their case, number, aspect, person etc. Word-based systems such as these do provide a way in to studying grammatical semantics: but the meanings they construe are always more complex than the categories that appear as formal variants, and grammarians have had to become aware of covert patterns.