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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (c) 2021 Stijn van Dongen -->
<head>
<meta name="keywords" content="manual">
<style type="text/css">
/* START aephea.base.css */
body
{ text-align: justify;
margin-left: 0%;
margin-right: 0%;
}
a:link { text-decoration: none; }
a:active { text-decoration: none; }
a:visited { text-decoration: none; }
a:link { color: #1111aa; }
a:active { color: #1111aa; }
a:visited { color: #111166; }
a.local:link { color: #11aa11; }
a.local:active { color: #11aa11; }
a.local:visited { color: #116611; }
a.intern:link { color: #1111aa; }
a.intern:active { color: #1111aa; }
a.intern:visited { color: #111166; }
a.extern:link { color: #aa1111; }
a.extern:active { color: #aa1111; }
a.extern:visited { color: #661111; }
a.quiet:link { color: black; }
a.quiet:active { color: black; }
a.quiet:visited { color: black; }
div.verbatim
{ font-family: monospace;
margin-top: 1em;
margin-bottom: 1em;
font-size: 10pt;
margin-left: 2em;
white-space: pre;
}
div.indent
{ margin-left: 8%;
margin-right: 0%;
}
.right { text-align: right; }
.left { text-align: left; }
.nowrap { white-space: nowrap; }
.item_leader
{ position: relative;
margin-left: 8%;
}
.item_compact { position: absolute; vertical-align: baseline; }
.item_cascade { position: relative; }
.item_leftalign { text-align: left; }
.item_rightalign
{ width: 2em;
text-align: right;
}
.item_compact .item_rightalign
{ position: absolute;
width: 52em;
right: -2em;
text-align: right;
}
.item_text
{ position: relative;
margin-left: 3em;
}
.smallcaps { font-size: smaller; text-transform: uppercase }
/* END aephea.base.css */
body { font-family: "Garamond", "Gill Sans", "Verdana", sans-serif; }
body
{ text-align: justify;
margin-left: 8%;
margin-right: 8%;
}
</style>
<title>zoem</title>
</head>
<body>
<p style="text-align:right">
7 Dec 2021
<a class="local" href="zoem.ps"><b>zoem</b></a>
21-341
</p>
<div class=" itemize " style="margin-top:1em; font-size:100%">
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">1.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#name">NAME</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">2.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#synopsis">SYNOPSIS</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">3.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#description">DESCRIPTION</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">4.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#options">OPTIONS</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">5.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#session">SESSION MACROS</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">6.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#set">THE SET MODIFIERS</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">7.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#inspect">THE INSPECT SUBLANGUAGE</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">8.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#tr">THE TR SUBLANGUAGE</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">9.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#tildexp">TILDE EXPANSION</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">10.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#environment">ENVIRONMENT</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">11.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#diagnostics">DIAGNOSTICS</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">12.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#bugs">BUGS</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">13.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#seealso">SEE ALSO</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">14.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#examples">EXAMPLES</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">15.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#author">AUTHOR</a>
</div>
</div>
<a name="name"></a>
<h2>NAME</h2>
<p style="margin-bottom:0" class="asd_par">
zoem — macro processor for the Zoem macro/programming language.</p>
<a name="synopsis"></a>
<h2>SYNOPSIS</h2>
<p style="margin-bottom:0" class="asd_par">
<b>zoem</b>
<a class="intern" href="#opt-i"><b>[-i</b> <file name>[.azm] (<i>entry file name</i>)<b>]</b></a>
<a class="intern" href="#opt-I"><b>[-I</b> <file name> (<i>entry file name</i>)<b>]</b></a>
<a class="intern" href="#opt-o"><b>[-o</b> <file name> (<i>output file name</i>)<b>]</b></a>
<a class="intern" href="#opt-d"><b>[-d</b> <device> (<i>set device key</i>)<b>]</b></a></p>
<p style="margin-bottom:0" class="asd_par">
<b>zoem</b><br>
(enter interactive mode - happens when none of <b>-i</b>,
<b>-I</b>, <b>-o</b> is given)</p>
<p style="margin-bottom:0" class="asd_par">
<b>zoem</b>
<a class="intern" href="#opt-i"><b>-i</b> <file name>[.azm] (<i>entry file name</i>)</a>
<a class="intern" href="#opt-I"><b>-I</b> <file name> (<i>entry file name</i>)</a>
<a class="intern" href="#opt-o"><b>[-o</b> <file name> (<i>output file name</i>)<b>]</b></a>
<a class="intern" href="#opt-d"><b>[-d</b> <device> (<i>set device key</i>)<b>]</b></a>
<a class="intern" href="#opt-x"><b>[-x</b> (<i>enter interactive mode on error</i>)<b>]</b></a>
<a class="intern" href="#opt-s"><b>[-s</b> <key>[=<val>] (<i>set key to val</i>)<b>]</b></a>
<a class="intern" href="#opt-e"><b>[-e</b> <any> (<i>evaluate any, exit</i>)<b>]</b></a>
<a class="intern" href="#opt-E"><b>[-E</b> <any> (<i>evaluate any, proceed</i>)<b>]</b></a>
<a class="intern" href="#opt-chunk-size"><b>[-chunk-size</b> <num> (<i>process chunks of size num</i>)<b>]</b></a>
<a class="intern" href="#opt--trace"><b>[--trace</b> (<i>trace mode, default</i>)<b>]</b></a>
<a class="intern" href="#opt--trace-all-long"><b>[--trace-all-long</b> (<i>long trace mode</i>)<b>]</b></a>
<a class="intern" href="#opt--trace-all-short"><b>[--trace-all-short</b> (<i>short trace mode</i>)<b>]</b></a>
<a class="intern" href="#opt--trace-regex"><b>[--trace-regex</b> (<i>trace regexes</i>)<b>]</b></a>
<a class="intern" href="#opt-trace"><b>[-trace</b> k (<i>trace mode, explicit</i>)<b>]</b></a>
<a class="intern" href="#opt--stats"><b>[--stats</b> (<i>show symbol table stats after run</i>)<b>]</b></a>
<a class="intern" href="#opt--split"><b>[--split</b> (<i>assume \writeto usage, set \__split__</i>)<b>]</b></a>
<a class="intern" href="#opt--stress-write"><b>[--stress-write</b> (<i>make \write#3 recover</i>)<b>]</b></a>
<a class="intern" href="#opt--unsafe"><b>[--unsafe</b> (<i>prompt for \system#3</i>)<b>]</b></a>
<a class="intern" href="#opt--unsafe-silent"><b>[--unsafe-silent</b> (<i>simply allow \system#3</i>)<b>]</b></a>
<a class="intern" href="#opt-allow"><b>[-allow</b> cmd1[:cmdx]+ (<i>allowable commands</i>)<b>]</b></a>
<a class="intern" href="#opt--system-honor"><b>[--system-honor</b> (<i>require \system#3 to succeed</i>)<b>]</b></a>
<a class="intern" href="#opt-nuser"><b>[-nuser</b> k (<i>user dict stack size</i>)<b>]</b></a>
<a class="intern" href="#opt-nenv"><b>[-nenv</b> k (<i>environment dict stack size</i>)<b>]</b></a>
<a class="intern" href="#opt-nsegment"><b>[-nsegment</b> k (<i>maximum simple nesting depth</i>)<b>]</b></a>
<a class="intern" href="#opt-nstack"><b>[-nstack</b> k (<i>maximum eval nesting depth</i>)<b>]</b></a>
<a class="intern" href="#opt-buser"><b>[-buser</b> (<i>initial user dict capacity</i>)<b>]</b></a>
<a class="intern" href="#opt-bzoem"><b>[-bzoem</b> (<i>initial zoem dict capacity</i>)<b>]</b></a>
<a class="intern" href="#opt-tl"><b>[-tl</b> k (<i>tab length</i>)<b>]</b></a>
<a class="intern" href="#opt-l"><b>[-l</b> <str> (<i>list items</i>)<b>]</b></a>
<a class="intern" href="#opt-h"><b>[-h</b> (<i>show options</i>)<b>]</b></a>
<a class="intern" href="#opt--apropos"><b>[--apropos</b> (<i>show options</i>)<b>]</b></a></p>
<a name="description"></a>
<h2>DESCRIPTION</h2>
<p style="margin-bottom:0" class="asd_par">
Zoem is a macro/programming language. It is fully described in the
<a class="local" href="zum.html">Zoem User Manual</a> , currently available
in HTML only. This manual page documents the zoem processor, not the
zoem language.</p>
<p style="margin-bottom:0" class="asd_par">
If the input file is specified using the <a class="intern" href="#opt-i"><b>-i</b> option</a> and
is a regular file (i.e. not STDIN - which is specified by using a single
hyphen), it must have the extension <tt>.azm</tt>. This extension can but need
not be specified. The zoem key <b>\__fnbase__</b> will be set to the file base
name stripped of the <tt>.azm</tt> extension and any leading path components.
If the input file is specified
using the <a class="intern" href="#opt-I"><b>-I</b> option</a>, no extension is assumed, and
<b>\__fnbase__</b> is set to the file base name, period. The file base name is
the file name with any leading path components stripped away.</p>
<p style="margin-bottom:0" class="asd_par">
If neither <b>-i</b> nor <b>-o</b> is specified, zoem enters interactive
mode. Zoem should fully recover from any error it encounters in the input.
If you find an exception to this rule, consider filing a bug report. In
interactive mode, zoem start interpreting once it encounters a line
containing a single dot. Zoem's input behaviour can be modified by setting
the key <b>\__parmode__</b>. See the section <a class="intern" href="#session">SESSION MACROS</a> for the details.
In interactive mode, zoem does <i>not</i> preprocess the interactive
input, implying that it does not accept inline files and it does not
recognize comments. Both types of sequence will generate syntax errors.
Finally, readline editing and history retrieval can be used in interactive
mode provided that they are available on the system. This means
that the input lines can be retrieved, edited, and discarded with
a wide range of cursor positioning and text manipulation commands.
</p>
<p style="margin-bottom:0" class="asd_par">
From within the entry file and included files it is possible to open and
write to arbitrary files using the <b>\write#3</b> primitive. Arbitrary files
can be read in various modes using the <b>\dofile#2</b> macro (providing four
different modes with respect to file existence and output), <b>\finsert#1</b>,
and <b>\zinsert#1</b>.
Zoem will write the default output to a single file, the name of which is
either specified by the <b>-o</b> option, or constructed as described
below. Zoem can split the default output among multiple files. This is
governed from within the input files by issuing <b>\writeto#1</b> calls. Refer
to the <a class="intern" href="#opt--split"><b>--split</b> option</a> and the
<a class="local" href="zum.html">Zoem User Manual</a>.</p>
<p style="margin-bottom:0" class="asd_par">
If none of <b>-i</b> or <b>-o</b> is given, then zoem will enter
interactive mode. In this mode, zoem interprets by default chunks of
text that are ended by a single dot on a line of its own. This can be
useful for testing or debugging. In interactive mode, zoem should recover
from any failure it encounters. Interactive mode can also be accessed from
within a file by issuing <tt>\zinsert{stdia}</tt>, and it can be triggered as
the mode to enter should an error occur (by adding the
<a class="intern" href="#opt-x"><b>-x</b> option</a> to the command line).</p>
<p style="margin-bottom:0" class="asd_par">
If <b>-o</b> is given and <b>-i</b> is not,
zoem reads input from STDIN.</p>
<p style="margin-bottom:0" class="asd_par">
If <b>-i</b> is given and <b>-o</b> is not, zoem will construct an
output file name as follows. If the <b>-d</b> option was used with
argument <tt><dev></tt>, zoem will write to the file which results from
expanding <b>\__fnbase__.<dev></b>. Otherwise, zoem writes to (the expansion
of) <b>\__fnbase__.ozm</b>.</p>
<p style="margin-bottom:0" class="asd_par">
For <b>-i</b> and <b>-o</b>, the argument <tt>-</tt>
is interpreted as respectively <tt>stdin</tt> and <tt>stdout</tt>.</p>
<a name="options"></a>
<h2>OPTIONS</h2>
<div class=" itemize " style="margin-top:1em; font-size:100%">
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-i"></a><b>-i</b> <file name>[.azm] (<i>entry file name</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Specify the entry file name. The file must have the <tt>.azm</tt>
extension, but it need not be specified.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-I"></a><b>-I</b> <file name>[.azm] (<i>entry file name</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Specify the entry file name, without restrictions on the file name.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-o"></a><b>-o</b> <file name> (<i>output file name</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Specify the output file name.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-d"></a><b>-d</b> <device> (<i>set key \__device__</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Set the key <b>\__device__</b> to <tt><device></tt>.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-x"></a><b>-x</b> (<i>enter interactive mode on error</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The afterlife option. If zoem encounters an error during
regular processing, it will emit error messages as usual,
and then enter interactive mode. This allows you e.g.
to inspect the values of keys used or defined within
the problematic area.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-s"></a><b>-s</b> <key>[=<val>] (<i>set key to val</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Set the key <b>\key</b> to <b>val</b> if present, <b>1</b> otherwise.
Any type of key can be set, including keys taking arguments and keys
surrounded in quotes. Beware of the shell's quote and backslash
interpolation.
Currently <b>val</b> is not evaluated, so appending or prepending
to a key is not possible.
</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-e"></a><b>-e</b> <any> (<i>evaluate any, exit</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
This causes zoem to evaluate <tt><any></tt>,
write any result text to stdout, and exit.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-E"></a><b>-E</b> <any> (<i>evaluate any, proceed</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
This causes zoem to evaluate <tt><any></tt>,
write any result text to stdout, and proceed e.g. with
the entry file or an interactive session.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-chunk-size"></a><b>-chunk-size</b> <num> (<i>process chunks of size num</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Zoem reads its input in chunks. It fully processes a chunk before moving on
with the next one. This option defines the
(minimum) size of the chunks. The size or count of the
chunks does not at all affect zoem's output. The default minimum
chunk size equals one megabyte.</p>
<p style="margin-bottom:0" class="asd_par">
Zoem will read files in their entirety before further processsing
if <b>-chunk-size</b> <b>0</b> is specified.</p>
<p style="margin-bottom:0" class="asd_par">
Zoem does not chunk input files arbitrarily. It will append to
a chunk until it is in the outermost scope (not contained within
any block) and the chunk will end with a line that was fully read.</p>
<p style="margin-bottom:0" class="asd_par">
Consequently, if e.g. a file contains a block (delimited by
balanced curlies) spanning the entire file then zoem is forced
to read it in its entirety.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt--trace"></a><b>--trace</b> (<i>trace mode, default</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Trace in default mode.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt--trace-all-long"></a><b>--trace-all-long</b> (<i>long trace mode</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Sets on <i>most</i> trace options in long mode.
Trace options <tt>xxx</tt> not set
have their own <b>--trace-xxx</b> entry (see below).</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt--trace-all-short"></a><b>--trace-all-short</b> (<i>short trace mode</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Sets on <i>most</i> trace options in short mode.
Trace options <tt>xxx</tt> not set
have their own <b>--trace-xxx</b> entry (see below).</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt--trace-keys"></a><b>--trace-keys</b> (<i>trace keys</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Trace keys.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt--trace-regex"></a><b>--trace-regex</b> (<i>trace regexes</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Trace regexes (i.e. the <b>\inspect#4</b> primitive).</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-trace"></a><b>-trace</b> k (<i>trace mode, explicit</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Set trace options by adding their representing bits.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt--stress-write"></a><b>--stress-write</b> (<i>stress test using write</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
This makes <b>\write#3</b> recover from errors.
It is a special purpose option used for creating zoem
stress test suites, such as <tt>stress.azm</tt>
in the zoem distribution <tt>/examples</tt> subdirectory.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade item_leftalign nowrap" ><a name="opt--unsafe"></a><b>--unsafe</b> (<i>prompt for \system#3</i>)</div><div class=" item_cascade item_leftalign nowrap" ><a name="opt--unsafe-silent"></a><b>--unsafe-silent</b> (<i>simply allow \system#3</i>)</div><div class=" item_cascade item_leftalign nowrap" ><a name="opt-allow"></a><b>-allow</b> cmd1[:cmdx]+ (<i>allowable commands</i>)</div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
With <b>--unsafe</b> system calls are allowed but the user
is prompted for each invocation. The command and its arguments (if any)
are shown, but the STDIN information (if any) is withheld.
With <b>--unsafe-silent</b> system calls are allowed and
the user is never prompted.</p>
<p style="margin-bottom:0" class="asd_par">Use <b>-allow</b> <i>str</i> or <b>--allow</b>=<i>str</i> to
specify a list of allowable commands, as a string
in which the commands are separated by colons.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt--system-honor"></a><b>--system-honor</b> (<i>require \system#3 to succeed</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
With this option any <tt>\system#3</tt> failure (for whatever reason,
including safe behaviour) is regarded as a zoem failure.
By default, failing system calls are ignored under either
safe mode, unsafe mode (--unsafe), or silent unsafe mode
(--unsafe-silent).</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt--split"></a><b>--split</b> (<i>assume split output</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
This assumes zoem input that allows output to multiple files (e.g.
chapters). It sets the default output stream to <tt>stdout</tt> (anticipating
custom output redirection with <b>\writeto#1</b>) and sets the session macro
<b>\__split__</b> to <tt>1</tt>.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt--stats"></a><b>--stats</b> (<i>show symbol table stats after run</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Show symbol table chacteristics. Symbol tables are
maintained as hashes.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-tl"></a><b>-tl</b> k (<i>set tab length</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Set the tab length. HTML output can be indented according
to nesting structure, using tabs which are expanded
to simple spaces. By default, the tab length is zero,
meaning that no indent is shown.
The maximum value the tab length can be set to is four.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade item_leftalign nowrap" ><a name="opt-nsegment"></a><b>-nsegment</b> k (<i>level of macro nesting allowed</i>)</div><div class=" item_cascade item_leftalign nowrap" ><a name="opt-nstack"></a><b>-nstack</b> k (<i>stack count</i>)</div><div class=" item_cascade item_leftalign nowrap" ><a name="opt-nuser"></a><b>-nuser</b> k (<i>user dictionary stack size</i>)</div><div class=" item_cascade item_leftalign nowrap" ><a name="opt-nenv"></a><b>-nenv</b> k (<i>environment dictionary stack size</i>)</div><div class=" item_cascade item_leftalign nowrap" ><a name="opt-buser"></a><b>-buser</b> k (<i>initial user dict capacity</i>)</div><div class=" item_cascade item_leftalign nowrap" ><a name="opt-bzoem"></a><b>-bzoem</b> k (<i>initial zoem dict capacity</i>)</div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Probably needed only if you have some obscure and extreme use
for zoem. The segment limit applies to simple nesting of macros. The
stack limit applies to nesting of macros that evaluate an argument before
use. Each such evaluation creates a new stack. The user limit applies to
<b>\push{user}</b>, the env limit applies to the nesting level of environments
(started with <tt>\begin#2</tt>). The user
dict capacity pertains to the initial number of buckets allocated for
user and environment dictionaries, and the zoem dict capacity pertains to the
dictionary containing the zoem primitives.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-l"></a><b>-l</b> <str> (<i>list items</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
List items identified by <tt><str></tt>. It can be any of
<b>all</b>,
<b>filter</b>.
<b>legend</b>,
<b>builtin</b>,
<b>session</b>,
<b>trace</b>, or
<b>zoem</b>,
Multiple identifiers
can be joined in a string, e.g. <tt>-l legendzoem</tt> prints a legend
followed by a listing of zoem primitives.</p>
</div>
<div style="margin-top:0em"> </div><div class=" item_cascade"><div class=" item_leftalign nowrap " ><a name="opt-h"></a><b>-h</b> (<i>show options</i>)</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Show short synopsis of options.</p>
</div>
</div>
<a name="session"></a>
<h2>SESSION MACROS</h2>
<div class=" itemize " style="margin-top:1em; font-size:100%">
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__parmode__</b></div></div>
<div class=" item_text " style="margin-left:2em">
This macro affects zoem's read behaviour in interactive mode.
It can be set on the command line using the <b>-s</b> option.
Bits that can be set:
<div class="verbatim">1 chomp newlines (remove the newline character)
2 skip empty newlines
4 read paragraphs (an empty line triggers input read)
8 newlines can be escaped using a backslash
16 read large paragraphs (a single dot on a line
triggers input read)</div>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__device__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The current output device, set by <a class="intern" href="#opt-d">the command line option
<b>-d</b></a>. The <b>man</b> and <b>faq</b> packages support <b>html</b> and
<b>roff</b> as its values.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__fnbase__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The base name of the input file name. Leading path components are stripped
away. If the <b>-i</b> option is used the input file is required to have
the <tt>.azm</tt> suffix. In that case the suffix is also stripped to obtain the
base name.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__fnentry__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The name of the entry file.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__fnin__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The file currently being processed.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__fnout__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The name of the default output file.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__fnpath__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The leading component of the input file name, possibly empty.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__fnup__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The file that included the current file, if applicable.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__fnwrite__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
This key is set by <tt>\write#3</tt> to its first argument. It can be used by
macros that are expanded during evaluation of the third argument. Possible
usage is to branch on the name of the <i>write</i> output stream. For example
a file called <i>index.html</i> may be treated differently from other files.
The key is deleted afterwards. Nested invocations of <tt>\write#3</tt> may
corrupt the status of this key.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__ia__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The input/output separator used in interactive mode.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__line__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
The line number in the file currently being processed.
This number will be correct for any invocation outside the scope
of a macro. For any invocation within a macro the result will be
the line number of the closing curly of the outermost containing
macro. The following</p>
<div class="verbatim"> \__line__
\__line__
\__line__
\group{
\__line__
\group{\__line__}
\__line__}</div>
<p style="margin-bottom:0" class="asd_par">Results in</p>
<div class="verbatim"> 1
2
3
7
7
7</div>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__searchpath__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
A vararg containing a list of paths to search when a file is to be
included/imported/read/loaded. When you start zoem, this key should
contain the location of the <b>man.zmm</b> and <b>faq.zmm</b> package files.
It is advisable not to overwrite this key but to append to it instead.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__zoemstat__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Set to one of <tt>ok</tt>, <tt>towel</tt> (that one is a bit lame),
or <tt>error</tt> by either the interpreter, an occurrence of <tt>\catch#2</tt>,
or <tt>\try#1</tt>.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__zoemput__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Set by <tt>\try#1</tt> to the possibly truncated result of processing
its argument.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__lc__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Expands to a left curly. It is hard to find a need for this — the zoem
stress suite uses it to generate a particular syntax error at a deeper
interpretation level.</p>
</div>
<div class=" item_cascade"><div class=" item_leftalign nowrap " ><b>\__rc__</b></div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">
Expands to a right curly.</p>
</div>
</div>
<a name="set"></a>
<h2>THE SET MODIFIERS</h2>
<p style="margin-bottom:0" class="asd_par">The <tt>\set#3</tt> primitive allows a <tt>{modes}{<modifiers>}</tt>
directive in its first argument. Here <i><modifiers></i>
can be a combination of single-letter modifiers, each
described below.
</p>
<div class=" itemize " style="margin-top:1em; font-size:100%">
<div class=" item_compact"><div class=" item_leftalign nowrap " >a</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">append to the key, do not overwrite, create if not existing.</p>
</div>
<div class=" item_compact"><div class=" item_leftalign nowrap " >c</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">conditionally; only set if not already defined.</p>
</div>
<div class=" item_compact"><div class=" item_leftalign nowrap " >e</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">existing; update existing key, possibly in lower dictionary.</p>
</div>
<div class=" item_compact"><div class=" item_leftalign nowrap " >g</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">global; set in the global (bottom) user dictionary.</p>
</div>
<div class=" item_compact"><div class=" item_leftalign nowrap " >u</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">unary; do not interpret vararg in <tt><any></tt> as key-value list (data keys only)</p>
</div>
<div class=" item_compact"><div class=" item_leftalign nowrap " >v</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">vararg; interpret vararg in <tt><any></tt> as key-value list (regular keys only).</p>
</div>
<div class=" item_compact"><div class=" item_leftalign nowrap " >w</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">warn if key exists (like <tt>\def#2</tt> and <tt>\defx#2</tt>).</p>
</div>
<div class=" item_compact"><div class=" item_leftalign nowrap " >x</div></div>
<div class=" item_text " style="margin-left:2em">
<p style="margin-top:0em; margin-bottom:0em">expand argument (like <tt>\setx#2</tt> and <tt>\defx#2</tt>).</p>
</div>
</div>
<a name="inspect"></a>
<h2>THE INSPECT SUBLANGUAGE</h2>
<p style="margin-bottom:0" class="asd_par">
The <tt>\inspect#4</tt> primitive takes four arguments. The languages
accepted by the first two arguments are described below. The third
argument is a replacement string or a replacement macro accepting
back-references (supplied as an anonymous macro). The fourth
argument is the data to be processed.</p>
<p style="margin-bottom:0"><b>arg 1</b><br>
Is a vararg. Currently it accepts a single key
<i>mods</i> for which the value should be a comma-separated list over the words
<i>posix</i>,
<i>icase</i>,
<i>dotall</i>,
<i>iter-lines</i>
<i>iter-args</i>,
<i>match-once</i>,
<i>discard-nmp</i>,
<i>discard-nil-out</i>,
<i>discard-miss</i>,
<i>count-matches</i>.
Alternatively repeated use of <i>mods</i> is allowed.</p>
<p style="margin-bottom:0"><b>arg 2</b><br>
Is a regular expression. Tilde patterns
are expanded according to all of the ZOEM, UNIX, and REGEX schemes.
Refer to <a class="intern" href="#tildexp">TILDE EXPANSION</a> for these.</p>
<p style="margin-bottom:0" class="asd_par">
The third argument is a constant string or an anonymous key,
the fourth argument is data.</p>
<a name="tr"></a>
<h2>THE TR SUBLANGUAGE</h2>
<p style="margin-bottom:0" class="asd_par">
The <tt>\tr#2</tt> primitive takes two arguments. The first argument contains
key-value pairs. The accepted keys are <i>from</i> and <i>to</i> which must
always occur together, and <i>delete</i> and <i>squash</i>.
The values of these keys must be valid <i>translation</i> specifications.
This primitive transforms the data in the second argument by successively
applying translation, deletion and squashing in that order. Only the
transformations that are needed need be specified.</p>
<p style="margin-bottom:0" class="asd_par">
Translation specifications are subjected to UNIX tilde expansion as
described below.</p>
<p style="margin-bottom:0" class="asd_par">
The syntax accepted by translation specifications is almost
fully compliant with the syntax accepted by <b>tr</b>(1), with
three exceptions. First, repeats are introduced as
<tt>[*a*20]</tt> rather than <tt>[a*20]</tt>. Second, ranges can (for
now) only be entered as <tt>X-Y</tt>, not as <tt>[X-Y]</tt>.
<tt>X</tt> and <tt>Y</tt> <i>can</i> be entered in either octal or
hexadecimal notation (see further below).
As an additional feature, the magic repeat operator <tt>[*a#]</tt> stops on both
class and range boundaries. Character specifications can be
complemented by preceding them with the caret <tt>^</tt>.
</p>
<p style="margin-bottom:0" class="asd_par">
Specifications may contain ranges of characters such as <tt>a-z</tt> and <tt>0-9</tt>.
Posix character classes are allowed. The available classes are</p>
<div class="verbatim"> [:alnum:]
[:alpha:]
[:cntrl:]
[:digit:]
[:graph:]
[:lower:]
[:print:]
[:punct:]
[:space:]
[:upper:]
[:xdigit:]</div>
<p style="margin-bottom:0" class="asd_par">
Characters can be specified using octal notation, e.g.
<tt>\012</tt> encodes the newline. Use <tt>\173</tt> for the opening curly,
<tt>\175</tt> for the closing curly, <tt>\134</tt> for the backslash, and <tt>\036</tt> for
the caret if it is the first character in a specification. <i>DON'T</i> use
<tt>\\</tt>, <tt>\{</tt>, or <tt>\}</tt> in this case! Hexadecimal notation is written
as <tt>\x7b</tt> (the left curly in this instance).</p>
<p style="margin-bottom:0" class="asd_par">
See <a class="intern" href="#examples">EXAMPLES</a> for an example of <tt>tr#2</tt> usage.</p>
<a name="tildexp"></a>
<h2>TILDE EXPANSION</h2>
<p style="margin-bottom:0" class="asd_par">
Some primitives interface with UNIX libraries that require backslash escape
sequences to encode certain tokens or characters. The backslash is special
in zoem too and without further measures it can become very cumbersome to
encode the correct escape sequences as it is not always clear which tokens
should be escaped or unprotected at what point. It is especially difficult
to handle the zoem characters with special meaning, <tt>{</tt>, <tt>}</tt> and
<tt>\</tt>.</p>
<p style="margin-bottom:0" class="asd_par">
The two primitives under consideration are <b>\inspect#4</b> and <b>\tr#2</b>.
Both treat the tilde as an additional escape character for certain arguments
(as documented in the user manual). These arguments are subjected to tilde
expansion, where the tilde and the character it proceeds are translated to a
new character or character sequence. There are three different sets of tilde
escapes, ZOEM, UNIX and REGEX escapes. <b>\tr#2</b> only accepts UNIX escapes,
<b>\inspect#4</b> accepts all. Tilde expansion is always the last processing
step before strings are passed on to external libraries.</p>
<p style="margin-bottom:0" class="asd_par">The ZOEM scheme contains some convenience escapes, such
as <tt>~E</tt> to encode a double backslash.</p>
<p style="margin-bottom:0" class="asd_par"><b>ZOEM tilde expansion</b></p>
<div class="verbatim"><b> meta sequence replacement
.-----------------------------.
| ~~ | ~ |
| ~E | \\ |
| ~e | \ |
| ~I | \{ |
| ~J | \} |
| ~x | \x |
| ~i | { |
| ~j | } |
`-----------------------------'</b></div>
<p style="margin-top:0em; margin-bottom:0em">The zoem tr specification language accepts <tt>\x**</tt> as hexadecimal
notation, e.g. <tt>\x0a</tt> denotes a newline in the ASCII character set</p>.
<p style="margin-bottom:0" class="asd_par"><b>UNIX tilde expansion</b></p>
<div class="verbatim"><b> meta sequence replacement
.-----------------------------.
| ~a | \a |
| ~b | \b |
| ~f | \f |
| ~n | \n |
| ~r | \r |
| ~t | \t |
| ~v | \v |
| ~0 | \0 |
| ~1 | \1 |
| ~2 | \2 |
| ~3 | \3 |
`-----------------------------'</b></div>
<p style="margin-bottom:0" class="asd_par"><b>REGEX tilde expansion</b></p>
<div class="verbatim"><b> meta sequence replacement
.-----------------------------.
| ~^ | \^ |
| ~. | \. |
| ~[ | \[ |
| ~$ | \$ |
| ~( | \( |
| ~) | \) |
| ~| | \| |
| ~* | \* |
| ~+ | \+ |
| ~? | \? |
`-----------------------------'</b></div>
<a name="environment"></a>
<h2>ENVIRONMENT</h2>
<p style="margin-bottom:0" class="asd_par">
The environment variable ZOEMSEARCHPATH may contain a colon and/or
whitespace separated list of paths. It will be used when searching
for files included via one of the <tt>dofile</tt> aliases
<tt>\input</tt>, <tt>\import</tt>, <tt>\read</tt>, and <tt>\load</tt>.
Note that the zoem macro <tt>\__searchpath__</tt> contains the location where
the zoem macro files were copied at the time of installation of zoem.</p>
<a name="diagnostics"></a>
<h2>DIAGNOSTICS</h2>
<p style="margin-bottom:0" class="asd_par">
On error, Zoem prints a file name and a line number to which it was able to
trace the error. The number reported is the same as the one stored in the
session macro <tt>\__line__</tt>. For an error-trigering macro which is not
nested within another macro the line number should be correct. For a macro
that does occur nested within another macro the line number will be the line
number of the closing curly in the outermost containing macro.</p>
<p style="margin-bottom:0" class="asd_par">
If in despair, use one of the tracing modes, <b>--trace-keys</b> is one of the
first to come to mind. Another possibility is to supply the
<a class="intern" href="#opt-x"><b>-x</b> option</a>.</p>
<a name="bugs"></a>
<h2>BUGS</h2>
<p style="margin-bottom:0" class="asd_par">
No known bugs. <b>\inspect#4</b> has not received thorough stress-testing,
and the more esoteric parts of its interface will probably change.</p>
<a name="seealso"></a>
<h2>SEE ALSO</h2>
<p style="margin-bottom:0" class="asd_par">
<a target="_parent" class="extern" href="http://micans.org/aephea/">Aephea</a>
is a document authoring framework largely for HTML documents.
</p>
<p style="margin-bottom:0" class="asd_par">
<a target="_parent" class="extern" href="http://micans.org/pud/">Portable Unix Documentation</a>
provides two mini-languages for authoring in the unix environment. These
languages, pud-man and pud-faq are both written in zoem.</p>
<a name="examples"></a>
<h2>EXAMPLES</h2>
<p style="margin-bottom:0" class="asd_par">
This is a relatively new section, aimed at assembling useful or explanatory snippets.
</p>
<p style="margin-bottom:0" class="asd_par">
Create a vararg containing file names matching a pattern (<tt>png</tt> in
this example).</p>
<div class="verbatim">\setx{images}{
\inspect{
{mods}{iter-lines,discard-miss}
}{(.*~.png)}{_#1{{\1}}}{\system{ls}}
}</div>
<p style="margin-bottom:0" class="asd_par">
Use magic boundary stops with <tt>tr#2</tt>.</p>
<div class="verbatim">\tr{
{from}{[:lower:][:upper:][:digit:][:space:][:punct:]}
{to}{[*L#][*U#][*D#][*S#][*P#]}}{
!"#$%&'()*+,-./0123456789:;<=>?@
ABCDEFGHIJKLMNOPQRSTUVWXYZ
[\\]^_`
abcdefghijklmnopqrstuvwxyz
\{|\}~]}</div>
<a name="author"></a>
<h2>AUTHOR</h2>
<p style="margin-bottom:0" class="asd_par">
Stijn van Dongen.</p>
</body>
</html>
|