adjective /ɡɹəˈmætɪkəl/
a) Acceptable as a correct sentence or clause as determined by the rules and conventions of the grammar, or morpho-syntax of the language.
Your writing is not grammatical enough for publication.
b) Of or pertaining to grammar.
My friend used a grammatical textbook to support her argument.
Wikipedia foundation.