summaryrefslogtreecommitdiff
path: root/components/external/SQLite-3.8.1/tool/opcodeDoc.awk
diff options
context:
space:
mode:
authorgeniusgogo <[email protected]>2013-11-13 22:27:45 +0800
committergeniusgogo <[email protected]>2013-11-30 14:59:51 +0800
commita186d329a47ebe7f4a2481016407898028454fde (patch)
treee983ff6d38238b55ac442aeaa7919a92b7d093ec /components/external/SQLite-3.8.1/tool/opcodeDoc.awk
parent0347f8ab9c75f17d89d7f565f6a398dcbf0f700b (diff)
add SQLite-3.8.1 authority original source tree
Diffstat (limited to 'components/external/SQLite-3.8.1/tool/opcodeDoc.awk')
-rw-r--r--components/external/SQLite-3.8.1/tool/opcodeDoc.awk23
1 files changed, 23 insertions, 0 deletions
diff --git a/components/external/SQLite-3.8.1/tool/opcodeDoc.awk b/components/external/SQLite-3.8.1/tool/opcodeDoc.awk
new file mode 100644
index 0000000000..492010624f
--- /dev/null
+++ b/components/external/SQLite-3.8.1/tool/opcodeDoc.awk
@@ -0,0 +1,23 @@
+#
+# Extract opcode documentation for sqliteVdbe.c and generate HTML
+#
+BEGIN {
+ print "<html><body bgcolor=white>"
+ print "<h1>SQLite Virtual Database Engine Opcodes</h1>"
+ print "<table>"
+}
+/ Opcode: /,/\*\// {
+ if( $2=="Opcode:" ){
+ printf "<tr><td>%s&nbsp;%s&nbsp;%s&nbsp;%s</td>\n<td>\n", $3, $4, $5, $6
+ }else if( $1=="*/" ){
+ printf "</td></tr>\n"
+ }else if( NF>1 ){
+ sub(/^ *\*\* /,"")
+ gsub(/</,"&lt;")
+ gsub(/&/,"&amp;")
+ print
+ }
+}
+END {
+ print "</table></body></html>"
+}