It is remarkable to think that concepts which are fundamental to today's theoretical computer science should have their origin with an Indian genius around 2500 years ago!!
A quote by George Cardona, in his book "Panini: A Survey of Research":
"Panini's grammar has been evaluated from various points of view. After all these different evaluations, I think that the grammar merits asserting... that it is one of the greatest monuments of human intelligence."
Sanskrit was the classical literary language of the Indian Hindus and Panini is considered the founder of the language and literature. It is interesting to note that the word "Sanskrit" means "complete" or "perfect" and it was thought of as the divine language, or language of the gods. This famous Sanskrit grammarian gave a scientific analysis of Sanskrit phonetics and morphology. Panini analyzed the classical Sanskrit language, which was the language of all literary works, and more light was thrown on the phonology of this language.
Among Panini's works, the most famous and major one is called "Ashtadhyayi". It is a thesis that consists of eight chapters and each chapter is divided into quarter chapters. It sums up the science of phonetics and grammar in 4,000 sutras !! This treatise basically highlights the difference between the language of holy texts and the language used for communicating in normal lives. A basic set of rules and grammar was given to describe Sanskrit grammar. He went on step by step and explained the use of nouns, vowels and verbs and divided them into classes. He then explained the construction of sentences and the use of nouns and tenses. It is very similar to the principles of Mathematics as the construction of this grammatical pattern functions mathematically.
The Ashtadhyayi is generative as well as descriptive. With its complex use of metarules, transformations, and recursions, the grammar in Ashtadhyayi has been linked to the Turing machine, an idealized mathematical model that reduces the logical structure of any computing device to its essentials.
The Sanskrit Effect on Modern Linguistics:
Panini should be thought of as the forerunner of the modern formal language theory used to specify computer languages. The Backus Normal Form was discovered independently by John Backus in 1959, but Panini's notation is equivalent in its power to that of Backus and has many similar properties.
Panini's work became known in 19th century Europe, where it influenced modern linguistics initially through Franz Bopp, who mainly looked at Panini. Subsequently, a wider body of work influenced Sanskrit scholars such as Ferdinand de Saussure, Leonard Bloomfield, and Roman Jakobson. Frits Staal discussed the impact of Indian ideas on language in Europe. After outlining the various aspects of the contact, Staal notes that the idea of formal rules in language, proposed by de Ferdinand de Saussure in 1894 and developed by Noam Chomsky in 1957 has origins in the European exposure to the formal rules of Paninian grammar. In particular, de Saussure, who lectured on Sanskrit for three decades, may have been influenced by Panini and Bhartrihari; his idea of the unity of signifier-signified in the sign is somewhat similar to the notion of Sphoṭa. More importantly, the very idea that formal rules can be applied to areas outside of logic or mathematics, may itself have been catalyzed by Europe's contact with the work of Sanskrit grammarians.