Halliday & Matthiessen (1999: 6):
In linguistics, while we do distinguish “language” (the phenomenon) from “linguistics” (the study of the phenomenon), we fail to make such a distinction with the word “grammar”, which means both the grammar of a language and the study of grammar. To avoid such a pathological ambiguity, we find it helpful to refer to the study of grammar by a special name, grammatics. […] Thus we can say that a grammatics is a theory of grammar, while a grammar is (among other things) a theory of experience.