BEGIN{ nact = 0; print "/* This file was created by btoktab.awk --- do not edit */" print "int btoktab[] = {" } { if ($1 !~ /#/) { nact++ ; if (nact != 1) {printf ",";}; if ($2 ~ /:/) {$2 = $1"_t"}; print $2 ; } } END{ print "};" }