What is the meaning of Grammarian?

A person who studies grammar, either scientifically or (traditionally) unscientifically.

A person who pedantically critiques the grammar of others' speech or writing, especially when unscientifically and misguidedly.

Source: wiktionary.org