Here's a breakdown:
* Tolkappiyam: This is the earliest known Tamil grammar text, believed to have been written sometime between the 3rd century BCE and the 5th century CE. It is a foundational work in Tamil literature and linguistics.
* Ashtadhyayi: This is a Sanskrit grammar text attributed to the sage Panini. It is dated around the 5th century BCE.
Therefore, Tolkappiyam predates Ashtadhyayi by a few centuries.
However, it's worth noting that:
* Dating ancient texts is always a challenge: There is ongoing debate among scholars about the precise dating of both Tolkappiyam and Ashtadhyayi.
* Potential for earlier versions: While the current versions of both texts have been dated, it is possible that earlier versions existed.
* Different languages: Tolkappiyam deals with Tamil grammar, while Ashtadhyayi covers Sanskrit.
Despite these points, the general consensus among scholars is that Tolkappiyam is older than Ashtadhyayi.