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
|
<!DOCTYPE html><html><head>
<title>pt::rde - Parser Tools</title>
<style type="text/css"><!--
HTML {
background: #FFFFFF;
color: black;
}
BODY {
background: #FFFFFF;
color: black;
}
DIV.doctools {
margin-left: 10%;
margin-right: 10%;
}
DIV.doctools H1,DIV.doctools H2 {
margin-left: -5%;
}
H1, H2, H3, H4 {
margin-top: 1em;
font-family: sans-serif;
font-size: large;
color: #005A9C;
background: transparent;
text-align: left;
}
H1.doctools_title {
text-align: center;
}
UL,OL {
margin-right: 0em;
margin-top: 3pt;
margin-bottom: 3pt;
}
UL LI {
list-style: disc;
}
OL LI {
list-style: decimal;
}
DT {
padding-top: 1ex;
}
UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
font: normal 12pt/14pt sans-serif;
list-style: none;
}
LI.doctools_section, LI.doctools_subsection {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
PRE {
display: block;
font-family: monospace;
white-space: pre;
margin: 0%;
padding-top: 0.5ex;
padding-bottom: 0.5ex;
padding-left: 1ex;
padding-right: 1ex;
width: 100%;
}
PRE.doctools_example {
color: black;
background: #f5dcb3;
border: 1px solid black;
}
UL.doctools_requirements LI, UL.doctools_syntax LI {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
DIV.doctools_synopsis {
color: black;
background: #80ffff;
border: 1px solid black;
font-family: serif;
margin-top: 1em;
margin-bottom: 1em;
}
UL.doctools_syntax {
margin-top: 1em;
border-top: 1px solid black;
}
UL.doctools_requirements {
margin-bottom: 1em;
border-bottom: 1px solid black;
}
--></style>
</head>
<!-- Generated from file 'pt_rdengine.man' by tcllib/doctools with format 'html'
-->
<!-- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
-->
<!-- pt::rde.n
-->
<body><hr> [
<a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::rde(n) 1.1 tcllib "Parser Tools"</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::rde - Parsing Runtime Support, PARAM based</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Class API</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object API</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::rde <span class="opt">?1.1?</span></b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::stack 1.5</b></li>
<li>package require <b class="pkgname">pt::ast 1.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::rde</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">reset</b> <i class="arg">chan</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">complete</b></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">chan</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">line</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">column</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">current</b></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">location</b></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">locations</b></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">ok</b></a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">value</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">error</b></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">errors</b></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">tokens</b> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#16"><i class="arg">objectName</i> <b class="method">symbols</b></a></li>
<li><a href="#17"><i class="arg">objectName</i> <b class="method">known</b></a></li>
<li><a href="#18"><i class="arg">objectName</i> <b class="method">reducible</b></a></li>
<li><a href="#19"><i class="arg">objectName</i> <b class="method">asts</b></a></li>
<li><a href="#20"><i class="arg">objectName</i> <b class="method">ast</b></a></li>
<li><a href="#21"><i class="arg">objectName</i> <b class="method">position</b> <i class="arg">loc</i></a></li>
<li><a href="#22"><i class="arg">objectName</i> <b class="method">i_input_next</b> <i class="arg">msg</i></a></li>
<li><a href="#23"><i class="arg">objectName</i> <b class="method">i_test_alnum</b></a></li>
<li><a href="#24"><i class="arg">objectName</i> <b class="method">i_test_alpha</b></a></li>
<li><a href="#25"><i class="arg">objectName</i> <b class="method">i_test_ascii</b></a></li>
<li><a href="#26"><i class="arg">objectName</i> <b class="method">i_test_char</b> <i class="arg">char</i></a></li>
<li><a href="#27"><i class="arg">objectName</i> <b class="method">i_test_ddigit</b></a></li>
<li><a href="#28"><i class="arg">objectName</i> <b class="method">i_test_digit</b></a></li>
<li><a href="#29"><i class="arg">objectName</i> <b class="method">i_test_graph</b></a></li>
<li><a href="#30"><i class="arg">objectName</i> <b class="method">i_test_lower</b></a></li>
<li><a href="#31"><i class="arg">objectName</i> <b class="method">i_test_print</b></a></li>
<li><a href="#32"><i class="arg">objectName</i> <b class="method">i_test_punct</b></a></li>
<li><a href="#33"><i class="arg">objectName</i> <b class="method">i_test_range</b> <i class="arg">chars</i> <i class="arg">chare</i></a></li>
<li><a href="#34"><i class="arg">objectName</i> <b class="method">i_test_space</b></a></li>
<li><a href="#35"><i class="arg">objectName</i> <b class="method">i_test_upper</b></a></li>
<li><a href="#36"><i class="arg">objectName</i> <b class="method">i_test_wordchar</b></a></li>
<li><a href="#37"><i class="arg">objectName</i> <b class="method">i_test_xdigit</b></a></li>
<li><a href="#38"><i class="arg">objectName</i> <b class="method">i_error_clear</b></a></li>
<li><a href="#39"><i class="arg">objectName</i> <b class="method">i_error_push</b></a></li>
<li><a href="#40"><i class="arg">objectName</i> <b class="method">i_error_pop_merge</b></a></li>
<li><a href="#41"><i class="arg">objectName</i> <b class="method">i_error_nonterminal</b> <i class="arg">symbol</i></a></li>
<li><a href="#42"><i class="arg">objectName</i> <b class="method">i_status_ok</b></a></li>
<li><a href="#43"><i class="arg">objectName</i> <b class="method">i_status_fail</b></a></li>
<li><a href="#44"><i class="arg">objectName</i> <b class="method">i_status_negate</b></a></li>
<li><a href="#45"><i class="arg">objectName</i> <b class="method">i_loc_push</b></a></li>
<li><a href="#46"><i class="arg">objectName</i> <b class="method">i_loc_pop_discard</b></a></li>
<li><a href="#47"><i class="arg">objectName</i> <b class="method">i_loc_pop_rewind</b></a></li>
<li><a href="#48"><i class="arg">objectName</i> <b class="method">i:ok_loc_pop_rewind</b></a></li>
<li><a href="#49"><i class="arg">objectName</i> <b class="method">i_loc_pop_rewind/discard</b></a></li>
<li><a href="#50"><i class="arg">objectName</i> <b class="method">i_symbol_restore</b> <i class="arg">symbol</i></a></li>
<li><a href="#51"><i class="arg">objectName</i> <b class="method">i_symbol_save</b> <i class="arg">symbol</i></a></li>
<li><a href="#52"><i class="arg">objectName</i> <b class="method">i_value_clear</b></a></li>
<li><a href="#53"><i class="arg">objectName</i> <b class="method">i_value_clear/leaf</b></a></li>
<li><a href="#54"><i class="arg">objectName</i> <b class="method">i_value_clear/reduce</b></a></li>
<li><a href="#55"><i class="arg">objectName</i> <b class="method">i:ok_ast_value_push</b></a></li>
<li><a href="#56"><i class="arg">objectName</i> <b class="method">i_ast_push</b></a></li>
<li><a href="#57"><i class="arg">objectName</i> <b class="method">i_ast_pop_rewind</b></a></li>
<li><a href="#58"><i class="arg">objectName</i> <b class="method">i:fail_ast_pop_rewind</b></a></li>
<li><a href="#59"><i class="arg">objectName</i> <b class="method">i_ast_pop_rewind/discard</b></a></li>
<li><a href="#60"><i class="arg">objectName</i> <b class="method">i_ast_pop_discard</b></a></li>
<li><a href="#61"><i class="arg">objectName</i> <b class="method">i_ast_pop_discard/rewind</b></a></li>
<li><a href="#62"><i class="arg">objectName</i> <b class="method">i:ok_continue</b></a></li>
<li><a href="#63"><i class="arg">objectName</i> <b class="method">i:fail_continue</b></a></li>
<li><a href="#64"><i class="arg">objectName</i> <b class="method">i:fail_return</b></a></li>
<li><a href="#65"><i class="arg">objectName</i> <b class="method">i:ok_return</b></a></li>
<li><a href="#66"><i class="arg">objectName</i> <b class="method">si:void_state_push</b></a></li>
<li><a href="#67"><i class="arg">objectName</i> <b class="method">si:void2_state_push</b></a></li>
<li><a href="#68"><i class="arg">objectName</i> <b class="method">si:value_state_push</b></a></li>
<li><a href="#69"><i class="arg">objectName</i> <b class="method">si:void_state_merge</b></a></li>
<li><a href="#70"><i class="arg">objectName</i> <b class="method">si:void_state_merge_ok</b></a></li>
<li><a href="#71"><i class="arg">objectName</i> <b class="method">si:value_state_merge</b></a></li>
<li><a href="#72"><i class="arg">objectName</i> <b class="method">si:value_notahead_start</b></a></li>
<li><a href="#73"><i class="arg">objectName</i> <b class="method">si:void_notahead_exit</b></a></li>
<li><a href="#74"><i class="arg">objectName</i> <b class="method">si:value_notahead_exit</b></a></li>
<li><a href="#75"><i class="arg">objectName</i> <b class="method">si:kleene_abort</b></a></li>
<li><a href="#76"><i class="arg">objectName</i> <b class="method">si:kleene_close</b></a></li>
<li><a href="#77"><i class="arg">objectName</i> <b class="method">si:voidvoid_branch</b></a></li>
<li><a href="#78"><i class="arg">objectName</i> <b class="method">si:voidvalue_branch</b></a></li>
<li><a href="#79"><i class="arg">objectName</i> <b class="method">si:valuevoid_branch</b></a></li>
<li><a href="#80"><i class="arg">objectName</i> <b class="method">si:valuevalue_branch</b></a></li>
<li><a href="#81"><i class="arg">objectName</i> <b class="method">si:voidvoid_part</b></a></li>
<li><a href="#82"><i class="arg">objectName</i> <b class="method">si:voidvalue_part</b></a></li>
<li><a href="#83"><i class="arg">objectName</i> <b class="method">si:valuevalue_part</b></a></li>
<li><a href="#84"><i class="arg">objectName</i> <b class="method">si:value_symbol_start</b> <i class="arg">symbol</i></a></li>
<li><a href="#85"><i class="arg">objectName</i> <b class="method">si:value_void_symbol_start</b> <i class="arg">symbol</i></a></li>
<li><a href="#86"><i class="arg">objectName</i> <b class="method">si:void_symbol_start</b> <i class="arg">symbol</i></a></li>
<li><a href="#87"><i class="arg">objectName</i> <b class="method">si:void_void_symbol_start</b> <i class="arg">symbol</i></a></li>
<li><a href="#88"><i class="arg">objectName</i> <b class="method">si:reduce_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#89"><i class="arg">objectName</i> <b class="method">si:void_leaf_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#90"><i class="arg">objectName</i> <b class="method">si:value_leaf_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#91"><i class="arg">objectName</i> <b class="method">si:value_clear_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#92"><i class="arg">objectName</i> <b class="method">si:void_clear_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#93"><i class="arg">objectName</i> <b class="method">si:next_char</b> <i class="arg">tok</i></a></li>
<li><a href="#94"><i class="arg">objectName</i> <b class="method">si:next_range</b> <i class="arg">toks</i> <i class="arg">toke</i></a></li>
<li><a href="#95"><i class="arg">objectName</i> <b class="method">si:next_alnum</b></a></li>
<li><a href="#96"><i class="arg">objectName</i> <b class="method">si:next_alpha</b></a></li>
<li><a href="#97"><i class="arg">objectName</i> <b class="method">si:next_ascii</b></a></li>
<li><a href="#98"><i class="arg">objectName</i> <b class="method">si:next_ddigit</b></a></li>
<li><a href="#99"><i class="arg">objectName</i> <b class="method">si:next_digit</b></a></li>
<li><a href="#100"><i class="arg">objectName</i> <b class="method">si:next_graph</b></a></li>
<li><a href="#101"><i class="arg">objectName</i> <b class="method">si:next_lower</b></a></li>
<li><a href="#102"><i class="arg">objectName</i> <b class="method">si:next_print</b></a></li>
<li><a href="#103"><i class="arg">objectName</i> <b class="method">si:next_punct</b></a></li>
<li><a href="#104"><i class="arg">objectName</i> <b class="method">si:next_space</b></a></li>
<li><a href="#105"><i class="arg">objectName</i> <b class="method">si:next_upper</b></a></li>
<li><a href="#106"><i class="arg">objectName</i> <b class="method">si:next_wordchar</b></a></li>
<li><a href="#107"><i class="arg">objectName</i> <b class="method">si:next_xdigit</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a class whose instances provide the runtime
support for recursive descent parsers with backtracking, as is needed
for the execution of, for example, parsing expression grammars. It
implements the <i class="term"><a href="pt_param.html">PackRat Machine Specification</a></i>, as such that
document is <em>required</em> reading to understand both this manpage,
and the package itself. The description below does make numerous
shorthand references to the PARAM's instructions and the various parts
of its architectural state.</p>
<p>The package resides in the Execution section of the Core Layer of
Parser Tools.</p>
<p><img alt="arch_core_transform" src="../../../../image/arch_core_transform.png"></p>
<p>Note: This package not only has the standard Tcl implementation, but
also an accelerator, i.e. a C implementation, based on Critcl.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Class API</a></h3>
<p>The package exports the API described here.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::rde</b> <i class="arg">objectName</i></a></dt>
<dd><p>The command creates a new runtime object for a recursive descent
parser with backtracking and returns the fully qualified name of the
object command as its result. The API of this object command is
described in the section <span class="sectref"><a href="#subsection2">Object API</a></span>. It may be used to
invoke various operations on the object.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object API</a></h3>
<p>All objects created by this package provide the following 63 methods
for the manipulation and querying of their state, which is, in essence
the architectural state of a PARAM.</p>
<p>First some general methods and the state accessors.</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object, releasing all claimed memory, and
deleting the associated object command.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">reset</b> <i class="arg">chan</i></a></dt>
<dd><p>This method resets the state of the runtme to its defaults, preparing
it for the parsing of the character in the channel <i class="arg">chan</i>, which
becomes IN.</p>
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#read">read</a></b> is properly changed for
push-operation.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">complete</b></a></dt>
<dd><p>This method completes parsing, either returning the AST made from the
elements of ARS, or throwing an error containing the current ER.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">chan</b></a></dt>
<dd><p>This method returns the handle of the channel which is IN.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">line</b></a></dt>
<dd><p>This method returns the line number for the position IN is currently
at. Note that this may not match with the line number for CL, due to
backtracking.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">column</b></a></dt>
<dd><p>This method returns the column for the position IN is currently
at. Note that this may not match with the column for CL, due to
backtracking.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">current</b></a></dt>
<dd><p>This method returns CC.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">location</b></a></dt>
<dd><p>This method returns CL.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">locations</b></a></dt>
<dd><p>This method returns the LS. The topmost entry of the stack will be the
first element of the returned list.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">ok</b></a></dt>
<dd><p>This method returns ST.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">value</b></a></dt>
<dd><p>This method returns SV.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">error</b></a></dt>
<dd><p>This method returns ER. This is either the empty string for an empty
ER, or a list of 2 elements, the location the error is for, and a set
of messages which specify which symbols were expected at the
location. The messages are encoded as one of the possible atomic
parsing expressions (special operators, terminal, range, and
nonterminal operator).</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">errors</b></a></dt>
<dd><p>This method returns ES. The topmost entry of the stack will be the
first element of the returned list. Each entry is encoded as described
for <b class="method">error</b>.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">tokens</b> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>This method returns the part of TC for the range of locations of IN
starting at <i class="arg">from</i> and ending at <i class="arg">to</i>. If <i class="arg">to</i> is not
specified it is taken as identical to <i class="arg">from</i>. If neither argument
is specified the whole of TC is returned.</p>
<p>Each token in the returned list is a list of three elements itself,
containing the character at the location, and the associated line and
column numbers, in this order.</p></dd>
<dt><a name="16"><i class="arg">objectName</i> <b class="method">symbols</b></a></dt>
<dd><p>This method returns a dictionary containing NC. Keys are two-element
lists containing nonterminal symbol and location, in this order. The
values are 4-tuples containing CL, ST, ER, and SV, in this order. ER
is encoded as specified for the method <b class="method">error</b>.</p></dd>
<dt><a name="17"><i class="arg">objectName</i> <b class="method">known</b></a></dt>
<dd><p>This method returns a list containing the keys of SC. They are
encoded in the same manner as is done by method <b class="method">symbols</b>.</p></dd>
<dt><a name="18"><i class="arg">objectName</i> <b class="method">reducible</b></a></dt>
<dd><p>This method returns ARS. The topmost entry of the stack will be the
first element of the returned list</p></dd>
<dt><a name="19"><i class="arg">objectName</i> <b class="method">asts</b></a></dt>
<dd><p>This method returns AS. The topmost entry of the stack will be the
first element of the returned list</p></dd>
<dt><a name="20"><i class="arg">objectName</i> <b class="method">ast</b></a></dt>
<dd><p>This is a convenience method returning the topmost element of ARS.</p></dd>
<dt><a name="21"><i class="arg">objectName</i> <b class="method">position</b> <i class="arg">loc</i></a></dt>
<dd><p>This method returns the line and column numbers for the specified
location of IN, assuming that this location has already been reached
during the parsing process.</p></dd>
</dl>
<p>The following methods implement all PARAM instructions. They all have
the prefix "i_".</p>
<p>The control flow is mainly provided by Tcl's builtin commands, like
<b class="cmd">if</b>, <b class="cmd">while</b>, etc., plus a few guarded variants of PARAM
instructions and Tcl commands.. That means that these instruction
variants will do nothing if their guard condition is not
fulfilled. They can be recognized by the prefix "i:ok_" and "i:fail_",
which denote the value ST has to have for the instruction to execute.</p>
<p>The instructions are listed in the same order they occur in the
<i class="term"><a href="pt_param.html">PackRat Machine Specification</a></i>, with the guard variants
listed after their regular implementation, if any, or in their place.</p>
<dl class="doctools_definitions">
<dt><a name="22"><i class="arg">objectName</i> <b class="method">i_input_next</b> <i class="arg">msg</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">input_next</b>.</p></dd>
<dt><a name="23"><i class="arg">objectName</i> <b class="method">i_test_alnum</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_alnum</b>.</p></dd>
<dt><a name="24"><i class="arg">objectName</i> <b class="method">i_test_alpha</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_alpha</b>.</p></dd>
<dt><a name="25"><i class="arg">objectName</i> <b class="method">i_test_ascii</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_ascii</b>.</p></dd>
<dt><a name="26"><i class="arg">objectName</i> <b class="method">i_test_char</b> <i class="arg">char</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_char</b>.</p></dd>
<dt><a name="27"><i class="arg">objectName</i> <b class="method">i_test_ddigit</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_ddigit</b>.</p></dd>
<dt><a name="28"><i class="arg">objectName</i> <b class="method">i_test_digit</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_digit</b>.</p></dd>
<dt><a name="29"><i class="arg">objectName</i> <b class="method">i_test_graph</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_graph</b>.</p></dd>
<dt><a name="30"><i class="arg">objectName</i> <b class="method">i_test_lower</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_lower</b>.</p></dd>
<dt><a name="31"><i class="arg">objectName</i> <b class="method">i_test_print</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_print</b>.</p></dd>
<dt><a name="32"><i class="arg">objectName</i> <b class="method">i_test_punct</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_punct</b>.</p></dd>
<dt><a name="33"><i class="arg">objectName</i> <b class="method">i_test_range</b> <i class="arg">chars</i> <i class="arg">chare</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_range</b>.</p></dd>
<dt><a name="34"><i class="arg">objectName</i> <b class="method">i_test_space</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_space</b>.</p></dd>
<dt><a name="35"><i class="arg">objectName</i> <b class="method">i_test_upper</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_upper</b>.</p></dd>
<dt><a name="36"><i class="arg">objectName</i> <b class="method">i_test_wordchar</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_wordchar</b>.</p></dd>
<dt><a name="37"><i class="arg">objectName</i> <b class="method">i_test_xdigit</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_xdigit</b>.</p></dd>
<dt><a name="38"><i class="arg">objectName</i> <b class="method">i_error_clear</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">error_clear</b>.</p></dd>
<dt><a name="39"><i class="arg">objectName</i> <b class="method">i_error_push</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">error_push</b>.</p></dd>
<dt><a name="40"><i class="arg">objectName</i> <b class="method">i_error_pop_merge</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">error_pop_merge</b>.</p></dd>
<dt><a name="41"><i class="arg">objectName</i> <b class="method">i_error_nonterminal</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">error_nonterminal</b>.</p></dd>
<dt><a name="42"><i class="arg">objectName</i> <b class="method">i_status_ok</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">status_ok</b>.</p></dd>
<dt><a name="43"><i class="arg">objectName</i> <b class="method">i_status_fail</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">status_fail</b>.</p></dd>
<dt><a name="44"><i class="arg">objectName</i> <b class="method">i_status_negate</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">status_negate</b>.</p></dd>
<dt><a name="45"><i class="arg">objectName</i> <b class="method">i_loc_push</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">loc_push</b>.</p></dd>
<dt><a name="46"><i class="arg">objectName</i> <b class="method">i_loc_pop_discard</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">loc_pop_discard</b>.</p></dd>
<dt><a name="47"><i class="arg">objectName</i> <b class="method">i_loc_pop_rewind</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">loc_pop_rewind</b>.</p></dd>
<dt><a name="48"><i class="arg">objectName</i> <b class="method">i:ok_loc_pop_rewind</b></a></dt>
<dd><p>This guarded method, a variant of <b class="method">i_loc_pop_rewind</b>, executes only
for "ST == ok".</p></dd>
<dt><a name="49"><i class="arg">objectName</i> <b class="method">i_loc_pop_rewind/discard</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">loc_pop_rewind</b> and <b class="cmd">loc_pop_discard</b>. The former
is executed for "ST == fail", the latter for "ST == ok".</p></dd>
<dt><a name="50"><i class="arg">objectName</i> <b class="method">i_symbol_restore</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">symbol_restore</b>.</p>
<p>The boolean result of the check is returned as the result of
the method and can be used with standard Tcl control flow commands.</p></dd>
<dt><a name="51"><i class="arg">objectName</i> <b class="method">i_symbol_save</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">symbol_save</b>.</p></dd>
<dt><a name="52"><i class="arg">objectName</i> <b class="method">i_value_clear</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">value_clear</b>.</p></dd>
<dt><a name="53"><i class="arg">objectName</i> <b class="method">i_value_clear/leaf</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">value_clear</b> and <b class="cmd">value_leaf</b>. The former
is executed for "ST == fail", the latter for "ST == ok".</p></dd>
<dt><a name="54"><i class="arg">objectName</i> <b class="method">i_value_clear/reduce</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">value_clear</b> and <b class="cmd">value_reduce</b>. The former
is executed for "ST == fail", the latter for "ST == ok".</p></dd>
<dt><a name="55"><i class="arg">objectName</i> <b class="method">i:ok_ast_value_push</b></a></dt>
<dd><p>This method implements a guarded variant of the the PARAM instruction
<b class="cmd">ast_value_push</b>, which executes only for "ST == ok".</p></dd>
<dt><a name="56"><i class="arg">objectName</i> <b class="method">i_ast_push</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">ast_push</b>.</p></dd>
<dt><a name="57"><i class="arg">objectName</i> <b class="method">i_ast_pop_rewind</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">ast_pop_rewind</b>.</p></dd>
<dt><a name="58"><i class="arg">objectName</i> <b class="method">i:fail_ast_pop_rewind</b></a></dt>
<dd><p>This guarded method, a variant of <b class="method">i_ast_pop_rewind</b>, executes only
for "ST == fail".</p></dd>
<dt><a name="59"><i class="arg">objectName</i> <b class="method">i_ast_pop_rewind/discard</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">ast_pop_rewind</b> and <b class="cmd">ast_pop_discard</b>. The former
is executed for "ST == fail", the latter for "ST == ok".</p></dd>
<dt><a name="60"><i class="arg">objectName</i> <b class="method">i_ast_pop_discard</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">ast_pop_discard</b>.</p></dd>
<dt><a name="61"><i class="arg">objectName</i> <b class="method">i_ast_pop_discard/rewind</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">ast_pop_discard</b> and <b class="cmd">ast_pop_rewind</b>. The former
is executed for "ST == fail", the latter for "ST == ok".</p></dd>
<dt><a name="62"><i class="arg">objectName</i> <b class="method">i:ok_continue</b></a></dt>
<dd><p>This guarded method executes only for "ST == ok". Then it aborts the
current iteration of the innermost loop in the calling Tcl procedure.</p></dd>
<dt><a name="63"><i class="arg">objectName</i> <b class="method">i:fail_continue</b></a></dt>
<dd><p>This guarded method executes only for "ST == fail". Then it aborts the
current iteration of the innermost loop in the calling Tcl procedure.</p></dd>
<dt><a name="64"><i class="arg">objectName</i> <b class="method">i:fail_return</b></a></dt>
<dd><p>This guarded method executes only for "ST == fail". Then it aborts the
calling Tcl procedure.</p></dd>
<dt><a name="65"><i class="arg">objectName</i> <b class="method">i:ok_return</b></a></dt>
<dd><p>This guarded method executes only for "ST == ok". Then it aborts the
calling Tcl procedure.</p></dd>
</dl>
<p>The next set of methods are <i class="term">super instructions</i>, meaning that
each implements a longer sequence of instructions commonly used in
parsers. The combinated instructions of the previous set, i.e. those
with names matching the pattern "i_*/*", are actually super
instructions as well, albeit with limited scope, handling 2
instructions with their control flow. The upcoming set is much broader
in scope, folding as much as six or more PARAM instructions into a
single method call.</p>
<p>In this we can see the reasoning behind their use well:</p>
<ol class="doctools_enumerated">
<li><p>By using less instructions the generated parsers become smaller, as
the common parts are now truly part of the common runtime, and not
explicitly written in the parser's code over and over again.</p></li>
<li><p>Using less instructions additionally reduces the overhead associated
with calls into the runtime, i.e. the cost of method dispatch and of
setting up the variable context.</p></li>
<li><p>Another effect of the super instructions is that their internals can
be optimized as well, especially regarding control flow, and stack
use, as the runtime internals are accessible to all instructions
folded into the sequence.</p></li>
</ol>
<dl class="doctools_definitions">
<dt><a name="66"><i class="arg">objectName</i> <b class="method">si:void_state_push</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_push
i_error_clear
i_error_push
</pre>
<p>Parsers use it at the beginning of <i class="term">void</i> sequences and choices
with a <i class="term">void</i> initial branch.</p></dd>
<dt><a name="67"><i class="arg">objectName</i> <b class="method">si:void2_state_push</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_push
i_error_clear
i_error_push
</pre>
<p>Parsers use it at the beginning of optional and repeated expressions.</p></dd>
<dt><a name="68"><i class="arg">objectName</i> <b class="method">si:value_state_push</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_ast_push
i_loc_push
i_error_clear
i_error_push
</pre>
<p>Parsers use it at the beginning of sequences generating an AST and
choices with an initial branch generating an AST.</p></dd>
<dt><a name="69"><i class="arg">objectName</i> <b class="method">si:void_state_merge</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_loc_pop_rewind/discard
</pre>
<p>Parsers use it at the end of void sequences and choices whose last
branch is void.</p></dd>
<dt><a name="70"><i class="arg">objectName</i> <b class="method">si:void_state_merge_ok</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_loc_pop_rewind/discard
i_status_ok
</pre>
<p>Parsers use it at the end of optional expressions</p></dd>
<dt><a name="71"><i class="arg">objectName</i> <b class="method">si:value_state_merge</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_ast_pop_rewind/discard
i_loc_pop_rewind/discard
</pre>
<p>Parsers use it at the end of sequences generating ASTs and choices
whose last branch generates an AST</p></dd>
<dt><a name="72"><i class="arg">objectName</i> <b class="method">si:value_notahead_start</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_push
i_ast_push
</pre>
<p>Parsers use it at the beginning of negative lookahead predicates which
generate ASTs.</p></dd>
<dt><a name="73"><i class="arg">objectName</i> <b class="method">si:void_notahead_exit</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_pop_rewind
i_status_negate
</pre>
<p>Parsers use it at the end of void negative lookahead predicates.</p></dd>
<dt><a name="74"><i class="arg">objectName</i> <b class="method">si:value_notahead_exit</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_ast_pop_discard/rewind
i_loc_pop_rewind
i_status_negate
</pre>
<p>Parsers use it at the end of negative lookahead predicates which
generate ASTs.</p></dd>
<dt><a name="75"><i class="arg">objectName</i> <b class="method">si:kleene_abort</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_pop_rewind/discard
i:fail_return
</pre>
<p>Parsers use it to stop a positive repetition when its first, required, expression fails.</p></dd>
<dt><a name="76"><i class="arg">objectName</i> <b class="method">si:kleene_close</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_loc_pop_rewind/discard
i:fail_status_ok
i:fail_return
</pre>
<p>Parsers use it at the end of repetitions.</p></dd>
<dt><a name="77"><i class="arg">objectName</i> <b class="method">si:voidvoid_branch</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:ok_loc_pop_discard
i:ok_return
i_loc_rewind
i_error_push
</pre>
<p>Parsers use it when transiting between branches of a choice when both are void.</p></dd>
<dt><a name="78"><i class="arg">objectName</i> <b class="method">si:voidvalue_branch</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:ok_loc_pop_discard
i:ok_return
i_ast_push
i_loc_rewind
i_error_push
</pre>
<p>Parsers use it when transiting between branches of a choice when the
failing branch is void, and the next to test generates an AST.</p></dd>
<dt><a name="79"><i class="arg">objectName</i> <b class="method">si:valuevoid_branch</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_ast_pop_rewind/discard
i:ok_loc_pop_discard
i:ok_return
i_loc_rewind
i_error_push
</pre>
<p>Parsers use it when transiting between branches of a choice when the
failing branch generates an AST, and the next to test is void.</p></dd>
<dt><a name="80"><i class="arg">objectName</i> <b class="method">si:valuevalue_branch</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_ast_pop_discard
i:ok_loc_pop_discard
i:ok_return
i_ast_rewind
i_loc_rewind
i_error_push
</pre>
<p>Parsers use it when transiting between branches of a choice when both
generate ASTs.</p></dd>
<dt><a name="81"><i class="arg">objectName</i> <b class="method">si:voidvoid_part</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:fail_loc_pop_rewind
i:fail_return
i_error_push
</pre>
<p>Parsers use it when transiting between parts of a sequence and both
are void.</p></dd>
<dt><a name="82"><i class="arg">objectName</i> <b class="method">si:voidvalue_part</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:fail_loc_pop_rewind
i:fail_return
i_ast_push
i_error_push
</pre>
<p>Parsers use it when transiting between parts of a sequence and the
sucessfully matched part is void, and after it an AST is generated.</p></dd>
<dt><a name="83"><i class="arg">objectName</i> <b class="method">si:valuevalue_part</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:fail_ast_pop_rewind
i:fail_loc_pop_rewind
i:fail_return
i_error_push
</pre>
<p>Parsers use it when transiting between parts of a sequence and both
parts generate ASTs.</p></dd>
<dt><a name="84"><i class="arg">objectName</i> <b class="method">si:value_symbol_start</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
if/found? i_symbol_restore $symbol
i:found:ok_ast_value_push
i:found_return
i_loc_push
i_ast_push
</pre>
<p>Parsers use it at the beginning of a nonterminal symbol generating an
AST, whose right-hand side may have generated an AST as well.</p></dd>
<dt><a name="85"><i class="arg">objectName</i> <b class="method">si:value_void_symbol_start</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
if/found? i_symbol_restore $symbol
i:found:ok_ast_value_push
i:found_return
i_loc_push
i_ast_push
</pre>
<p>Parsers use it at the beginning of a void nonterminal symbol whose
right-hand side may generate an AST.</p></dd>
<dt><a name="86"><i class="arg">objectName</i> <b class="method">si:void_symbol_start</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
if/found? i_symbol_restore $symbol
i:found_return
i_loc_push
i_ast_push
</pre>
<p>Parsers use it at the beginning of a nonterminal symbol generating an
AST whose right-hand side is void.</p></dd>
<dt><a name="87"><i class="arg">objectName</i> <b class="method">si:void_void_symbol_start</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
if/found? i_symbol_restore $symbol
i:found_return
i_loc_push
</pre>
<p>Parsers use it at the beginning of a void nonterminal symbol whose
right-hand side is void as well.</p></dd>
<dt><a name="88"><i class="arg">objectName</i> <b class="method">si:reduce_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear/reduce $symbol
i_symbol_save $symbol
i_error_nonterminal $symbol
i_ast_pop_rewind
i_loc_pop_discard
i:ok_ast_value_push
</pre>
<p>Parsers use it at the end of a non-terminal symbol generating an AST
using the AST generated by the right-hand side as child.</p></dd>
<dt><a name="89"><i class="arg">objectName</i> <b class="method">si:void_leaf_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear/leaf $symbol
i_symbol_save $symbol
i_error_nonterminal $symbol
i_loc_pop_discard
i:ok_ast_value_push
</pre>
<p>Parsers use it at the end of a non-terminal symbol generating an AST
whose right-hand side is void.</p></dd>
<dt><a name="90"><i class="arg">objectName</i> <b class="method">si:value_leaf_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear/leaf $symbol
i_symbol_save $symbol
i_error_nonterminal $symbol
i_loc_pop_discard
i_ast_pop_rewind
i:ok_ast_value_push
</pre>
<p>Parsers use it at the end of a non-terminal symbol generating an AST
discarding the AST generated by the right-hand side.</p></dd>
<dt><a name="91"><i class="arg">objectName</i> <b class="method">si:value_clear_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear
i_symbol_save $symbol
i_error_nonterminal $symbol
i_loc_pop_discard
i_ast_pop_rewind
</pre>
<p>Parsers use it at the end of a void non-terminal symbol, discarding
the AST generated by the right-hand side.</p></dd>
<dt><a name="92"><i class="arg">objectName</i> <b class="method">si:void_clear_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear
i_symbol_save $symbol
i_error_nonterminal $symbol
i_loc_pop_discard
</pre>
<p>Parsers use it at the end of a void non-terminal symbol with a void
right-hand side.</p></dd>
<dt><a name="93"><i class="arg">objectName</i> <b class="method">si:next_char</b> <i class="arg">tok</i></a></dt>
<dd></dd>
<dt><a name="94"><i class="arg">objectName</i> <b class="method">si:next_range</b> <i class="arg">toks</i> <i class="arg">toke</i></a></dt>
<dd></dd>
<dt><a name="95"><i class="arg">objectName</i> <b class="method">si:next_alnum</b></a></dt>
<dd></dd>
<dt><a name="96"><i class="arg">objectName</i> <b class="method">si:next_alpha</b></a></dt>
<dd></dd>
<dt><a name="97"><i class="arg">objectName</i> <b class="method">si:next_ascii</b></a></dt>
<dd></dd>
<dt><a name="98"><i class="arg">objectName</i> <b class="method">si:next_ddigit</b></a></dt>
<dd></dd>
<dt><a name="99"><i class="arg">objectName</i> <b class="method">si:next_digit</b></a></dt>
<dd></dd>
<dt><a name="100"><i class="arg">objectName</i> <b class="method">si:next_graph</b></a></dt>
<dd></dd>
<dt><a name="101"><i class="arg">objectName</i> <b class="method">si:next_lower</b></a></dt>
<dd></dd>
<dt><a name="102"><i class="arg">objectName</i> <b class="method">si:next_print</b></a></dt>
<dd></dd>
<dt><a name="103"><i class="arg">objectName</i> <b class="method">si:next_punct</b></a></dt>
<dd></dd>
<dt><a name="104"><i class="arg">objectName</i> <b class="method">si:next_space</b></a></dt>
<dd></dd>
<dt><a name="105"><i class="arg">objectName</i> <b class="method">si:next_upper</b></a></dt>
<dd></dd>
<dt><a name="106"><i class="arg">objectName</i> <b class="method">si:next_wordchar</b></a></dt>
<dd></dd>
<dt><a name="107"><i class="arg">objectName</i> <b class="method">si:next_xdigit</b></a></dt>
<dd><p>These methods all combine</p>
<pre class="doctools_example">
i_input_next $msg
i:fail_return
</pre>
<p>with the appropriate <b class="cmd">i_test_xxx</b> instruction. Parsers use them for
handling atomic expressions.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright © 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net></p>
</div>
</div></body></html>
|