1 #if HAVE_NBTOOL_CONFIG_H
2 #include "nbtool_config.h"
9 static const char * const printname
[94] = {
10 "FIRSTTOKEN", /* 257 */
102 "INDIRECT", /* 349 */
103 "LASTTOKEN", /* 350 */
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 get_line
, /* 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
];