1 #if HAVE_NBTOOL_CONFIG_H
2 #include "nbtool_config.h"
9 static const char * const printname
[94] = {
10 "FIRSTTOKEN", /* 57346 */
11 "PROGRAM", /* 57347 */
13 "PASTAT2", /* 57349 */
19 "NOTMATCH", /* 57355 */
20 "MATCHOP", /* 57356 */
31 "EMPTYRE", /* 57367 */
46 "CONTINUE", /* 57382 */
56 "LSUBSTR", /* 57392 */
57 "MATCHFCN", /* 57393 */
59 "NEXTFILE", /* 57395 */
75 "SPRINTF", /* 57411 */
78 "CONDEXPR", /* 57414 */
79 "POSTINCR", /* 57415 */
80 "PREINCR", /* 57416 */
81 "POSTDECR", /* 57417 */
82 "PREDECR", /* 57418 */
89 "REGEXPR", /* 57425 */
90 "GETLINE", /* 57426 */
102 "INDIRECT", /* 57438 */
103 "LASTTOKEN", /* 57439 */
107 Cell
*(*proctab
[94])(Node
**, int) = {
108 nullproc
, /* FIRSTTOKEN */
109 program
, /* PROGRAM */
112 nullproc
, /* XBEGIN */
117 matchop
, /* NOTMATCH */
118 nullproc
, /* MATCHOP */
119 nullproc
, /* FINAL */
127 nullproc
, /* QUEST */
129 nullproc
, /* EMPTYRE */
132 nullproc
, /* APPEND */
143 closefile
, /* CLOSE */
145 awkdelete
, /* DELETE */
154 nullproc
, /* LSUBSTR */
155 matchop
, /* MATCHFCN */
164 nullproc
, /* ASGNOP */
171 printstat
, /* PRINT */
172 awkprintf
, /* PRINTF */
173 awksprintf
, /* SPRINTF */
176 condexpr
, /* CONDEXPR */
177 incrdecr
, /* POSTINCR */
178 incrdecr
, /* PREINCR */
179 incrdecr
, /* POSTDECR */
180 incrdecr
, /* PREDECR */
185 nullproc
, /* NUMBER */
186 nullproc
, /* STRING */
187 nullproc
, /* REGEXPR */
188 awkgetline
, /* GETLINE */
193 whilestat
, /* WHILE */
200 indirect
, /* INDIRECT */
201 nullproc
, /* LASTTOKEN */
204 const char *tokname(int n
)
206 static char buf
[100];
208 if (n
< FIRSTTOKEN
|| n
> LASTTOKEN
) {
209 snprintf(buf
, sizeof(buf
), "token %d", n
);
212 return printname
[n
-FIRSTTOKEN
];