grammatically

adverb
1
in a way that is connected with the rules of grammar
از نظر دستوری, از لحاظ دستوری, از نظر قواعد دستور زبان
2
in a way that correctly follows the rules of grammar
از نظر دستوری, به لحاظ دستوری
to speak grammatically