Knowledge

Ambiguous grammar

Source 📝

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

Index

Inherently ambiguous language
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

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