# Copyright (c) 1991 The Regents of the University of California.
# This code is derived from software contributed to Berkeley by
# %sccs.include.redist.sh%
# @(#)mktokens 5.1 (Berkeley) %G%
# The following is a list of tokens. The second column is nonzero if the
# token marks the end of a list. The third column is the name to print in
awk '{print "#define " $1 " " NR-1}' /tmp
/ka$$
/* Array indicating which tokens mark the end of a list */
const char tokendlist[] = {'
awk '{print "\t" $2 ","}' /tmp
/ka$$
char *const tokname[] = {'
-e 's/[^ ]*[ ][ ]*[^ ]*[ ][ ]*\(.*\)/ "\1",/' \
sed 's/"//g' /tmp
/ka$$ |
awk '
/TIF/{print "#define KWDOFFSET " NR-1; print ""; print "char *const parsekwd[] = {"}
/TIF/,/neverfound/{print " \"" $3 "\","}'