Based on the above information, it transpires that Tamil Grammar includes Sanskrit Grammar and is an improvement on Sanskrit Grammar.
As to the origin of Sanskrit, it is from Shiva's Damaru, a musical instrument, adorned by Shiva.
The sound of Damaru created Sanskrit and it was compiled as Maheswara Suktha.
This was revealed to Panini and Agastya
Apart from these, Hanuman is regarded as the Tenth Grammarian of Sanskrit.
Hanuman wonders as to which language he should use when he met Sita in Lanka.
He was worried that Sita might mistake him to be Ravana in disguise if he ( Hanuman ) spoke in Sanskrit for Ravana was a Sanskrit scholar.
He was a disciple of Agastya,who wrote Vedic Hymns,a scholar in Sanskrit,Agathyam ,Tamil Grammar,
Tholkaapiyar expresses his desire to streamline Tamil,
It is highly probable that he wrote Tholkaapiyam ,refining Aindhiram as it was becoming obsolete,disappearing.
Tamil Grammar Thokappiyam might be a refined,improved Aindhiram of Sanskrit Grammar.
And as Tholkappiyar's Guru was a Scholar of Vedas,which is in Sanskrit, is it that Aindhiram is a Sanskrit Work?
Agastya could not have written Aindhiram in Tamil as the First Tamil Grammar Agathiyam was by Agastya,which has been lost?
Why write two books on the same subject?
Or ,as Agastya is a schloar in both Tamil and Sanskrit,Aindhiram could be in Tamil?