xref: /titanic_50/usr/src/lib/libsqlite/tool/opcodeDoc.awk (revision 8b80e8cb6855118d46f605e91b5ed4ce83417395)
1
2#pragma ident	"%Z%%M%	%I%	%E% SMI"
3
4#
5# Extract opcode documentation for sqliteVdbe.c and generate HTML
6#
7BEGIN {
8  print "<html><body bgcolor=white>"
9  print "<h1>SQLite Virtual Database Engine Opcodes</h1>"
10  print "<table>"
11}
12/ Opcode: /,/\*\// {
13  if( $2=="Opcode:" ){
14    printf "<tr><td>%s&nbsp;%s&nbsp;%s&nbsp;%s</td>\n<td>\n", $3, $4, $5, $6
15  }else if( $1=="*/" ){
16    printf "</td></tr>\n"
17  }else if( NF>1 ){
18    sub(/^ *\*\* /,"")
19    gsub(/</,"&lt;")
20    gsub(/&/,"&amp;")
21    print
22  }
23}
24END {
25  print "</table></body></html>"
26}
27