Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/sqlite/sqlite-src-3080704/mkopcodec.awk

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/awk -f
2 #
3 # This AWK script scans the opcodes.h file (which is itself generated by
4 # another awk script) and uses the information gleaned to create the
5 # opcodes.c source file.
6 #
7 # Opcodes.c contains strings which are the symbolic names for the various
8 # opcodes used by the VDBE. These strings are used when disassembling a
9 # VDBE program during tracing or as a result of the EXPLAIN keyword.
10 #
11 BEGIN {
12 print "/* Automatically generated. Do not edit */"
13 print "/* See the mkopcodec.awk script for details. */"
14 printf "#if !defined(SQLITE_OMIT_EXPLAIN)"
15 printf " || defined(VDBE_PROFILE)"
16 print " || defined(SQLITE_DEBUG)"
17 print "#if defined(SQLITE_ENABLE_EXPLAIN_COMMENTS) || defined(SQLITE_DEBUG)"
18 print "# define OpHelp(X) \"\\0\" X"
19 print "#else"
20 print "# define OpHelp(X)"
21 print "#endif"
22 print "const char *sqlite3OpcodeName(int i){"
23 print " static const char *const azName[] = { \"?\","
24 mx = 0
25 }
26 /^.define OP_/ {
27 sub("OP_","",$2)
28 i = $3+0
29 label[i] = $2
30 if( mx<i ) mx = i
31 for(j=5; j<NF; j++) if( $j=="synopsis:" ) break
32 if( j<NF ){
33 j++
34 x = $j
35 for(j=j+1; j<NF; j++) x = x " " $j
36 synopsis[i] = x
37 }else{
38 synopsis[i] = ""
39 }
40 }
41 END {
42 for(i=1; i<=mx; i++){
43 printf " /* %3d */ %-18s OpHelp(\"%s\"),\n", i, \
44 "\"" label[i] "\"", synopsis[i]
45 }
46 print " };"
47 print " return azName[i];"
48 print "}"
49 print "#endif"
50 }
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/manifest.uuid ('k') | third_party/sqlite/sqlite-src-3080704/mkopcodeh.awk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698