Patanjali was the author of a commentary on Panini's Sanskrit grammar, the Mahabhaṣya. It is a commentary on the selected rules of Sanskrit grammar from Paṇini's treatise, the Ashtadhyayi, as well as Katyayana's Varttika, an elaboration of Paṇini's grammar. It is dated to the 2nd century BCE. Patanjali is one of the three most famous Sanskrit grammarians of ancient India, the other two being Paṇini and Katyayana who preceded Patanjali.