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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 print "#define OPFLG_OUT2 0x0020 /* out2: P2 is an output */" | 152 print "#define OPFLG_OUT2 0x0020 /* out2: P2 is an output */" |
153 print "#define OPFLG_OUT3 0x0040 /* out3: P3 is an output */" | 153 print "#define OPFLG_OUT3 0x0040 /* out3: P3 is an output */" |
154 print "#define OPFLG_INITIALIZER {\\" | 154 print "#define OPFLG_INITIALIZER {\\" |
155 for(i=0; i<=max; i++){ | 155 for(i=0; i<=max; i++){ |
156 if( i%8==0 ) printf("/* %3d */",i) | 156 if( i%8==0 ) printf("/* %3d */",i) |
157 printf " 0x%02x,", bv[i] | 157 printf " 0x%02x,", bv[i] |
158 if( i%8==7 ) printf("\\\n"); | 158 if( i%8==7 ) printf("\\\n"); |
159 } | 159 } |
160 print "}" | 160 print "}" |
161 } | 161 } |
OLD | NEW |