| OLD | NEW |
| 1 #!/usr/bin/awk -f | 1 #!/usr/bin/awk -f |
| 2 # | 2 # |
| 3 # Generate the file opcodes.h. | 3 # Generate the file opcodes.h. |
| 4 # | 4 # |
| 5 # This AWK script scans a concatenation of the parse.h output file from the | 5 # This AWK script scans a concatenation of the parse.h output file from the |
| 6 # parser and the vdbe.c source file in order to generate the opcodes numbers | 6 # parser and the vdbe.c source file in order to generate the opcodes numbers |
| 7 # for all opcodes. | 7 # for all opcodes. |
| 8 # | 8 # |
| 9 # The lines of the vdbe.c that we are interested in are of the form: | 9 # The lines of the vdbe.c that we are interested in are of the form: |
| 10 # | 10 # |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 print "#define OPFLG_IN3 0x0010 /* in3: P3 is an input */" | 148 print "#define OPFLG_IN3 0x0010 /* in3: P3 is an input */" |
| 149 print "#define OPFLG_OUT3 0x0020 /* out3: P3 is an output */" | 149 print "#define OPFLG_OUT3 0x0020 /* out3: P3 is an output */" |
| 150 print "#define OPFLG_INITIALIZER {\\" | 150 print "#define OPFLG_INITIALIZER {\\" |
| 151 for(i=0; i<=max; i++){ | 151 for(i=0; i<=max; i++){ |
| 152 if( i%8==0 ) printf("/* %3d */",i) | 152 if( i%8==0 ) printf("/* %3d */",i) |
| 153 printf " 0x%02x,", bv[i] | 153 printf " 0x%02x,", bv[i] |
| 154 if( i%8==7 ) printf("\\\n"); | 154 if( i%8==7 ) printf("\\\n"); |
| 155 } | 155 } |
| 156 print "}" | 156 print "}" |
| 157 } | 157 } |
| OLD | NEW |