Debian Codegraph @

texk/web2c/cwebdir/ctwill-mini.ch

raw
1 Formatting changes for CTWILL by Andreas Scherer
2 This file is in the Public Domain.
3
4 This extensive set of changes is my best attempt to format CTWILL with
5 itself in DVI or PDF format, i.e., with the '[pdf]ctwimac.tex' macros. This
6 produces output with 'mini-indexes' on each spread of pages.
7
8 Apply these additional changes in the following two-step procedure:
9 First create 'ctwill-w2c.ch' that mogrifies CWEAVE into CTWILL:
10 $ tie -c ctwill-w2c.ch \
11 > cweave.w cweav-{patch,extensions,output,i18n,twill}.ch \
12 > cwtw-texlive.ch ctwill-texlive.ch
13 Then create 'ctwill.w' that gets processed with TeX (plain, pdfTeX, XeTeX):
14 $ ctie -m ctwill.w \
15 > cweave.w ctwill-w2c.ch ctwill-mini.ch
16
17 Section 1.
18
19 @x
20 @** Introduction.
21 @y
22 \ifx\undefined\pdfpagewidth
23 \else
24 \pdfpagewidth=\pagewidth \advance\pdfpagewidth by 2cm
25 \pdfpageheight=\pageheight \advance\pdfpageheight by 5cm
26 \ifpdflua \pdfhorigin=1cm \pdfvorigin=1cm
27 \else \global\hoffset=-1.54cm \global\voffset=-1.54cm \fi
28 \def\startpdf{\def\pagemode{/PageMode /UseOutlines}
29 \ifpdflua\pdfcatalog{\pagemode}
30 \else\special{pdf: docview << \pagemode >>}\fi}
31 \fi
32
33 @** Introduction.
34 @z
35
36 @x
37 A kind of ``user manual'' for \.{CTWILL} can be found in the appendix
38 \X270:Mogrify \.{CWEAVE} into \.{CTWILL}\X~and beyond, together with
39 additional material specific to \.{CTWILL}. % FIXME
40 Until then, \.{CWEAVE}'s sequence of sections will be preserved.
41
42 The ``banner line'' defined here should be changed whenever \.{CTWILL} is
43 modified. The version number parallels the corresponding version of \.{CWEAVE}.
44 @y
45 A kind of ``user manual'' for \.{CTWILL} can be found in section~%
46 \X287:Mogrify {\tentex CWEAVE} into {\tentex CTWILL}\X~and beyond,
47 together with additional material specific to \.{CTWILL}. % FIXME
48 \bigskip
49 {\font\itt=cmitt10 \font\bit=cmbxti10
50 \noindent \bit Editor's Note: \it This heavily redacted version of
51 {\itt ctwill.pdf} had to meddle with the section numbering of
52 {\itt cweave.w}, spreading tabular material over several sections
53 and splitting long sections into smaller chunks in order to
54 fix overful pages---both horizontally and vertically---, to make
55 the overall appearance of the {\itt CTWILL} documentation most
56 pleasing to the readers'~eyes.
57 \smallskip
58 \noindent Please do not try to compare this {\itt ctwill.pdf} to the one
59 created by {\itt CWEAVE} instead of {\itt CTWILL}; the section numbering will
60 be quite ``off'' from {\itt cweave.w}. Care has been taken to give a
61 faithful overall rendering of {\itt CTWILL}'s code, though. \hfill
62 ---Enjoy!\par}
63 \bigskip
64 The ``banner line'' defined here should be changed whenever \.{CTWILL} is
65 modified. The version number parallels the corresponding version of \.{CWEAVE}.
66 @-banner@>
67 @$banner {CTWILL}1 =\.{"This\ is\ CTWILL"}@>
68
69 @$ctangle {CTWILL}3 \&{enum} \&{cweb}@>
70 @$ctwill {CTWILL}3 \&{enum} \&{cweb}@>
71 @$cweave {CTWILL}3 \&{enum} \&{cweb}@>
72
73 @$inner {CTWILL}223 \&{enum} \&{mode}@>
74 @$outer {CTWILL}223 \&{enum} \&{mode}@>
75 @z
76
77 Section 2.
78
79 @x
80 @ \.{CWEAVE} has a fairly straightforward outline. It operates in
81 @y
82 @r @ \.{CWEAVE} has a fairly straightforward outline. It operates in
83 @%
84 @$show_banner {CTWILL}15 =\\{flags}[\.{'b'}]@>
85 @$show_progress {CTWILL}15 =\\{flags}[\.{'p'}]@>
86 @z
87
88 Section 5.
89
90 @x
91 @d _(s) gettext(s)
92 @y
93 @d _(s) gettext(s)
94 @-s@>
95 @-a@>
96 @-HAVE_GETTEXT@>
97 @z
98
99 Section 6.
100
101 @x
102 @d compress(c) if (loc++<=limit) return c
103 @y
104 @d compress(c) if (loc++<=limit) return c
105 @-c@>
106 @z
107
108 Section 7.
109
110 @x
111 @ Code related to input routines:
112 @y
113 @ Code related to input routines:
114 @-c@>
115 @z
116
117 Section 8.
118
119 @x
120 @d cur_line line[include_depth] /* number of current line in current file */
121 @y
122 @d cur_line line[include_depth] /* number of current line in current file */
123 @-cur_file@>
124 @-cur_file_name@>
125 @-cur_line@>
126 @$cur_file {CTWILL}8 =\\{file}[\\{include\_depth}]@>
127 @$cur_file_name {CTWILL}8 =\hfil\break\\{file\_name}[\\{include\_depth}]@>
128 @$cur_line {CTWILL}8 =\\{line}[\\{include\_depth}]@>
129 @z
130
131 Section 11.
132
133 @x
134 @ Code related to identifier and section name storage:
135 @y
136 @ Code related to identifier and section name storage:
137 @-c@>
138 @-llink@>
139 @-rlink@>
140 @-root@>
141 @-ilk@>
142 @$llink {CTWILL}11 =\\{link}@>
143 @$rlink {CTWILL}11 =\\{dummy}.\\{Rlink}@>
144 @$root {CTWILL}11 =\\{name\_dir}$\MG$\\{rlink}@>
145 @$ilk {CTWILL}11 =\\{dummy}.\\{Ilk}@>
146 @z
147
148 Section 13.
149
150 @x
151 @ Code related to error handling:
152 @y
153 @ Code related to error handling:
154 @-s@>
155 @z
156
157 Section 15.
158
159 @x
160 extern const char *use_language; /* prefix to \.{cwebmac.tex} in \TEX/ output */
161 @y
162 extern const char *use_language; /* prefix to \.{ctwimac.tex} in \TEX/ output */
163 @-show_banner@>
164 @-show_progress@>
165 @-show_happiness@>
166 @-show_stats@>
167 @-make_xrefs@>
168 @-check_for_change@>
169 @$show_banner {CTWILL}15 =\\{flags}[\.{'b'}]@>
170 @$show_progress {CTWILL}15 =\\{flags}[\.{'p'}]@>
171 @$show_happiness {CTWILL}15 =\\{flags}[\.{'h'}]@>
172 @$show_stats {CTWILL}15 =\\{flags}[\.{'s'}]@>
173 @$make_xrefs {CTWILL}15 =\\{flags}[\.{'x'}]@>
174 @$check_for_change {CTWILL}15 =\\{flags}[\.{'c'}]@>
175 @z
176
177 Section 16.
178
179 @x
180 @ Code related to output:
181 @y
182 @ Code related to output:
183 @-a@>
184 @-b@>
185 @-c@>
186 @-update_terminal@>
187 @-new_line@>
188 @$update_terminal {CTWILL}16 =\\{fflush}(\\{stdout})@>
189 @$new_line {CTWILL}16 =\\{putchar}(\.{'\\n'})@>
190 @z
191
192 Section 17.
193
194 @x
195 @ The following parameters are sufficient to handle \TEX/ (converted to
196 @y
197 @r @ The following parameters are sufficient to handle \TEX/ (converted to
198 @z
199
200 @x
201 @d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
202 @y
203 @d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
204 @-long_buf_size@>
205 @$long_buf_size {CTWILL}17 =$\\{buf\_size}+\\{longest\_name}$@>
206 @z
207
208 Section 20.
209
210 @x
211 @* Data structures exclusive to {\tt CWEAVE}.
212 @y
213 @* Data structures exclusive to {\tt CWEAVE}.
214 @-a@>
215 @z
216
217 Section 21.
218
219 @x
220 @ We keep track of the current section number in |section_count|, which
221 @y
222 @r @ We keep track of the current section number in |section_count|, which
223 @z
224
225 Section 22.
226
227 @x
228 @ The other large memory area in \.{CWEAVE} keeps the cross-reference data.
229 @y
230 @ The other large memory area in \.{CWEAVE} keeps the cross-reference data.
231 @-p@>
232 @-x@>
233 @z
234
235 Section 24.
236
237 @x
238 @d file_flag (3*cite_flag)
239 @y
240 @-file_flag@>
241 @-def_flag@>
242 @-xref@>
243 @$file_flag {CTWILL}24 =$\T{3}*\\{cite\_flag}{}$@>
244 @$def_flag {CTWILL}24 =$\T{2}*\\{cite\_flag}{}$@>
245 @$xref {CTWILL}24 =\\{equiv\_or\_xref}@>
246 @d file_flag (3*cite_flag)
247 @z
248
249 Section 25.
250
251 @x
252 @ A new cross-reference for an identifier is formed by calling |new_xref|,
253 @y
254 @ A new cross-reference for an identifier is formed by calling |new_xref|,
255 @-a@>
256 @-c@>
257 @-p@>
258 @-no_xref@>
259 @$no_xref {CTWILL}25 =$\R\\{make\_xrefs}$@>
260 @z
261
262 Section 27.
263
264 @x
265 while (q->num>section_xref_switch) {r=q; q=q->xlink;}
266 @y
267 while (q->num>section_xref_switch) {@+r=q; q=q->xlink;@+}
268 @z
269
270 Section 36.
271
272 @x
273 @d underline '\n' /* this code will be intercepted without confusion */
274 @y
275 @d underline '\n' /* this code will be intercepted without confusion */
276 @-begin_comment@>
277 @-underline@>
278 @$begin_comment {CTWILL}36 =\.{'\\t'}@>
279 @$underline {CTWILL}36 =\.{'\\n'}@>
280 @z
281
282 Section 37.
283
284 @x
285 @ Control codes are converted to \.{CWEAVE}'s internal
286 @y
287 @r @ Control codes are converted to \.{CWEAVE}'s internal
288 @z
289
290 Section 42.
291
292 CTWILL hickups on comment and produces unmatched '$' in mini-index.
293
294 @x
295 skip_TeX(void) /* skip past pure \TEX/ code */
296 @y
297 skip_TeX(void)
298 @z
299
300 Section 43.
301
302 @x
303 \yskip\hang |identifier|: In this case the global variables |id_first| and
304 |id_loc| will have been set to the beginning and ending-plus-one locations
305 in the buffer, as required by the |id_lookup| routine.
306
307 \yskip\hang |string|: The string will have been copied into the array
308 |section_text|; |id_first| and |id_loc| are set as above (now they are
309 pointers into |section_text|).
310
311 \yskip\hang |constant|: The constant is copied into |section_text|, with
312 slight modifications; |id_first| and |id_loc| are set.
313 @y
314 {\raggedright
315 \yskip\hang |identifier|: In this case the global variables |id_first| and
316 |id_loc| will have been set to the beginning and ending-plus-one locations
317 in the buffer, as required by the |id_lookup| routine.
318
319 \yskip\hang |string|: The string will have been copied into the array
320 |section_text|; |id_first| and |id_loc| are set as above (now they are
321 pointers into |section_text|).
322
323 \yskip\hang |constant|: The constant is copied into |section_text|, with
324 slight modifications; |id_first| and |id_loc| are set.\par}
325 @z
326
327 @x
328 \yskip\hang |xref_roman|, |xref_wildcard|, |xref_typewriter|, |TeX_string|,
329 |meaning|, |suppress|,
330 |verbatim|: The values of |id_first| and |id_loc| will have been set to
331 the beginning and ending-plus-one locations in the buffer.
332
333 \yskip\hang |section_name|: In this case the global variable |cur_section| will
334 point to the |byte_start| entry for the section name that has just been scanned.
335 The value of |cur_section_char| will be |'('| if the section name was
336 preceded by \.{@@(} instead of \.{@@<}.
337 @y
338 {\raggedright
339 \yskip\hang |xref_roman|, |xref_wildcard|, |xref_typewriter|, |TeX_string|,
340 |meaning|, |suppress|,
341 and |verbatim|: The values of |id_first| and |id_loc| will have been set to
342 the beginning and ending-plus-one locations in the buffer.
343
344 \yskip\hang |section_name|: In this case the global variable |cur_section| will
345 point to the\hfil\break |byte_start| entry for the section name that has just been scanned.
346 The value of |cur_section_char| will be |'('| if the section name was
347 preceded by \.{@@(} instead of \.{@@<}.\par}
348 @z
349
350 Section 44.
351
352 @x
353 @ As one might expect, |get_next| consists mostly of a big switch
354 @y
355 @ As one might expect, |get_next| consists mostly of a big switch
356 @-c@>
357 @$c {CTWILL}44 \&{eight\_bits}@>
358 @z
359
360 Section 45.
361
362 @x
363 @ @<Predecl...@>=@+static eight_bits get_next(void);
364 @y
365 @ @<Predecl...@>=@+static eight_bits get_next(void);
366 @-get_next@>
367 @z
368
369 Section 46.
370
371 @x
372 @d left_preproc ord /* begins a preprocessor command */
373 @y
374 @-left_preproc@>
375 @$left_preproc {CTWILL}46 =\\{ord}@>
376 @d left_preproc ord /* begins a preprocessor command */
377 @z
378
379 Section 51.
380
381 @x
382 if (*(loc+1)=='*') {loc++;@+compress(minus_gt_ast);}
383 @y
384 if (*(loc+1)=='*') {@+loc++;@+compress(minus_gt_ast);@+}
385 @z
386
387 @x
388 else if (*loc=='.' && *(loc+1)=='.') {
389 loc++;@+compress(dot_dot_dot);
390 } break;
391 @y
392 else if (*loc=='.' && *(loc+1)=='.') {@+
393 loc++;@+compress(dot_dot_dot);@+
394 } break;
395 @z
396
397 Section 52.
398
399 @x
400 id_first=--loc;
401 do
402 ++loc;
403 while (isalpha((int)*loc) || isdigit((int)*loc) @|
404 || isxalpha(*loc) || ishigh(*loc));
405 id_loc=loc; return identifier;
406 }
407 @y
408 id_first=--loc;@/
409 do
410 ++loc;
411 while (isalpha((int)*loc) || isdigit((int)*loc) @|
412 || isxalpha(*loc) || ishigh(*loc));@/
413 id_loc=loc;@/
414 return identifier;
415 }
416 @z
417
418 Section 53.
419
420 @x
421 @d gather_digits_while(t) while ((t) || *loc=='\'')
422 @y
423 @d gather_digits_while(t) while ((t) || *loc=='\'')
424 @-t@>
425 @z
426
427 Section 54.
428
429 @x
430 @ @<Get a hex...@>={
431 @y
432 @r @ @<Get a hex...@>={
433 @z
434
435 Section 57.
436
437 @x
438 else {
439 @y
440 else
441 @z
442
443 @x
444 }
445 @y
446 @z
447
448 Section 64.
449
450 @x
451 @ This function skips over a restricted context at relatively high speed.
452 @y
453 @r @ This function skips over a restricted context at relatively high speed.
454 @z
455
456 Section 65.
457
458 @x
459 @ @<Predecl...@>=@+static void skip_restricted(void);
460 @y
461 @ @<Predecl...@>=@+static void skip_restricted(void);
462 @-skip_restricted@>
463 @z
464
465 Section 69.
466
467 @x
468 @ @<Predecl...@>=@+static void phase_one(void);
469 @y
470 @ @<Predecl...@>=@+static void phase_one(void);
471 @-phase_one@>
472 @z
473
474 Section 72.
475
476 @x
477 C_xref( /* makes cross-references for \CEE/ identifiers */
478 eight_bits spec_ctrl)
479 @y
480 C_xref( /* makes cross-references for \CEE/ identifiers */
481 eight_bits spec_ctrl)
482 @-C_xref@>
483 @$C_xref {CTWILL}72 \&{static} \&{void} (\,)@>
484 @z
485
486 @x
487 if (next_control=='|' || next_control==begin_comment ||
488 next_control==begin_short_comment) return;
489 @y
490 if (next_control=='|' || next_control==begin_comment @| ||
491 next_control==begin_short_comment) return;
492 @z
493
494 Section 73.
495
496 @x
497 @ The |outer_xref| subroutine is like |C_xref| except that it begins
498 with |next_control!='|'| and ends with |next_control>=format_code|. Thus, it
499 handles \CEE/ text with embedded comments.
500 @y
501 @ The |outer_xref| subroutine is like |C_xref| except that it begins
502 with |next_control| |!='|'| and ends with |next_control>=format_code|.
503 Thus, it handles \CEE/ text with embedded comments.
504 @z
505
506 Section 75.
507
508 @x
509 @ @<Replace `\.{@@@@}' by `\.{@@}'@>=
510 @y
511 @r @ @<Replace `\.{@@@@}' by `\.{@@}'@>=
512 @z
513
514 Section 80.
515
516 @x
517 @ Finally, when the \TEX/ and definition parts have been treated, we have
518 |next_control>=begin_C|.
519 @y
520 @ Finally, when the \TEX/ and definition parts have been treated, we have
521 \hfil\break|next_control>=begin_C|.
522 @z
523
524 Section 82.
525
526 @x
527 if (p) {
528 @y
529 @+ if (!p) return;
530 @z
531 @x
532 }
533 @y
534 @z
535
536 Section 86.
537
538 @x
539 @ The |flush_buffer| routine empties the buffer up to a given breakpoint,
540 @y
541 @ The |flush_buffer| routine empties the buffer up to a given breakpoint,
542 @-b@>
543 @-c@>
544 @-tex_new_line@>
545 @$tex_new_line {CTWILL}86 =$\\{putc}(\.{'\\n'},\39\\{active\_file})$@>
546 @z
547
548 Section 89.
549
550 @x
551 @d proofing flags['P']
552 @y
553 @d proofing flags['P']
554 @-proofing@>
555 @$proofing {CTWILL}89 =\\{flags}[\.{'P'}]@>
556 @z
557
558 Section 90.
559
560 @x
561 @ When we wish to append one character |c| to the output buffer, we write
562 @y
563 @ When we wish to append one character |c| to the output buffer, we write
564 @-c@>
565 @-s@>
566 @z
567
568 Section 91.
569
570 @x
571 out_str( /* output characters from |s| to end of string */
572 const char*s)
573 @y
574 out_str( /* output characters from |s| to end of string */
575 const char*s)
576 @-out_str@>
577 @$out_str {CTWILL}91 \&{static} \&{void} (\,)@>
578 @z
579
580 Section 97.
581
582 @x
583 @ The |out_name| procedure is used to output an identifier or index
584 @y
585 @r @ The |out_name| procedure is used to output an identifier or index
586 @z
587
588 Section 100.
589
590 @x
591 @ The |copy_TeX| routine processes the \TEX/ code at the beginning of a
592 @y
593 @r @ The |copy_TeX| routine processes the \TEX/ code at the beginning of a
594 @z
595
596 Section 101.
597
598 @x
599 @ The |copy_comment| function issues a warning if more braces are opened than
600 @y
601 @ The |copy_comment| function issues a warning if more braces are opened than
602 @-c@>
603 @-t@>
604 @-copy_comment@>
605 @$copy_comment {CTWILL}101 \&{static} \&{int} (\,)@>
606 @z
607
608 @x
609 } else {
610 @y
611 } @+ else {
612 @z
613
614 Section 106.
615
616 @x
617 @ Here is a list of the category codes that scraps can have.
618 @y
619 @r @ Here is a list of the category codes that scraps can have.
620 @z
621
622 Section 108.
623
624 @x
625 @d print_cat(c) fputs(cat_name[c],stdout) /* symbolic printout of a category */
626 @y
627 @d print_cat(c) fputs(cat_name[c],stdout) /* symbolic printout of a category */
628 @-c@>
629 @z
630
631 Section 109--110.
632
633 @x
634 @ The token lists for translated \TEX/ output contain some special control
635 @y
636 @r @ The token lists for translated \TEX/ output contain some special control
637 @-n@>
638 @z
639
640 @x
641 \yskip\noindent All of these tokens are removed from the \TEX/ output that
642 @y
643 @ All of these tokens are removed from the \TEX/ output that
644 @-n@>
645 @z
646
647 Section 111--116.
648
649 @x
650 @ The raw input is converted into scraps according to the following table,
651 @y
652 @* From raw input to scraps.
653 @-c@>
654 \advance \hsize by 4cm
655 \ifx\undefined\pdfpagewidth \else \advance \pdfpagewidth by 4cm \fi
656 The raw input is converted into scraps according to the following table,
657 @z
658
659 @x
660 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
661 @y
662 \yskip\halign{\quad#\hfil&\quad\hbox to11cm{#\hfil}&\quad\hfil#\hfil\cr
663 @z
664
665 @x
666 \./&|binop|: \./&yes\cr
667 @y
668 \./&|binop|: \./&yes\cr}
669
670 @ Cont.
671
672 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
673 @z
674
675 @x
676 \.{complex}&|int_like|: \stars&yes\cr
677 @y
678 \.{complex}&|int_like|: \stars&yes\cr}
679
680 @ Cont.
681
682 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
683 @z
684
685 @x
686 \.{friend}&|int_like|: \stars&maybe\cr
687 @y
688 \.{friend}&|int_like|: \stars&maybe\cr}
689
690 @ Cont.
691
692 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
693 @z
694
695 @x
696 \.{static\_cast}&|raw_int|: \stars&maybe\cr
697 @y
698 \.{static\_cast}&|raw_int|: \stars&maybe\cr}
699
700 @ Cont.
701
702 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
703 @z
704
705 @x
706 \.{xor\_eq}&|alfop|: \stars&yes\cr
707 @y
708 \.{xor\_eq}&|alfop|: \stars&yes\cr}
709
710 @ Cont.
711
712 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
713 @z
714
715 @x
716 \.{\\hbox\{}\thinspace stuff\/\thinspace\.\} to the following scrap.
717 @y
718 \.{\\hbox\{}\thinspace stuff\/\thinspace\.\} to the following scrap.
719
720 \smallskip
721 *The \.{\\,} (thin space) is omitted in ``|inner| \TeX\ mode.''
722 @z
723
724 Sections 117--125.
725
726 @x l.7 line numbers refer to 'prod.w'
727 @ Here is a table of all the productions. Each production that
728 @y
729 @* Table of all productions. Each production that
730 @-time@>
731 @z
732
733 TeX reports 'extra \fi' when running on twilled 'ctwill.w'.
734
735 @x l.14
736 \fi \newcount\prodno \newdimen\midcol \let\+\relax \ifon
737 @y
738 \newcount\prodno \newdimen\midcol \let\+\relax
739 @z
740
741 Section 118.
742
743 @x l.78
744 \+& |lpar| |rpar| & |exp| \hfill $L\.{\\,}R$ & functions, declarations\cr
745 @y
746 \+& |lpar| |rpar| & |exp| \hfill $L\.{\\,}R$ & functions, declarations\cr
747 \endgroup
748 @-in@>@-f@>@-x@>@-y@>
749
750 @r @ Cont.
751 \begingroup \lineskip=4pt
752 \def\alt #1 #2
753 {$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
754 \strut\hbox{#2}\cr}\!\Bigr\}$ }
755 \def\altt #1 #2 #3
756 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
757 \strut\hbox{#3}\cr}\!\Biggr\}$ }
758 \def\malt #1 #2
759 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
760 \def\maltt #1 #2 #3
761 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
762 \strut\hbox{#3}\hfill\cr}$}
763 \yskip@-in@>@-x@>@-y@>
764 \prodno=13 \midcol=2.5in
765 \def\theprodno{\number\prodno \global\advance\prodno by1\enspace}
766 \def\dagit{\dag\theprodno}
767 \def\+#1&#2&#3&#4\cr{\def\next{#1}%
768 \line{\hbox to 2em{\hss
769 \ifx\next\empty\theprodno\else\next\fi}\strut
770 \ignorespaces#2\hfil\hbox to\midcol{$\RA$
771 \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
772 @z
773
774 Section 119.
775
776 @x l.45
777 |int_like| \alt|raw_int| |struct_like| & |extern "Ada" int|\cr
778 @y
779 |int_like| \alt|raw_int| |struct_like| & |extern "Ada" int|\cr
780 \endgroup
781
782 @ Cont.
783 \begingroup \lineskip=4pt
784 \def\alt #1 #2
785 {$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
786 \strut\hbox{#2}\cr}\!\Bigr\}$ }
787 \def\altt #1 #2 #3
788 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
789 \strut\hbox{#3}\cr}\!\Biggr\}$ }
790 \def\malt #1 #2
791 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
792 \def\maltt #1 #2 #3
793 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
794 \strut\hbox{#3}\hfill\cr}$}
795 \yskip@-in@>
796 \prodno=27 \midcol=2.5in
797 \def\theprodno{\number\prodno \global\advance\prodno by1\enspace}
798 \def\dagit{\dag\theprodno}
799 \def\+#1&#2&#3&#4\cr{\def\next{#1}%
800 \line{\hbox to 2em{\hss
801 \ifx\next\empty\theprodno\else\next\fi}\strut
802 \ignorespaces#2\hfil\hbox to\midcol{$\RA$
803 \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
804 @z
805
806 Section 120.
807
808 @x l.75
809 & \&{struct} \&{name\_info} $\{$\cr
810 @y
811 & \&{struct} \&{name\_info} $\{$\cr
812 \endgroup
813
814 @r @ Cont.@-z@>@-in@>@-x@>
815 \begingroup \lineskip=4pt
816 \def\alt #1 #2
817 {$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
818 \strut\hbox{#2}\cr}\!\Bigr\}$ }
819 \def\altt #1 #2 #3
820 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
821 \strut\hbox{#3}\cr}\!\Biggr\}$ }
822 \def\malt #1 #2
823 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
824 \def\maltt #1 #2 #3
825 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
826 \strut\hbox{#3}\hfill\cr}$}
827 \yskip@-in@>@-x@>
828 \prodno=47 \midcol=2.5in
829 \def\theprodno{\number\prodno \global\advance\prodno by1\enspace}
830 \def\dagit{\dag\theprodno}
831 \def\+#1&#2&#3&#4\cr{\def\next{#1}%
832 \line{\hbox to 2em{\hss
833 \ifx\next\empty\theprodno\else\next\fi}\strut
834 \ignorespaces#2\hfil\hbox to\midcol{$\RA$
835 \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
836 @z
837
838 Section 121.
839
840 @x l.164
841 & \&{else} $x=0;$\cr
842 @y
843 & \&{else} $x=0;$\cr
844 \endgroup
845
846 @ Cont.
847 \begingroup \lineskip=4pt
848 \def\alt #1 #2
849 {$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
850 \strut\hbox{#2}\cr}\!\Bigr\}$ }
851 \def\altt #1 #2 #3
852 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
853 \strut\hbox{#3}\cr}\!\Biggr\}$ }
854 \def\malt #1 #2
855 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
856 \def\maltt #1 #2 #3
857 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
858 \strut\hbox{#3}\hfill\cr}$}
859 \yskip@-any@>@-z@>@-g@>@-a@>@-x@>@-y@>@-f@>
860 \prodno=61 \midcol=2.5in
861 \def\theprodno{\number\prodno \global\advance\prodno by1\enspace}
862 \def\dagit{\dag\theprodno}
863 \def\+#1&#2&#3&#4\cr{\def\next{#1}%
864 \line{\hbox to 2em{\hss
865 \ifx\next\empty\theprodno\else\next\fi}\strut
866 \ignorespaces#2\hfil\hbox to\midcol{$\RA$
867 \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
868 \advance\midcol20pt
869 @z
870
871 Section 122.
872
873 @x l.211
874 \+& |prerangle| & |binop| \hfill \.> & $>$ not in template\cr
875 @y
876 \+& |prerangle| & |binop| \hfill \.> & $>$ not in template\cr
877 \endgroup
878
879 @r @ Cont.
880 \begingroup \lineskip=4pt
881 \def\alt #1 #2
882 {$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
883 \strut\hbox{#2}\cr}\!\Bigr\}$ }
884 \def\altt #1 #2 #3
885 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
886 \strut\hbox{#3}\cr}\!\Biggr\}$ }
887 \def\malt #1 #2
888 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
889 \def\maltt #1 #2 #3
890 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
891 \strut\hbox{#3}\hfill\cr}$}
892 \yskip@-any@>@-z@>@-g@>@-a@>
893 \prodno=86 \midcol=2.5in
894 \def\theprodno{\number\prodno \global\advance\prodno by1\enspace}
895 \def\dagit{\dag\theprodno}
896 \def\+#1&#2&#3&#4\cr{\def\next{#1}%
897 \line{\hbox to 2em{\hss
898 \ifx\next\empty\theprodno\else\next\fi}\strut
899 \ignorespaces#2\hfil\hbox to\midcol{$\RA$
900 \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
901 @z
902
903 Section 123.
904
905 @x l.232
906 \+\dagit& |new_exp| & |exp| & |new int;|\cr
907 @y
908 \+\dagit& |new_exp| & |exp| & |new int;|\cr
909 \endgroup
910
911 @ Cont.
912 @-deprecated@>
913 @-fallthrough@>
914 @-likely@>
915 @-nodiscard@>
916 @-unlikely@>
917 @-s@>
918 \begingroup \lineskip=4pt
919 \def\alt #1 #2
920 {$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
921 \strut\hbox{#2}\cr}\!\Bigr\}$ }
922 \def\altt #1 #2 #3
923 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
924 \strut\hbox{#3}\cr}\!\Biggr\}$ }
925 \def\malt #1 #2
926 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
927 \def\maltt #1 #2 #3
928 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
929 \strut\hbox{#3}\hfill\cr}$}
930 \yskip@-any_other@>@-z@>@-f@>@-x@>@-p@>
931 \prodno=100 \midcol=2.5in
932 \def\theprodno{\number\prodno \global\advance\prodno by1\enspace}
933 \def\dagit{\dag\theprodno}
934 \def\+#1&#2&#3&#4\cr{\def\next{#1}%
935 \line{\hbox to 2em{\hss
936 \ifx\next\empty\theprodno\else\next\fi}\strut
937 \ignorespaces#2\hfil\hbox to\midcol{$\RA$
938 \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
939 \advance\midcol20pt
940 @z
941
942 @x
943 \advance\midcol-3pt
944 \+\dag200\enspace& |typedef_like| |decl_head| \alt|exp| |int_like| &
945 |typedef_like| |decl_head| \hfill $D=D$\alt $E^{**}$ $I^{**}$ \unskip &
946 \&{typedef} \&{char} \&{ch};\cr
947 \advance\midcol+3pt
948 \+201\enspace& |typedef_like| |decl_head| |semi| & |decl| \hfill $T\.\ D$ &
949 \&{typedef} \&{int} $\&x,\&y$;\cr
950 \+\dag202\enspace& |typedef_like| |int_like| |raw_int| & |typedef_like| |int_like| |exp| &
951 \&{typedef} \&{int} \&{foo}\cr
952 @y
953 @z
954
955 Section 124.
956
957 @x l.291
958 \+& |exp| |attr| & |exp| \hfill $E\.\ A$ & \&{enum} $\{x\ [[\ldots]]\}$ \cr
959 @y
960 \+& |exp| |attr| & |exp| \hfill $E\.\ A$ & \&{enum} $\{x\ [[\ldots]]\}$ \cr
961 \endgroup
962
963 @ Cont.
964 @-deprecated@>
965 @-fallthrough@>
966 @-likely@>
967 @-nodiscard@>
968 @-unlikely@>
969 @-y@>
970 \begingroup \lineskip=4pt
971 \def\alt #1 #2
972 {$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
973 \strut\hbox{#2}\cr}\!\Bigr\}$ }
974 \def\altt #1 #2 #3
975 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
976 \strut\hbox{#3}\cr}\!\Biggr\}$ }
977 \def\malt #1 #2
978 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
979 \def\maltt #1 #2 #3
980 {$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
981 \strut\hbox{#3}\hfill\cr}$}
982 \yskip@-any_other@>@-z@>@-f@>@-x@>@-p@>
983 \prodno=143 \midcol=2.5in
984 \def\theprodno{\number\prodno \global\advance\prodno by1\enspace}
985 \def\dagit{\dag\theprodno}
986 \def\+#1&#2&#3&#4\cr{\def\next{#1}%
987 \line{\hbox to 2em{\hss
988 \ifx\next\empty\theprodno\else\next\fi}\strut
989 \ignorespaces#2\hfil\hbox to\midcol{$\RA$
990 \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
991 \advance\midcol20pt
992 @z
993
994 Section 125.
995
996 @x l.326
997 \+& |alignas_like| |cast| & |attr| & |alignas(int)| \cr
998 \vfill\break
999 \parindent=0pt
1000 \everypar={\hangindent=2em}
1001 \dag{\bf Notes}
1002 @y
1003 \+& |alignas_like| |cast| & |attr| & |alignas(int)| \cr
1004 \advance\midcol-3pt
1005 \+\dag200\enspace& |typedef_like| |decl_head| \alt|exp| |int_like| &
1006 |typedef_like| |decl_head| \hfill $D=D$\alt $E^{**}$ $I^{**}$ \unskip &
1007 \&{typedef} \&{char} \&{ch};\cr
1008 \advance\midcol+3pt
1009 \+201\enspace& |typedef_like| |decl_head| |semi| & |decl| \hfill $T\.\ D$ &
1010 \&{typedef} \&{int} $\&x,\&y$;\cr
1011 \+\dag202\enspace& |typedef_like| |int_like| |raw_int| & |typedef_like| |int_like| |exp| &
1012 \&{typedef} \&{int} \&{foo}\cr
1013 \endgroup
1014
1015 @-any_other@>@-z@>@ \begingroup\dag{\bf Notes}
1016 \advance \hsize by -4cm
1017 \parindent=0pt
1018 \everypar={\hangindent=2em}
1019 @z
1020
1021 Section 126.
1022
1023 @x
1024 @* Implementing the productions.
1025 @y
1026 @* Implementing the productions.\advance \hsize by -4cm
1027 \ifx\undefined\pdfpagewidth \else \advance \pdfpagewidth by -4cm \fi
1028 @z
1029
1030 @x
1031 the category codes |pp->cat,@,@,(pp+1)->cat|$,\,\,\ldots\,$
1032 @y
1033 the category codes |pp->cat|, |(pp+1)->cat|, $\,\ldots\,$
1034 @z
1035
1036 @x
1037 @d trans trans_plus.Trans /* translation texts of scraps */
1038 @y
1039 @d trans trans_plus.Trans /* translation texts of scraps */
1040 @-trans@>
1041 @$trans {CTWILL}126 =\\{trans\_plus}.\\{Trans}@>
1042 @z
1043
1044 Section 128.
1045
1046 @x
1047 null_scrap.trans=&tok_start[0];
1048 scrap_base=scrap_info+1;
1049 @y
1050 null_scrap.trans=&tok_start[0];@/
1051 scrap_base=scrap_info+1;@/
1052 @z
1053
1054 Section 129.
1055
1056 @x
1057 @ Token lists in |@!tok_mem| are composed of the following kinds of
1058 @y
1059 @ Token lists in |@!tok_mem| are composed of the following kinds of
1060 @-DEBUG@>
1061 @-p@>
1062 @-res_flag@>
1063 @-section_flag@>
1064 @-tok_flag@>
1065 @-inner_tok_flag@>
1066 @$res_flag {CTWILL}129 =$\T{2}*\\{id\_flag}$@>
1067 @$section_flag {CTWILL}129 =$\T{3}*\\{id\_flag}$@>
1068 @$tok_flag {CTWILL}129 =$\T{3}*\\{id\_flag}$@>
1069 @$inner_tok_flag {CTWILL}129 =$\T{4}*\\{id\_flag}$@>
1070 @z
1071
1072 Section 130.
1073
1074 @x
1075 @c
1076 @y
1077 @c
1078 @-DEBUG@>
1079 @z
1080
1081 Section 132.
1082
1083 @x
1084 @ The production rules listed above are embedded directly into \.{CWEAVE},
1085 @y
1086 @ The production rules listed above are embedded directly into \.{CWEAVE},
1087 @-a@>
1088 @-c@>
1089 @-d@>
1090 @-j@>
1091 @-k@>
1092 @-n@>
1093 @-pp@>
1094 @z
1095
1096 @x
1097 example, `|squash(pp,3,exp,-2,3)|' is an abbreviation for `|big_app3(pp);
1098 reduce(pp,3,exp,-2,3)|'.
1099 @y
1100 example, `|squash(pp,3,exp,-2,3)|' is an abbreviation for `|big_app3(pp)|'
1101 followed by `|reduce(pp,3,exp,-2,3)|'.
1102 @z
1103
1104 Section 133.
1105
1106 @x
1107 @ The |mathness| is an attribute of scraps that says whether they are
1108 @y
1109 @r @ The |mathness| is an attribute of scraps that says whether they are
1110 @z
1111
1112 Section 135--136.
1113
1114 @x
1115 @ Let us consider the big switch for productions now, before looking
1116 @y
1117 @r @ Let us consider the big switch for productions now, before looking
1118 @-cat1@>
1119 @-cat2@>
1120 @-cat3@>
1121 @$cat1 {CTWILL}135 =$(\\{pp}+\T{1})\MG\\{cat}$@>
1122 @$cat2 {CTWILL}135 =$(\\{pp}+\T{2})\MG\\{cat}$@>
1123 @$cat3 {CTWILL}135 =$(\\{pp}+\T{3})\MG\\{cat}$@>
1124 @z
1125
1126 @x
1127 && pp->cat!=new_exp
1128 && pp->cat!=ftemplate @|
1129 @y
1130 && pp->cat!=new_exp @|
1131 && pp->cat!=ftemplate
1132 @z
1133
1134 @x
1135 && pp->cat!=const_like
1136 @y
1137 && pp->cat!=const_like @|
1138 @z
1139
1140 @x
1141 switch (pp->cat) {
1142 case exp: @<Cases for |exp|@>@; @+break;
1143 case lpar: @<Cases for |lpar|@>@; @+break;
1144 case unop: @<Cases for |unop|@>@; @+break;
1145 case ubinop: @<Cases for |ubinop|@>@; @+break;
1146 case binop: @<Cases for |binop|@>@; @+break;
1147 case cast: @<Cases for |cast|@>@; @+break;
1148 case sizeof_like: @<Cases for |sizeof_like|@>@; @+break;
1149 case int_like: @<Cases for |int_like|@>@; @+break;
1150 case public_like: @<Cases for |public_like|@>@; @+break;
1151 case colcol: @<Cases for |colcol|@>@; @+break;
1152 case decl_head: @<Cases for |decl_head|@>@; @+break;
1153 case decl: @<Cases for |decl|@>@; @+break;
1154 case base: @<Cases for |base|@>@; @+break;
1155 case struct_like: @<Cases for |struct_like|@>@; @+break;
1156 case struct_head: @<Cases for |struct_head|@>@; @+break;
1157 case fn_decl: @<Cases for |fn_decl|@>@; @+break;
1158 case function: @<Cases for |function|@>@; @+break;
1159 case lbrace: @<Cases for |lbrace|@>@; @+break;
1160 case if_like: @<Cases for |if_like|@>@; @+break;
1161 case else_like: @<Cases for |else_like|@>@; @+break;
1162 case else_head: @<Cases for |else_head|@>@; @+break;
1163 case if_clause: @<Cases for |if_clause|@>@; @+break;
1164 case if_head: @<Cases for |if_head|@>@; @+break;
1165 case do_like: @<Cases for |do_like|@>@; @+break;
1166 case case_like: @<Cases for |case_like|@>@; @+break;
1167 case catch_like: @<Cases for |catch_like|@>@; @+break;
1168 case tag: @<Cases for |tag|@>@; @+break;
1169 case stmt: @<Cases for |stmt|@>@; @+break;
1170 case semi: @<Cases for |semi|@>@; @+break;
1171 case lproc: @<Cases for |lproc|@>@; @+break;
1172 case section_scrap: @<Cases for |section_scrap|@>@; @+break;
1173 case insert: @<Cases for |insert|@>@; @+break;
1174 case prelangle: @<Cases for |prelangle|@>@; @+break;
1175 case prerangle: @<Cases for |prerangle|@>@; @+break;
1176 case langle: @<Cases for |langle|@>@; @+break;
1177 case template_like: @<Cases for |template_like|@>@; @+break;
1178 case new_like: @<Cases for |new_like|@>@; @+break;
1179 case new_exp: @<Cases for |new_exp|@>@; @+break;
1180 case ftemplate: @<Cases for |ftemplate|@>@; @+break;
1181 case for_like: @<Cases for |for_like|@>@; @+break;
1182 case raw_ubin: @<Cases for |raw_ubin|@>@; @+break;
1183 case const_like: @<Cases for |const_like|@>@; @+break;
1184 case raw_int: @<Cases for |raw_int|@>@; @+break;
1185 case operator_like: @<Cases for |operator_like|@>@; @+break;
1186 case typedef_like: @<Cases for |typedef_like|@>@; @+break;
1187 case delete_like: @<Cases for |delete_like|@>@; @+break;
1188 case question: @<Cases for |question|@>@; @+break;
1189 case alignas_like: @<Cases for |alignas_like|@>@; @+break;
1190 case lbrack: @<Cases for |lbrack|@>@; @+break;
1191 case attr_head: @<Cases for |attr_head|@>@; @+break;
1192 case attr: @<Cases for |attr|@>@; @+break;
1193 case default_like: @<Cases for |default_like|@>@; @+break;
1194 }
1195 pp++; /* if no match was found, we move to the right */
1196 @y
1197 switch (pp->cat) {
1198 @<Cases for |pp->cat|@>@;
1199 }
1200 pp++; /* if no match was found, we move to the right */
1201
1202 @ @<Cases for |pp->cat|@>=@t\1\5\5@>
1203 case exp: @<Cases for |exp|@>@; @+break;
1204 case lpar: @<Cases for |lpar|@>@; @+break;
1205 case unop: @<Cases for |unop|@>@; @+break;
1206 case ubinop: @<Cases for |ubinop|@>@; @+break;
1207 case binop: @<Cases for |binop|@>@; @+break;
1208 case cast: @<Cases for |cast|@>@; @+break;
1209 case sizeof_like: @<Cases for |sizeof_like|@>@; @+break;
1210 case int_like: @<Cases for |int_like|@>@; @+break;
1211 case public_like: @<Cases for |public_like|@>@; @+break;
1212 case colcol: @<Cases for |colcol|@>@; @+break;
1213 case decl_head: @<Cases for |decl_head|@>@; @+break;
1214 case decl: @<Cases for |decl|@>@; @+break;
1215 case base: @<Cases for |base|@>@; @+break;
1216 case struct_like: @<Cases for |struct_like|@>@; @+break;
1217 case struct_head: @<Cases for |struct_head|@>@; @+break;
1218 case fn_decl: @<Cases for |fn_decl|@>@; @+break;
1219 case function: @<Cases for |function|@>@; @+break;
1220 case lbrace: @<Cases for |lbrace|@>@; @+break;
1221 case if_like: @<Cases for |if_like|@>@; @+break;
1222 case else_like: @<Cases for |else_like|@>@; @+break;
1223 case else_head: @<Cases for |else_head|@>@; @+break;
1224 case if_clause: @<Cases for |if_clause|@>@; @+break;
1225 case if_head: @<Cases for |if_head|@>@; @+break;
1226 case do_like: @<Cases for |do_like|@>@; @+break;
1227 case case_like: @<Cases for |case_like|@>@; @+break;
1228 case catch_like: @<Cases for |catch_like|@>@; @+break;
1229 case tag: @<Cases for |tag|@>@; @+break;
1230 case stmt: @<Cases for |stmt|@>@; @+break;
1231 case semi: @<Cases for |semi|@>@; @+break;
1232 case lproc: @<Cases for |lproc|@>@; @+break;
1233 case section_scrap: @<Cases for |section_scrap|@>@; @+break;
1234 case insert: @<Cases for |insert|@>@; @+break;
1235 case prelangle: @<Cases for |prelangle|@>@; @+break;
1236 case prerangle: @<Cases for |prerangle|@>@; @+break;
1237 case langle: @<Cases for |langle|@>@; @+break;
1238 case template_like: @<Cases for |template_like|@>@; @+break;
1239 case new_like: @<Cases for |new_like|@>@; @+break;
1240 case new_exp: @<Cases for |new_exp|@>@; @+break;
1241 case ftemplate: @<Cases for |ftemplate|@>@; @+break;
1242 case for_like: @<Cases for |for_like|@>@; @+break;
1243 case raw_ubin: @<Cases for |raw_ubin|@>@; @+break;
1244 case const_like: @<Cases for |const_like|@>@; @+break;
1245 case raw_int: @<Cases for |raw_int|@>@; @+break;
1246 case operator_like: @<Cases for |operator_like|@>@; @+break;
1247 case typedef_like: @<Cases for |typedef_like|@>@; @+break;
1248 case delete_like: @<Cases for |delete_like|@>@; @+break;
1249 case question: @<Cases for |question|@>@; @+break;
1250 case alignas_like: @<Cases for |alignas_like|@>@; @+break;
1251 case lbrack: @<Cases for |lbrack|@>@; @+break;
1252 case attr_head: @<Cases for |attr_head|@>@; @+break;
1253 case attr: @<Cases for |attr|@>@; @+break;
1254 case default_like: @<Cases for |default_like|@>@; @+break;
1255 @z
1256
1257 Section 137.
1258
1259 @x
1260 should say, for example, `\.{@@!@@\^\\\&\{operator\} \$+\{=\}\$@@>}' (or,
1261 more properly alpha\-betized,
1262 `\.{@@!@@:operator+=\}\{\\\&\{operator\} \$+\{=\}\$@@>}').
1263 @y
1264 should say, for example, `\.{@@!@@\^\\\&\{operator\}} \.{\$+\{=\}\$@@>}'
1265 (or, properly alpha\-betized,
1266 `\.{@@!@@:operator+=\}\{\\\&\{operator\}} \.{\$+\{=\}\$@@>}').
1267 @-find_first_ident@>
1268 @-make_reserved@>
1269 @-make_underlined@>
1270 @-underline_xref@>
1271 @-no_ident_found@>
1272 @-case_found@>
1273 @-operator_found@>
1274 @$no_ident_found {CTWILL}137 =\hfil\break(\&{token\_pointer}) 0@>
1275 @$case_found {CTWILL}137 =\hfil\break(\&{token\_pointer}) 1@>
1276 @$operator_found {CTWILL}137 =\hfil\break(\&{token\_pointer}) 2@>
1277 @z
1278
1279 Section 139.
1280
1281 @x
1282 the |for| loop below.
1283
1284 We use the fact that |make_underlined| has been called immediately preceding
1285 |make_reserved|, hence |tok_loc| has been set.
1286 @y
1287 the |for| loop below.
1288 We use the fact that |make_underlined| has been called immediately preceding
1289 |make_reserved|, hence |tok_loc| has been set.
1290 @z
1291
1292 @x
1293 make_reserved( /* make the first identifier in |p->trans| like |int| */
1294 scrap_pointer p)
1295 @y
1296 make_reserved( /* make the first identifier in |p->trans| like |int| */
1297 scrap_pointer p)
1298 @-make_reserved@>
1299 @$make_reserved {CTWILL}139 \&{static} \&{void} (\,)@>
1300 @z
1301
1302 Section 140.
1303
1304 @x
1305 @ In the following situations we want to mark the occurrence of
1306 @y
1307 @r @ In the following situations we want to mark the occurrence of
1308 @z
1309
1310 @x
1311 make_underlined(
1312 /* underline the entry for the first identifier in |p->trans| */
1313 scrap_pointer p)
1314 @y
1315 make_underlined(
1316 /* underline the entry for the first identifier in |p->trans| */
1317 scrap_pointer p)
1318 @-make_underlined@>
1319 @$make_underlined {CTWILL}140 \&{static} \&{void} (\,)@>
1320 @z
1321
1322 @x
1323 return; /* this happens, for example, in |case found:| */
1324 @y
1325 return; /* this happens, for example, in \&{case} \\{found}: */
1326 @z
1327
1328 Section 141.
1329
1330 @x
1331 xref_pointer q=(xref_pointer)p->xref; /* pointer to cross-reference being examined */
1332 @y
1333 @+ xref_pointer q=(xref_pointer)p->xref; /* pointer to cross-reference being examined */
1334 @z
1335 @x
1336 while (q != xmem) {
1337 @y
1338 while (q != xmem) { @+
1339 @z
1340 @x
1341 else if (m==n+def_flag) {
1342 q->num=m; return;
1343 @y
1344 else if (m==n+def_flag) { @+
1345 q->num=m; return; @+
1346 @z
1347
1348 Section 143.
1349
1350 @x
1351 strcpy(ministring_buf,"label");
1352 @y
1353 strcpy(ministring_buf,"label");@/
1354 @z
1355
1356 @x
1357 else if (cat1==attr) {
1358 @y
1359 else @/ if (cat1==attr) {
1360 @z
1361
1362 Section 157.
1363
1364 @x
1365 @ @<Cases for |struct_head|@>=
1366 @y
1367 @r @ @<Cases for |struct_head|@>=
1368 @z
1369
1370 Section 164.
1371
1372 @x
1373 else reduce(pp,0,else_like,0,65);
1374 }
1375 else if (cat1==attr) {
1376 @y
1377 @+else reduce(pp,0,else_like,0,65);
1378 }
1379 @+ else @/ if (cat1==attr) {
1380 @z
1381
1382 Section 170.
1383
1384 @x
1385 @d force_lines flags['f'] /* should each statement be on its own line? */
1386 @d force_first flags['F'] /* should compound statement start on new line? */
1387 @y
1388 @d force_lines flags['f'] /* should each statement be on its own line? */
1389 @-force_lines@> @$force_lines {CTWILL}170 =\\{flags}[\.{'f'}]@>
1390 @d force_first flags['F'] /* should compound statement start on new line? */
1391 @-force_first@> @$force_first {CTWILL}170 =\\{flags}[\.{'F'}]@>
1392 @z
1393
1394 Section 173.
1395
1396 @x
1397 } else if (cat1==exp || cat1==function) {
1398 @y
1399 } @+ else @/ if (cat1==exp || cat1==function) {
1400 @z
1401
1402 Section 178.
1403
1404 @x
1405 app(opt); app('9'); reduce(pp,4,langle,0,153);
1406 }
1407 else reduce(pp,4,cast,-1,154);
1408 @y
1409 app(opt); app('9'); reduce(pp,4,langle,0,153);
1410 } @+
1411 else reduce(pp,4,cast,-1,154);
1412 @z
1413
1414 Section 179.
1415
1416 @x
1417 big_app1_insert(pp,' '); reduce(pp,2,struct_like,0,155);
1418 }
1419 else reduce(pp,0,raw_int,0,91);
1420 @y
1421 big_app1_insert(pp,' '); reduce(pp,2,struct_like,0,155);
1422 } @+
1423 else reduce(pp,0,raw_int,0,91);
1424 @z
1425
1426 Section 181.
1427
1428 @x
1429 big_app1(pp+2); reduce(pp,3,new_exp,0,96);
1430 }
1431 else if (cat1==raw_ubin) {
1432 @y
1433 big_app1(pp+2); reduce(pp,3,new_exp,0,96);
1434 }
1435 @+ else @/ if (cat1==raw_ubin) {
1436 @z
1437
1438 Section 197.
1439
1440 @x
1441 @ Now here's the |reduce| procedure used in our code for productions,
1442 @y
1443 @r @ Now here's the |reduce| procedure used in our code for productions,
1444 @z
1445 @x
1446 scrap_pointer i; /* pointer into scrap memory */
1447 @y
1448 @+ scrap_pointer i; /* pointer into scrap memory */
1449 @z
1450 @x
1451 pp--; /* we next say |pp++| */
1452 @y
1453 @z
1454
1455 Section 198.
1456
1457 @x
1458 switch (k) {
1459 @y
1460 @+ switch (k) {
1461 @z
1462
1463 Section 199.
1464
1465 @x
1466 static int tracing=off; /* can be used to show parsing details */
1467 @y
1468 @+ static int tracing=off; /* used to show parsing details */
1469 @z
1470
1471 Section 200.
1472
1473 @x
1474 @ @<Print a snapsh...@>=
1475 @y
1476 @ @<Print a snapsh...@>=
1477 @-n@>
1478 @%
1479 @$n {CTWILL}197 \&{short}@>
1480 @z
1481 @x
1482 }
1483 @y
1484 }
1485 pp--; /* we next say |pp++| */
1486 @z
1487
1488 Section 202.
1489
1490 @x
1491 @ If we get to the end of the scrap list, category codes equal to zero are
1492 @y
1493 @r @ If we get to the end of the scrap list, category codes equal to zero are
1494 @-j@>
1495 @%
1496 @$j {CTWILL}203 \&{scrap\_pointer}@>
1497 @z
1498
1499 Section 204.
1500
1501 @x
1502 @ @<Predecl...@>=@+static text_pointer translate(void);
1503 @y
1504 @ @<Predecl...@>=@+static text_pointer translate(void);
1505 @-translate@>
1506 @z
1507
1508 Section 208.
1509
1510 @x
1511 if (next_control=='|' || next_control==begin_comment ||
1512 next_control==begin_short_comment) return;
1513 @y
1514 @-C_parse@>
1515 @$C_parse {CTWILL}208 \&{static} \&{void} (\,)@>
1516 if (next_control=='|' || next_control==begin_comment @| ||
1517 next_control==begin_short_comment) return;
1518 @z
1519
1520 Section 209.
1521
1522 @x
1523 @ @<Predecl...@>=@+static void C_parse(eight_bits);
1524 @y
1525 @ @<Predecl...@>=@+static void C_parse(eight_bits);
1526 @-C_parse@>
1527 @z
1528
1529 Section 210.
1530
1531 @x
1532 @ The following macro is used to append a scrap whose tokens have just
1533 @y
1534 @ The following macro is used to append a scrap whose tokens have just
1535 @-b@>
1536 @-c@>
1537 @z
1538
1539 Section 211.
1540
1541 @x
1542 @ @<Append the scr...@>=
1543 @<Make sure that there is room for the new scraps, tokens, and texts@>@;
1544 @y
1545 @ @<Append the scr...@>=
1546 @#
1547 @<Make sure that there is room for the new scraps, tokens, and texts@>@;
1548 @#
1549 @z
1550
1551 @x
1552 case '/': case '.':
1553 app(next_control);@+app_scrap(binop,yes_math);@+break;
1554 case '<': app_str("\\langle");@+app_scrap(prelangle,yes_math);@+break;
1555 @.\\langle@>
1556 case '>': app_str("\\rangle");@+app_scrap(prerangle,yes_math);@+break;
1557 @.\\rangle@>
1558 case '=': app_str("\\K");@+app_scrap(binop,yes_math);@+break;
1559 @.\\K@>
1560 case '|': app_str("\\OR");@+app_scrap(binop,yes_math);@+break;
1561 @.\\OR@>
1562 case '^': app_str("\\XOR");@+app_scrap(binop,yes_math);@+break;
1563 @.\\XOR@>
1564 case '%': app_str("\\MOD");@+app_scrap(binop,yes_math);@+break;
1565 @.\\MOD@>
1566 case '!': app_str("\\R");@+app_scrap(unop,yes_math);@+break;
1567 @.\\R@>
1568 case '~': app_str("\\CM");@+app_scrap(unop,yes_math);@+break;
1569 @.\\CM@>
1570 case '+': case '-': app(next_control);@+app_scrap(ubinop,yes_math);@+break;
1571 case '*': app(next_control);@+app_scrap(raw_ubin,yes_math);@+break;
1572 case '&': app_str("\\AND");@+app_scrap(raw_ubin,yes_math);@+break;
1573 @.\\AND@>
1574 case '?': app_str("\\?");@+app_scrap(question,yes_math);@+break;
1575 @.\\?@>
1576 case '#': app_str("\\#");@+app_scrap(ubinop,yes_math);@+break;
1577 @.\\\#@>
1578 case ignore: case xref_roman: case xref_wildcard:
1579 case meaning: case suppress:
1580 case xref_typewriter: case noop:@+break;
1581 case '(': app(next_control);@+app_scrap(lpar,maybe_math);@+break;
1582 case ')': app(next_control);@+app_scrap(rpar,maybe_math);@+break;
1583 case '[': app(next_control);@+app_scrap(lbrack,maybe_math);@+break;
1584 case ']': app(next_control);@+app_scrap(rbrack,maybe_math);@+break;
1585 case '{': app_str("\\{"@q}@>);@+app_scrap(lbrace,yes_math);@+break;
1586 @.\\\{@>@q}@>
1587 case '}': app_str(@q{@>"\\}");@+app_scrap(rbrace,yes_math);@+break;
1588 @q{@>@.\\\}@>
1589 case ',': app(',');@+app_scrap(comma,yes_math);@+break;
1590 case ';': app(';');@+app_scrap(semi,maybe_math);@+break;
1591 case ':': app(':');@+app_scrap(colon,no_math);@+break;@/
1592 @t\4@> @<Cases involving nonstandard characters@>@;
1593 @y
1594 case ignore: case xref_roman: case xref_wildcard: case meaning: @/
1595 case suppress: case xref_typewriter: case noop:@+break;
1596 @#
1597 @t\4@> @<Cases for operators and syntax markers@>@;
1598 @t\4@> @<Cases involving nonstandard characters@>@;
1599 @#
1600 @z
1601
1602 Section 212--213.
1603
1604 @x
1605 overflow(_("scrap/token/text"));
1606 }
1607 @y
1608 overflow(_("scrap/token/text"));
1609 }
1610
1611 @ @<Cases for operators...@>=@t\1\5\5@>
1612 case '/': case '.':
1613 app(next_control);@+app_scrap(binop,yes_math);@+break;
1614 case '<': app_str("\\langle");@+app_scrap(prelangle,yes_math);@+break;
1615 @.\\langle@>
1616 case '>': app_str("\\rangle");@+app_scrap(prerangle,yes_math);@+break;
1617 @.\\rangle@>
1618 case '=': app_str("\\K");@+app_scrap(binop,yes_math);@+break;
1619 @.\\K@>
1620 case '|': app_str("\\OR");@+app_scrap(binop,yes_math);@+break;
1621 @.\\OR@>
1622 case '^': app_str("\\XOR");@+app_scrap(binop,yes_math);@+break;
1623 @.\\XOR@>
1624 case '%': app_str("\\MOD");@+app_scrap(binop,yes_math);@+break;
1625 @.\\MOD@>
1626 case '!': app_str("\\R");@+app_scrap(unop,yes_math);@+break;
1627 @.\\R@>
1628 case '~': app_str("\\CM");@+app_scrap(unop,yes_math);@+break;
1629 @.\\CM@>
1630 case '+': case '-': app(next_control);@+app_scrap(ubinop,yes_math);@+break;
1631 case '*': app(next_control);@+app_scrap(raw_ubin,yes_math);@+break;
1632 case '&': app_str("\\AND");@+app_scrap(raw_ubin,yes_math);@+break;
1633 @.\\AND@>
1634 case '?': app_str("\\?");@+app_scrap(question,yes_math);@+break;
1635 @.\\?@>
1636 case '#': app_str("\\#");@+app_scrap(ubinop,yes_math);@+break;
1637 @.\\\#@>
1638 case '(': app(next_control);@+app_scrap(lpar,maybe_math);@+break;
1639 case ')': app(next_control);@+app_scrap(rpar,maybe_math);@+break;
1640 case '[': app(next_control);@+app_scrap(lbrack,maybe_math);@+break;
1641 case ']': app(next_control);@+app_scrap(rbrack,maybe_math);@+break;
1642 case '{': app_str("\\{"@q}@>);@+app_scrap(lbrace,yes_math);@+break;
1643 @.\\\{@>@q}@>
1644 case '}': app_str(@q{@>"\\}");@+app_scrap(rbrace,yes_math);@+break;
1645 @q{@>@.\\\}@>
1646 case ',': app(',');@+app_scrap(comma,yes_math);@+break;
1647 case ';': app(';');@+app_scrap(semi,maybe_math);@+break;
1648 case ':': app(':');@+app_scrap(colon,no_math);@+break;@/
1649 @z
1650
1651 Section 215.
1652
1653 @x
1654 if (count==0) { /* insert a discretionary break in a long string */
1655 app_str(@q(@>@q{@>"}\\)\\.{"@q}@>); count=20;
1656 @y
1657 if (count==0) {
1658 count=20; @/ /* insert a discretionary break in a long string */
1659 app_str(@q(@>@q{@>"}\\)\\.{"@q}@>);
1660 @z
1661
1662 Section 220.
1663
1664 @x
1665 @ The |outer_parse| routine is to |C_parse| as |outer_xref|
1666 @y
1667 @r @ The |outer_parse| routine is to |C_parse| as |outer_xref|
1668 @z
1669
1670 @x
1671 @d make_pb flags['e']
1672 @y
1673 @d make_pb flags['e']
1674 @-make_pb@>
1675 @$make_pb {CTWILL}220 =\\{flags}[\.{'e'}]@>
1676 @z
1677
1678 Section 224.
1679
1680 @x
1681 @d cur_mode cur_state.mode_field /* current mode of interpretation */
1682 @y
1683 @d cur_mode cur_state.mode_field /* current mode of interpretation */
1684 @-cur_end@>
1685 @-cur_tok@>
1686 @-cur_mode@>
1687 @$cur_end {CTWILL}224 =\\{cur\_state}.\\{end\_field}@>
1688 @$cur_tok {CTWILL}224 =\\{cur\_state}.\\{tok\_field}@>
1689 @$cur_mode {CTWILL}224 =\\{cur\_state}.\\{mode\_field}@>
1690 @z
1691
1692 Section 227.
1693
1694 @x
1695 @ To insert token-list |p| into the output, the |push_level| subroutine
1696 @y
1697 @r @ To insert token-list |p| into the output, the |push_level| subroutine
1698 @z
1699
1700 @x
1701 push_level( /* suspends the current level */
1702 text_pointer p)
1703 @y
1704 push_level( /* suspends the current level */
1705 text_pointer p)
1706 @-push_level@>
1707 @$push_level {CTWILL}227 \&{static} \&{void} (\,)@>
1708 @z
1709
1710 Section 228.
1711
1712 @x
1713 force when the current level was begun. This subroutine will never be
1714 called when |stack_ptr==1|. It is so simple, we declare it as a macro:
1715 @y
1716 force when the current level was begun. It is so simple, we declare it as a
1717 macro. This subroutine will never be called when |stack_ptr==1|.
1718 @z
1719
1720 Section 233--234.
1721
1722 @x
1723 @ Here is \.{CWEAVE}'s major output handler.
1724 @y
1725 @r @ Here is \.{CWEAVE}'s major output handler.
1726 @z
1727
1728 @x
1729 reswitch: switch(a) {
1730 case end_translation: return;
1731 case identifier: case res_word: @<Output an identifier@>@; break;
1732 case section_code: @<Output a section name@>@; break;
1733 case math_rel: out_str("\\MRL{"@q}@>); @=/* fall through */@>@;
1734 @.\\MRL@>
1735 case noop: case inserted: break;
1736 case cancel: case big_cancel: c=0; b=a;
1737 while (true) {
1738 a=get_output();
1739 if (a==inserted) continue;
1740 if ((a<indent && !(b==big_cancel&&a==' ')) @|
1741 || (a>big_force && a!=dindent)) break;
1742 switch (a) {
1743 case dindent: c++; @=/* fall through */@>@;
1744 case indent: c++; break;
1745 case outdent: c--; break;
1746 case opt: a=get_output();
1747 }
1748 }
1749 @<Output saved |indent| or |outdent| tokens@>@;
1750 goto reswitch;
1751 case dindent: a=get_output();
1752 if (a!=big_force) {
1753 out_str("\\1\\1"); goto reswitch;
1754 }
1755 else dindent_pending=true; @=/* fall through */@>@;
1756 case indent: case outdent: case opt: case backup: case break_space:
1757 case force: case big_force: case preproc_line: @<Output a control,
1758 look ahead in case of line breaks, possibly |goto reswitch|@>@; break;
1759 case quoted_char: out(*(cur_tok++)); @=/* fall through */@>@;
1760 case qualifier: break;
1761 default: out(a); /* otherwise |a| is an ordinary character */
1762 }
1763 }
1764 }
1765 @y
1766 @/@<The output |switch|@>@;
1767 }
1768 }
1769
1770 @ @<The output |switch|@>=
1771 reswitch: switch(a) {
1772 case end_translation: return;
1773 case identifier: case res_word: @<Output an identifier@>@; break;
1774 case section_code: @<Output a section name@>@; break;
1775 case math_rel: out_str("\\MRL{"@q}@>); @=/* fall through */@>@;
1776 @.\\MRL@>
1777 case noop: case inserted: break;
1778 case cancel: case big_cancel: c=0; b=a;
1779 while (true) {
1780 a=get_output();
1781 if (a==inserted) continue;
1782 if ((a<indent && !(b==big_cancel&&a==' ')) @|
1783 || (a>big_force && a!=dindent)) break;
1784 switch (a) {
1785 case dindent: c++; @=/* fall through */@>@;
1786 case indent: c++; break;
1787 case outdent: c--; break;
1788 case opt: a=get_output();
1789 }
1790 }
1791 @<Output saved |indent| or |outdent| tokens@>@;
1792 goto reswitch;
1793 case dindent: a=get_output();
1794 if (a!=big_force) {
1795 out_str("\\1\\1"); goto reswitch;
1796 }
1797 else dindent_pending=true; @=/* fall through */@>@;
1798 case indent: case outdent: case opt: case backup: case break_space:
1799 case force: case big_force: case preproc_line: @<Output a control,
1800 look ahead in case of line breaks, possibly |goto reswitch|@>@; break;
1801 case quoted_char: out(*(cur_tok++)); @=/* fall through */@>@;
1802 case qualifier: break;
1803 default: out(a); /* otherwise |a| is an ordinary character */
1804 }
1805 @z
1806
1807 Section 235.
1808
1809 @x
1810 @ An identifier of length one does not have to be enclosed in braces, and it
1811 @y
1812 @r @ An identifier of length one does not have to be enclosed in braces, and it
1813 @z
1814
1815 Section 236.
1816
1817 @x
1818 } else if (a==opt) b=get_output(); /* ignore digit following |opt| */
1819 @y
1820 }@+ else if (a==opt) b=get_output(); /* ignore digit following |opt| */
1821 @z
1822
1823 Section 237.
1824
1825 @x
1826 @<Look ahead for st...@>= {
1827 b=a; save_mode=cur_mode;
1828 if (dindent_pending) {
1829 c=2; dindent_pending=false;
1830 } else c=0;
1831 @y
1832 @<Look ahead for st...@>= {@+
1833 b=a; save_mode=cur_mode;
1834 if (dindent_pending) {@+
1835 c=2; dindent_pending=false;@+
1836 } else c=0;
1837 @z
1838
1839 @x
1840 while (true) {
1841 @y
1842 while (true) {@+
1843 @z
1844
1845 Section 240.
1846
1847 @x
1848 case ' ': case '\\': case '#': case '%': case '$': case '^':
1849 case '{': case '}': case '~': case '&': case '_':
1850 out('\\'); @=/* falls through */@>@;
1851 @y
1852 case ' ': case '\\': case '#': case '%': @/
1853 case '$': case '^': case '{': case '}': @/
1854 case '~': case '&': case '_': @/
1855 out('\\'); @=/* falls through */@>@;
1856 @z
1857
1858 Section 242.
1859
1860 @x
1861 if (b=='@@' || (b=='\\' && delim!=0))
1862 @y
1863 if (b=='@@' || (b=='\\' && delim!=0)) @/
1864 @z
1865
1866 Section 244.
1867
1868 @x
1869 phase_two(void) {
1870 @y
1871 phase_two(void) {@+
1872 @z
1873
1874 Section 245.
1875
1876 @x
1877 @ @<Predecl...@>=@+static void phase_two(void);
1878 @y
1879 @ @<Predecl...@>=@+static void phase_two(void);
1880 @-phase_two@>
1881 @z
1882
1883 Section 246.
1884
1885 @x
1886 @d save_position() save_line=out_line; save_place=out_ptr
1887 @y
1888 @d usage_sentinel (struct perm_meaning *)1
1889 @-usage_sentinel@>
1890 @$usage_sentinel {CTWILL}247 =(\&{struct} \&{perm\_meaning} ${}{*}{}$) \T{1}@>
1891 @d save_position() save_line=out_line; save_place=out_ptr
1892 @z
1893
1894 Section 247.
1895
1896 @x
1897 @ @d usage_sentinel (struct perm_meaning *)1
1898 @<Translate the \9{c}current section@>= {
1899 @y
1900 @ @<Translate the \9{c}current section@>= @+ {
1901 @z
1902
1903 Section 249.
1904
1905 @x
1906 case section_name: loc-=2; next_control=get_next(); /* reprocess */
1907 @y
1908 case section_name: @/ loc-=2; @/ next_control=get_next(); /* reprocess */
1909 @z
1910
1911 Section 251.
1912
1913 @x
1914 finish_C( /* finishes a definition or a \CEE/ part */
1915 bool visible) /* |true| if we should produce \TeX\ output */
1916 @y
1917 finish_C( /* finishes a definition or a \CEE/ part */
1918 bool visible) /* |true| if we should produce \TeX\ output */
1919 @-finish_C@>
1920 @$finish_C {CTWILL}251 \&{static} \&{void} (\,)@>
1921 @z
1922
1923 Section 252.
1924
1925 @x
1926 @ @<Predecl...@>=@+static void finish_C(bool);
1927 @y
1928 @ @<Predecl...@>=@+static void finish_C(bool);
1929 @-finish_C@>
1930 @z
1931
1932 Section 254.
1933
1934 @x
1935 @ @<Start \9{a}a format...@>= {
1936 @y
1937 @r @ @<Start \9{a}a format...@>= {
1938 @z
1939
1940 Section 255.
1941
1942 @x
1943 |next_control>=begin_C|. We will make the global variable |this_section|
1944 point to the current section name, if it has a name.
1945 @y
1946 \hfil\break|next_control>=begin_C|.
1947 We will make the global variable |this_section| point to
1948 \hfil\break the current section name, if it has a name.
1949 @z
1950
1951 Section 260.
1952
1953 @x
1954 footnote( /* outputs section cross-references */
1955 sixteen_bits flag)
1956 @y
1957 footnote( /* outputs section cross-references */
1958 sixteen_bits flag)
1959 @-footnote@>
1960 @$footnote {CTWILL}260 \&{static} \&{void} (\,)@>
1961 @z
1962
1963 Section 261.
1964
1965 @x
1966 @ @<Predecl...@>=@+static void footnote(sixteen_bits);
1967 @y
1968 @ @<Predecl...@>=@+static void footnote(sixteen_bits);
1969 @-footnote@>
1970 @z
1971
1972 Section 264.
1973
1974 @x
1975 @** Phase three processing.
1976 @y
1977 @r @** Phase three processing.
1978 @z
1979
1980 Section 265.
1981
1982 @x
1983 @ @<Predecl...@>=@+static void phase_three(void);
1984 @y
1985 @ @<Predecl...@>=@+static void phase_three(void);
1986 @-phase_three@>
1987 @z
1988
1989 Section 267.
1990
1991 @x
1992 @ A left-to-right radix sorting method is used, since this makes it easy to
1993 @y
1994 @ A left-to-right radix sorting method is used, since this makes it easy to
1995 @-c@>
1996 @z
1997
1998 @x l.4596
1999 the |blink| array.
2000 @y
2001 the |blink| array.
2002 \vadjust{\goodbreak}%
2003 @z
2004
2005 Section 269.
2006
2007 @x
2008 @<Rest of |trans_plus| union@>=
2009 @y
2010 @<Rest of |trans_plus| union@>=
2011 @-j@>
2012 @-k@>
2013 @z
2014
2015 Section 270.
2016
2017 @x
2018 @ @d depth cat /* reclaims memory that is no longer needed for parsing */
2019 @y
2020 @ @d depth cat /* reclaims memory that is no longer needed for parsing */
2021 @-depth@>
2022 @-head@>
2023 @-sort_ptr@>
2024 @-max_sorts@>
2025 @$depth {CTWILL}270 =\\{cat}@>
2026 @$head {CTWILL}270 =\\{trans\_plus}.\\{Head}@>
2027 @$sort_ptr {CTWILL}270 =\\{scrap\_ptr}@>
2028 @z
2029
2030 Section 272.
2031
2032 @x
2033 $|collate|[0]<|collate|[1]<\cdots<|collate|[100]$.
2034 @y
2035 |collate[0]| ${}<{}$|collate[1]|${}<\cdots<{}$|collate[100]|.
2036 @z
2037
2038 Section 274.
2039
2040 @x
2041 @ Procedure |unbucket| goes through the buckets and adds nonempty lists
2042 @y
2043 @ Procedure |unbucket| goes through the buckets and adds nonempty lists
2044 @-unbucket@>
2045 @$unbucket {CTWILL}274 \&{static} \&{void} (\,)@>
2046 @z
2047
2048 Section 275.
2049
2050 @x
2051 @ @<Predecl...@>=@+static void unbucket(eight_bits);
2052 @y
2053 @ @<Predecl...@>=@+static void unbucket(eight_bits);
2054 @-unbucket@>
2055 @z
2056
2057 Section 277.
2058
2059 @x
2060 @ @<Split the list...@>= {
2061 int c;
2062 next_name=sort_ptr->head;
2063 @y
2064 @ @<Split the list...@>= {@+
2065 int c; @+
2066 next_name=sort_ptr->head;@/
2067 @z
2068
2069 Section 278.
2070
2071 @x
2072 @ @<Output index...@>= {
2073 cur_name=sort_ptr->head;
2074 @y
2075 @ @<Output index...@>= { @+
2076 cur_name=sort_ptr->head;@/
2077 @z
2078
2079 Section 280.
2080
2081 @x
2082 else {out_str("\\["); out_section(cur_val-def_flag); out(']');}
2083 @y
2084 else {@+out_str("\\["); out_section(cur_val-def_flag); out(']');@+}
2085 @z
2086
2087 Section 284.
2088
2089 @x
2090 @ @<Predecl...@>=@+static void section_print(name_pointer);
2091 @y
2092 @ @<Predecl...@>=@+static void section_print(name_pointer);
2093 @-section_print@>
2094 @z
2095
2096 Section 286.
2097
2098 @x
2099 puts(_("\nMemory usage statistics:"));
2100 @.Memory usage statistics:@>
2101 printf(_("%td names (out of %ld)\n"),@^system dependencies@>
2102 (ptrdiff_t)(name_ptr-name_dir),(long)max_names);
2103 printf(_("%td cross-references (out of %ld)\n"),
2104 (ptrdiff_t)(xref_ptr-xmem),(long)max_refs);
2105 printf(_("%td bytes (out of %ld)\n"),
2106 (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes);
2107 printf(_("%td temp meanings (out of %ld)\n"),
2108 (ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),
2109 (long)max_meanings);
2110 printf(_("%td titles (out of %ld)\n"),
2111 (ptrdiff_t)(title_code_ptr-title_code),(long)max_titles);
2112 puts(_("Parsing:"));
2113 printf(_("%td scraps (out of %ld)\n"),
2114 (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps);
2115 printf(_("%td texts (out of %ld)\n"),
2116 (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts);
2117 printf(_("%td tokens (out of %ld)\n"),
2118 (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks);
2119 printf(_("%td levels (out of %ld)\n"),
2120 (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size);
2121 puts(_("Sorting:"));
2122 printf(_("%td levels (out of %ld)\n"),
2123 (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps);
2124 @y
2125 puts(_("\nMemory usage statistics:"));@/
2126 @.Memory usage statistics:@>
2127 printf(_("%td names (out of %ld)\n"),@^system dependencies@>
2128 (ptrdiff_t)(name_ptr-name_dir),@/
2129 @t\5\5\5\5@>(long)max_names);@/
2130 printf(_("%td cross-references (out of %ld)\n"),
2131 (ptrdiff_t)(xref_ptr-xmem),(long)max_refs);@/
2132 printf(_("%td bytes (out of %ld)\n"),
2133 (ptrdiff_t)(byte_ptr-byte_mem),@/
2134 @t\5\5\5\5@>(long)max_bytes);@/
2135 printf(_("%td temp meanings (out of %ld)\n"),
2136 (ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),@/
2137 @t\5\5\5\5@>(long)max_meanings);@/
2138 printf(_("%td titles (out of %ld)\n"),
2139 (ptrdiff_t)(title_code_ptr-title_code),@/
2140 @t\5\5\5\5@>(long)max_titles);@/
2141 puts(_("Parsing:"));@/
2142 printf(_("%td scraps (out of %ld)\n"),
2143 (ptrdiff_t)(max_scr_ptr-scrap_info),@/
2144 @t\5\5\5\5@>(long)max_scraps);@/
2145 printf(_("%td texts (out of %ld)\n"),
2146 (ptrdiff_t)(max_text_ptr-tok_start),@/
2147 @t\5\5\5\5@>(long)max_texts);@/
2148 printf(_("%td tokens (out of %ld)\n"),
2149 (ptrdiff_t)(max_tok_ptr-tok_mem),@/
2150 @t\5\5\5\5@>(long)max_toks);@/
2151 printf(_("%td levels (out of %ld)\n"),
2152 (ptrdiff_t)(max_stack_ptr-stack),@/
2153 @t\5\5\5\5@>(long)stack_size);@/
2154 puts(_("Sorting:"));@/
2155 printf(_("%td levels (out of %ld)\n"),
2156 (ptrdiff_t)(max_sort_ptr-scrap_info),@/
2157 @t\5\5\5\5@>(long)max_scraps);
2158 @z
2159
2160 Section 287.
2161
2162 @x
2163 @** Mogrify {\tentex CWEAVE} into {\tentex CTWILL}. The following sections
2164 introduce material that is specific to \.{CTWILL}.
2165
2166 Care has been taken to keep the original section numbering of \.{CWEAVE}
2167 up to this point intact, so this new material should nicely integrate
2168 with the original ``\&{270.~Index}.''
2169
2170 @q Section 2->271. @>
2171 @* {\tentex CTWILL} user manual.
2172 Here is a sort of user manual for \.{CTWILL}---which is exactly like
2173 @y
2174 @** Mogrify {\tentex CWEAVE} into {\tentex CTWILL}.
2175 Here is a sort of user manual for \.{CTWILL}%
2176 \ifluatex, \else---\fi which is exactly like
2177 @-s@>
2178 @z
2179
2180 @x
2181 give it the necessary hints in other places via your change file.
2182 @y
2183 give it the necessary hints in other places via your change file.
2184 @-f@>
2185 @-x@>
2186 @z
2187
2188 Section 288--289.
2189
2190 @x
2191 The current meaning of every identifier is initially `\.{\\uninitialized}'.
2192 @y
2193 @r @ The current meaning of every identifier is initially `\.{\\uninitialized}'.
2194 @-printf@>
2195 @z
2196
2197 @x
2198 must have fewer than 80 characters. If the \TeX\ part starts
2199 @y
2200 must have fewer than 80 characters.
2201
2202 @d max_tex_chars 80 /* limit on the \TeX\ part of a meaning */
2203 @-s@>
2204
2205 @ If the \TeX\ part starts
2206 @z
2207
2208 @x
2209 @d max_tex_chars 80 /* limit on the \TeX\ part of a meaning */
2210 @y
2211 @z
2212
2213 Section 291.
2214
2215 @x
2216 static struct perm_meaning {
2217 @y
2218 static struct perm_meaning {
2219 @-perm_meaning@>
2220 @$perm_meaning {CTWILL}291 \&{static} \&{struct}@>
2221 @z
2222
2223 Section 300.
2224
2225 @x
2226 @ @<Predec...@>=@+static bool app_supp(text_pointer);
2227 @y
2228 @ @<Predec...@>=@+static bool app_supp(text_pointer);
2229 @-app_supp@>
2230 @z
2231
2232 Section 301.
2233
2234 @x
2235 @ The trickiest part of \.{CTWILL} is the procedure |make_ministring(pp+l)|,
2236 @y
2237 @r @ The trickiest part of \.{CTWILL} is the procedure |make_ministring(pp+l)|,
2238 @-a@>
2239 @-b@>
2240 @-c@>
2241 @-l@>
2242 @-make_ministring@>
2243 @$make_ministring {CTWILL}301 \&{static} \&{void} (\,)@>
2244 @z
2245
2246 Section 302.
2247
2248 @x
2249 @ @<Predec...@>=@+static void make_ministring(scrap_pointer);
2250 @y
2251 @ @<Predec...@>=@+static void make_ministring(scrap_pointer);
2252 @-make_ministring@>
2253 @z
2254
2255 Section 305.
2256
2257 @x
2258 @ @<Append tokens for type |q|@>=
2259 @y
2260 @r @ @<Append tokens for type |q|@>=
2261 @z
2262
2263 @x
2264 && *(*r+1)=='{') app(**q); /* |struct_like| identifier */
2265 @y
2266 @|&& *(*r+1)=='{') app(**q); /* |struct_like| identifier */
2267 @z
2268
2269 Section 310.
2270
2271 @x
2272 @ @<Write the new meaning to the \.{.aux} file@>=
2273 @y
2274 @ @<Write the new meaning to the \.{.aux} file@>=
2275 @%
2276 @$p {CTWILL}294 \&{name\_pointer}@>
2277 @$q {CTWILL}294 \&{struct perm\_meaning} ${}{*}{}$@>
2278 @z
2279
2280 Section 311.
2281
2282 @x
2283 @<Flag the usage of this identifier, for the mini-index@>=
2284 @y
2285 @<Flag the usage of this identifier, for the mini-index@>=
2286 @%
2287 @$p {CTWILL}218 \&{name\_pointer}@>
2288 @z
2289
2290 Section 314.
2291
2292 @x
2293 @ @<Predec...@>=@+static void out_mini(meaning_struct *);
2294 @y
2295 @ @<Predec...@>=@+static void out_mini(meaning_struct *);
2296 @-out_mini@>
2297 @z
2298
2299 Section 317.
2300
2301 @x
2302 @ @<Predec...@>=@+static sixteen_bits title_lookup(void);
2303 @y
2304 @ @<Predec...@>=@+static sixteen_bits title_lookup(void);
2305 @-title_lookup@>
2306 @z
2307
2308 Section 320.
2309
2310 @x
2311 @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */
2312 @y
2313 @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */
2314 @-indent_param_decl@>
2315 @$indent_param_decl {CTWILL}320 =\\{flags}[\.{'i'}]@>
2316 @z
2317
2318 Section 321.
2319
2320 @x
2321 @d order_decl_stmt flags['o'] /* should declarations and statements be separated? */
2322 @y
2323 @d order_decl_stmt flags['o'] /* should declarations and statements be separated? */
2324 @-order_decl_stmt@>
2325 @$order_decl_stmt {CTWILL}321 =\\{flags}[\.{'o'}]@>
2326 @z
2327
2328 Section 327.
2329
2330 @x l.102 of CTWILL-TEXLIVE.CH
2331 @d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)
2332 @y
2333 @d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)
2334 @-name@>
2335 @z
2336
2337 Section 329.
2338
2339 @x
2340 @** Index.
2341 If you have read and understood the code for Phase III above, you know what
2342 is in this index and how it got here. All sections in which an identifier is
2343 used are listed with that identifier, except that reserved words are
2344 indexed only when they appear in format definitions, and the appearances
2345 of identifiers in section names are not indexed. Underlined entries
2346 correspond to where the identifier was declared. Error messages, control
2347 sequences put into the output, and a few
2348 other things like ``recursion'' are indexed here too.
2349 @y
2350 @z