Knowledge

Ambiguous grammar

Source 📝

289: 568:
on the alphabet of 0 and 1 has the unambiguous context-free grammar S → 0S0 | 1S1 | ε. An arbitrary string of this language cannot be parsed without reading all its symbols first, which means that a pushdown automaton has to try alternative state transitions to accommodate for the different possible
791: 584:
While some context-free languages (the set of strings that can be generated by a grammar) have both ambiguous and unambiguous grammars, there exist context-free languages for which no unambiguous context-free grammar can exist. Such languages are called
103:…meaning that the nonterminal A can be derived to either itself again, or to the empty string. Thus the empty string has leftmost derivations of length 1, 2, 3, and indeed of any length, depending on how many times the rule A → A is used. 929: 1343: 609: 1098: 1017: 1424: 1308: 1177: 494:
is an unambiguous grammar for the language { 0+0, 0+1, 1+0, 1+1 }. While each of these four strings has only one leftmost derivation, it has two different derivations, for example
465:
mandatory. In other cases the grammar is left ambiguous, but the ambiguity is resolved by making the overall phrase grammar context-sensitive, such as by associating an
329:
Concretely, in many languages one may write conditionals in two valid forms: the if-then form, and the if-then-else form – in effect, making the else clause optional:
572:
Nevertheless, removing grammar ambiguity may produce a deterministic context-free grammar and thus allow for more efficient parsing. Compiler generators such as
1182:
More examples, and a general review of techniques for proving inherent ambiguity of context-free languages, are found given by Bassino and Nicaud (2011).
802: 95:
The simplest example is the following ambiguous grammar (with start symbol A) for the trivial language that consists of only the empty string:
457:
This is resolved in various ways in different languages. Sometimes the grammar is modified so that it is unambiguous, such as by requiring an
1365: 1233: 295:
The language that it generates, however, is not inherently ambiguous; the following is a non-ambiguous grammar generating the same language:
326:
statement is optional, which results in nested conditionals having multiple ways of being recognized in terms of the context-free grammar.
55:
are always unambiguous, and are an important subclass of unambiguous grammars; there are non-deterministic unambiguous grammars, however.
1830: 538: 323: 288: 107: 52: 1649: 1753: 1726: 1433: 1349: 1317: 786:{\displaystyle \{x|x=a^{n}b^{m}a^{n^{\prime }}b^{m}{\text{ or }}x=a^{n}b^{m}a^{n}b^{m^{\prime }},{\text{ where }}n,n',m,m'\geq 1\}} 481:
The existence of multiple derivations of the same string does not suffice to indicate that the grammar is ambiguous; only multiple
1223: 542: 47:
admits an ambiguous grammar by introducing e.g. a duplicate rule. A language that only admits ambiguous grammars is called an
1703: 1100:
is inherently ambiguous. This set is context-free, since the union of two context-free languages is always context-free. But
1022: 941: 1808: 1496: 576:
include features for resolving some kinds of ambiguity, such as by using the precedence and associativity constraints.
527: 1833:- tool for analyzing context-free grammars with respect to language universality, ambiguity, and similar properties. 1107: 118:…meaning that the unique production can produce only the empty string, which is the unique string in the language. 1846: 1763:
Brabrand, Claus; Giegerich, Robert; Møller, Anders (March 2010). "Analyzing Ambiguity of Context-Free Grammars".
67: 32: 1104:
give a proof that any context-free grammar for this union language cannot unambiguously parse strings of form
1334: 161:
tree (for the unambiguous grammar) or allowing both left- and right- association. This is elaborated below.
79: 1772: 600: 550: 75: 44: 219:→ A + A + A (First A is replaced by A+A. Replacement of the second A would yield a similar derivation) 498: 170: 59: 28: 564:
Unambiguous context-free grammars can be nondeterministic. For example, the language of even-length
1777: 1745: 1691: 1203: 596: 523: 36: 121:
In the same way, any grammar for a non-empty language can be made ambiguous by adding duplicates.
66:
problem. If present, these ambiguities are generally resolved by adding precedence rules or other
1851: 1614: 1566: 1478: 537:
The efficiency of parsing a context-free grammar is determined by the automaton that accepts it.
1749: 1722: 1699: 1643:"Philippe Flajolet & Analytic Combinatorics: Inherent Ambiguity of Context-Free Languages" 1606: 1558: 1470: 1429: 1361: 1313: 1229: 554: 158: 70:
parsing rules, so the overall phrase grammar is unambiguous. Some parsing algorithms (such as
473:. In this latter case the grammar is unambiguous, but the context-free grammar is ambiguous. 1782: 1737: 1677: 1598: 1548: 1462: 1393: 1353: 1262: 932: 796: 519: 130: 20: 1642: 1738: 1419: 1415: 1303: 1299: 531: 1682: 1665: 1397: 1840: 1715: 1411: 1295: 558: 315: 309: 78:
parsers) can generate sets of parse trees (or "parse forests") from strings that are
71: 63: 1618: 1570: 1482: 1381: 1197: 1357: 1282: 1786: 1267: 1250: 180:
is ambiguous since there are two leftmost derivations for the string a + a + a:
924:{\displaystyle \{a^{n}b^{m}c^{m}|m,n\geq 1\}\cup \{a^{m}b^{m}c^{n}|m,n\geq 1\}} 1191: 565: 280: 40: 1610: 1562: 1474: 1450: 595:
The existence of inherently ambiguous context-free languages was proven with
1466: 546: 1553: 1536: 485:
derivations (or, equivalently, multiple parse trees) indicate ambiguity.
1586: 1602: 314:
A common example of ambiguity in computer programming languages is the
106:
This language also has an unambiguous grammar, consisting of a single
62:, the reference grammar is often ambiguous, due to issues such as the 1524:. Quarterly Progress Report, Research Laboratory of Electronics, MIT. 1384:(July 1965). "On the translation of languages from left to right". 799:
can be used to prove that certain context-free languages, such as
1497:"formal languages - Can regular expressions be made unambiguous?" 1335:"Analyzing Context-Free Grammars Using an Incremental SAT Solver" 279:
As another example, the grammar is ambiguous since there are two
573: 1344:
International Colloquium on Automata, Languages and Programming
1824: 1225:
An Introduction to the Theory of Formal Languages and Automata
1194:, a type of parser for ambiguous and nondeterministic grammars 728: 660: 358:
some ambiguous phrase structures can appear. The expression
1717:
Introduction to Automata Theory, Languages, and Computation
1425:
Introduction to automata theory, languages, and computation
1312:(2nd ed.). Addison-Wesley. Theorem 9.20, pp. 405–406. 1309:
Introduction to automata theory, languages, and computation
1740:
Introduction to Automata Theory, Languages and Computation
1736:
Hopcroft, John; Motwani, Rajeev; Ullman, Jeffrey (2001).
1641:
Fredérique Bassino and Cyril Nicaud (December 16, 2011).
1333:
Axelsson, Roland; Heljanko, Keijo; Lange, Martin (2008).
557:
and can be parsed in polynomial time, for example by the
1449:
Book, R.; Even, S.; Greibach, S.; Ott, G. (Feb 1971).
1352:. Vol. 5126. Springer-Verlag. pp. 410–422. 1283:
An efficient augmented-context-free parsing algorithm
1110: 1093:{\displaystyle \{a^{n}b^{m}c^{m}d^{n}\mid n,m>0\}} 1025: 1012:{\displaystyle \{a^{n}b^{n}c^{m}d^{m}\mid n,m>0\}} 944: 805: 612: 592:
There are no inherently ambiguous regular languages.
526:
because it can be shown that it is equivalent to the
545:
and can be parsed in linear time, for example by an
48: 1714: 1428:(2nd ed.). Addison-Wesley. pp. 249–253. 1285:." Computational linguistics 13.1-2 (1987): 31-46. 1171: 1092: 1011: 923: 785: 534:for detecting ambiguity of context-free grammars. 1587:"A helpful result for proving inherent ambiguity" 1255:Electronic Notes in Theoretical Computer Science 522:of whether an arbitrary grammar is ambiguous is 477:An unambiguous grammar with multiple derivations 1666:"Inherent ambiguity of minimal linear grammars" 1200:, another type of parser for ambiguous grammars 1713:Hopcroft, John E.; Ullman, Jeffrey D. (1979). 1101: 530:. At least, there are tools implementing some 510:Only the former derivation is a leftmost one. 1172:{\displaystyle a^{n}b^{n}c^{n}d^{n},(n>0)} 8: 1251:"SPPF-Style Parsing From Earley Recognizers" 1087: 1026: 1006: 945: 918: 865: 859: 806: 780: 613: 355:Statement | ... Condition → ... 133:of unary strings of a given character, say 1776: 1744:(2nd ed.). Addison Wesley. pp.  1681: 1552: 1266: 1145: 1135: 1125: 1115: 1109: 1063: 1053: 1043: 1033: 1024: 982: 972: 962: 952: 943: 898: 892: 882: 872: 839: 833: 823: 813: 804: 738: 727: 722: 712: 702: 692: 677: 671: 659: 654: 644: 634: 619: 611: 1800: 1214: 1696:Introduction to Formal Language Theory 1451:"Ambiguity in Graphs and Expressions" 149:…but also has the ambiguous grammar: 7: 539:Deterministic context-free grammars 53:Deterministic context-free grammars 1249:Scott, Elizabeth (April 1, 2008). 569:lengths of a semi-parsed string. 549:. They are a strict subset of the 332:In a grammar containing the rules 14: 1664:Gross, Maurice (September 1964). 1350:Lecture Notes in Computer Science 1721:(1st ed.). Addison-Wesley. 1655:from the original on 2022-09-25. 931:, are inherently ambiguous. See 488:For example, the simple grammar 318:problem. In many languages, the 287: 283:for the string a + a − a: 157:These correspond to producing a 141:), has the unambiguous grammar: 1827:- a grammar ambiguity analyzer. 1765:Science of Computer Programming 1535:Parikh, Rohit J. (1966-10-01). 543:deterministic pushdown automata 1520:Parikh, Rohit (January 1961). 1455:IEEE Transactions on Computers 1346:(ICALP'08), Reykjavik, Iceland 1166: 1154: 899: 840: 620: 580:Inherently ambiguous languages 514:Recognizing ambiguous grammars 16:Type of a context-free grammar 1: 1683:10.1016/S0019-9958(64)90422-X 1398:10.1016/S0019-9958(65)90426-2 1228:. John Benjamins Publishing. 446:is associated with the first 49:inherently ambiguous language 1358:10.1007/978-3-540-70583-3_34 1222:Willem J. M. Levelt (2008). 1102:Hopcroft & Ullman (1979) 603:in an MIT research report. 35:that can have more than one 1807:The following example uses 1787:10.1016/j.scico.2009.11.002 1591:Mathematical Systems Theory 1585:Ogden, William (Sep 1968). 1537:"On Context-Free Languages" 1522:Language-generating devices 1268:10.1016/j.entcs.2008.03.044 528:Post correspondence problem 182: 1868: 507:S ⇒ A + A ⇒ A + 0 ⇒ 0 + 0 307: 793:is inherently ambiguous. 442:depending on whether the 268:     250:     232:     214:     195:     31:for which there exists a 1771:(3). Elsevier: 176–191. 1342:Proceedings of the 35th 553:, which are accepted by 382:can be parsed as either 343:Statement | 260:     242:     224:     206:     186:     165:Addition and subtraction 137:(the regular expression 1670:Information and Control 1467:10.1109/t-c.1971.223204 1386:Information and Control 532:semi-decision procedure 80:syntactically ambiguous 1173: 1094: 1013: 925: 787: 501:A + A ⇒ 0 + A ⇒ 0 + 0 1554:10.1145/321356.321364 1174: 1095: 1014: 926: 788: 551:context-free grammars 299:A → A + a | A − a | a 176:A → A + A | A − A | a 60:programming languages 45:context-free language 1108: 1023: 942: 803: 610: 587:inherently ambiguous 491:S → A + A A → 0 | 1 461:statement or making 171:context free grammar 29:context-free grammar 1204:Syntactic ambiguity 37:leftmost derivation 1698:. Addison-Wesley. 1631:p.99-103, Sect.4.7 1603:10.1007/bf01694004 1541:Journal of the ACM 1169: 1090: 1009: 921: 783: 43:. Every non-empty 1692:Michael, Harrison 1367:978-3-540-70582-6 1281:Tomita, Masaru. " 1235:978-90-272-3250-2 741: 740: where  680: 555:pushdown automata 469:with the nearest 277: 276: 159:right-associative 68:context-sensitive 25:ambiguous grammar 1859: 1847:Formal languages 1825:dk.brics.grammar 1812: 1805: 1790: 1780: 1759: 1743: 1732: 1720: 1709: 1687: 1685: 1657: 1656: 1654: 1647: 1638: 1632: 1629: 1623: 1622: 1582: 1576: 1575:Here: Theorem 3. 1574: 1556: 1532: 1526: 1525: 1517: 1511: 1510: 1508: 1507: 1493: 1487: 1486: 1446: 1440: 1439: 1408: 1402: 1401: 1378: 1372: 1371: 1339: 1330: 1324: 1323: 1292: 1286: 1279: 1273: 1272: 1270: 1246: 1240: 1239: 1219: 1178: 1176: 1175: 1170: 1150: 1149: 1140: 1139: 1130: 1129: 1120: 1119: 1099: 1097: 1096: 1091: 1068: 1067: 1058: 1057: 1048: 1047: 1038: 1037: 1018: 1016: 1015: 1010: 987: 986: 977: 976: 967: 966: 957: 956: 930: 928: 927: 922: 902: 897: 896: 887: 886: 877: 876: 843: 838: 837: 828: 827: 818: 817: 792: 790: 789: 784: 773: 756: 742: 739: 734: 733: 732: 731: 717: 716: 707: 706: 697: 696: 681: 678: 676: 675: 666: 665: 664: 663: 649: 648: 639: 638: 623: 597:Parikh's theorem 541:are accepted by 520:decision problem 472: 468: 464: 460: 453: 449: 445: 321: 291: 183: 140: 136: 131:regular language 91:Trivial language 21:computer science 1867: 1866: 1862: 1861: 1860: 1858: 1857: 1856: 1837: 1836: 1821: 1816: 1815: 1806: 1802: 1797: 1762: 1756: 1735: 1729: 1712: 1706: 1690: 1663: 1660: 1652: 1645: 1640: 1639: 1635: 1630: 1626: 1584: 1583: 1579: 1534: 1533: 1529: 1519: 1518: 1514: 1505: 1503: 1495: 1494: 1490: 1448: 1447: 1443: 1436: 1420:Ullman, Jeffrey 1416:Motwani, Rajeev 1410: 1409: 1405: 1380: 1379: 1375: 1368: 1337: 1332: 1331: 1327: 1320: 1304:Ullman, Jeffrey 1300:Motwani, Rajeev 1294: 1293: 1289: 1280: 1276: 1248: 1247: 1243: 1236: 1221: 1220: 1216: 1212: 1188: 1141: 1131: 1121: 1111: 1106: 1105: 1059: 1049: 1039: 1029: 1021: 1020: 978: 968: 958: 948: 940: 939: 888: 878: 868: 829: 819: 809: 801: 800: 766: 749: 723: 718: 708: 698: 688: 667: 655: 650: 640: 630: 608: 607: 582: 516: 508: 502: 492: 479: 470: 466: 462: 458: 451: 447: 443: 440: 410: 380: 356: 319: 312: 306: 167: 153:A → aA | Aa | ε 138: 134: 127: 108:production rule 93: 88: 17: 12: 11: 5: 1865: 1863: 1855: 1854: 1849: 1839: 1838: 1835: 1834: 1828: 1820: 1819:External links 1817: 1814: 1813: 1799: 1798: 1796: 1793: 1792: 1791: 1778:10.1.1.86.3118 1760: 1754: 1733: 1727: 1710: 1704: 1688: 1676:(3): 366–368. 1659: 1658: 1633: 1624: 1597:(3): 191–194. 1577: 1547:(4): 570–581. 1527: 1512: 1488: 1461:(2): 149–153. 1441: 1434: 1412:Hopcroft, John 1403: 1392:(6): 607–639. 1373: 1366: 1325: 1318: 1296:Hopcroft, John 1287: 1274: 1241: 1234: 1213: 1211: 1208: 1207: 1206: 1201: 1195: 1187: 1184: 1168: 1165: 1162: 1159: 1156: 1153: 1148: 1144: 1138: 1134: 1128: 1124: 1118: 1114: 1089: 1086: 1083: 1080: 1077: 1074: 1071: 1066: 1062: 1056: 1052: 1046: 1042: 1036: 1032: 1028: 1008: 1005: 1002: 999: 996: 993: 990: 985: 981: 975: 971: 965: 961: 955: 951: 947: 920: 917: 914: 911: 908: 905: 901: 895: 891: 885: 881: 875: 871: 867: 864: 861: 858: 855: 852: 849: 846: 842: 836: 832: 826: 822: 816: 812: 808: 782: 779: 776: 772: 769: 765: 762: 759: 755: 752: 748: 745: 737: 730: 726: 721: 715: 711: 705: 701: 695: 691: 687: 684: 679: or  674: 670: 662: 658: 653: 647: 643: 637: 633: 629: 626: 622: 618: 615: 581: 578: 515: 512: 506: 496: 490: 478: 475: 414: 384: 360: 334: 324:If–then(–else) 308:Main article: 305: 302: 301: 300: 293: 292: 275: 274: 271: 269: 266: 263: 261: 257: 256: 253: 251: 248: 245: 243: 239: 238: 235: 233: 230: 227: 225: 221: 220: 217: 215: 212: 209: 207: 203: 202: 199: 196: 193: 190: 187: 178: 177: 166: 163: 155: 154: 147: 146: 126: 123: 116: 115: 101: 100: 92: 89: 87: 84: 15: 13: 10: 9: 6: 4: 3: 2: 1864: 1853: 1850: 1848: 1845: 1844: 1842: 1832: 1829: 1826: 1823: 1822: 1818: 1810: 1804: 1801: 1794: 1788: 1784: 1779: 1774: 1770: 1766: 1761: 1757: 1755:9780201441246 1751: 1747: 1742: 1741: 1734: 1730: 1728:9780201029888 1724: 1719: 1718: 1711: 1707: 1701: 1697: 1693: 1689: 1684: 1679: 1675: 1671: 1667: 1662: 1661: 1651: 1644: 1637: 1634: 1628: 1625: 1620: 1616: 1612: 1608: 1604: 1600: 1596: 1592: 1588: 1581: 1578: 1572: 1568: 1564: 1560: 1555: 1550: 1546: 1542: 1538: 1531: 1528: 1523: 1516: 1513: 1502: 1498: 1492: 1489: 1484: 1480: 1476: 1472: 1468: 1464: 1460: 1456: 1452: 1445: 1442: 1437: 1435:0-201-44124-1 1431: 1427: 1426: 1421: 1417: 1413: 1407: 1404: 1399: 1395: 1391: 1387: 1383: 1377: 1374: 1369: 1363: 1359: 1355: 1351: 1347: 1345: 1336: 1329: 1326: 1321: 1319:0-201-44124-1 1315: 1311: 1310: 1305: 1301: 1297: 1291: 1288: 1284: 1278: 1275: 1269: 1264: 1260: 1256: 1252: 1245: 1242: 1237: 1231: 1227: 1226: 1218: 1215: 1209: 1205: 1202: 1199: 1196: 1193: 1190: 1189: 1185: 1183: 1180: 1163: 1160: 1157: 1151: 1146: 1142: 1136: 1132: 1126: 1122: 1116: 1112: 1103: 1084: 1081: 1078: 1075: 1072: 1069: 1064: 1060: 1054: 1050: 1044: 1040: 1034: 1030: 1003: 1000: 997: 994: 991: 988: 983: 979: 973: 969: 963: 959: 953: 949: 938:The union of 936: 935:for a proof. 934: 915: 912: 909: 906: 903: 893: 889: 883: 879: 873: 869: 862: 856: 853: 850: 847: 844: 834: 830: 824: 820: 814: 810: 798: 797:Ogden's lemma 794: 777: 774: 770: 767: 763: 760: 757: 753: 750: 746: 743: 735: 724: 719: 713: 709: 703: 699: 693: 689: 685: 682: 672: 668: 656: 651: 645: 641: 635: 631: 627: 624: 616: 606:The language 604: 602: 598: 593: 590: 588: 579: 577: 575: 570: 567: 562: 560: 559:CYK algorithm 556: 552: 548: 544: 540: 535: 533: 529: 525: 521: 513: 511: 505: 500: 495: 489: 486: 484: 476: 474: 455: 439: 435: 431: 427: 424: 421: 417: 413: 408: 405: 401: 397: 394: 391: 387: 383: 378: 374: 370: 367: 363: 359: 354: 350: 346: 342: 338: 333: 330: 327: 325: 317: 316:dangling else 311: 310:Dangling else 304:Dangling else 303: 298: 297: 296: 290: 286: 285: 284: 282: 272: 270: 267: 264: 262: 259: 258: 254: 252: 249: 246: 244: 241: 240: 236: 234: 231: 228: 226: 223: 222: 218: 216: 213: 210: 208: 205: 204: 200: 197: 194: 191: 188: 185: 184: 181: 175: 174: 173: 172: 164: 162: 160: 152: 151: 150: 144: 143: 142: 132: 124: 122: 119: 113: 112: 111: 109: 104: 98: 97: 96: 90: 85: 83: 81: 77: 73: 69: 65: 64:dangling else 61: 58:For computer 56: 54: 50: 46: 42: 38: 34: 30: 26: 22: 1803: 1768: 1764: 1739: 1716: 1695: 1673: 1669: 1636: 1627: 1594: 1590: 1580: 1544: 1540: 1530: 1521: 1515: 1504:. Retrieved 1501:MathOverflow 1500: 1491: 1458: 1454: 1444: 1423: 1406: 1389: 1385: 1382:Knuth, D. E. 1376: 1341: 1328: 1307: 1290: 1277: 1261:(2): 53–67. 1258: 1254: 1244: 1224: 1217: 1198:Chart parser 1181: 937: 795: 605: 601:Rohit Parikh 594: 591: 586: 583: 571: 563: 536: 517: 509: 503: 493: 487: 482: 480: 456: 441: 437: 433: 429: 425: 422: 419: 415: 411: 406: 403: 399: 395: 392: 389: 385: 381: 376: 372: 368: 365: 361: 357: 352: 348: 344: 340: 336: 335:Statement → 331: 328: 313: 294: 278: 273:→ a + a + a 265:→ a + a + a 255:→ a + a + A 247:→ a + a + A 237:→ a + A + A 229:→ a + A + A 179: 168: 156: 148: 128: 125:Unary string 120: 117: 105: 102: 94: 57: 24: 18: 1831:CFGAnalyzer 599:in 1961 by 566:palindromes 524:undecidable 281:parse trees 1841:Categories 1705:0201029553 1506:2023-02-23 1210:References 1192:GLR parser 450:or second 351:Statement 347:Condition 339:Condition 145:A → aA | ε 41:parse tree 1852:Ambiguity 1773:CiteSeerX 1611:0025-5661 1563:0004-5411 1475:0018-9340 1070:∣ 989:∣ 933:this page 913:≥ 863:∪ 854:≥ 775:≥ 729:′ 661:′ 547:LR parser 99:A → A | ε 1694:(1978). 1650:Archived 1619:13197551 1571:12263468 1483:20676251 1422:(2001). 1306:(2001). 1186:See also 771:′ 754:′ 483:leftmost 211:→ a + A 201:→ A + A 192:→ A + A 86:Examples 1811:syntax 1809:Pascal 1775:  1752:  1725:  1702:  1617:  1609:  1569:  1561:  1481:  1473:  1432:  1364:  1316:  1232:  412:or as 322:in an 72:Earley 33:string 1795:Notes 1653:(PDF) 1646:(PDF) 1615:S2CID 1567:S2CID 1479:S2CID 1338:(PDF) 1019:with 459:endif 423:begin 393:begin 114:A → ε 27:is a 23:, an 1750:ISBN 1723:ISBN 1700:ISBN 1607:ISSN 1559:ISSN 1471:ISSN 1459:C-20 1430:ISBN 1362:ISBN 1314:ISBN 1230:ISBN 1161:> 1082:> 1001:> 574:YACC 518:The 504:and 467:else 463:else 444:else 434:else 430:then 420:then 407:else 400:then 390:then 377:else 373:then 366:then 353:else 349:then 341:then 320:else 169:The 129:The 1783:doi 1746:217 1678:doi 1599:doi 1549:doi 1463:doi 1394:doi 1354:doi 1263:doi 1259:203 561:. 438:end 436:s2 409:s2 404:end 379:s2 135:'a' 76:GLR 74:or 39:or 19:In 1843:: 1781:. 1769:75 1767:. 1748:. 1672:. 1668:. 1648:. 1613:. 1605:. 1593:. 1589:. 1565:. 1557:. 1545:13 1543:. 1539:. 1499:. 1477:. 1469:. 1457:. 1453:. 1418:; 1414:; 1388:. 1360:. 1348:. 1340:. 1302:; 1298:; 1257:. 1253:. 1179:. 589:. 497:S 471:if 454:. 452:if 448:if 432:s 428:b 426:if 418:a 416:if 402:s 398:b 396:if 388:a 386:if 375:s 371:b 369:if 364:a 362:if 345:if 337:if 139:a* 110:: 82:. 51:. 1789:. 1785:: 1758:. 1731:. 1708:. 1686:. 1680:: 1674:7 1621:. 1601:: 1595:2 1573:. 1551:: 1509:. 1485:. 1465:: 1438:. 1400:. 1396:: 1390:8 1370:. 1356:: 1322:. 1271:. 1265:: 1238:. 1167:) 1164:0 1158:n 1155:( 1152:, 1147:n 1143:d 1137:n 1133:c 1127:n 1123:b 1117:n 1113:a 1088:} 1085:0 1079:m 1076:, 1073:n 1065:n 1061:d 1055:m 1051:c 1045:m 1041:b 1035:n 1031:a 1027:{ 1007:} 1004:0 998:m 995:, 992:n 984:m 980:d 974:m 970:c 964:n 960:b 954:n 950:a 946:{ 919:} 916:1 910:n 907:, 904:m 900:| 894:n 890:c 884:m 880:b 874:m 870:a 866:{ 860:} 857:1 851:n 848:, 845:m 841:| 835:m 831:c 825:m 821:b 815:n 811:a 807:{ 781:} 778:1 768:m 764:, 761:m 758:, 751:n 747:, 744:n 736:, 725:m 720:b 714:n 710:a 704:m 700:b 694:n 690:a 686:= 683:x 673:m 669:b 657:n 652:a 646:m 642:b 636:n 632:a 628:= 625:x 621:| 617:x 614:{ 499:⇒ 198:A 189:A

Index

computer science
context-free grammar
string
leftmost derivation
parse tree
context-free language
inherently ambiguous language
Deterministic context-free grammars
programming languages
dangling else
context-sensitive
Earley
GLR
syntactically ambiguous
production rule
regular language
right-associative
context free grammar
parse trees
Leftmostderivations jaredwf.svg
Dangling else
dangling else
If–then(–else)

decision problem
undecidable
Post correspondence problem
semi-decision procedure
Deterministic context-free grammars
deterministic pushdown automata

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.