I haven't studied the Sanskrit grammar but I have done some research on its creator Panini. From what I know, he wrote the grammar of Sanskrit 2500 years ago, and was the world's first linguist. He discovered the linguistic ideas of grammar, morphology, phonology, morphemes, phonemes, roots, etc.
His grammar of Sanskrit also has a grammatical structure similar to a modern computer programming language. He used metarules, transformations and recursions, defined grammar rules into classes and functions, etc. like a computer programming language.
Some people call him the "father of computing" because his work was similar to the work of Alan Turing, the father of computers. Alan Turing was born in India and used a formal language structure similar to Panini's grammar in his work on the theoretical modern computer. The Panini-Backus form of formal language structure, based on Panini's grammar rules, is also used by most computer programming languages (including C++, Java, etc).
There's also an article on how Panini's grammar of Sanskrit apparently inspired Mendeleev's discovery of the periodic table:
http://arxiv.org/abs/physics/0411080