I think this confusion arose because it was similarities between Greek, Latin and Sanskrit that first alerted scholars to the existence of a common ancestor.
You can see a family tree of the Indo-European languages at https://upload.wikimedia.org/wikipedia/commons/4/4f/IndoEuro...
https://en.wikipedia.org/wiki/Sanskrit#Grammar
(That's a scholarly article, don't go by it, though you could skim it, just giving it for background info. Try out the language instead.)
There are a handful of rules, and the rest of the stuff builds upon that, the way programs build upon the handful of syntax and semantic rules about statements in programming language.
An interesting point mentioned in the article is that "Word order is free" in Sanskrit.
https://en.wikipedia.org/wiki/Word_order
While not a linguist myself, I've noticed that the meanings of sentences in Sanskrit seem to be intelligible and mean the same, even if you switch some of the words around. I don't know if that is true for any other languages.
I wonder if that point has any connection with the concept of context-free grammars.