17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# Extract opcode documentation for sqliteVdbe.c and generate HTML
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gateBEGIN {
57c478bd9Sstevel@tonic-gate  print "<html><body bgcolor=white>"
67c478bd9Sstevel@tonic-gate  print "<h1>SQLite Virtual Database Engine Opcodes</h1>"
77c478bd9Sstevel@tonic-gate  print "<table>"
87c478bd9Sstevel@tonic-gate}
97c478bd9Sstevel@tonic-gate/ Opcode: /,/\*\// {
107c478bd9Sstevel@tonic-gate  if( $2=="Opcode:" ){
117c478bd9Sstevel@tonic-gate    printf "<tr><td>%s&nbsp;%s&nbsp;%s&nbsp;%s</td>\n<td>\n", $3, $4, $5, $6
127c478bd9Sstevel@tonic-gate  }else if( $1=="*/" ){
137c478bd9Sstevel@tonic-gate    printf "</td></tr>\n"
147c478bd9Sstevel@tonic-gate  }else if( NF>1 ){
157c478bd9Sstevel@tonic-gate    sub(/^ *\*\* /,"")
167c478bd9Sstevel@tonic-gate    gsub(/</,"&lt;")
177c478bd9Sstevel@tonic-gate    gsub(/&/,"&amp;")
187c478bd9Sstevel@tonic-gate    print
197c478bd9Sstevel@tonic-gate  }
207c478bd9Sstevel@tonic-gate}
217c478bd9Sstevel@tonic-gateEND {
227c478bd9Sstevel@tonic-gate  print "</table></body></html>"
237c478bd9Sstevel@tonic-gate}
24