/usr/share/doc/python-pyparsing/htmldoc/pyparsing.pyparsing-module.html is in python-pyparsing 1.5.2-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 | <?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>pyparsing.pyparsing</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th bgcolor="#70b0f0" class="navbar-select"
> Home </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>pyparsing</th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
Package pyparsing ::
Module pyparsing
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="pyparsing.pyparsing-module.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module pyparsing</h1><p class="nomargin-top"><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html">source code</a></span></p>
<p>pyparsing module - Classes and methods to define and execute parsing
grammars</p>
<p>The pyparsing module is an alternative approach to creating and
executing simple grammars, vs. the traditional lex/yacc approach, or the
use of regular expressions. With pyparsing, you don't need to learn a
new syntax for defining grammars or matching expressions - the parsing
module provides a library of classes that you use to construct the
grammar directly in Python.</p>
<p>Here is a program to parse "Hello, World!" (or any greeting
of the form "<salutation>, <addressee>!"):</p>
<pre class="literalblock">
from pyparsing import Word, alphas
# define grammar of a greeting
greet = Word( alphas ) + "," + Word( alphas ) + "!"
hello = "Hello, World!"
print hello, "->", greet.parseString( hello )
</pre>
<p>The program outputs the following:</p>
<pre class="literalblock">
Hello, World! -> ['Hello', ',', 'World', '!']
</pre>
<p>The Python representation of the grammar is quite readable, owing to
the self-explanatory class names, and the use of '+', '|' and '^'
operators.</p>
<p>The parsed results returned from parseString() can be accessed as a
nested list, a dictionary, or an object with named attributes.</p>
<p>The pyparsing module handles some of the problems that are typically
vexing when writing text parsers:</p>
<ul>
<li>
extra or missing whitespace (the above program will also handle
"Hello,World!", "Hello , World !", etc.)
</li>
<li>
quoted strings
</li>
<li>
embedded comments
</li>
</ul>
<hr />
<div class="fields"> <p><strong>Version:</strong>
1.5.2
</p>
<p><strong>Author:</strong>
Paul McGuire <ptmcg@users.sourceforge.net>
</p>
</div><!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Classes</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.ParseBaseException-class.html" class="summary-name">ParseBaseException</a><br />
base exception class for all parsing runtime exceptions
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.ParseException-class.html" class="summary-name">ParseException</a><br />
exception thrown when parse expressions don't match class;
supported attributes by name are:
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.ParseFatalException-class.html" class="summary-name">ParseFatalException</a><br />
user-throwable exception thrown when inconsistent parse content is
found; stops all parsing immediately
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.ParseSyntaxException-class.html" class="summary-name">ParseSyntaxException</a><br />
just like ParseFatalException, but thrown internally when an
ErrorStop indicates that parsing is to stop immediately because an
unbacktrackable syntax error has been found
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.RecursiveGrammarException-class.html" class="summary-name">RecursiveGrammarException</a><br />
exception thrown by validate() if the grammar could be improperly
recursive
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.ParseResults-class.html" class="summary-name">ParseResults</a><br />
Structured parse results, to provide multiple means of access to
the parsed data:
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.ParserElement-class.html" class="summary-name">ParserElement</a><br />
Abstract base level parser element class.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Token-class.html" class="summary-name">Token</a><br />
Abstract ParserElement subclass, for defining atomic matching
patterns.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Empty-class.html" class="summary-name">Empty</a><br />
An empty token, will always match.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.NoMatch-class.html" class="summary-name">NoMatch</a><br />
A token that will never match.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Literal-class.html" class="summary-name">Literal</a><br />
Token to exactly match a specified string.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Keyword-class.html" class="summary-name">Keyword</a><br />
Token to exactly match a specified string as a keyword, that is, it
must be immediately followed by a non-keyword character.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.CaselessLiteral-class.html" class="summary-name">CaselessLiteral</a><br />
Token to match a specified string, ignoring case of letters.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.CaselessKeyword-class.html" class="summary-name">CaselessKeyword</a>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Word-class.html" class="summary-name">Word</a><br />
Token for matching words composed of allowed character sets.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Regex-class.html" class="summary-name">Regex</a><br />
Token for matching strings that match a given regular expression.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.QuotedString-class.html" class="summary-name">QuotedString</a><br />
Token for matching strings that are delimited by quoting
characters.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.CharsNotIn-class.html" class="summary-name">CharsNotIn</a><br />
Token for matching words composed of characters *not* in a given
set.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.White-class.html" class="summary-name">White</a><br />
Special matching class for matching whitespace.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.GoToColumn-class.html" class="summary-name">GoToColumn</a><br />
Token to advance to a specific column of input text; useful for
tabular report scraping.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.LineStart-class.html" class="summary-name">LineStart</a><br />
Matches if current position is at the beginning of a line within
the parse string
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.LineEnd-class.html" class="summary-name">LineEnd</a><br />
Matches if current position is at the end of a line within the
parse string
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.StringStart-class.html" class="summary-name">StringStart</a><br />
Matches if current position is at the beginning of the parse string
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.StringEnd-class.html" class="summary-name">StringEnd</a><br />
Matches if current position is at the end of the parse string
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.WordStart-class.html" class="summary-name">WordStart</a><br />
Matches if the current position is at the beginning of a Word, and
is not preceded by any character in a given set of wordChars
(default=printables).
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.WordEnd-class.html" class="summary-name">WordEnd</a><br />
Matches if the current position is at the end of a Word, and is not
followed by any character in a given set of wordChars
(default=printables).
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.ParseExpression-class.html" class="summary-name">ParseExpression</a><br />
Abstract subclass of ParserElement, for combining and
post-processing parsed tokens.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.And-class.html" class="summary-name">And</a><br />
Requires all given ParseExpressions to be found in the given order.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Or-class.html" class="summary-name">Or</a><br />
Requires that at least one ParseExpression is found.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.MatchFirst-class.html" class="summary-name">MatchFirst</a><br />
Requires that at least one ParseExpression is found.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Each-class.html" class="summary-name">Each</a><br />
Requires all given ParseExpressions to be found, but in any order.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.ParseElementEnhance-class.html" class="summary-name">ParseElementEnhance</a><br />
Abstract subclass of ParserElement, for combining and
post-processing parsed tokens.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.FollowedBy-class.html" class="summary-name">FollowedBy</a><br />
Lookahead matching of the given parse expression.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.NotAny-class.html" class="summary-name">NotAny</a><br />
Lookahead to disallow matching with the given parse expression.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.ZeroOrMore-class.html" class="summary-name">ZeroOrMore</a><br />
Optional repetition of zero or more of the given expression.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.OneOrMore-class.html" class="summary-name">OneOrMore</a><br />
Repetition of one or more of the given expression.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Optional-class.html" class="summary-name">Optional</a><br />
Optional matching of the given expression.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.SkipTo-class.html" class="summary-name">SkipTo</a><br />
Token for skipping over all undefined text until the matched
expression is found.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Forward-class.html" class="summary-name">Forward</a><br />
Forward declaration of an expression to be defined later - used for
recursive grammars, such as algebraic infix notation.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.TokenConverter-class.html" class="summary-name">TokenConverter</a><br />
Abstract subclass of ParseExpression, for converting parsed
results.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Upcase-class.html" class="summary-name">Upcase</a><br />
Converter to upper case all matching tokens.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Combine-class.html" class="summary-name">Combine</a><br />
Converter to concatenate all matching tokens to a single string.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Group-class.html" class="summary-name">Group</a><br />
Converter to return the matched tokens as a list - useful for
returning tokens of ZeroOrMore and OneOrMore expressions.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Dict-class.html" class="summary-name">Dict</a><br />
Converter to return a repetitive expression as a list, but also as
a dictionary.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.Suppress-class.html" class="summary-name">Suppress</a><br />
Converter for ignoring the results of a parsed expression.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing.OnlyOnce-class.html" class="summary-name">OnlyOnce</a><br />
Wrapper for parse actions, to ensure they are only called once.
</td>
</tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Functions</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#col" class="summary-sig-name">col</a>(<span class="summary-sig-arg">loc</span>,
<span class="summary-sig-arg">strg</span>)</span><br />
Returns current column within a string, counting newlines as line
separators.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#col">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#lineno" class="summary-sig-name">lineno</a>(<span class="summary-sig-arg">loc</span>,
<span class="summary-sig-arg">strg</span>)</span><br />
Returns current line number within a string, counting newlines as
line separators.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#lineno">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="line"></a><span class="summary-sig-name">line</span>(<span class="summary-sig-arg">loc</span>,
<span class="summary-sig-arg">strg</span>)</span><br />
Returns the line of text containing loc within a string, counting
newlines as line separators.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#line">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="nullDebugAction"></a><span class="summary-sig-name">nullDebugAction</span>(<span class="summary-sig-arg">*args</span>)</span><br />
'Do-nothing' debug action, to suppress debugging output during
parsing.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#nullDebugAction">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="traceParseAction"></a><span class="summary-sig-name">traceParseAction</span>(<span class="summary-sig-arg">f</span>)</span><br />
Decorator for debugging parse actions.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#traceParseAction">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#delimitedList" class="summary-sig-name">delimitedList</a>(<span class="summary-sig-arg">expr</span>,
<span class="summary-sig-arg">delim</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">,</code><code class="variable-quote">'</code></span>,
<span class="summary-sig-arg">combine</span>=<span class="summary-sig-default">False</span>)</span><br />
Helper to define a delimited list of expressions - the delimiter
defaults to ','.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#delimitedList">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#countedArray" class="summary-sig-name">countedArray</a>(<span class="summary-sig-arg">expr</span>)</span><br />
Helper to define a counted list of expressions.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#countedArray">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#matchPreviousLiteral" class="summary-sig-name">matchPreviousLiteral</a>(<span class="summary-sig-arg">expr</span>)</span><br />
Helper to define an expression that is indirectly defined from the
tokens matched in a previous expression, that is, it looks for a
'repeat' of a previous expression.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#matchPreviousLiteral">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#matchPreviousExpr" class="summary-sig-name">matchPreviousExpr</a>(<span class="summary-sig-arg">expr</span>)</span><br />
Helper to define an expression that is indirectly defined from the
tokens matched in a previous expression, that is, it looks for a
'repeat' of a previous expression.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#matchPreviousExpr">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#oneOf" class="summary-sig-name">oneOf</a>(<span class="summary-sig-arg">strs</span>,
<span class="summary-sig-arg">caseless</span>=<span class="summary-sig-default">False</span>,
<span class="summary-sig-arg">useRegex</span>=<span class="summary-sig-default">True</span>)</span><br />
Helper to quickly define a set of alternative Literals, and makes
sure to do longest-first testing when there is a conflict, regardless
of the input order, but returns a MatchFirst for best performance.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#oneOf">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#dictOf" class="summary-sig-name">dictOf</a>(<span class="summary-sig-arg">key</span>,
<span class="summary-sig-arg">value</span>)</span><br />
Helper to easily and clearly define a dictionary by specifying the
respective patterns for the key and value.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#dictOf">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#originalTextFor" class="summary-sig-name">originalTextFor</a>(<span class="summary-sig-arg">expr</span>,
<span class="summary-sig-arg">asString</span>=<span class="summary-sig-default">True</span>)</span><br />
Helper to return the original, untokenized text for a given
expression.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#originalTextFor">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#srange" class="summary-sig-name">srange</a>(<span class="summary-sig-arg">s</span>)</span><br />
Helper to easily define string ranges for use in Word construction.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#srange">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="matchOnlyAtCol"></a><span class="summary-sig-name">matchOnlyAtCol</span>(<span class="summary-sig-arg">n</span>)</span><br />
Helper method for defining parse actions that require matching at a
specific column in the input text.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#matchOnlyAtCol">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#replaceWith" class="summary-sig-name">replaceWith</a>(<span class="summary-sig-arg">replStr</span>)</span><br />
Helper method for common parse actions that simply return a literal
value.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#replaceWith">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#removeQuotes" class="summary-sig-name">removeQuotes</a>(<span class="summary-sig-arg">s</span>,
<span class="summary-sig-arg">l</span>,
<span class="summary-sig-arg">t</span>)</span><br />
Helper parse action for removing quotation marks from parsed quoted
strings.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#removeQuotes">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="upcaseTokens"></a><span class="summary-sig-name">upcaseTokens</span>(<span class="summary-sig-arg">s</span>,
<span class="summary-sig-arg">l</span>,
<span class="summary-sig-arg">t</span>)</span><br />
Helper parse action to convert tokens to upper case.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#upcaseTokens">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="downcaseTokens"></a><span class="summary-sig-name">downcaseTokens</span>(<span class="summary-sig-arg">s</span>,
<span class="summary-sig-arg">l</span>,
<span class="summary-sig-arg">t</span>)</span><br />
Helper parse action to convert tokens to lower case.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#downcaseTokens">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="keepOriginalText"></a><span class="summary-sig-name">keepOriginalText</span>(<span class="summary-sig-arg">s</span>,
<span class="summary-sig-arg">startLoc</span>,
<span class="summary-sig-arg">t</span>)</span><br />
Helper parse action to preserve original parsed text, overriding any
nested parse actions.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#keepOriginalText">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="getTokensEndLoc"></a><span class="summary-sig-name">getTokensEndLoc</span>()</span><br />
Method to be called from within a parse action to determine the end
location of the parsed tokens.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#getTokensEndLoc">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="makeHTMLTags"></a><span class="summary-sig-name">makeHTMLTags</span>(<span class="summary-sig-arg">tagStr</span>)</span><br />
Helper to construct opening and closing tag expressions for HTML,
given a tag name</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#makeHTMLTags">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="makeXMLTags"></a><span class="summary-sig-name">makeXMLTags</span>(<span class="summary-sig-arg">tagStr</span>)</span><br />
Helper to construct opening and closing tag expressions for XML,
given a tag name</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#makeXMLTags">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#withAttribute" class="summary-sig-name">withAttribute</a>(<span class="summary-sig-arg">*args</span>,
<span class="summary-sig-arg">**attrDict</span>)</span><br />
Helper to create a validating parse action to be used with start tags
created with makeXMLTags or makeHTMLTags.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#withAttribute">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#operatorPrecedence" class="summary-sig-name">operatorPrecedence</a>(<span class="summary-sig-arg">baseExpr</span>,
<span class="summary-sig-arg">opList</span>)</span><br />
Helper method for constructing grammars of expressions made up of
operators working in a precedence hierarchy.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#operatorPrecedence">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#nestedExpr" class="summary-sig-name">nestedExpr</a>(<span class="summary-sig-arg">opener</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">(</code><code class="variable-quote">'</code></span>,
<span class="summary-sig-arg">closer</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">)</code><code class="variable-quote">'</code></span>,
<span class="summary-sig-arg">content</span>=<span class="summary-sig-default">None</span>,
<span class="summary-sig-arg">ignoreExpr</span>=<span class="summary-sig-default">quotedString using single or double quotes</span>)</span><br />
Helper method for defining nested lists enclosed in opening and
closing delimiters ("(" and ")" are the default).</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#nestedExpr">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.pyparsing-module.html#indentedBlock" class="summary-sig-name">indentedBlock</a>(<span class="summary-sig-arg">blockStatementExpr</span>,
<span class="summary-sig-arg">indentStack</span>,
<span class="summary-sig-arg">indent</span>=<span class="summary-sig-default">True</span>)</span><br />
Helper method for defining space-delimited indentation blocks, such
as those used to define block statements in Python source code.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#indentedBlock">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="replaceHTMLEntity"></a><span class="summary-sig-name">replaceHTMLEntity</span>(<span class="summary-sig-arg">t</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#replaceHTMLEntity">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Variables</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="alphas"></a><span class="summary-name">alphas</span> = <code title="'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'"><code class="variable-quote">'</code><code class="variable-string">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="nums"></a><span class="summary-name">nums</span> = <code title="'0123456789'"><code class="variable-quote">'</code><code class="variable-string">0123456789</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="hexnums"></a><span class="summary-name">hexnums</span> = <code title="'0123456789ABCDEFabcdef'"><code class="variable-quote">'</code><code class="variable-string">0123456789ABCDEFabcdef</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing-module.html#alphanums" class="summary-name">alphanums</a> = <code title="'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'"><code class="variable-quote">'</code><code class="variable-string">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing-module.html#printables" class="summary-name">printables</a> = <code title="'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\\
'()*+,-./:;<=>?@[\\]^_`{|}~'"><code class="variable-quote">'</code><code class="variable-string">0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="empty"></a><span class="summary-name">empty</span> = <code title="empty">empty</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="lineStart"></a><span class="summary-name">lineStart</span> = <code title="lineStart">lineStart</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="lineEnd"></a><span class="summary-name">lineEnd</span> = <code title="lineEnd">lineEnd</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="stringStart"></a><span class="summary-name">stringStart</span> = <code title="stringStart">stringStart</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="stringEnd"></a><span class="summary-name">stringEnd</span> = <code title="stringEnd">stringEnd</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="opAssoc"></a><span class="summary-name">opAssoc</span> = <code title="_Constants()">_Constants()</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="dblQuotedString"></a><span class="summary-name">dblQuotedString</span> = <code title="string enclosed in double quotes">string enclosed in double quotes</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="sglQuotedString"></a><span class="summary-name">sglQuotedString</span> = <code title="string enclosed in single quotes">string enclosed in single quotes</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="quotedString"></a><span class="summary-name">quotedString</span> = <code title="quotedString using single or double quotes">quotedString using single or double quotes</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing-module.html#unicodeString" class="summary-name">unicodeString</a> = <code title="Combine:({"u" quotedString using single or double quotes})">Combine:({"u" quotedString using single or dou<code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="pyparsing.pyparsing-module.html#alphas8bit" class="summary-name">alphas8bit</a> = <code title="u'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'"><code class="variable-quote">u'</code><code class="variable-string">ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîï</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="punc8bit"></a><span class="summary-name">punc8bit</span> = <code title="u'¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿×÷'"><code class="variable-quote">u'</code><code class="variable-string">¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿×÷</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="commonHTMLEntity"></a><span class="summary-name">commonHTMLEntity</span> = <code title="Combine:({"&" Re:('gt|lt|amp|nbsp|quot') ";"})">Combine:({"&" Re:('gt|lt|amp|nbsp|quot') ";"})</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="cStyleComment"></a><span class="summary-name">cStyleComment</span> = <code title="C style comment">C style comment</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="htmlComment"></a><span class="summary-name">htmlComment</span> = <code title="Re:('<!--[\\s\\S]*?-->')">Re:('<!--[\\s\\S]*?-->')</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="restOfLine"></a><span class="summary-name">restOfLine</span> = <code title="Re:('.*')">Re:('.*')</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="dblSlashComment"></a><span class="summary-name">dblSlashComment</span> = <code title="// comment">// comment</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="cppStyleComment"></a><span class="summary-name">cppStyleComment</span> = <code title="C++ style comment">C++ style comment</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="javaStyleComment"></a><span class="summary-name">javaStyleComment</span> = <code title="C++ style comment">C++ style comment</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="pythonStyleComment"></a><span class="summary-name">pythonStyleComment</span> = <code title="Python style comment">Python style comment</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="commaSeparatedList"></a><span class="summary-name">commaSeparatedList</span> = <code title="commaSeparatedList">commaSeparatedList</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="anyCloseTag"></a><span class="summary-name">anyCloseTag</span> = <code title="</W:(abcd...,abcd...)>"></W:(abcd...,abcd...)></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="anyOpenTag"></a><span class="summary-name">anyOpenTag</span> = <code title="<W:(abcd...,abcd...)>"><W:(abcd...,abcd...)></code>
</td>
</tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Function Details</span></td>
</tr>
</table>
<a name="col"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">col</span>(<span class="sig-arg">loc</span>,
<span class="sig-arg">strg</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#col">source code</a></span>
</td>
</tr></table>
<p>Returns current column within a string, counting newlines as line
separators. The first column is number 1.</p>
<p>Note: the default parsing behavior is to expand tabs in the input
string before starting the parsing process. See <a
href="pyparsing.pyparsing.ParserElement-class.html#parseString"
class="link"><i>ParserElement.parseString</i></a> for more information on
parsing strings containing <TAB>s, and suggested methods to
maintain a consistent view of the parsed string, the parse location, and
line and column positions within the parsed string.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="lineno"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">lineno</span>(<span class="sig-arg">loc</span>,
<span class="sig-arg">strg</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#lineno">source code</a></span>
</td>
</tr></table>
<p>Returns current line number within a string, counting newlines as line
separators. The first line is number 1.</p>
<p>Note: the default parsing behavior is to expand tabs in the input
string before starting the parsing process. See <a
href="pyparsing.pyparsing.ParserElement-class.html#parseString"
class="link"><i>ParserElement.parseString</i></a> for more information on
parsing strings containing <TAB>s, and suggested methods to
maintain a consistent view of the parsed string, the parse location, and
line and column positions within the parsed string.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="delimitedList"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">delimitedList</span>(<span class="sig-arg">expr</span>,
<span class="sig-arg">delim</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">,</code><code class="variable-quote">'</code></span>,
<span class="sig-arg">combine</span>=<span class="sig-default">False</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#delimitedList">source code</a></span>
</td>
</tr></table>
<p>Helper to define a delimited list of expressions - the delimiter
defaults to ','. By default, the list elements and delimiters can have
intervening whitespace, and comments, but this can be overridden by
passing 'combine=True' in the constructor. If combine is set to True, the
matching tokens are returned as a single token string, with the
delimiters included; otherwise, the matching tokens are returned as a
list of tokens, with the delimiters suppressed.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="countedArray"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">countedArray</span>(<span class="sig-arg">expr</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#countedArray">source code</a></span>
</td>
</tr></table>
<p>Helper to define a counted list of expressions. This helper defines a
pattern of the form:</p>
<pre class="literalblock">
integer expr expr expr...
</pre>
<p>where the leading integer tells how many expr expressions follow. The
matched tokens returns the array of expr tokens as a list - the leading
count token is suppressed.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="matchPreviousLiteral"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">matchPreviousLiteral</span>(<span class="sig-arg">expr</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#matchPreviousLiteral">source code</a></span>
</td>
</tr></table>
<p>Helper to define an expression that is indirectly defined from the
tokens matched in a previous expression, that is, it looks for a 'repeat'
of a previous expression. For example:</p>
<pre class="literalblock">
first = Word(nums)
second = matchPreviousLiteral(first)
matchExpr = first + ":" + second
</pre>
<p>will match "1:1", but not "1:2". Because this
matches a previous literal, will also match the leading "1:1"
in "1:10". If this is not desired, use matchPreviousExpr. Do
*not* use with packrat parsing enabled.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="matchPreviousExpr"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">matchPreviousExpr</span>(<span class="sig-arg">expr</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#matchPreviousExpr">source code</a></span>
</td>
</tr></table>
<p>Helper to define an expression that is indirectly defined from the
tokens matched in a previous expression, that is, it looks for a 'repeat'
of a previous expression. For example:</p>
<pre class="literalblock">
first = Word(nums)
second = matchPreviousExpr(first)
matchExpr = first + ":" + second
</pre>
<p>will match "1:1", but not "1:2". Because this
matches by expressions, will *not* match the leading "1:1" in
"1:10"; the expressions are evaluated first, and then compared,
so "1" is compared with "10". Do *not* use with
packrat parsing enabled.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="oneOf"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">oneOf</span>(<span class="sig-arg">strs</span>,
<span class="sig-arg">caseless</span>=<span class="sig-default">False</span>,
<span class="sig-arg">useRegex</span>=<span class="sig-default">True</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#oneOf">source code</a></span>
</td>
</tr></table>
<p>Helper to quickly define a set of alternative Literals, and makes sure
to do longest-first testing when there is a conflict, regardless of the
input order, but returns a MatchFirst for best performance.</p>
<p>Parameters:</p>
<ul>
<li>
strs - a string of space-delimited literals, or a list of string
literals
</li>
<li>
caseless - (default=False) - treat all literals as caseless
</li>
<li>
useRegex - (default=True) - as an optimization, will generate a Regex
object; otherwise, will generate a MatchFirst object (if
caseless=True, or if creating a Regex raises an exception)
</li>
</ul>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="dictOf"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">dictOf</span>(<span class="sig-arg">key</span>,
<span class="sig-arg">value</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#dictOf">source code</a></span>
</td>
</tr></table>
<p>Helper to easily and clearly define a dictionary by specifying the
respective patterns for the key and value. Takes care of defining the
Dict, ZeroOrMore, and Group tokens in the proper order. The key pattern
can include delimiting markers or punctuation, as long as they are
suppressed, thereby leaving the significant key text. The value pattern
can include named results, so that the Dict results can include named
token fields.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="originalTextFor"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">originalTextFor</span>(<span class="sig-arg">expr</span>,
<span class="sig-arg">asString</span>=<span class="sig-default">True</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#originalTextFor">source code</a></span>
</td>
</tr></table>
<p>Helper to return the original, untokenized text for a given
expression. Useful to restore the parsed fields of an HTML start tag
into the raw tag text itself, or to revert separate tokens with
intervening whitespace back to the original matching input text. Simpler
to use than the parse action keepOriginalText, and does not require the
inspect module to chase up the call stack. By default, returns a string
containing the original parsed text.</p>
<p>If the optional asString argument is passed as False, then the return
value is a ParseResults containing any results names that were originally
matched, and a single token containing the original matched text from the
input string. So if the expression passed to originalTextFor contains
expressions with defined results names, you must set asString to False if
you want to preserve those results name values.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="srange"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">srange</span>(<span class="sig-arg">s</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#srange">source code</a></span>
</td>
</tr></table>
<p>Helper to easily define string ranges for use in Word construction.
Borrows syntax from regexp '[]' string range definitions:</p>
<pre class="literalblock">
srange("[0-9]") -> "0123456789"
srange("[a-z]") -> "abcdefghijklmnopqrstuvwxyz"
srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"
</pre>
<p>The input string must be enclosed in []'s, and the returned string is
the expanded character set joined into a single string. The values
enclosed in the []'s may be:</p>
<pre class="literalblock">
a single character
an escaped character with a leading backslash (such as \- or \])
an escaped hex character with a leading '\0x' (\0x21, which is a '!' character)
an escaped octal character with a leading '\0' (\041, which is a '!' character)
a range of any of the above, separated by a dash ('a-z', etc.)
any combination of the above ('aeiouy', 'a-zA-Z0-9_$', etc.)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="replaceWith"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">replaceWith</span>(<span class="sig-arg">replStr</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#replaceWith">source code</a></span>
</td>
</tr></table>
<p>Helper method for common parse actions that simply return a literal
value. Especially useful when used with transformString().</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="removeQuotes"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">removeQuotes</span>(<span class="sig-arg">s</span>,
<span class="sig-arg">l</span>,
<span class="sig-arg">t</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#removeQuotes">source code</a></span>
</td>
</tr></table>
<p>Helper parse action for removing quotation marks from parsed quoted
strings. To use, add this parse action to quoted string using:</p>
<pre class="literalblock">
quotedString.setParseAction( removeQuotes )
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="withAttribute"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">withAttribute</span>(<span class="sig-arg">*args</span>,
<span class="sig-arg">**attrDict</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#withAttribute">source code</a></span>
</td>
</tr></table>
<p>Helper to create a validating parse action to be used with start tags
created with makeXMLTags or makeHTMLTags. Use withAttribute to qualify a
starting tag with a required attribute value, to avoid false matches on
common tags such as <TD> or <DIV>.</p>
<p>Call withAttribute with a series of attribute names and values.
Specify the list of filter attributes names and values as:</p>
<ul>
<li>
keyword arguments, as in
(class="Customer",align="right"), or
</li>
<li>
a list of name-value tuples, as in ( ("ns1:class",
"Customer"), ("ns2:align","right") )
</li>
</ul>
<p>For attribute names with a namespace prefix, you must use the second
form. Attribute names are matched insensitive to upper/lower case.</p>
<p>To verify that the attribute exists, but without specifying a value,
pass withAttribute.ANY_VALUE as the value.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="operatorPrecedence"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">operatorPrecedence</span>(<span class="sig-arg">baseExpr</span>,
<span class="sig-arg">opList</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#operatorPrecedence">source code</a></span>
</td>
</tr></table>
<p>Helper method for constructing grammars of expressions made up of
operators working in a precedence hierarchy. Operators may be unary or
binary, left- or right-associative. Parse actions can also be attached
to operator expressions.</p>
<p>Parameters:</p>
<ul>
<li>
baseExpr - expression representing the most basic element for the
nested
</li>
<li>
opList - list of tuples, one for each operator precedence level in
the expression grammar; each tuple is of the form (opExpr, numTerms,
rightLeftAssoc, parseAction), where:
<ul>
<li>
opExpr is the pyparsing expression for the operator; may also be
a string, which will be converted to a Literal; if numTerms is 3,
opExpr is a tuple of two expressions, for the two operators
separating the 3 terms
</li>
<li>
numTerms is the number of terms for this operator (must be 1, 2,
or 3)
</li>
<li>
rightLeftAssoc is the indicator whether the operator is right or
left associative, using the pyparsing-defined constants
opAssoc.RIGHT and opAssoc.LEFT.
</li>
<li>
parseAction is the parse action to be associated with expressions
matching this operator expression (the parse action tuple member
may be omitted)
</li>
</ul>
</li>
</ul>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="nestedExpr"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">nestedExpr</span>(<span class="sig-arg">opener</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">(</code><code class="variable-quote">'</code></span>,
<span class="sig-arg">closer</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">)</code><code class="variable-quote">'</code></span>,
<span class="sig-arg">content</span>=<span class="sig-default">None</span>,
<span class="sig-arg">ignoreExpr</span>=<span class="sig-default">quotedString using single or double quotes</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#nestedExpr">source code</a></span>
</td>
</tr></table>
<p>Helper method for defining nested lists enclosed in opening and
closing delimiters ("(" and ")" are the default).</p>
<p>Parameters:</p>
<ul>
<li>
opener - opening character for a nested list (default="(");
can also be a pyparsing expression
</li>
<li>
closer - closing character for a nested list (default=")");
can also be a pyparsing expression
</li>
<li>
content - expression for items within the nested lists (default=None)
</li>
<li>
ignoreExpr - expression for ignoring opening and closing delimiters
(default=quotedString)
</li>
</ul>
<p>If an expression is not provided for the content argument, the nested
expression will capture all whitespace-delimited content between
delimiters as a list of separate values.</p>
<p>Use the ignoreExpr argument to define expressions that may contain
opening or closing characters that should not be treated as opening or
closing characters for nesting, such as quotedString or a comment
expression. Specify multiple expressions using an Or or MatchFirst. The
default is quotedString, but if no expressions are to be ignored, then
pass None for this argument.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="indentedBlock"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">indentedBlock</span>(<span class="sig-arg">blockStatementExpr</span>,
<span class="sig-arg">indentStack</span>,
<span class="sig-arg">indent</span>=<span class="sig-default">True</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing.pyparsing-pysrc.html#indentedBlock">source code</a></span>
</td>
</tr></table>
<p>Helper method for defining space-delimited indentation blocks, such as
those used to define block statements in Python source code.</p>
<p>Parameters:</p>
<ul>
<li>
blockStatementExpr - expression defining syntax of statement that is
repeated within the indented block
</li>
<li>
indentStack - list created by caller to manage indentation stack
(multiple statementWithIndentedBlock expressions within a single
grammar should share a common indentStack)
</li>
<li>
indent - boolean indicating whether block must be indented beyond the
the current level; set to False for block of left-most statements
(default=True)
</li>
</ul>
<p>A valid block must contain at least one blockStatement.</p>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Variables Details</span></td>
</tr>
</table>
<a name="alphanums"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">alphanums</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="printables"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">printables</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">'()*+,-./:;<=>?@[\\]^_`{|}~</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="unicodeString"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">unicodeString</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
Combine:({"u" quotedString using single or double quotes})
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="alphas8bit"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">alphas8bit</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-quote">u'</code><code class="variable-string">ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th bgcolor="#70b0f0" class="navbar-select"
> Home </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>pyparsing</th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Mon Apr 13 16:51:33 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>
|