OLD | NEW |
1 #!/usr/bin/tclsh | 1 #!/usr/bin/tclsh |
2 # | 2 # |
3 # Run this script to generate the pragma name lookup table C code. | 3 # Run this script to generate the pragma name lookup table C code. |
4 # | 4 # |
5 # To add new pragmas, first add the name and other relevant attributes | 5 # To add new pragmas, first add the name and other relevant attributes |
6 # of the pragma to the "pragma_def" object below. Then run this script | 6 # of the pragma to the "pragma_def" object below. Then run this script |
7 # to generate the C-code for the lookup table and copy/paste the output | 7 # to generate the C-code for the lookup table and copy/paste the output |
8 # of this script into the appropriate spot in the pragma.c source file. | 8 # of this script into the appropriate spot in the pragma.c source file. |
9 # Then add the extra "case PragTyp_XXXXX:" and subsequent code for the | 9 # Then add the extra "case PragTyp_XXXXX:" and subsequent code for the |
10 # new pragma. | 10 # new pragma. |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 # | 427 # |
428 set allcnt 0 | 428 set allcnt 0 |
429 set dfltcnt 0 | 429 set dfltcnt 0 |
430 foreach name $allnames { | 430 foreach name $allnames { |
431 incr allcnt | 431 incr allcnt |
432 set if [lindex $allbyname($name) 2] | 432 set if [lindex $allbyname($name) 2] |
433 if {[regexp {^defined} $if] || [regexp {[^!]defined} $if]} continue | 433 if {[regexp {^defined} $if] || [regexp {[^!]defined} $if]} continue |
434 incr dfltcnt | 434 incr dfltcnt |
435 } | 435 } |
436 puts "/* Number of pragmas: $dfltcnt on by default, $allcnt total. */" | 436 puts "/* Number of pragmas: $dfltcnt on by default, $allcnt total. */" |
OLD | NEW |