Mercurial > hg > CbC > CbC_gcc
comparison CbC-scripts/make_headers.py @ 27:f9b1a53df341
implemented indirect sibcall for ppc.
author | kent@teto.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 10 Nov 2009 16:34:29 +0900 |
parents | b388631e4738 |
children |
comparison
equal
deleted
inserted
replaced
26:b388631e4738 | 27:f9b1a53df341 |
---|---|
1 #!/usr/bin/env python3.0 | 1 #!/usr/bin/env python3.0 |
2 | |
2 | 3 |
3 import sys | 4 import sys |
4 import re | 5 import re |
5 import getopt | 6 import getopt |
6 | 7 |
7 reserved_words = [ "if", "for", "switch", "return", "while", "else", ] | 8 reserved_words = [ "if", "for", "switch", "return", "while", "else", ] |
8 | 9 |
9 PATTERN = "([a-zA-Z_][\w\s]*\**)\s([a-zA-Z_]\w*)\s*\(([^{/;]*)\)\s*\{" | 10 PATTERN = "([a-zA-Z_][\w\s]*\**)\s([a-zA-Z_]\w*)\s*\(([^{/;]*)\)\s*\{" |
10 # TODO: 関数パラメータ内にコメントがあると正しく動かない! | 11 # TODO: 関数パラメータ内にコメントがあると正しく動かない! |
11 # TODO: int * const * とか大丈夫? | 12 # TODO: int * const * とか大丈夫? |
12 PROG = re.compile(PATTERN, re.S) | 13 PROG = re.compile(PATTERN, re.S) |
13 | 14 |
14 omit_static=False | 15 omit_static=False |
117 # static function is ignored. | 118 # static function is ignored. |
118 continue | 119 continue |
119 #debug_print(decl) | 120 #debug_print(decl) |
120 format_print(decl, file) | 121 format_print(decl, file) |
121 | 122 |
122 #usage() | |
123 main() | 123 main() |
124 | 124 |