Read this: The history of phonology may be traced back to the Ashtadhyayi, the Sanskrit grammar composed by Pāṇini in the 4th century BC. In particular the Shiva Sutras, an auxiliary text to the Ashtadhyayi, introduces what can be considered a list of the phonemes of the Sanskrit language, with a notational system for them that is used throughout the main text, which deals with matters of morphology, syntax and semantics.
Now answer this question, if there is an answer (If it cannot be answered, return "unanswerable"): What other text was related to the Ashtadhyayi?
the Shiva Sutras