← All writing Ancient algorithms, 15 min read

Panini's Ashtadhyayi as a rewrite system, compared with Backus-Naur form, in Python

Panini's Ashtadhyayi states Sanskrit grammar in about 4,000 ordered, context-sensitive rewrite rules. Vowel sandhi in Python, compared with Backus-Naur form.

In March 1967 the Communications of the ACM printed a letter by Peter Ingerman proposing that Backus-Naur form, the notation used to define programming languages, be renamed “Panini-Backus form”. Panini’s Ashtadhyayi (Aṣṭādhyāyī, “the 8 chapters”) is a grammar of Sanskrit in about 4,000 short rules that build correct words and sentences from roots, suffixes and endings.

Its rules for joining sounds are ordered, context-sensitive rewrite rules: each one says which sound is replaced, by what, next to what. When several rules could apply, a special rule blocks a general one, and the tradition adds that otherwise the later rule wins (1.4.2).

To see how far Ingerman’s comparison holds, I took 10 of Panini’s vowel-joining rules, the shorthand they are written in, and the principles that settle conflicts, and coded them in Python, tested against the commentators’ examples (panini.py on GitHub). The series is Ancient algorithms, implemented.

The problem: sounds change where words meet

In Sanskrit spoken without pauses (saṃhitā, “joined”), the sound at the end of a word merges with the sound at the start of the next. Sanskrit writing records the merged form:

  • upa + indraḥ is said and written upendraḥ;
  • sudhī + upāsyaḥ becomes sudhyupāsyaḥ;
  • daitya + ariḥ becomes daityāriḥ.

These changes are called sandhi, “putting together”. A grammar has to say which change happens at every junction. Panini does it with a few dozen rules in the first quarter of chapter 6.

Who wrote the Ashtadhyayi, and when

  • Panini (Pāṇini) wrote it. His date is not known. Parmanand Singh’s survey (1985) reports that 19th- and 20th-century scholars placed him anywhere from 700 BCE to 100 CE, and that V. S. Agrawala (1969) argued for 480 to 410 BCE. David Mumford’s review of Kim Plofker’s Mathematics in India reports “perhaps” the 5th century BCE. Jayant Shah writes 6th century BCE. Ingerman’s 1967 letter says 400 to 200 BCE.
  • The commentary tradition fixed how the rules are read: Katyayana’s short critical notes (vārttikas), Patanjali’s Mahābhāṣya, then the Kāśikāvṛtti of Jayaditya and Vamana. Later teaching texts rearranged the rules by topic, among them Varadaraja’s Laghusiddhāntakaumudī, which supplies 28 of the test examples below. Nagesa’s Paribhāṣenduśekhara collects the working principles the tradition uses to apply the rules.
  • Earlier grammarians. Panini was not the first. He names earlier grammarians when he records their opinions, for example Āpiśali (6.1.92), Kāśyapa (1.2.25), Gārgya (8.3.20), Gālava (7.3.99), Cākravarmaṇa (6.1.130), Bhāradvāja (7.2.63), Śākaṭāyana (3.4.111), Śākalya (8.3.19) and Sphoṭāyana (6.1.123). The Ashtadhyayi is the oldest Sanskrit grammar that survives complete.

Aṣṭādhyāyī means “in 8 chapters”. Each chapter (adhyāya) has 4 quarters (pāda), so a rule is cited by 3 numbers: 6.1.77 is chapter 6, quarter 1, rule 77. The GRETIL e-text I used numbers 3,958 sutras; counts differ by a few between recensions.

The shorthand: Shiva Sutras and pratyaharas

Before the first numbered rule, the grammar lists the sounds of Sanskrit in 14 short lines, the Shiva Sutras (Māheśvara sūtras). Each line ends in a marker consonant (it), which closes the line and is dropped from the sound list. The text below is from the Kāśikāvṛtti on GRETIL.

अइउण् । ऋऌक् । एओङ् । ऐऔच् । हयवरट् । लण् । ञमङणनम् ।
झभञ् । घढधष् । जबगडदश् । खफछठथचटतव् । कपय् । शषसर् । हल् ॥

a i u ṇ | ṛ ḷ k | e o ṅ | ai au c | ha ya va ra ṭ | la ṇ | ña ma ṅa ṇa na m |
jha bha ñ | gha ḍha dha ṣ | ja ba ga ḍa da ś | kha pha cha ṭha tha ca ṭa ta v | ka pa y | śa ṣa sa r | ha l ||

The a after each consonant is there to make it sayable. The Kāśikāvṛtti says so: in ha, ya and the rest, the a is for pronunciation only.

3 rules turn this list into a naming system:

SutraSanskritMeaning
1.3.3hal antyama final consonant in the teaching is a marker
1.3.9tasya lopaḥthe marker is dropped
1.1.71ādir antyena sahetāa first sound, together with a final marker, names itself and every sound between

So ac (a + the marker c) names every sound from a to the c marker: a i u ṛ ḷ e o ai au, the vowels. Hal (h + l) names every consonant. Ik is i u ṛ ḷ, and yaṇ is y v r l. These names are pratyāhāras, “drawn together”. The Kāśikāvṛtti lists, line by line, the pratyaharas the grammar uses, 41 in all, and closes with a verse that counts how many each marker forms.1

The rules in this model

SutraDevanagariIASTWhat it does
6.1.77इको यणचिiko yaṇ acii, u, ṛ, ḷ become y, v, r, l before a vowel
6.1.78एचोऽयवायावःeco ‘yavāyāvaḥe, o, ai, au become ay, av, āy, āv before a vowel
6.1.87आद्गुणःād guṇaḥa or ā and the next vowel become 1 guṇa vowel
6.1.88वृद्धिरेचिvṛddhir ecia or ā and a following e, o, ai, au become 1 vṛddhi vowel
6.1.89एत्येधत्यूठ्सुetyedhatyūṭhsuthe same, before forms of i “go” and edh “grow”
6.1.91उपसर्गादृति धातौupasargād ṛti dhātaua prefix’s a or ā and a root’s initial ṛ become ār
6.1.94एङि पररूपम्eṅi pararūpama prefix’s a or ā and a verb’s e or o become the second vowel
6.1.101अकः सवर्णे दीर्घःakaḥ savarṇe dīrghaḥ2 like vowels become 1 long vowel
6.1.109एङः पदान्तादतिeṅaḥ padāntād atia word-final e or o absorbs a following short a
8.3.19लोपः शाकल्यस्यlopaḥ śākalyasyaa word-final y or v after a or ā drops, in Śākalya’s view

Guṇa and vṛddhi are defined at the start of the grammar: 1.1.2 adeṅ guṇaḥ makes a, e, o the guṇa vowels, and 1.1.1 vṛddhir ād aic makes ā, ai, au the vṛddhi vowels.

3 principles decide between rules that apply at the same junction:

PrincipleSourceWhat it does
exception (apavāda)the commentators; Nagesa’s Paribhāṣenduśekharaa special rule blocks the general rule it is an exception to
1.4.2 विप्रतिषेधे परं कार्यम् vipratiṣedhe paraṃ kāryamsutrain a conflict, the later rule applies
8.2.1 पूर्वत्रासिद्धम् pūrvatrāsiddhamsutrafrom here on, a rule’s result is invisible to earlier rules

Word by word: 6.1.77 and 1.4.2

Panini’s rules use the grammatical case of each word to mark its role. 1.1.49 says a genitive names what is replaced. 1.1.66 says that when a rule names a sound in the locative, the change happens to the sound immediately before it. 1.1.67 says that with an ablative, the change happens to the sound immediately after it.

SanskritFormRoleMeaning
ikaḥik, genitivewhat is replaced (1.1.49)in place of i, u, ṛ, ḷ
yaṇyaṇ, nominativethe substitutey, v, r, l
aciac, locativethe right context (1.1.66)before a vowel
vipratiṣedhevipratiṣedha, locativeconditionwhen 2 rules conflict
parampara, nominativethe later one
kāryamkārya, gerundiveis to be applied

So iko yaṇ aci is a rewrite rule with a context. In the notation of modern phonology:

ik→yaṇ  /  __  ac\text{ik} \rightarrow \text{yaṇ} \;/\; \_\_\; \text{ac}

My translation

6.1.77 In place of i, u, ṛ, ḷ, put y, v, r, l when a vowel follows.

6.1.87 After a or ā, a single guṇa vowel replaces both, when a vowel follows.

1.4.2 When 2 rules conflict, the later one is to be applied.

8.2.1 In relation to earlier rules, a rule from here on counts as not having applied.

What the sutras leave open

  1. Words carried down from earlier rules. 6.1.87 says only “after a, guṇa”. The rest comes from earlier sutras whose words continue to apply (anuvṛtti): “before a vowel” from 6.1.77, “1 replacement for both” from 6.1.84 ekaḥ pūrvaparayoḥ, and “in joined speech” from 6.1.72 saṃhitāyām. A reader has to know which words carry and how far.
  2. Which substitute. 6.1.77 says y, v, r, l replace i, u, ṛ, ḷ, without saying which goes with which. 1.1.50 sthāne ‘ntaratamaḥ says to pick the closest. The tradition measures closeness by place of articulation first; Nagesa states this as a working principle. I used the places the Laghusiddhāntakaumudī gives: throat, palate, retroflex (tongue tip curled back), teeth and lips.
  3. Which ṇ. The marker ṇ ends 2 lines of the Shiva Sutras, so aṇ is ambiguous. The Kāśikāvṛtti says aṇ uses the first ṇ everywhere except in 1.1.69, and iṇ always uses the second.

The sutras also do not say which rule is an exception to which; that comes from the commentators, under “What is debated”.

Worked example: 4 words, 3 junctions

Kiparsky uses this sentence: adya iha apāci odanaḥ, “the rice was cooked here today”. Here is what the code does at each junction:

JunctionRules that applyChosen, and whyResult
adya + iha6.1.876.1.87, the only rule: a + i becomes the guṇa vowel closest to both, eadyeha
adyeha + apāci6.1.87, 6.1.1016.1.101, an exception to 6.1.87: a + a becomes āadyehāpāci
adyehāpāci + odanaḥ6.1.776.1.77, the only rule: i becomes yadyehāpācyodanaḥ

The output is adyehāpācyodanaḥ, as Kiparsky gives it. At the second junction 6.1.87 would give guṇa a, so adyehapāci. 6.1.101 blocks it and gives the long ā, the attested form. Kiparsky notes that none of 6.1.77, 6.1.87 and 6.1.101 covers a subset of another’s cases, but every case of 6.1.101 falls inside the cases of the other 2 together, so it blocks both (collective blocking).

The other conflicts the tests cover:

InputRules that applyChosen, and whyResult
śrī + īśaḥ6.1.77, 6.1.1016.1.101, exceptionśrīśaḥ
kṛṣṇa + ekatvam6.1.87, 6.1.886.1.88, exceptionkṛṣṇaikatvam
pra + ejate6.1.87, 6.1.88, 6.1.946.1.94, exceptionprejate
pra + ṛcchati6.1.87, 6.1.916.1.91, exceptionprārcchati
upa + eti6.1.87, 6.1.88, 6.1.89, 6.1.946.1.89, exceptionupaiti
hare + ava6.1.78, 6.1.1096.1.109, exceptionhare’va
iha + ejate (iha is no prefix)6.1.87, 6.1.886.1.88, exceptionihaijate

Every conflict in the model is settled by an exception, so 1.4.2 decides none of them. In every row but 1, the exception is also the later sutra, so “the later rule wins” alone would give the same answer. Upa + eti is the case where it does not: 6.1.94 is later than 6.1.89, and choosing it would give upeti. The attested form is upaiti, which the Laghusiddhāntakaumudī gives under 6.1.89, and Kiparsky uses the same pair to show 6.1.89 blocking 6.1.94.

Why the order matters: 8.2.1

The last 3 quarters of the grammar, from 8.2.1 to the end, are called the tripādī, “the 3 quarters”. 8.2.1 says each rule in it is invisible to every rule before it. The Laghusiddhāntakaumudī gives this example under 8.2.1:

  • hare + iha (“O Hari, here”): 6.1.78 turns e into ay, giving haray iha.
  • 8.3.19, in the tripādī, may drop the y after a, giving hara iha.
  • Now a and i meet again. 6.1.87 would turn them into e, giving hareha. It does not apply, because the dropping of y happened in the tripādī and is invisible to 6.1.87.

The correct forms are hara iha or harayiha, and the code produces both, depending on whether the optional deletion is taken. The repo also has rewrite_to_fixpoint, which runs the same rules with 8.2.1 removed. On hare + iha it produces hareha, the wrong form. Kiparsky describes the effect of 8.2.1: it fixes the rules of the last 3 quarters to the order in which they are listed, the way rules are ordered in classical generative phonology.

The Python

This is a short version: the pratyahara expansion, 4 vowel rules and the choice between them. It reads 1 letter on each side of the junction, so it leaves out the diphthongs ai and au.

SHIVA_SUTRAS = [
    ("a i u", "ṇ"), ("ṛ ḷ", "k"), ("e o", "ṅ"), ("ai au", "c"),
    ("h y v r", "ṭ"), ("l", "ṇ"), ("ñ m ṅ ṇ n", "m"), ("jh bh", "ñ"),
    ("gh ḍh dh", "ṣ"), ("j b g ḍ d", "ś"), ("kh ph ch ṭh th c ṭ t", "v"),
    ("k p", "y"), ("ś ṣ s", "r"), ("h", "l"),
]
LONG = {"a": "ā", "i": "ī", "u": "ū", "ṛ": "ṝ"}


def pratyahara(first: str, marker: str) -> list[str]:
    """1.1.71: the sounds from `first` up to the last sutra ending in `marker`."""
    end = max(i for i, (_, m) in enumerate(SHIVA_SUTRAS) if m == marker)
    sounds = [s for sounds, _ in SHIVA_SUTRAS[: end + 1] for s in sounds.split()]
    return sounds[sounds.index(first) :]


def with_long(sounds: list[str]) -> set[str]:
    """1.1.69: a vowel also stands for its long form."""
    return set(sounds) | {LONG[s] for s in sounds if s in LONG}


AC = with_long(pratyahara("a", "c"))  # every vowel
IK = with_long(pratyahara("i", "k"))  # i u ṛ ḷ, short and long
AK = with_long(pratyahara("a", "k"))  # a i u ṛ ḷ, short and long
YAN = dict(zip(["i", "u", "ṛ", "ḷ"], pratyahara("y", "ṇ")))  # paired by list order
SHORT = {v: k for k, v in LONG.items()} | {k: k for k in LONG}
GUNA = {"i": "e", "u": "o", "ṛ": "ar"}  # 1.1.2 a, e, o; 1.1.51 adds r after a for r

RULES = [  # (number, condition on the 2 vowels, result, rules it is an exception to)
    ("6.1.77", lambda x, y: x in IK and y in AC, lambda x, y: YAN[SHORT.get(x, x)] + y, []),
    ("6.1.87", lambda x, y: x in "aā" and y in AC, lambda x, y: GUNA.get(SHORT.get(y, y), y), []),
    ("6.1.88", lambda x, y: x in "aā" and y in "eo", lambda x, y: {"e": "ai", "o": "au"}[y],
     ["6.1.87"]),
    ("6.1.101", lambda x, y: x in AK and SHORT.get(x) == SHORT.get(y),
     lambda x, y: LONG[SHORT[x]], ["6.1.77", "6.1.87"]),
]


def join(left: str, right: str) -> str:
    """Join 2 words: an exception blocks its general rule; otherwise the later rule wins (1.4.2)."""
    x, y = left[-1], right[0]
    candidates = [rule for rule in RULES if rule[1](x, y)]
    blocked = {number for rule in candidates for number in rule[3]}
    remaining = [rule for rule in candidates if rule[0] not in blocked]
    if not remaining:
        return left + right
    _, _, result, _ = remaining[-1]  # RULES is in sutra order
    return left[:-1] + result(x, y) + right[1:]


print(join("sudhī", "upāsyaḥ"))  # 6.1.77: sudhyupāsyaḥ
print(join("upa", "indraḥ"))  # 6.1.87: upendraḥ
print(join("kṛṣṇa", "ṛddhiḥ"))  # 6.1.87 with 1.1.51: kṛṣṇarddhiḥ
print(join("kṛṣṇa", "ekatvam"))  # 6.1.88 is an exception to 6.1.87: kṛṣṇaikatvam
print(join("daitya", "ariḥ"))  # 6.1.101 is an exception to 6.1.87: daityāriḥ
print(join("śrī", "īśaḥ"))  # 6.1.101 is an exception to 6.1.77: śrīśaḥ

The repo version is fuller:

  • it handles ai and au, word boundaries, and the verbal prefixes 6.1.91 and 6.1.94 need, checked against the Kāśikāvṛtti’s list of 22;
  • it picks substitutes by place of articulation (1.1.50), and treats ṛ and ḷ as 1 class, as the vārttika under 1.1.9 says;
  • it records each step with the rules that applied, the one chosen, and why, runs the tripādī last, and refuses junctions where 2 vowels do not meet.

The tests check:

  • the 41 pratyaharas the Kāśikāvṛtti lists, and its verse on how many each marker forms;
  • 22 vowel-sandhi examples and 6 verb examples from the Laghusiddhāntakaumudī, 2 from the Kāśikāvṛtti (upārcchati, and khaṭvarcchati with no prefix), and Kiparsky’s upelayati, each with the rule that produced it;
  • Kiparsky’s sentence, the upa + eti case, and the hara iha example under 8.2.1;
  • property tests with Hypothesis: for every pair of 12 vowels, the rules give the same result as the standard vowel-sandhi table, written out separately in the test without Panini’s rules, and 1 rule closes every junction.

I removed each rule and guard in turn and confirmed a test fails. Without the exception step, upa + eti comes out upeti; without the prefix check, iha + ejate comes out ihejate.

Against Backus-Naur form

Backus-Naur form (BNF) is the notation the ALGOL 60 report used to define the language’s syntax. The report credits John Backus’s 1959 paper for it, and Peter Naur edited the report. Donald Knuth’s 1964 letter to the Communications of the ACM argued for the name “Backus-Naur form”. A rule from the revised report:

<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<unsigned integer> ::= <digit> | <unsigned integer> <digit>

Each rule says that a named class (<digit>) is made of one of several sequences. The left side is always a single name, and the rules can be read in any order. That makes BNF a notation for context-free grammars: it defines which strings belong to the language and how they break into parts.

Ingerman’s letter calls Panini’s notation “equivalent in its power to that of Backus” with “many similar properties”, and points to alternatives and names that stand for classes. He proposes “Panini-Backus form” to give credit to the earlier inventor.

Here is how the 2 compare in the part of the grammar I implemented:

BNFPanini’s sound rules
What a rule saysa class is one of these sequencesin place of A, put B, next to C
Contextnone: the left side is 1 namestated by case endings, left (ablative) and right (locative)
Order of rulesdoes not mattermatters: exceptions and 1.4.2 for conflicts, 8.2.1 for the last 3 quarters
Directiondescribes which strings are well formedderives a form from its parts, step by step
Names for classes<digit>, <letter>pratyaharas such as ac, hal, ik

Ingerman’s point holds for the last row: both systems name classes with short tokens and define them once, and Panini’s pratyaharas do that for sounds. The other rows differ. Iko yaṇ aci has a context, and a single BNF production cannot state a context, because its left side is 1 name. The order of application and the principles for conflicts have no counterpart in BNF. The closest modern relatives of Panini’s sound rules are the ordered rewrite rules of generative phonology, and Kiparsky draws that comparison for the tripādī. Dominik Wujastyk made a similar objection to the “Panini-Backus” name on the Indology mailing list in 1993: in his reading BNF describes a grammar, while the Ashtadhyayi is a grammar.

The model here covers 10 sutras out of about 4,000, all from sound joining. It does not show anything about the rest of the grammar, which builds words from roots and suffixes and assigns meanings and cases.

Parallels and lineage

  • John Backus (1959) and the ALGOL 60 report (1960, revised 1963). BNF as above. Ingerman himself appears in the revised report’s list of advisers to the April 1962 meeting in Rome. Ingerman’s letter says Backus found the notation independently.
  • Pingala. A late tradition makes Pingala, whose rules for meter are in the previous post, Panini’s younger brother.

What is debated

  • The reach of 1.4.2. It sits in a section headed by 1.4.1 ā kaḍārād ekā saṃjñā, which governs technical names. The tradition applies “the later rule wins” across the whole grammar. Kiparsky writes that it “is today generally agreed” that the principle is restricted to that section, with conflicts elsewhere settled by other principles such as blocking. In this model 1.4.2 decides nothing, which fits Kiparsky’s reading.
  • Which rule is an exception to which. The sutras do not label their exceptions; the commentators do. The Laghusiddhāntakaumudī calls 6.1.88 an exception to guṇa. The Kāśikāvṛtti names 6.1.91 an exception to 6.1.87, 6.1.94 to 6.1.88, and 6.1.109 to the ay, av of 6.1.78. Kiparsky shows 6.1.101 blocking 6.1.77 and 6.1.87, and 6.1.89 blocking 6.1.94. The model declares each of these, with its source, in the code.
  • The ranking of principles. Nagesa’s Paribhāṣenduśekhara ranks 5 grounds for one rule overriding another, each stronger than the last: earlier, later (para), always applicable (nitya), internally conditioned (antaraṅga) and exception (apavāda). My model uses the exception ground, with the later ground as a fallback that no test case reaches.
  • Who wrote the Shiva Sutras. Tradition attributes them to the god Shiva, hence the name. Whether Panini composed them or took them over is discussed in the literature; I have not read a source that settles it.

Key takeaways

  • The Ashtadhyayi is Panini’s grammar of Sanskrit: about 4,000 sutras in 8 chapters of 4 quarters each. Its date is debated, with proposals from 700 BCE to 100 CE (Singh).
  • Its sound rules are context-sensitive rewrites: case endings mark what is replaced (genitive), the substitute (nominative) and the context (locative, ablative).
  • The 14 Shiva Sutras give short names for classes of sounds, and 1.1.71 defines how to read them.
  • An exception blocks its general rule, which settles every conflict in this model, and 8.2.1 makes the last 3 quarters apply in order, invisible to the rules before them. Without 8.2.1, hare + iha comes out as the wrong hareha.
  • BNF and Panini share named classes. They differ in context, ordering and direction. The code and tests are in ancient-algorithms.

Sources

  • Pāṇini, Aṣṭādhyāyī, GRETIL e-texts: the mula text from the Kāśikāvṛtti (Aryendra Sharma’s edition, Hyderabad 1969 to 1985) and the alternative version. Sutra numbers were checked against both, except 1.1.49, 1.1.50, 1.1.51, 1.1.66, 1.1.67, 1.1.69 and 1.1.71, which are missing from the first e-text and were checked against the alternative version only.
  • Jayāditya and Vāmana, Kāśikāvṛtti, GRETIL. The Shiva Sutras and the list of pratyaharas.
  • Varadarāja, Laghusiddhāntakaumudī, GRETIL. The vowel-sandhi section, for examples and places of articulation.
  • Nāgeśa, Paribhāṣenduśekhara, GRETIL.
  • P. Kiparsky, “On the architecture of Pāṇini’s grammar”. Lectures given in Hyderabad in 2002, revised text.
  • P. Z. Ingerman, “‘Pānini-Backus form’ suggested”. Communications of the ACM 10(3), March 1967, 137 to 138.
  • D. E. Knuth, “Backus normal form vs. Backus Naur form”. Communications of the ACM 7(12), December 1964, 735 to 736.
  • P. Naur (editor), “Revised report on the algorithmic language ALGOL 60”. Communications of the ACM 6(1), January 1963, 1 to 17. Text.
  • D. Wujastyk, “Panini’s grammar and Boolean logic”, Indology mailing list, 8 October 1993.
  • P. Singh, “The so-called Fibonacci numbers in ancient and medieval India”. Historia Mathematica 12 (1985), 229 to 244. For the range of proposed dates.
  • J. Shah, “A history of Piṅgala’s combinatorics”. Northeastern University.
  • D. Mumford, “Review of Mathematics in India by Kim Plofker”. Notices of the AMS, March 2010.

Footnotes

  1. The verse runs ekasmān ṅañaṇavaṭā dvābhyāṃ ṣas tribhya eva kaṇamāḥ syuḥ, jñeyau cayau caturbhyo raḥ pañcabhyaḥ śalau ṣaḍbhyaḥ: the markers ṅ, ñ, ṇ, v and ṭ each form 1 pratyahara, ṣ forms 2, k, ṇ and m form 3, c and y form 4, r forms 5, and ś and l form 6. The 2 ṇ’s are counted separately. The test suite checks the 41 names against these counts. ↩

Common questions

Who wrote the Ashtadhyayi?↓

The grammarian Panini (Pāṇini). His date is not known; proposals range from 700 BCE to 100 CE (Parmanand Singh, 1985). The text reaches us with commentaries by Katyayana and Patanjali, and later the Kasikavrtti of Jayaditya and Vamana.

What does Ashtadhyayi mean?↓

Aṣṭādhyāyī means a work in 8 chapters: aṣṭa is eight and adhyāya is a chapter or lesson. Each chapter has 4 quarters (pāda), so every sutra has a 3-part number such as 6.1.77: chapter 6, quarter 1, sutra 77.

What is the first grammar of Sanskrit?↓

The Ashtadhyayi is the oldest Sanskrit grammar that survives complete. It is not the first one written: Panini names earlier grammarians in his rules, among them Apisali (6.1.92), Kasyapa (1.2.25), Gargya (8.3.20), Sakatayana (3.4.111) and Sakalya (8.3.19).

Is Panini's grammar the same as Backus-Naur form?↓

No. Backus-Naur form writes context-free rules that say which strings belong to a language, and the order of the rules does not matter. Panini's sound rules replace one sound with another in a stated context, and which rule applies is settled by principles: a special rule blocks a general one, the later rule wins a conflict (1.4.2), and the last 3 quarters run in order (8.2.1). The 2 share a metalanguage with short names for classes, which is what Ingerman's 1967 letter pointed to.

What are the Shiva Sutras?↓

The Shiva Sutras (Māheśvara sūtras) are 14 lines that list the sounds of Sanskrit, each line ending in a marker consonant. A sound plus a marker names every sound from that sound to the marker: ac is every vowel, hal every consonant, ik the vowels i, u, ṛ, ḷ. Panini uses these names, pratyaharas, throughout the Ashtadhyayi.

Share this
← More writing Get in touch