sqlite/tool/opNames.awk
drh 75897234be initial check-in of the new version (CVS 1)
FossilOrigin-Name: 6f3655f79f9b6fc9fb7baaa10a7e0f2b6a512dfa
2000-05-29 14:26:00 +00:00

24 lines
359 B
Awk

# Read the sqliteVdbe.h file and generate a table of opcode names.
#
BEGIN {
printf "static char *zOpName[] = { 0,\n"
n = 0
}
/^#define OP_MAX/ {
next
}
/^#define OP_/ {
name = "\"" substr($2,4) "\","
if( n<3 ){
printf " %-16s", name
n++
} else {
printf " %s\n", name
n = 0
}
}
END {
if( n ){ printf "\n" }
printf "};\n"
}