Pāṇini's ancient Sanskrit grammar has been compared to a Turing machine
Roughly two and a half thousand years ago, an Indian grammarian packed the whole of Sanskrit into nearly 4,000 terse rules that generate correct words like an algorithm. The text can be recited in about two hours, scholars are still untangling how its rules interact, and Saussure and Bloomfield counted it among their influences.
Almost nothing is securely known about Pāṇini himself. His name means descendant of Paṇina, and Patanjali's commentary suggests his mother was called Dakṣi. Later inscriptions and the Chinese traveller Xuanzang link him to Salatura in ancient Gandhara, near the meeting of the Indus and Kabul rivers, in what is now northwest Pakistan. Legend adds colour: a slow student who won wisdom from Shiva's drum, and, in the Panchatantra, a man killed by a lion.
Dating him is a scholarly battleground. Some place him in the late Vedic era, as early as the seventh or sixth century BCE, because his language is close to the Upanishads. George Cardona judged the solid evidence points no earlier than 400 BCE. Coins named in his rules, which numismatists date to the fourth century BCE, persuaded Oskar von Hinüber and Harry Falk to place him around 350 BCE, possibly just before Alexander reached India. He clearly knew of writing, since his rules mention script and scribes.
His Aṣṭādhyāyī, meaning eight chapters, is the oldest Sanskrit grammar to survive intact. It takes lists of verb roots and nouns as input and applies ordered rules to produce well-formed words, backed by a sound inventory, the Shiva Sutras, and meta-rules for settling conflicts between rules. Grown out of efforts to keep Vedic hymns accurate, it favoured brevity so it could be memorised, which is why centuries of commentaries followed, above all Patanjali's Mahabhashya.
The work marks the conventional start of Classical Sanskrit and helped make it the leading language of Indian learning for two thousand years. Its analysis of word formation was more sophisticated than anything in the West before the twentieth century, and his treatment of compounds still underpins theories for Indian languages. The poet Bhaṭṭi even wrote a Ramayana designed to illustrate its rules. After European scholars encountered it in the nineteenth century, Pāṇini was hailed as the first descriptive linguist.
Source: Pāṇini