n A system of rules and principles for speaking and writing a language.
n (uncountable|linguistics) The study of the internal structure of words (morphology) and the use of words in the construction of phrases and sentences (syntax).
n A book describing the rules of grammar of a language.
n (computing theory) A formal system specifying the syntax of a language.
n (computing theory) A formal system defining a formal language