adlint 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (465) hide show
  1. data/AUTHORS +27 -0
  2. data/COPYING +674 -0
  3. data/ChangeLog +820 -0
  4. data/INSTALL +78 -0
  5. data/MANIFEST +464 -0
  6. data/NEWS +38 -0
  7. data/README +74 -0
  8. data/Rakefile +167 -0
  9. data/TODO +29 -0
  10. data/bin/adlint +141 -0
  11. data/bin/adlint_chk +129 -0
  12. data/bin/adlint_cma +122 -0
  13. data/bin/adlint_sma +129 -0
  14. data/bin/adlintize +286 -0
  15. data/etc/conf.d/fallback/cinit.erb +11 -0
  16. data/etc/conf.d/fallback/traits.erb +216 -0
  17. data/etc/conf.d/i686-cygwin/cinit-gcc_4.3.4.erb +149 -0
  18. data/etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb +227 -0
  19. data/etc/conf.d/i686-devkit/cinit-gcc_4.5.2.erb +224 -0
  20. data/etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb +226 -0
  21. data/etc/conf.d/i686-linux/cinit-gcc_4.5.1.erb +219 -0
  22. data/etc/conf.d/i686-linux/traits-gcc_4.5.1.erb +224 -0
  23. data/etc/conf.d/i686-mingw/cinit-gcc_4.6.1.erb +234 -0
  24. data/etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb +226 -0
  25. data/etc/conf.d/noarch/GNUmakefile.erb +119 -0
  26. data/etc/conf.d/noarch/adlint_all_bat.erb +9 -0
  27. data/etc/conf.d/noarch/adlint_all_sh.erb +10 -0
  28. data/etc/conf.d/noarch/pinit.erb +11 -0
  29. data/etc/mesg.d/en_US/messages.yml +784 -0
  30. data/etc/mesg.d/ja_JP/messages.yml +784 -0
  31. data/lib/adlint/analyzer.rb +294 -0
  32. data/lib/adlint/c/branch.rb +251 -0
  33. data/lib/adlint/c/builtin.rb +92 -0
  34. data/lib/adlint/c/code.rb +490 -0
  35. data/lib/adlint/c/const.rb +465 -0
  36. data/lib/adlint/c/conv.rb +212 -0
  37. data/lib/adlint/c/ctrlexpr.rb +949 -0
  38. data/lib/adlint/c/domain.rb +7499 -0
  39. data/lib/adlint/c/environ.rb +133 -0
  40. data/lib/adlint/c/expr.rb +1725 -0
  41. data/lib/adlint/c/format.rb +3209 -0
  42. data/lib/adlint/c/interp.rb +1740 -0
  43. data/lib/adlint/c/lexer.rb +241 -0
  44. data/lib/adlint/c/mediator.rb +313 -0
  45. data/lib/adlint/c/message.rb +13597 -0
  46. data/lib/adlint/c/metric.rb +765 -0
  47. data/lib/adlint/c/object.rb +1018 -0
  48. data/lib/adlint/c/parser.rb +3800 -0
  49. data/lib/adlint/c/parser.y +2054 -0
  50. data/lib/adlint/c/phase.rb +712 -0
  51. data/lib/adlint/c/resolver.rb +270 -0
  52. data/lib/adlint/c/scanner.rb +248 -0
  53. data/lib/adlint/c/scope.rb +74 -0
  54. data/lib/adlint/c/syntax.rb +4279 -0
  55. data/lib/adlint/c/type.rb +7506 -0
  56. data/lib/adlint/c/util.rb +91 -0
  57. data/lib/adlint/c/value.rb +2310 -0
  58. data/lib/adlint/c.rb +56 -0
  59. data/lib/adlint/code.rb +500 -0
  60. data/lib/adlint/cpp/code.rb +189 -0
  61. data/lib/adlint/cpp/constexpr.rb +721 -0
  62. data/lib/adlint/cpp/constexpr.y +389 -0
  63. data/lib/adlint/cpp/eval.rb +1012 -0
  64. data/lib/adlint/cpp/lexer.rb +860 -0
  65. data/lib/adlint/cpp/macro.rb +637 -0
  66. data/lib/adlint/cpp/message.rb +992 -0
  67. data/lib/adlint/cpp/phase.rb +176 -0
  68. data/lib/adlint/cpp/scanner.rb +93 -0
  69. data/lib/adlint/cpp/source.rb +169 -0
  70. data/lib/adlint/cpp/subst.rb +300 -0
  71. data/lib/adlint/cpp/syntax.rb +1412 -0
  72. data/lib/adlint/cpp/util.rb +97 -0
  73. data/lib/adlint/cpp.rb +43 -0
  74. data/lib/adlint/driver.rb +147 -0
  75. data/lib/adlint/error.rb +179 -0
  76. data/lib/adlint/lang.rb +97 -0
  77. data/lib/adlint/ld/message.rb +259 -0
  78. data/lib/adlint/ld/metric.rb +57 -0
  79. data/lib/adlint/ld/object.rb +542 -0
  80. data/lib/adlint/ld/phase.rb +193 -0
  81. data/lib/adlint/ld/typedef.rb +109 -0
  82. data/lib/adlint/ld/util.rb +88 -0
  83. data/lib/adlint/ld.rb +37 -0
  84. data/lib/adlint/lexer.rb +293 -0
  85. data/lib/adlint/message.rb +368 -0
  86. data/lib/adlint/metric.rb +805 -0
  87. data/lib/adlint/monitor.rb +144 -0
  88. data/lib/adlint/phase.rb +90 -0
  89. data/lib/adlint/prelude.rb +314 -0
  90. data/lib/adlint/report.rb +617 -0
  91. data/lib/adlint/source.rb +155 -0
  92. data/lib/adlint/symbol.rb +127 -0
  93. data/lib/adlint/token.rb +215 -0
  94. data/lib/adlint/traits.rb +643 -0
  95. data/lib/adlint/util.rb +524 -0
  96. data/lib/adlint/version.rb +71 -0
  97. data/lib/adlint.rb +66 -0
  98. data/share/HEADER +45 -0
  99. data/share/demo/Makefile +110 -0
  100. data/share/demo/ambig_operator/ambig_operator.c +289 -0
  101. data/share/demo/arg_points_unset/arg_points_unset.c +37 -0
  102. data/share/demo/array_range/array_range.c +62 -0
  103. data/share/demo/bad_bitfields/bad_bitfields.c +74 -0
  104. data/share/demo/bad_brace/bad_brace.c +19 -0
  105. data/share/demo/bad_charset/abcde$.h +0 -0
  106. data/share/demo/bad_charset/bad_charset.c +22 -0
  107. data/share/demo/bad_comment/bad_comment.c +3 -0
  108. data/share/demo/bad_const/bad_const.c +19 -0
  109. data/share/demo/bad_conv/bad_conv.c +48 -0
  110. data/share/demo/bad_indent/bad_indent.c +50 -0
  111. data/share/demo/bad_init/bad_init.c +49 -0
  112. data/share/demo/bad_macro/bad_macro.c +97 -0
  113. data/share/demo/bitwise_expr/bitwise_expr.c +19 -0
  114. data/share/demo/call_by_value/call_by_value.c +26 -0
  115. data/share/demo/cross_ref/cross_ref.c +21 -0
  116. data/share/demo/dangling_else/dangling_else.c +20 -0
  117. data/share/demo/dead_code/dead_code.c +237 -0
  118. data/share/demo/deep_nest/deep_nest.c +57 -0
  119. data/share/demo/dense_switch/dense_switch.c +62 -0
  120. data/share/demo/direct_recur/direct_recur.c +15 -0
  121. data/share/demo/div_by_zero/div_by_zero.c +35 -0
  122. data/share/demo/dos_source/dos_source.c +7 -0
  123. data/share/demo/funptr_cast/funptr_cast.c +26 -0
  124. data/share/demo/goto_stmt/goto_stmt.c +19 -0
  125. data/share/demo/id_hiding/id_hiding.c +19 -0
  126. data/share/demo/ill_defined/ill_defined.c +13 -0
  127. data/share/demo/implicit_conv/implicit_conv.c +60 -0
  128. data/share/demo/implicit_int/implicit_int.c +14 -0
  129. data/share/demo/incomplete_type/incomplete_type.c +49 -0
  130. data/share/demo/indirect_recur/indirect_recur_1.c +14 -0
  131. data/share/demo/indirect_recur/indirect_recur_1.h +7 -0
  132. data/share/demo/indirect_recur/indirect_recur_2.c +12 -0
  133. data/share/demo/indirect_recur/indirect_recur_2.h +6 -0
  134. data/share/demo/indirect_recur/indirect_recur_3.c +6 -0
  135. data/share/demo/indirect_recur/indirect_recur_3.h +6 -0
  136. data/share/demo/indirect_recur/indirect_recur_4.c +25 -0
  137. data/share/demo/intro_demo/intro_demo.c +76 -0
  138. data/share/demo/intro_demo/intro_demo.h +12 -0
  139. data/share/demo/intro_demo/useless_header.h +5 -0
  140. data/share/demo/invalid_call/invalid_call.c +32 -0
  141. data/share/demo/kandr_fundef/kandr_fundef.c +10 -0
  142. data/share/demo/line_comment/line_comment.c +12 -0
  143. data/share/demo/local_decl/local_decl.c +9 -0
  144. data/share/demo/logical_trick/logical_trick.c +36 -0
  145. data/share/demo/long_sym/long_sym.c +5 -0
  146. data/share/demo/loop_var/loop_var.c +92 -0
  147. data/share/demo/malloc_or_die/malloc_or_die.c +43 -0
  148. data/share/demo/may_be_null/may_be_null.c +52 -0
  149. data/share/demo/may_be_null_arith/may_be_null_arith.c +15 -0
  150. data/share/demo/may_be_unset/may_be_unset.c +34 -0
  151. data/share/demo/mmapped_io/mmapped_io.c +23 -0
  152. data/share/demo/multi_break/multi_break.c +33 -0
  153. data/share/demo/multi_decl/multi_decl_1.c +17 -0
  154. data/share/demo/multi_decl/multi_decl_1.h +6 -0
  155. data/share/demo/multi_decl/multi_decl_2.c +13 -0
  156. data/share/demo/multi_decl/multi_decl_2.h +6 -0
  157. data/share/demo/multi_decl/multi_decl_3.c +22 -0
  158. data/share/demo/multi_def/multi_def_1.c +36 -0
  159. data/share/demo/multi_def/multi_def_1.h +6 -0
  160. data/share/demo/multi_def/multi_def_2.c +22 -0
  161. data/share/demo/multi_def/multi_def_2.h +6 -0
  162. data/share/demo/multi_def/multi_def_3.c +6 -0
  163. data/share/demo/multi_typedef/multi_typedef.c +11 -0
  164. data/share/demo/multi_typedef/multi_typedef_1.h +1 -0
  165. data/share/demo/multi_typedef/multi_typedef_2.h +1 -0
  166. data/share/demo/must_be_false/must_be_false.c +53 -0
  167. data/share/demo/must_be_null/must_be_null.c +13 -0
  168. data/share/demo/must_be_null_arith/must_be_null_arith.c +14 -0
  169. data/share/demo/must_be_true/must_be_true.c +21 -0
  170. data/share/demo/no_eof_nl/no_eof_nl.c +4 -0
  171. data/share/demo/no_void_arg/no_void_arg.c +14 -0
  172. data/share/demo/null_stmt/null_stmt.c +19 -0
  173. data/share/demo/octal_const/octal_const.c +20 -0
  174. data/share/demo/output_by_param/output_by_param.c +17 -0
  175. data/share/demo/overflow/overflow.c +74 -0
  176. data/share/demo/press_release/press_release.c +40 -0
  177. data/share/demo/retn_lvar_addr/retn_lvar_addr.c +47 -0
  178. data/share/demo/shift_expr/shift_expr.c +14 -0
  179. data/share/demo/should_be_typedef/should_be_typedef.c +51 -0
  180. data/share/demo/static_paths/static_paths.c +153 -0
  181. data/share/demo/static_vars/static_vars.c +39 -0
  182. data/share/demo/tag_hiding/tag_hiding.c +18 -0
  183. data/share/demo/tricky_incdec/tricky_incdec.c +12 -0
  184. data/share/demo/undefined_macro/undefined_macro.c +17 -0
  185. data/share/demo/uninit_vars/uninit_vars.c +28 -0
  186. data/share/demo/union_type/union_type.c +23 -0
  187. data/share/demo/unmatch_decl/unmatch_decl_1.c +12 -0
  188. data/share/demo/unmatch_decl/unmatch_decl_1.h +8 -0
  189. data/share/demo/unmatch_decl/unmatch_decl_2.c +10 -0
  190. data/share/demo/unmatch_decl/unmatch_decl_2.h +8 -0
  191. data/share/demo/unmatch_decl/unmatch_decl_3.c +7 -0
  192. data/share/demo/unmatch_paren_macro/unmatch_paren_macro.c +15 -0
  193. data/share/demo/unreachable/unreachable.c +34 -0
  194. data/share/demo/useless_exp_funs/useless_exp_funs_1.c +14 -0
  195. data/share/demo/useless_exp_funs/useless_exp_funs_1.h +1 -0
  196. data/share/demo/useless_exp_funs/useless_exp_funs_2.c +6 -0
  197. data/share/demo/useless_exp_vars/useless_export_1.c +8 -0
  198. data/share/demo/useless_exp_vars/useless_export_1.h +1 -0
  199. data/share/demo/useless_exp_vars/useless_export_2.c +7 -0
  200. data/share/demo/useless_expr/useless_expr.c +17 -0
  201. data/share/demo/useless_funs/useless_funs_1.c +21 -0
  202. data/share/demo/useless_funs/useless_funs_1.h +8 -0
  203. data/share/demo/useless_funs/useless_funs_2.c +6 -0
  204. data/share/demo/useless_header/useless_header.c +9 -0
  205. data/share/demo/useless_header/useless_header_1.h +12 -0
  206. data/share/demo/useless_header/useless_header_2.h +6 -0
  207. data/share/demo/useless_header/useless_header_3.h +9 -0
  208. data/share/demo/useless_header/useless_header_4.h +3 -0
  209. data/share/demo/useless_vars/useless_vars.c +17 -0
  210. data/share/demo/va_funcall/va_funcall.c +25 -0
  211. data/share/demo/various_fundef/various_fundef.c +36 -0
  212. data/share/demo/wchar_wstring/wchar_wstring.c +7 -0
  213. data/share/demo/wrap_around/wrap_around.c +38 -0
  214. data/share/doc/Makefile +16 -0
  215. data/share/doc/adlint_on_adqua.png +0 -0
  216. data/share/doc/adlint_on_eclipse_en.png +0 -0
  217. data/share/doc/adlint_on_eclipse_ja.png +0 -0
  218. data/share/doc/adlint_on_vim_en.png +0 -0
  219. data/share/doc/adlint_on_vim_ja.png +0 -0
  220. data/share/doc/developers_guide_ja.html +171 -0
  221. data/share/doc/developers_guide_ja.texi +87 -0
  222. data/share/doc/gen_mesg_sections.rb +39 -0
  223. data/share/doc/samples/GNUmakefile +162 -0
  224. data/share/doc/samples/adlint_traits.yml +238 -0
  225. data/share/doc/texinfo.css +22 -0
  226. data/share/doc/users_guide_en.html +39975 -0
  227. data/share/doc/users_guide_en.texi +32640 -0
  228. data/share/doc/users_guide_ja.html +40505 -0
  229. data/share/doc/users_guide_ja.texi +33189 -0
  230. data/share/logo/adlint-110.png +0 -0
  231. data/share/logo/adlint-524.png +0 -0
  232. data/share/logo/adlint.svg +4637 -0
  233. data/share/sample/README +6 -0
  234. data/share/sample/bison-2.5/adlint/GNUmakefile +170 -0
  235. data/share/sample/bison-2.5/adlint/adlint_traits.yml +225 -0
  236. data/share/sample/bison-2.5/adlint/lib/GNUmakefile +198 -0
  237. data/share/sample/bison-2.5/adlint/lib/adlint_cinit.h +228 -0
  238. data/share/sample/bison-2.5/adlint/lib/adlint_pinit.h +21 -0
  239. data/share/sample/bison-2.5/adlint/lib/adlint_traits.yml +238 -0
  240. data/share/sample/bison-2.5/adlint/src/GNUmakefile +166 -0
  241. data/share/sample/bison-2.5/adlint/src/adlint_cinit.h +228 -0
  242. data/share/sample/bison-2.5/adlint/src/adlint_pinit.h +21 -0
  243. data/share/sample/bison-2.5/adlint/src/adlint_traits.yml +239 -0
  244. data/share/sample/ctags-5.8/adlint/GNUmakefile +169 -0
  245. data/share/sample/ctags-5.8/adlint/adlint_cinit.h +219 -0
  246. data/share/sample/ctags-5.8/adlint/adlint_pinit.h +13 -0
  247. data/share/sample/ctags-5.8/adlint/adlint_traits.yml +225 -0
  248. data/share/sample/flex-2.5.35/adlint/GNUmakefile +140 -0
  249. data/share/sample/flex-2.5.35/adlint/adlint_cinit.h +219 -0
  250. data/share/sample/flex-2.5.35/adlint/adlint_pinit.h +14 -0
  251. data/share/sample/flex-2.5.35/adlint/adlint_traits.yml +225 -0
  252. data/share/sample/ruby-1.9.3-p0/adlint/GNUmakefile +314 -0
  253. data/share/sample/ruby-1.9.3-p0/adlint/adlint_traits.yml +225 -0
  254. data/share/sample/ruby-1.9.3-p0/adlint/core/GNUmakefile +204 -0
  255. data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_cinit.h +228 -0
  256. data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_pinit.h +28 -0
  257. data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_traits.yml +240 -0
  258. data/share/sample/ruby-1.9.3-p0/adlint/enc/GNUmakefile +163 -0
  259. data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_cinit.h +228 -0
  260. data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_pinit.h +24 -0
  261. data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_traits.yml +240 -0
  262. data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/GNUmakefile +149 -0
  263. data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_cinit.h +228 -0
  264. data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_pinit.h +24 -0
  265. data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_traits.yml +240 -0
  266. data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/GNUmakefile +131 -0
  267. data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_cinit.h +228 -0
  268. data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_pinit.h +24 -0
  269. data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_traits.yml +241 -0
  270. data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/GNUmakefile +131 -0
  271. data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_cinit.h +228 -0
  272. data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_pinit.h +24 -0
  273. data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_traits.yml +241 -0
  274. data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/GNUmakefile +131 -0
  275. data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_cinit.h +228 -0
  276. data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_pinit.h +24 -0
  277. data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_traits.yml +241 -0
  278. data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/GNUmakefile +131 -0
  279. data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_cinit.h +228 -0
  280. data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_pinit.h +24 -0
  281. data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_traits.yml +241 -0
  282. data/share/sample/ruby-1.9.3-p0/adlint/ext-date/GNUmakefile +134 -0
  283. data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_cinit.h +228 -0
  284. data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_pinit.h +24 -0
  285. data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_traits.yml +241 -0
  286. data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/GNUmakefile +131 -0
  287. data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_cinit.h +228 -0
  288. data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_pinit.h +24 -0
  289. data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_traits.yml +241 -0
  290. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/GNUmakefile +131 -0
  291. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_cinit.h +228 -0
  292. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_pinit.h +24 -0
  293. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_traits.yml +241 -0
  294. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/GNUmakefile +131 -0
  295. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_cinit.h +228 -0
  296. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_pinit.h +24 -0
  297. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_traits.yml +242 -0
  298. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/GNUmakefile +132 -0
  299. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_cinit.h +228 -0
  300. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_pinit.h +24 -0
  301. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_traits.yml +242 -0
  302. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/GNUmakefile +132 -0
  303. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_cinit.h +228 -0
  304. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_pinit.h +24 -0
  305. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_traits.yml +242 -0
  306. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/GNUmakefile +132 -0
  307. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_cinit.h +228 -0
  308. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_pinit.h +24 -0
  309. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_traits.yml +242 -0
  310. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/GNUmakefile +132 -0
  311. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_cinit.h +228 -0
  312. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_pinit.h +24 -0
  313. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_traits.yml +242 -0
  314. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/GNUmakefile +134 -0
  315. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_cinit.h +228 -0
  316. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_pinit.h +24 -0
  317. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_traits.yml +241 -0
  318. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/GNUmakefile +140 -0
  319. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_cinit.h +228 -0
  320. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_pinit.h +24 -0
  321. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_traits.yml +242 -0
  322. data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/GNUmakefile +131 -0
  323. data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_cinit.h +228 -0
  324. data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_pinit.h +24 -0
  325. data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_traits.yml +241 -0
  326. data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/GNUmakefile +131 -0
  327. data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_cinit.h +228 -0
  328. data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_pinit.h +24 -0
  329. data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_traits.yml +241 -0
  330. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/GNUmakefile +131 -0
  331. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_cinit.h +228 -0
  332. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_pinit.h +24 -0
  333. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_traits.yml +241 -0
  334. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/GNUmakefile +134 -0
  335. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_cinit.h +228 -0
  336. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_pinit.h +24 -0
  337. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_traits.yml +242 -0
  338. data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/GNUmakefile +131 -0
  339. data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_cinit.h +228 -0
  340. data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_pinit.h +24 -0
  341. data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_traits.yml +241 -0
  342. data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/GNUmakefile +131 -0
  343. data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_cinit.h +228 -0
  344. data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_pinit.h +24 -0
  345. data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_traits.yml +241 -0
  346. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/GNUmakefile +131 -0
  347. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_cinit.h +228 -0
  348. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_pinit.h +24 -0
  349. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_traits.yml +241 -0
  350. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/GNUmakefile +131 -0
  351. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_cinit.h +228 -0
  352. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_pinit.h +24 -0
  353. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_traits.yml +241 -0
  354. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/GNUmakefile +131 -0
  355. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_cinit.h +228 -0
  356. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_pinit.h +24 -0
  357. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_traits.yml +241 -0
  358. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/GNUmakefile +131 -0
  359. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_cinit.h +228 -0
  360. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_pinit.h +24 -0
  361. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_traits.yml +241 -0
  362. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/GNUmakefile +131 -0
  363. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_cinit.h +228 -0
  364. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_pinit.h +24 -0
  365. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_traits.yml +241 -0
  366. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/GNUmakefile +131 -0
  367. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_cinit.h +228 -0
  368. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_pinit.h +24 -0
  369. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_traits.yml +241 -0
  370. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/GNUmakefile +131 -0
  371. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_cinit.h +228 -0
  372. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_pinit.h +24 -0
  373. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_traits.yml +241 -0
  374. data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/GNUmakefile +131 -0
  375. data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_cinit.h +228 -0
  376. data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_pinit.h +24 -0
  377. data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_traits.yml +241 -0
  378. data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/GNUmakefile +162 -0
  379. data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_cinit.h +228 -0
  380. data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_pinit.h +24 -0
  381. data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_traits.yml +241 -0
  382. data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/GNUmakefile +131 -0
  383. data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_cinit.h +228 -0
  384. data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_pinit.h +24 -0
  385. data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_traits.yml +241 -0
  386. data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/GNUmakefile +135 -0
  387. data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_cinit.h +228 -0
  388. data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_pinit.h +24 -0
  389. data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_traits.yml +241 -0
  390. data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/GNUmakefile +131 -0
  391. data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_cinit.h +228 -0
  392. data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_pinit.h +24 -0
  393. data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_traits.yml +241 -0
  394. data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/GNUmakefile +131 -0
  395. data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_cinit.h +228 -0
  396. data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_pinit.h +24 -0
  397. data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_traits.yml +241 -0
  398. data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/GNUmakefile +131 -0
  399. data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_cinit.h +228 -0
  400. data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_pinit.h +24 -0
  401. data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_traits.yml +241 -0
  402. data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/GNUmakefile +131 -0
  403. data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_cinit.h +228 -0
  404. data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_pinit.h +24 -0
  405. data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_traits.yml +241 -0
  406. data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/GNUmakefile +132 -0
  407. data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_cinit.h +228 -0
  408. data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_pinit.h +24 -0
  409. data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_traits.yml +241 -0
  410. data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/GNUmakefile +144 -0
  411. data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_cinit.h +228 -0
  412. data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_pinit.h +24 -0
  413. data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_traits.yml +241 -0
  414. data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/GNUmakefile +131 -0
  415. data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_cinit.h +228 -0
  416. data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_pinit.h +24 -0
  417. data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_traits.yml +241 -0
  418. data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/GNUmakefile +131 -0
  419. data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_cinit.h +228 -0
  420. data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_pinit.h +24 -0
  421. data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_traits.yml +241 -0
  422. data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/GNUmakefile +140 -0
  423. data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_cinit.h +228 -0
  424. data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_pinit.h +24 -0
  425. data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_traits.yml +241 -0
  426. data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/GNUmakefile +131 -0
  427. data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_cinit.h +228 -0
  428. data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_pinit.h +24 -0
  429. data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_traits.yml +241 -0
  430. data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/GNUmakefile +131 -0
  431. data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_cinit.h +228 -0
  432. data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_pinit.h +24 -0
  433. data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_traits.yml +241 -0
  434. data/share/sample/screen-4.0.3/adlint/GNUmakefile +162 -0
  435. data/share/sample/screen-4.0.3/adlint/adlint_cinit.h +228 -0
  436. data/share/sample/screen-4.0.3/adlint/adlint_pinit.h +21 -0
  437. data/share/sample/screen-4.0.3/adlint/adlint_traits.yml +238 -0
  438. data/share/sample/vim-7.3/adlint/vim/GNUmakefile +185 -0
  439. data/share/sample/vim-7.3/adlint/vim/adlint_cinit.h +228 -0
  440. data/share/sample/vim-7.3/adlint/vim/adlint_pinit.h +25 -0
  441. data/share/sample/vim-7.3/adlint/vim/adlint_traits.yml +250 -0
  442. data/share/sample/vim-7.3/adlint/xxd/GNUmakefile +131 -0
  443. data/share/sample/vim-7.3/adlint/xxd/adlint_cinit.h +228 -0
  444. data/share/sample/vim-7.3/adlint/xxd/adlint_pinit.h +24 -0
  445. data/share/sample/vim-7.3/adlint/xxd/adlint_traits.yml +237 -0
  446. data/share/sample/zsh-4.3.15/adlint/GNUmakefile +146 -0
  447. data/share/sample/zsh-4.3.15/adlint/adlint_traits.yml +225 -0
  448. data/share/sample/zsh-4.3.15/adlint/builtins/GNUmakefile +132 -0
  449. data/share/sample/zsh-4.3.15/adlint/builtins/adlint_cinit.h +228 -0
  450. data/share/sample/zsh-4.3.15/adlint/builtins/adlint_pinit.h +24 -0
  451. data/share/sample/zsh-4.3.15/adlint/builtins/adlint_traits.yml +240 -0
  452. data/share/sample/zsh-4.3.15/adlint/core/GNUmakefile +153 -0
  453. data/share/sample/zsh-4.3.15/adlint/core/adlint_cinit.h +228 -0
  454. data/share/sample/zsh-4.3.15/adlint/core/adlint_pinit.h +23 -0
  455. data/share/sample/zsh-4.3.15/adlint/core/adlint_traits.yml +239 -0
  456. data/share/sample/zsh-4.3.15/adlint/modules/GNUmakefile +147 -0
  457. data/share/sample/zsh-4.3.15/adlint/modules/adlint_cinit.h +228 -0
  458. data/share/sample/zsh-4.3.15/adlint/modules/adlint_pinit.h +24 -0
  459. data/share/sample/zsh-4.3.15/adlint/modules/adlint_traits.yml +240 -0
  460. data/share/sample/zsh-4.3.15/adlint/zle/GNUmakefile +144 -0
  461. data/share/sample/zsh-4.3.15/adlint/zle/adlint_cinit.h +228 -0
  462. data/share/sample/zsh-4.3.15/adlint/zle/adlint_pinit.h +24 -0
  463. data/share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml +239 -0
  464. data/spec/MUST_WRITE_SPECS_WITH_RSPEC +0 -0
  465. metadata +532 -0
@@ -0,0 +1,712 @@
1
+ # Analysis phases for C language.
2
+ #
3
+ # Author:: Yutaka Yanoh <mailto:yanoh@users.sourceforge.net>
4
+ # Copyright:: Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
5
+ # License:: GPLv3+: GNU General Public License version 3 or later
6
+ #
7
+ # Owner:: Yutaka Yanoh <mailto:yanoh@users.sourceforge.net>
8
+
9
+ #--
10
+ # ___ ____ __ ___ _________
11
+ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer
12
+ # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint
13
+ # / __ |/ /_/ / /___/ / /| / / /
14
+ # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
15
+ #
16
+ # This file is part of AdLint.
17
+ #
18
+ # AdLint is free software: you can redistribute it and/or modify it under the
19
+ # terms of the GNU General Public License as published by the Free Software
20
+ # Foundation, either version 3 of the License, or (at your option) any later
21
+ # version.
22
+ #
23
+ # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY
24
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
25
+ # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
26
+ #
27
+ # You should have received a copy of the GNU General Public License along with
28
+ # AdLint. If not, see <http://www.gnu.org/licenses/>.
29
+ #
30
+ #++
31
+
32
+ require "adlint/phase"
33
+ require "adlint/error"
34
+ require "adlint/monitor"
35
+ require "adlint/c/lexer"
36
+ require "adlint/c/parser"
37
+ require "adlint/c/syntax"
38
+ require "adlint/c/interp"
39
+ require "adlint/c/code"
40
+ require "adlint/c/metric"
41
+ require "adlint/c/message"
42
+ require "adlint/c/util"
43
+
44
+ module AdLint #:nodoc:
45
+ module C #:nodoc:
46
+
47
+ class ParsePhase < Phase
48
+ private
49
+ def do_execute(context)
50
+ monitored_region("prs") do
51
+ parser = Parser.new(context, Lexer.new(context[:c_source]))
52
+ begin
53
+ context[:c_syntax_tree] = parser.execute
54
+ ensure
55
+ context[:c_token_array] = parser.token_array
56
+ end
57
+ end
58
+ ensure
59
+ DebugUtil.dump_token_array(context)
60
+ end
61
+ end
62
+
63
+ class ResolvePhase < Phase
64
+ private
65
+ def do_execute(context)
66
+ monitored_region("typ") do
67
+ resolver = StaticTypeResolver.new
68
+ context[:c_type_table] = resolver.resolve(context[:c_syntax_tree])
69
+ end
70
+ end
71
+ end
72
+
73
+ class PreparePhase < Phase
74
+ private
75
+ def do_execute(context)
76
+ monitored_region("pr2") do
77
+ context[:c_interpreter] = Interpreter.new(context[:c_type_table])
78
+ context[:c_visitor] = SyntaxTreeMulticastVisitor.new
79
+
80
+ context[:c_commands] = setup_code_extractions(context) +
81
+ setup_metric_measurements(context) +
82
+ setup_message_detections(context)
83
+ end
84
+ end
85
+
86
+ def setup_code_extractions(context)
87
+ [
88
+ FuncCallExtraction.new(context),
89
+ CrossRefExtraction.new(context),
90
+ TypeDeclExtraction.new(context),
91
+ GVarDeclExtraction.new(context),
92
+ FuncDeclExtraction.new(context),
93
+ VarDefExtraction.new(context),
94
+ FuncDefExtraction.new(context),
95
+ LabelDefExtraction.new(context),
96
+ InitializationExtraction.new(context),
97
+ AssignmentExtraction.new(context),
98
+ LiteralExtraction.new(context)
99
+ ]
100
+ end
101
+
102
+ def setup_metric_measurements(context)
103
+ [
104
+ FN_UNUV.new(context),
105
+ FN_PATH.new(context),
106
+ FL_STMT.new(context),
107
+ FL_FUNC.new(context),
108
+ FN_STMT.new(context),
109
+ FN_UNRC.new(context),
110
+ FN_LINE.new(context),
111
+ FN_PARA.new(context),
112
+ FN_CSUB.new(context),
113
+ FN_GOTO.new(context),
114
+ FN_RETN.new(context),
115
+ FN_UELS.new(context),
116
+ FN_NEST.new(context),
117
+ FN_CYCM.new(context)
118
+ ]
119
+ end
120
+
121
+ def setup_message_detections(context)
122
+ [
123
+ W0001.new(context),
124
+ W0002.new(context),
125
+ W0003.new(context),
126
+ W0007.new(context),
127
+ W0010.new(context),
128
+ W0013.new(context),
129
+ W0016.new(context),
130
+ W0017.new(context),
131
+ W0018.new(context),
132
+ W0019.new(context),
133
+ W0021.new(context),
134
+ W0023.new(context),
135
+ W0024.new(context),
136
+ W0027.new(context),
137
+ W0028.new(context),
138
+ W0030.new(context),
139
+ W0031.new(context),
140
+ W0033.new(context),
141
+ W0035.new(context),
142
+ W0036.new(context),
143
+ W0037.new(context),
144
+ W0038.new(context),
145
+ W0039.new(context),
146
+ W0040.new(context),
147
+ W0041.new(context),
148
+ W0042.new(context),
149
+ W0043.new(context),
150
+ W0049.new(context),
151
+ W0050.new(context),
152
+ W0051.new(context),
153
+ W0052.new(context),
154
+ W0058.new(context),
155
+ W0062.new(context),
156
+ W0063.new(context),
157
+ W0065.new(context),
158
+ W0066.new(context),
159
+ W0064.new(context),
160
+ W0067.new(context),
161
+ W0068.new(context),
162
+ W0070.new(context),
163
+ W0071.new(context),
164
+ W0076.new(context),
165
+ W0077.new(context),
166
+ W0078.new(context),
167
+ W0079.new(context),
168
+ W0080.new(context),
169
+ W0081.new(context),
170
+ W0082.new(context),
171
+ W0084.new(context),
172
+ W0085.new(context),
173
+ W0086.new(context),
174
+ W0087.new(context),
175
+ W0088.new(context),
176
+ W0093.new(context),
177
+ W0096.new(context),
178
+ W0097.new(context),
179
+ W0100.new(context),
180
+ W0101.new(context),
181
+ W0102.new(context),
182
+ W0103.new(context),
183
+ W0104.new(context),
184
+ W0105.new(context),
185
+ W0107.new(context),
186
+ W0108.new(context),
187
+ W0109.new(context),
188
+ W0110.new(context),
189
+ W0112.new(context),
190
+ W0114.new(context),
191
+ W0115.new(context),
192
+ W0116.new(context),
193
+ W0117.new(context),
194
+ W0118.new(context),
195
+ W0119.new(context),
196
+ W0120.new(context),
197
+ W0121.new(context),
198
+ W0122.new(context),
199
+ W0123.new(context),
200
+ W0124.new(context),
201
+ W0125.new(context),
202
+ W0126.new(context),
203
+ W0127.new(context),
204
+ W0128.new(context),
205
+ W0129.new(context),
206
+ W0130.new(context),
207
+ W0131.new(context),
208
+ W0132.new(context),
209
+ W0133.new(context),
210
+ W0134.new(context),
211
+ W0135.new(context),
212
+ W0136.new(context),
213
+ W0137.new(context),
214
+ W0138.new(context),
215
+ W0139.new(context),
216
+ W0140.new(context),
217
+ W0141.new(context),
218
+ W0142.new(context),
219
+ W0143.new(context),
220
+ W0144.new(context),
221
+ W0145.new(context),
222
+ W0146.new(context),
223
+ W0147.new(context),
224
+ W0148.new(context),
225
+ W0149.new(context),
226
+ W0150.new(context),
227
+ W0151.new(context),
228
+ W0152.new(context),
229
+ W0153.new(context),
230
+ W0154.new(context),
231
+ W0155.new(context),
232
+ W0156.new(context),
233
+ W0157.new(context),
234
+ W0158.new(context),
235
+ W0159.new(context),
236
+ W0160.new(context),
237
+ W0161.new(context),
238
+ W0162.new(context),
239
+ W0163.new(context),
240
+ W0164.new(context),
241
+ W0165.new(context),
242
+ W0166.new(context),
243
+ W0167.new(context),
244
+ W0168.new(context),
245
+ W0169.new(context),
246
+ W0170.new(context),
247
+ W0171.new(context),
248
+ W0172.new(context),
249
+ W0173.new(context),
250
+ W0174.new(context),
251
+ W0175.new(context),
252
+ W0176.new(context),
253
+ W0177.new(context),
254
+ W0178.new(context),
255
+ W0179.new(context),
256
+ W0180.new(context),
257
+ W0181.new(context),
258
+ W0182.new(context),
259
+ W0183.new(context),
260
+ W0184.new(context),
261
+ W0185.new(context),
262
+ W0186.new(context),
263
+ W0187.new(context),
264
+ W0188.new(context),
265
+ W0189.new(context),
266
+ W0190.new(context),
267
+ W0191.new(context),
268
+ W0192.new(context),
269
+ W0193.new(context),
270
+ W0194.new(context),
271
+ W0195.new(context),
272
+ W0196.new(context),
273
+ W0197.new(context),
274
+ W0198.new(context),
275
+ W0199.new(context),
276
+ W0200.new(context),
277
+ W0201.new(context),
278
+ W0202.new(context),
279
+ W0203.new(context),
280
+ W0204.new(context),
281
+ W0205.new(context),
282
+ W0206.new(context),
283
+ W0207.new(context),
284
+ W0208.new(context),
285
+ W0209.new(context),
286
+ W0210.new(context),
287
+ W0211.new(context),
288
+ W0212.new(context),
289
+ W0213.new(context),
290
+ W0214.new(context),
291
+ W0215.new(context),
292
+ W0216.new(context),
293
+ W0217.new(context),
294
+ W0218.new(context),
295
+ W0219.new(context),
296
+ W0220.new(context),
297
+ W0221.new(context),
298
+ W0222.new(context),
299
+ W0223.new(context),
300
+ W0224.new(context),
301
+ W0225.new(context),
302
+ W0226.new(context),
303
+ W0227.new(context),
304
+ W0228.new(context),
305
+ W0229.new(context),
306
+ W0230.new(context),
307
+ W0231.new(context),
308
+ W0232.new(context),
309
+ W0233.new(context),
310
+ W0234.new(context),
311
+ W0235.new(context),
312
+ W0236.new(context),
313
+ W0237.new(context),
314
+ W0238.new(context),
315
+ W0239.new(context),
316
+ W0240.new(context),
317
+ W0241.new(context),
318
+ W0242.new(context),
319
+ W0243.new(context),
320
+ W0244.new(context),
321
+ W0245.new(context),
322
+ W0246.new(context),
323
+ W0247.new(context),
324
+ W0248.new(context),
325
+ W0249.new(context),
326
+ W0250.new(context),
327
+ W0251.new(context),
328
+ W0252.new(context),
329
+ W0253.new(context),
330
+ W0254.new(context),
331
+ W0255.new(context),
332
+ W0256.new(context),
333
+ W0257.new(context),
334
+ W0258.new(context),
335
+ W0259.new(context),
336
+ W0260.new(context),
337
+ W0261.new(context),
338
+ W0262.new(context),
339
+ W0263.new(context),
340
+ W0264.new(context),
341
+ W0265.new(context),
342
+ W0266.new(context),
343
+ W0267.new(context),
344
+ W0268.new(context),
345
+ W0269.new(context),
346
+ W0270.new(context),
347
+ W0271.new(context),
348
+ W0272.new(context),
349
+ W0273.new(context),
350
+ W0274.new(context),
351
+ W0275.new(context),
352
+ W0276.new(context),
353
+ W0277.new(context),
354
+ W0278.new(context),
355
+ W0279.new(context),
356
+ W0280.new(context),
357
+ W0281.new(context),
358
+ W0282.new(context),
359
+ W0283.new(context),
360
+ W0284.new(context),
361
+ W0285.new(context),
362
+ W0286.new(context),
363
+ W0287.new(context),
364
+ W0288.new(context),
365
+ W0289.new(context),
366
+ W0290.new(context),
367
+ W0291.new(context),
368
+ W0292.new(context),
369
+ W0293.new(context),
370
+ W0294.new(context),
371
+ W0295.new(context),
372
+ W0296.new(context),
373
+ W0297.new(context),
374
+ W0298.new(context),
375
+ W0299.new(context),
376
+ W0300.new(context),
377
+ W0301.new(context),
378
+ W0302.new(context),
379
+ W0303.new(context),
380
+ W0304.new(context),
381
+ W0305.new(context),
382
+ W0306.new(context),
383
+ W0307.new(context),
384
+ W0308.new(context),
385
+ W0309.new(context),
386
+ W0310.new(context),
387
+ W0311.new(context),
388
+ W0312.new(context),
389
+ W0313.new(context),
390
+ W0314.new(context),
391
+ W0315.new(context),
392
+ W0316.new(context),
393
+ W0317.new(context),
394
+ W0318.new(context),
395
+ W0319.new(context),
396
+ W0320.new(context),
397
+ W0321.new(context),
398
+ W0322.new(context),
399
+ W0323.new(context),
400
+ W0324.new(context),
401
+ W0325.new(context),
402
+ W0326.new(context),
403
+ W0327.new(context),
404
+ W0328.new(context),
405
+ W0329.new(context),
406
+ W0330.new(context),
407
+ W0331.new(context),
408
+ W0332.new(context),
409
+ W0333.new(context),
410
+ W0334.new(context),
411
+ W0335.new(context),
412
+ W0336.new(context),
413
+ W0337.new(context),
414
+ W0338.new(context),
415
+ W0339.new(context),
416
+ W0340.new(context),
417
+ W0341.new(context),
418
+ W0342.new(context),
419
+ W0343.new(context),
420
+ W0344.new(context),
421
+ W0345.new(context),
422
+ W0346.new(context),
423
+ W0347.new(context),
424
+ W0348.new(context),
425
+ W0349.new(context),
426
+ W0350.new(context),
427
+ W0351.new(context),
428
+ W0352.new(context),
429
+ W0353.new(context),
430
+ W0354.new(context),
431
+ W0355.new(context),
432
+ W0356.new(context),
433
+ W0357.new(context),
434
+ W0358.new(context),
435
+ W0359.new(context),
436
+ W0360.new(context),
437
+ W0361.new(context),
438
+ W0362.new(context),
439
+ W0363.new(context),
440
+ W0364.new(context),
441
+ W0365.new(context),
442
+ W0366.new(context),
443
+ W0367.new(context),
444
+ W0368.new(context),
445
+ W0369.new(context),
446
+ W0370.new(context),
447
+ W0371.new(context),
448
+ W0372.new(context),
449
+ W0373.new(context),
450
+ W0374.new(context),
451
+ W0375.new(context),
452
+ W0376.new(context),
453
+ W0377.new(context),
454
+ W0378.new(context),
455
+ W0379.new(context),
456
+ W0380.new(context),
457
+ W0381.new(context),
458
+ W0382.new(context),
459
+ W0383.new(context),
460
+ W0384.new(context),
461
+ W0385.new(context),
462
+ W0386.new(context),
463
+ W0387.new(context),
464
+ W0388.new(context),
465
+ W0389.new(context),
466
+ W0390.new(context),
467
+ W0391.new(context),
468
+ W0392.new(context),
469
+ W0393.new(context),
470
+ W0394.new(context),
471
+ W0395.new(context),
472
+ W0396.new(context),
473
+ W0397.new(context),
474
+ W0398.new(context),
475
+ W0399.new(context),
476
+ W0400.new(context),
477
+ W0401.new(context),
478
+ W0402.new(context),
479
+ W0403.new(context),
480
+ W0404.new(context),
481
+ W0405.new(context),
482
+ W0406.new(context),
483
+ W0407.new(context),
484
+ W0408.new(context),
485
+ W0409.new(context),
486
+ W0410.new(context),
487
+ W0411.new(context),
488
+ W0413.new(context),
489
+ W0414.new(context),
490
+ W0421.new(context),
491
+ W0422.new(context),
492
+ W0423.new(context),
493
+ W0424.new(context),
494
+ W0425.new(context),
495
+ W0431.new(context),
496
+ W0432.new(context),
497
+ W0440.new(context),
498
+ W0441.new(context),
499
+ W0446.new(context),
500
+ W0447.new(context),
501
+ W0456.new(context),
502
+ W0457.new(context),
503
+ W0458.new(context),
504
+ W0459.new(context),
505
+ W0460.new(context),
506
+ W0461.new(context),
507
+ W0462.new(context),
508
+ W0488.new(context),
509
+ W0489.new(context),
510
+ W0490.new(context),
511
+ W0491.new(context),
512
+ W0492.new(context),
513
+ W0493.new(context),
514
+ W0495.new(context),
515
+ W0496.new(context),
516
+ W0497.new(context),
517
+ W0498.new(context),
518
+ W0499.new(context),
519
+ W0500.new(context),
520
+ W0501.new(context),
521
+ W0502.new(context),
522
+ W0508.new(context),
523
+ W0512.new(context),
524
+ W0525.new(context),
525
+ W0529.new(context),
526
+ W0530.new(context),
527
+ W0532.new(context),
528
+ W0534.new(context),
529
+ W0535.new(context),
530
+ W0538.new(context),
531
+ W0540.new(context),
532
+ W0542.new(context),
533
+ W0543.new(context),
534
+ W0544.new(context),
535
+ W0546.new(context),
536
+ W0551.new(context),
537
+ W0552.new(context),
538
+ W0553.new(context),
539
+ W0556.new(context),
540
+ W0559.new(context),
541
+ W0560.new(context),
542
+ W0561.new(context),
543
+ W0562.new(context),
544
+ W0563.new(context),
545
+ W0564.new(context),
546
+ W0565.new(context),
547
+ W0566.new(context),
548
+ W0567.new(context),
549
+ W0568.new(context),
550
+ W0569.new(context),
551
+ W0570.new(context),
552
+ W0571.new(context),
553
+ W0572.new(context),
554
+ W0578.new(context),
555
+ W0580.new(context),
556
+ W0581.new(context),
557
+ W0582.new(context),
558
+ W0583.new(context),
559
+ W0584.new(context),
560
+ W0585.new(context),
561
+ W0605.new(context),
562
+ W0609.new(context),
563
+ W0610.new(context),
564
+ W0611.new(context),
565
+ W0612.new(context),
566
+ W0613.new(context),
567
+ W0614.new(context),
568
+ W0622.new(context),
569
+ W0623.new(context),
570
+ W0624.new(context),
571
+ W0626.new(context),
572
+ W0627.new(context),
573
+ W0629.new(context),
574
+ W0635.new(context),
575
+ W0636.new(context),
576
+ W0637.new(context),
577
+ W0638.new(context),
578
+ W0639.new(context),
579
+ W0640.new(context),
580
+ W0653.new(context),
581
+ W0654.new(context),
582
+ W0655.new(context),
583
+ W0656.new(context),
584
+ W0657.new(context),
585
+ W0658.new(context),
586
+ W0659.new(context),
587
+ W0660.new(context),
588
+ W0661.new(context),
589
+ W0662.new(context),
590
+ W0663.new(context),
591
+ W0664.new(context),
592
+ W0665.new(context),
593
+ W0666.new(context),
594
+ W0667.new(context),
595
+ W0668.new(context),
596
+ W0669.new(context),
597
+ W0670.new(context),
598
+ W0671.new(context),
599
+ W0672.new(context),
600
+ W0673.new(context),
601
+ W0674.new(context),
602
+ W0675.new(context),
603
+ W0676.new(context),
604
+ W0677.new(context),
605
+ W0678.new(context),
606
+ W0679.new(context),
607
+ W0680.new(context),
608
+ W0681.new(context),
609
+ W0682.new(context),
610
+ W0683.new(context),
611
+ W0684.new(context),
612
+ W0703.new(context),
613
+ W0704.new(context),
614
+ W0705.new(context),
615
+ W0708.new(context),
616
+ W0736.new(context),
617
+ W0742.new(context),
618
+ W0744.new(context),
619
+ W0745.new(context),
620
+ W0747.new(context),
621
+ W0748.new(context),
622
+ W0749.new(context),
623
+ W0750.new(context),
624
+ W0751.new(context),
625
+ W0752.new(context),
626
+ W0753.new(context),
627
+ W0754.new(context),
628
+ W0755.new(context),
629
+ W0756.new(context),
630
+ W0757.new(context),
631
+ W0758.new(context),
632
+ W0759.new(context),
633
+ W0760.new(context),
634
+ W0761.new(context),
635
+ W0762.new(context),
636
+ W0763.new(context),
637
+ W0764.new(context),
638
+ W0765.new(context),
639
+ W0766.new(context),
640
+ W0767.new(context),
641
+ W0768.new(context),
642
+ W0769.new(context),
643
+ W0771.new(context),
644
+ W0774.new(context),
645
+ W0775.new(context),
646
+ W0776.new(context),
647
+ W0777.new(context),
648
+ W0778.new(context),
649
+ W0779.new(context),
650
+ W0785.new(context),
651
+ W0786.new(context),
652
+ W0790.new(context),
653
+ W0795.new(context),
654
+ W0796.new(context),
655
+ W0797.new(context),
656
+ W0798.new(context),
657
+ W0799.new(context),
658
+ W0800.new(context),
659
+ W0810.new(context),
660
+ W0827.new(context),
661
+ W0828.new(context),
662
+ W0947.new(context),
663
+ W0948.new(context),
664
+ W0949.new(context),
665
+ W0950.new(context),
666
+ W1027.new(context),
667
+ W1028.new(context),
668
+ W1029.new(context),
669
+ W1031.new(context),
670
+ W1032.new(context),
671
+ W1034.new(context),
672
+ W1049.new(context),
673
+ W1050.new(context),
674
+ W1051.new(context),
675
+ W1052.new(context),
676
+ W9001.new(context)
677
+ ]
678
+ end
679
+ end
680
+
681
+ class InterpPhase < Phase
682
+ private
683
+ def do_execute(context)
684
+ monitored_region("int") do
685
+ context[:c_interpreter].execute(context[:c_syntax_tree])
686
+ ValueDomain.clear_memo
687
+ end
688
+ ensure
689
+ DebugUtil.dump_syntax_tree(context)
690
+ end
691
+ end
692
+
693
+ class ReviewPhase < Phase
694
+ private
695
+ def do_execute(context)
696
+ monitored_region("rv2") do
697
+ context[:c_syntax_tree].accept(context[:c_visitor])
698
+ end
699
+ end
700
+ end
701
+
702
+ class CommandPhase < Phase
703
+ private
704
+ def do_execute(context)
705
+ monitored_region("cm2") do
706
+ context[:c_commands].each { |command| command.execute }
707
+ end
708
+ end
709
+ end
710
+
711
+ end
712
+ end