Date: Sat, 31 Jul 2021 14:15:33 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 83dea422ac8d - stable/13 - awk: remove proctab.c Message-ID: <202107311415.16VEFX8Z060588@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=83dea422ac8d4a8323e64203c2eadaa813768717 commit 83dea422ac8d4a8323e64203c2eadaa813768717 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-07-12 03:26:08 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-31 14:14:43 +0000 awk: remove proctab.c proctab.c is a generated file and never should have been committed to the tree. This file has been added and removed a couple of times, most recently added by me in my 2019 updates. Sponsored by: Netflix (cherry picked from commit 0c92d88c9180bf25187f01f1d7e419edea9a0fef) --- contrib/one-true-awk/proctab.c | 213 ----------------------------------------- 1 file changed, 213 deletions(-) diff --git a/contrib/one-true-awk/proctab.c b/contrib/one-true-awk/proctab.c deleted file mode 100644 index 96fad36e601c..000000000000 --- a/contrib/one-true-awk/proctab.c +++ /dev/null @@ -1,213 +0,0 @@ -#include <stdio.h> -#include "awk.h" -#include "awkgram.tab.h" - -static const char * const printname[96] = { - "FIRSTTOKEN", /* 258 */ - "PROGRAM", /* 259 */ - "PASTAT", /* 260 */ - "PASTAT2", /* 261 */ - "XBEGIN", /* 262 */ - "XEND", /* 263 */ - "NL", /* 264 */ - "ARRAY", /* 265 */ - "MATCH", /* 266 */ - "NOTMATCH", /* 267 */ - "MATCHOP", /* 268 */ - "FINAL", /* 269 */ - "DOT", /* 270 */ - "ALL", /* 271 */ - "CCL", /* 272 */ - "NCCL", /* 273 */ - "CHAR", /* 274 */ - "OR", /* 275 */ - "STAR", /* 276 */ - "QUEST", /* 277 */ - "PLUS", /* 278 */ - "EMPTYRE", /* 279 */ - "ZERO", /* 280 */ - "AND", /* 281 */ - "BOR", /* 282 */ - "APPEND", /* 283 */ - "EQ", /* 284 */ - "GE", /* 285 */ - "GT", /* 286 */ - "LE", /* 287 */ - "LT", /* 288 */ - "NE", /* 289 */ - "IN", /* 290 */ - "ARG", /* 291 */ - "BLTIN", /* 292 */ - "BREAK", /* 293 */ - "CLOSE", /* 294 */ - "CONTINUE", /* 295 */ - "DELETE", /* 296 */ - "DO", /* 297 */ - "EXIT", /* 298 */ - "FOR", /* 299 */ - "FUNC", /* 300 */ - "GENSUB", /* 301 */ - "SUB", /* 302 */ - "GSUB", /* 303 */ - "IF", /* 304 */ - "INDEX", /* 305 */ - "LSUBSTR", /* 306 */ - "MATCHFCN", /* 307 */ - "NEXT", /* 308 */ - "NEXTFILE", /* 309 */ - "ADD", /* 310 */ - "MINUS", /* 311 */ - "MULT", /* 312 */ - "DIVIDE", /* 313 */ - "MOD", /* 314 */ - "ASSIGN", /* 315 */ - "ASGNOP", /* 316 */ - "ADDEQ", /* 317 */ - "SUBEQ", /* 318 */ - "MULTEQ", /* 319 */ - "DIVEQ", /* 320 */ - "MODEQ", /* 321 */ - "POWEQ", /* 322 */ - "PRINT", /* 323 */ - "PRINTF", /* 324 */ - "SPRINTF", /* 325 */ - "ELSE", /* 326 */ - "INTEST", /* 327 */ - "CONDEXPR", /* 328 */ - "POSTINCR", /* 329 */ - "PREINCR", /* 330 */ - "POSTDECR", /* 331 */ - "PREDECR", /* 332 */ - "VAR", /* 333 */ - "IVAR", /* 334 */ - "VARNF", /* 335 */ - "CALL", /* 336 */ - "NUMBER", /* 337 */ - "STRING", /* 338 */ - "REGEXPR", /* 339 */ - "GETLINE", /* 340 */ - "RETURN", /* 341 */ - "SPLIT", /* 342 */ - "SUBSTR", /* 343 */ - "WHILE", /* 344 */ - "CAT", /* 345 */ - "NOT", /* 346 */ - "UMINUS", /* 347 */ - "UPLUS", /* 348 */ - "POWER", /* 349 */ - "DECR", /* 350 */ - "INCR", /* 351 */ - "INDIRECT", /* 352 */ - "LASTTOKEN", /* 353 */ -}; - - -Cell *(*proctab[96])(Node **, int) = { - nullproc, /* FIRSTTOKEN */ - program, /* PROGRAM */ - pastat, /* PASTAT */ - dopa2, /* PASTAT2 */ - nullproc, /* XBEGIN */ - nullproc, /* XEND */ - nullproc, /* NL */ - array, /* ARRAY */ - matchop, /* MATCH */ - matchop, /* NOTMATCH */ - nullproc, /* MATCHOP */ - nullproc, /* FINAL */ - nullproc, /* DOT */ - nullproc, /* ALL */ - nullproc, /* CCL */ - nullproc, /* NCCL */ - nullproc, /* CHAR */ - nullproc, /* OR */ - nullproc, /* STAR */ - nullproc, /* QUEST */ - nullproc, /* PLUS */ - nullproc, /* EMPTYRE */ - nullproc, /* ZERO */ - boolop, /* AND */ - boolop, /* BOR */ - nullproc, /* APPEND */ - relop, /* EQ */ - relop, /* GE */ - relop, /* GT */ - relop, /* LE */ - relop, /* LT */ - relop, /* NE */ - instat, /* IN */ - arg, /* ARG */ - bltin, /* BLTIN */ - jump, /* BREAK */ - closefile, /* CLOSE */ - jump, /* CONTINUE */ - awkdelete, /* DELETE */ - dostat, /* DO */ - jump, /* EXIT */ - forstat, /* FOR */ - nullproc, /* FUNC */ - gensub, /* GENSUB */ - sub, /* SUB */ - gsub, /* GSUB */ - ifstat, /* IF */ - sindex, /* INDEX */ - nullproc, /* LSUBSTR */ - matchop, /* MATCHFCN */ - jump, /* NEXT */ - jump, /* NEXTFILE */ - arith, /* ADD */ - arith, /* MINUS */ - arith, /* MULT */ - arith, /* DIVIDE */ - arith, /* MOD */ - assign, /* ASSIGN */ - nullproc, /* ASGNOP */ - assign, /* ADDEQ */ - assign, /* SUBEQ */ - assign, /* MULTEQ */ - assign, /* DIVEQ */ - assign, /* MODEQ */ - assign, /* POWEQ */ - printstat, /* PRINT */ - awkprintf, /* PRINTF */ - awksprintf, /* SPRINTF */ - nullproc, /* ELSE */ - intest, /* INTEST */ - condexpr, /* CONDEXPR */ - incrdecr, /* POSTINCR */ - incrdecr, /* PREINCR */ - incrdecr, /* POSTDECR */ - incrdecr, /* PREDECR */ - nullproc, /* VAR */ - nullproc, /* IVAR */ - getnf, /* VARNF */ - call, /* CALL */ - nullproc, /* NUMBER */ - nullproc, /* STRING */ - nullproc, /* REGEXPR */ - awkgetline, /* GETLINE */ - jump, /* RETURN */ - split, /* SPLIT */ - substr, /* SUBSTR */ - whilestat, /* WHILE */ - cat, /* CAT */ - boolop, /* NOT */ - arith, /* UMINUS */ - arith, /* UPLUS */ - arith, /* POWER */ - nullproc, /* DECR */ - nullproc, /* INCR */ - indirect, /* INDIRECT */ - nullproc, /* LASTTOKEN */ -}; - -const char *tokname(int n) -{ - static char buf[100]; - - if (n < FIRSTTOKEN || n > LASTTOKEN) { - snprintf(buf, sizeof(buf), "token %d", n); - return buf; - } - return printname[n-FIRSTTOKEN]; -}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107311415.16VEFX8Z060588>