5 static char *printname
[92] = {
6 (char *) "FIRSTTOKEN", /* 258 */
7 (char *) "PROGRAM", /* 259 */
8 (char *) "PASTAT", /* 260 */
9 (char *) "PASTAT2", /* 261 */
10 (char *) "XBEGIN", /* 262 */
11 (char *) "XEND", /* 263 */
12 (char *) "NL", /* 264 */
13 (char *) "ARRAY", /* 265 */
14 (char *) "MATCH", /* 266 */
15 (char *) "NOTMATCH", /* 267 */
16 (char *) "MATCHOP", /* 268 */
17 (char *) "FINAL", /* 269 */
18 (char *) "DOT", /* 270 */
19 (char *) "ALL", /* 271 */
20 (char *) "CCL", /* 272 */
21 (char *) "NCCL", /* 273 */
22 (char *) "CHAR", /* 274 */
23 (char *) "OR", /* 275 */
24 (char *) "STAR", /* 276 */
25 (char *) "QUEST", /* 277 */
26 (char *) "PLUS", /* 278 */
27 (char *) "AND", /* 279 */
28 (char *) "BOR", /* 280 */
29 (char *) "APPEND", /* 281 */
30 (char *) "EQ", /* 282 */
31 (char *) "GE", /* 283 */
32 (char *) "GT", /* 284 */
33 (char *) "LE", /* 285 */
34 (char *) "LT", /* 286 */
35 (char *) "NE", /* 287 */
36 (char *) "IN", /* 288 */
37 (char *) "ARG", /* 289 */
38 (char *) "BLTIN", /* 290 */
39 (char *) "BREAK", /* 291 */
40 (char *) "CLOSE", /* 292 */
41 (char *) "CONTINUE", /* 293 */
42 (char *) "DELETE", /* 294 */
43 (char *) "DO", /* 295 */
44 (char *) "EXIT", /* 296 */
45 (char *) "FOR", /* 297 */
46 (char *) "FUNC", /* 298 */
47 (char *) "SUB", /* 299 */
48 (char *) "GSUB", /* 300 */
49 (char *) "IF", /* 301 */
50 (char *) "INDEX", /* 302 */
51 (char *) "LSUBSTR", /* 303 */
52 (char *) "MATCHFCN", /* 304 */
53 (char *) "NEXT", /* 305 */
54 (char *) "NEXTFILE", /* 306 */
55 (char *) "ADD", /* 307 */
56 (char *) "MINUS", /* 308 */
57 (char *) "MULT", /* 309 */
58 (char *) "DIVIDE", /* 310 */
59 (char *) "MOD", /* 311 */
60 (char *) "ASSIGN", /* 312 */
61 (char *) "ASGNOP", /* 313 */
62 (char *) "ADDEQ", /* 314 */
63 (char *) "SUBEQ", /* 315 */
64 (char *) "MULTEQ", /* 316 */
65 (char *) "DIVEQ", /* 317 */
66 (char *) "MODEQ", /* 318 */
67 (char *) "POWEQ", /* 319 */
68 (char *) "PRINT", /* 320 */
69 (char *) "PRINTF", /* 321 */
70 (char *) "SPRINTF", /* 322 */
71 (char *) "ELSE", /* 323 */
72 (char *) "INTEST", /* 324 */
73 (char *) "CONDEXPR", /* 325 */
74 (char *) "POSTINCR", /* 326 */
75 (char *) "PREINCR", /* 327 */
76 (char *) "POSTDECR", /* 328 */
77 (char *) "PREDECR", /* 329 */
78 (char *) "VAR", /* 330 */
79 (char *) "IVAR", /* 331 */
80 (char *) "VARNF", /* 332 */
81 (char *) "CALL", /* 333 */
82 (char *) "NUMBER", /* 334 */
83 (char *) "STRING", /* 335 */
84 (char *) "REGEXPR", /* 336 */
85 (char *) "GETLINE", /* 337 */
86 (char *) "SUBSTR", /* 338 */
87 (char *) "SPLIT", /* 339 */
88 (char *) "RETURN", /* 340 */
89 (char *) "WHILE", /* 341 */
90 (char *) "CAT", /* 342 */
91 (char *) "UMINUS", /* 343 */
92 (char *) "NOT", /* 344 */
93 (char *) "POWER", /* 345 */
94 (char *) "INCR", /* 346 */
95 (char *) "DECR", /* 347 */
96 (char *) "INDIRECT", /* 348 */
97 (char *) "LASTTOKEN", /* 349 */
101 Cell
*(*proctab
[92])(Node
**, int) = {
102 nullproc
, /* FIRSTTOKEN */
103 program
, /* PROGRAM */
106 nullproc
, /* XBEGIN */
111 matchop
, /* NOTMATCH */
112 nullproc
, /* MATCHOP */
113 nullproc
, /* FINAL */
121 nullproc
, /* QUEST */
125 nullproc
, /* APPEND */
136 closefile
, /* CLOSE */
138 awkdelete
, /* DELETE */
147 nullproc
, /* LSUBSTR */
148 matchop
, /* MATCHFCN */
157 nullproc
, /* ASGNOP */
164 printstat
, /* PRINT */
165 awkprintf
, /* PRINTF */
166 awksprintf
, /* SPRINTF */
169 condexpr
, /* CONDEXPR */
170 incrdecr
, /* POSTINCR */
171 incrdecr
, /* PREINCR */
172 incrdecr
, /* POSTDECR */
173 incrdecr
, /* PREDECR */
178 nullproc
, /* NUMBER */
179 nullproc
, /* STRING */
180 nullproc
, /* REGEXPR */
181 getline
, /* GETLINE */
185 whilestat
, /* WHILE */
192 indirect
, /* INDIRECT */
193 nullproc
, /* LASTTOKEN */
198 static char buf
[100];
200 if (n
< FIRSTTOKEN
|| n
> LASTTOKEN
) {
201 sprintf(buf
, "token %d", n
);
204 return printname
[n
-FIRSTTOKEN
];