adlint 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +27 -0
- data/COPYING +674 -0
- data/ChangeLog +820 -0
- data/INSTALL +78 -0
- data/MANIFEST +464 -0
- data/NEWS +38 -0
- data/README +74 -0
- data/Rakefile +167 -0
- data/TODO +29 -0
- data/bin/adlint +141 -0
- data/bin/adlint_chk +129 -0
- data/bin/adlint_cma +122 -0
- data/bin/adlint_sma +129 -0
- data/bin/adlintize +286 -0
- data/etc/conf.d/fallback/cinit.erb +11 -0
- data/etc/conf.d/fallback/traits.erb +216 -0
- data/etc/conf.d/i686-cygwin/cinit-gcc_4.3.4.erb +149 -0
- data/etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb +227 -0
- data/etc/conf.d/i686-devkit/cinit-gcc_4.5.2.erb +224 -0
- data/etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb +226 -0
- data/etc/conf.d/i686-linux/cinit-gcc_4.5.1.erb +219 -0
- data/etc/conf.d/i686-linux/traits-gcc_4.5.1.erb +224 -0
- data/etc/conf.d/i686-mingw/cinit-gcc_4.6.1.erb +234 -0
- data/etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb +226 -0
- data/etc/conf.d/noarch/GNUmakefile.erb +119 -0
- data/etc/conf.d/noarch/adlint_all_bat.erb +9 -0
- data/etc/conf.d/noarch/adlint_all_sh.erb +10 -0
- data/etc/conf.d/noarch/pinit.erb +11 -0
- data/etc/mesg.d/en_US/messages.yml +784 -0
- data/etc/mesg.d/ja_JP/messages.yml +784 -0
- data/lib/adlint/analyzer.rb +294 -0
- data/lib/adlint/c/branch.rb +251 -0
- data/lib/adlint/c/builtin.rb +92 -0
- data/lib/adlint/c/code.rb +490 -0
- data/lib/adlint/c/const.rb +465 -0
- data/lib/adlint/c/conv.rb +212 -0
- data/lib/adlint/c/ctrlexpr.rb +949 -0
- data/lib/adlint/c/domain.rb +7499 -0
- data/lib/adlint/c/environ.rb +133 -0
- data/lib/adlint/c/expr.rb +1725 -0
- data/lib/adlint/c/format.rb +3209 -0
- data/lib/adlint/c/interp.rb +1740 -0
- data/lib/adlint/c/lexer.rb +241 -0
- data/lib/adlint/c/mediator.rb +313 -0
- data/lib/adlint/c/message.rb +13597 -0
- data/lib/adlint/c/metric.rb +765 -0
- data/lib/adlint/c/object.rb +1018 -0
- data/lib/adlint/c/parser.rb +3800 -0
- data/lib/adlint/c/parser.y +2054 -0
- data/lib/adlint/c/phase.rb +712 -0
- data/lib/adlint/c/resolver.rb +270 -0
- data/lib/adlint/c/scanner.rb +248 -0
- data/lib/adlint/c/scope.rb +74 -0
- data/lib/adlint/c/syntax.rb +4279 -0
- data/lib/adlint/c/type.rb +7506 -0
- data/lib/adlint/c/util.rb +91 -0
- data/lib/adlint/c/value.rb +2310 -0
- data/lib/adlint/c.rb +56 -0
- data/lib/adlint/code.rb +500 -0
- data/lib/adlint/cpp/code.rb +189 -0
- data/lib/adlint/cpp/constexpr.rb +721 -0
- data/lib/adlint/cpp/constexpr.y +389 -0
- data/lib/adlint/cpp/eval.rb +1012 -0
- data/lib/adlint/cpp/lexer.rb +860 -0
- data/lib/adlint/cpp/macro.rb +637 -0
- data/lib/adlint/cpp/message.rb +992 -0
- data/lib/adlint/cpp/phase.rb +176 -0
- data/lib/adlint/cpp/scanner.rb +93 -0
- data/lib/adlint/cpp/source.rb +169 -0
- data/lib/adlint/cpp/subst.rb +300 -0
- data/lib/adlint/cpp/syntax.rb +1412 -0
- data/lib/adlint/cpp/util.rb +97 -0
- data/lib/adlint/cpp.rb +43 -0
- data/lib/adlint/driver.rb +147 -0
- data/lib/adlint/error.rb +179 -0
- data/lib/adlint/lang.rb +97 -0
- data/lib/adlint/ld/message.rb +259 -0
- data/lib/adlint/ld/metric.rb +57 -0
- data/lib/adlint/ld/object.rb +542 -0
- data/lib/adlint/ld/phase.rb +193 -0
- data/lib/adlint/ld/typedef.rb +109 -0
- data/lib/adlint/ld/util.rb +88 -0
- data/lib/adlint/ld.rb +37 -0
- data/lib/adlint/lexer.rb +293 -0
- data/lib/adlint/message.rb +368 -0
- data/lib/adlint/metric.rb +805 -0
- data/lib/adlint/monitor.rb +144 -0
- data/lib/adlint/phase.rb +90 -0
- data/lib/adlint/prelude.rb +314 -0
- data/lib/adlint/report.rb +617 -0
- data/lib/adlint/source.rb +155 -0
- data/lib/adlint/symbol.rb +127 -0
- data/lib/adlint/token.rb +215 -0
- data/lib/adlint/traits.rb +643 -0
- data/lib/adlint/util.rb +524 -0
- data/lib/adlint/version.rb +71 -0
- data/lib/adlint.rb +66 -0
- data/share/HEADER +45 -0
- data/share/demo/Makefile +110 -0
- data/share/demo/ambig_operator/ambig_operator.c +289 -0
- data/share/demo/arg_points_unset/arg_points_unset.c +37 -0
- data/share/demo/array_range/array_range.c +62 -0
- data/share/demo/bad_bitfields/bad_bitfields.c +74 -0
- data/share/demo/bad_brace/bad_brace.c +19 -0
- data/share/demo/bad_charset/abcde$.h +0 -0
- data/share/demo/bad_charset/bad_charset.c +22 -0
- data/share/demo/bad_comment/bad_comment.c +3 -0
- data/share/demo/bad_const/bad_const.c +19 -0
- data/share/demo/bad_conv/bad_conv.c +48 -0
- data/share/demo/bad_indent/bad_indent.c +50 -0
- data/share/demo/bad_init/bad_init.c +49 -0
- data/share/demo/bad_macro/bad_macro.c +97 -0
- data/share/demo/bitwise_expr/bitwise_expr.c +19 -0
- data/share/demo/call_by_value/call_by_value.c +26 -0
- data/share/demo/cross_ref/cross_ref.c +21 -0
- data/share/demo/dangling_else/dangling_else.c +20 -0
- data/share/demo/dead_code/dead_code.c +237 -0
- data/share/demo/deep_nest/deep_nest.c +57 -0
- data/share/demo/dense_switch/dense_switch.c +62 -0
- data/share/demo/direct_recur/direct_recur.c +15 -0
- data/share/demo/div_by_zero/div_by_zero.c +35 -0
- data/share/demo/dos_source/dos_source.c +7 -0
- data/share/demo/funptr_cast/funptr_cast.c +26 -0
- data/share/demo/goto_stmt/goto_stmt.c +19 -0
- data/share/demo/id_hiding/id_hiding.c +19 -0
- data/share/demo/ill_defined/ill_defined.c +13 -0
- data/share/demo/implicit_conv/implicit_conv.c +60 -0
- data/share/demo/implicit_int/implicit_int.c +14 -0
- data/share/demo/incomplete_type/incomplete_type.c +49 -0
- data/share/demo/indirect_recur/indirect_recur_1.c +14 -0
- data/share/demo/indirect_recur/indirect_recur_1.h +7 -0
- data/share/demo/indirect_recur/indirect_recur_2.c +12 -0
- data/share/demo/indirect_recur/indirect_recur_2.h +6 -0
- data/share/demo/indirect_recur/indirect_recur_3.c +6 -0
- data/share/demo/indirect_recur/indirect_recur_3.h +6 -0
- data/share/demo/indirect_recur/indirect_recur_4.c +25 -0
- data/share/demo/intro_demo/intro_demo.c +76 -0
- data/share/demo/intro_demo/intro_demo.h +12 -0
- data/share/demo/intro_demo/useless_header.h +5 -0
- data/share/demo/invalid_call/invalid_call.c +32 -0
- data/share/demo/kandr_fundef/kandr_fundef.c +10 -0
- data/share/demo/line_comment/line_comment.c +12 -0
- data/share/demo/local_decl/local_decl.c +9 -0
- data/share/demo/logical_trick/logical_trick.c +36 -0
- data/share/demo/long_sym/long_sym.c +5 -0
- data/share/demo/loop_var/loop_var.c +92 -0
- data/share/demo/malloc_or_die/malloc_or_die.c +43 -0
- data/share/demo/may_be_null/may_be_null.c +52 -0
- data/share/demo/may_be_null_arith/may_be_null_arith.c +15 -0
- data/share/demo/may_be_unset/may_be_unset.c +34 -0
- data/share/demo/mmapped_io/mmapped_io.c +23 -0
- data/share/demo/multi_break/multi_break.c +33 -0
- data/share/demo/multi_decl/multi_decl_1.c +17 -0
- data/share/demo/multi_decl/multi_decl_1.h +6 -0
- data/share/demo/multi_decl/multi_decl_2.c +13 -0
- data/share/demo/multi_decl/multi_decl_2.h +6 -0
- data/share/demo/multi_decl/multi_decl_3.c +22 -0
- data/share/demo/multi_def/multi_def_1.c +36 -0
- data/share/demo/multi_def/multi_def_1.h +6 -0
- data/share/demo/multi_def/multi_def_2.c +22 -0
- data/share/demo/multi_def/multi_def_2.h +6 -0
- data/share/demo/multi_def/multi_def_3.c +6 -0
- data/share/demo/multi_typedef/multi_typedef.c +11 -0
- data/share/demo/multi_typedef/multi_typedef_1.h +1 -0
- data/share/demo/multi_typedef/multi_typedef_2.h +1 -0
- data/share/demo/must_be_false/must_be_false.c +53 -0
- data/share/demo/must_be_null/must_be_null.c +13 -0
- data/share/demo/must_be_null_arith/must_be_null_arith.c +14 -0
- data/share/demo/must_be_true/must_be_true.c +21 -0
- data/share/demo/no_eof_nl/no_eof_nl.c +4 -0
- data/share/demo/no_void_arg/no_void_arg.c +14 -0
- data/share/demo/null_stmt/null_stmt.c +19 -0
- data/share/demo/octal_const/octal_const.c +20 -0
- data/share/demo/output_by_param/output_by_param.c +17 -0
- data/share/demo/overflow/overflow.c +74 -0
- data/share/demo/press_release/press_release.c +40 -0
- data/share/demo/retn_lvar_addr/retn_lvar_addr.c +47 -0
- data/share/demo/shift_expr/shift_expr.c +14 -0
- data/share/demo/should_be_typedef/should_be_typedef.c +51 -0
- data/share/demo/static_paths/static_paths.c +153 -0
- data/share/demo/static_vars/static_vars.c +39 -0
- data/share/demo/tag_hiding/tag_hiding.c +18 -0
- data/share/demo/tricky_incdec/tricky_incdec.c +12 -0
- data/share/demo/undefined_macro/undefined_macro.c +17 -0
- data/share/demo/uninit_vars/uninit_vars.c +28 -0
- data/share/demo/union_type/union_type.c +23 -0
- data/share/demo/unmatch_decl/unmatch_decl_1.c +12 -0
- data/share/demo/unmatch_decl/unmatch_decl_1.h +8 -0
- data/share/demo/unmatch_decl/unmatch_decl_2.c +10 -0
- data/share/demo/unmatch_decl/unmatch_decl_2.h +8 -0
- data/share/demo/unmatch_decl/unmatch_decl_3.c +7 -0
- data/share/demo/unmatch_paren_macro/unmatch_paren_macro.c +15 -0
- data/share/demo/unreachable/unreachable.c +34 -0
- data/share/demo/useless_exp_funs/useless_exp_funs_1.c +14 -0
- data/share/demo/useless_exp_funs/useless_exp_funs_1.h +1 -0
- data/share/demo/useless_exp_funs/useless_exp_funs_2.c +6 -0
- data/share/demo/useless_exp_vars/useless_export_1.c +8 -0
- data/share/demo/useless_exp_vars/useless_export_1.h +1 -0
- data/share/demo/useless_exp_vars/useless_export_2.c +7 -0
- data/share/demo/useless_expr/useless_expr.c +17 -0
- data/share/demo/useless_funs/useless_funs_1.c +21 -0
- data/share/demo/useless_funs/useless_funs_1.h +8 -0
- data/share/demo/useless_funs/useless_funs_2.c +6 -0
- data/share/demo/useless_header/useless_header.c +9 -0
- data/share/demo/useless_header/useless_header_1.h +12 -0
- data/share/demo/useless_header/useless_header_2.h +6 -0
- data/share/demo/useless_header/useless_header_3.h +9 -0
- data/share/demo/useless_header/useless_header_4.h +3 -0
- data/share/demo/useless_vars/useless_vars.c +17 -0
- data/share/demo/va_funcall/va_funcall.c +25 -0
- data/share/demo/various_fundef/various_fundef.c +36 -0
- data/share/demo/wchar_wstring/wchar_wstring.c +7 -0
- data/share/demo/wrap_around/wrap_around.c +38 -0
- data/share/doc/Makefile +16 -0
- data/share/doc/adlint_on_adqua.png +0 -0
- data/share/doc/adlint_on_eclipse_en.png +0 -0
- data/share/doc/adlint_on_eclipse_ja.png +0 -0
- data/share/doc/adlint_on_vim_en.png +0 -0
- data/share/doc/adlint_on_vim_ja.png +0 -0
- data/share/doc/developers_guide_ja.html +171 -0
- data/share/doc/developers_guide_ja.texi +87 -0
- data/share/doc/gen_mesg_sections.rb +39 -0
- data/share/doc/samples/GNUmakefile +162 -0
- data/share/doc/samples/adlint_traits.yml +238 -0
- data/share/doc/texinfo.css +22 -0
- data/share/doc/users_guide_en.html +39975 -0
- data/share/doc/users_guide_en.texi +32640 -0
- data/share/doc/users_guide_ja.html +40505 -0
- data/share/doc/users_guide_ja.texi +33189 -0
- data/share/logo/adlint-110.png +0 -0
- data/share/logo/adlint-524.png +0 -0
- data/share/logo/adlint.svg +4637 -0
- data/share/sample/README +6 -0
- data/share/sample/bison-2.5/adlint/GNUmakefile +170 -0
- data/share/sample/bison-2.5/adlint/adlint_traits.yml +225 -0
- data/share/sample/bison-2.5/adlint/lib/GNUmakefile +198 -0
- data/share/sample/bison-2.5/adlint/lib/adlint_cinit.h +228 -0
- data/share/sample/bison-2.5/adlint/lib/adlint_pinit.h +21 -0
- data/share/sample/bison-2.5/adlint/lib/adlint_traits.yml +238 -0
- data/share/sample/bison-2.5/adlint/src/GNUmakefile +166 -0
- data/share/sample/bison-2.5/adlint/src/adlint_cinit.h +228 -0
- data/share/sample/bison-2.5/adlint/src/adlint_pinit.h +21 -0
- data/share/sample/bison-2.5/adlint/src/adlint_traits.yml +239 -0
- data/share/sample/ctags-5.8/adlint/GNUmakefile +169 -0
- data/share/sample/ctags-5.8/adlint/adlint_cinit.h +219 -0
- data/share/sample/ctags-5.8/adlint/adlint_pinit.h +13 -0
- data/share/sample/ctags-5.8/adlint/adlint_traits.yml +225 -0
- data/share/sample/flex-2.5.35/adlint/GNUmakefile +140 -0
- data/share/sample/flex-2.5.35/adlint/adlint_cinit.h +219 -0
- data/share/sample/flex-2.5.35/adlint/adlint_pinit.h +14 -0
- data/share/sample/flex-2.5.35/adlint/adlint_traits.yml +225 -0
- data/share/sample/ruby-1.9.3-p0/adlint/GNUmakefile +314 -0
- data/share/sample/ruby-1.9.3-p0/adlint/adlint_traits.yml +225 -0
- data/share/sample/ruby-1.9.3-p0/adlint/core/GNUmakefile +204 -0
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_pinit.h +28 -0
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_traits.yml +240 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc/GNUmakefile +163 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_traits.yml +240 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/GNUmakefile +149 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_traits.yml +240 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/GNUmakefile +134 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/GNUmakefile +134 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/GNUmakefile +140 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/GNUmakefile +134 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/GNUmakefile +162 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/GNUmakefile +135 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/GNUmakefile +144 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/GNUmakefile +140 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_traits.yml +241 -0
- data/share/sample/screen-4.0.3/adlint/GNUmakefile +162 -0
- data/share/sample/screen-4.0.3/adlint/adlint_cinit.h +228 -0
- data/share/sample/screen-4.0.3/adlint/adlint_pinit.h +21 -0
- data/share/sample/screen-4.0.3/adlint/adlint_traits.yml +238 -0
- data/share/sample/vim-7.3/adlint/vim/GNUmakefile +185 -0
- data/share/sample/vim-7.3/adlint/vim/adlint_cinit.h +228 -0
- data/share/sample/vim-7.3/adlint/vim/adlint_pinit.h +25 -0
- data/share/sample/vim-7.3/adlint/vim/adlint_traits.yml +250 -0
- data/share/sample/vim-7.3/adlint/xxd/GNUmakefile +131 -0
- data/share/sample/vim-7.3/adlint/xxd/adlint_cinit.h +228 -0
- data/share/sample/vim-7.3/adlint/xxd/adlint_pinit.h +24 -0
- data/share/sample/vim-7.3/adlint/xxd/adlint_traits.yml +237 -0
- data/share/sample/zsh-4.3.15/adlint/GNUmakefile +146 -0
- data/share/sample/zsh-4.3.15/adlint/adlint_traits.yml +225 -0
- data/share/sample/zsh-4.3.15/adlint/builtins/GNUmakefile +132 -0
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_cinit.h +228 -0
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_pinit.h +24 -0
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_traits.yml +240 -0
- data/share/sample/zsh-4.3.15/adlint/core/GNUmakefile +153 -0
- data/share/sample/zsh-4.3.15/adlint/core/adlint_cinit.h +228 -0
- data/share/sample/zsh-4.3.15/adlint/core/adlint_pinit.h +23 -0
- data/share/sample/zsh-4.3.15/adlint/core/adlint_traits.yml +239 -0
- data/share/sample/zsh-4.3.15/adlint/modules/GNUmakefile +147 -0
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_cinit.h +228 -0
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_pinit.h +24 -0
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_traits.yml +240 -0
- data/share/sample/zsh-4.3.15/adlint/zle/GNUmakefile +144 -0
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_cinit.h +228 -0
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_pinit.h +24 -0
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml +239 -0
- data/spec/MUST_WRITE_SPECS_WITH_RSPEC +0 -0
- metadata +532 -0
@@ -0,0 +1,721 @@
|
|
1
|
+
#
|
2
|
+
# DO NOT MODIFY!!!!
|
3
|
+
# This file is automatically generated by Racc 1.4.7
|
4
|
+
# from Racc grammer file "".
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'racc/parser.rb'
|
8
|
+
|
9
|
+
|
10
|
+
require "adlint/report"
|
11
|
+
require "adlint/util"
|
12
|
+
require "adlint/cpp/util"
|
13
|
+
|
14
|
+
module AdLint
|
15
|
+
module Cpp
|
16
|
+
class ConstantExpression < Racc::Parser
|
17
|
+
|
18
|
+
module_eval(<<'...end constexpr.y/module_eval...', 'constexpr.y', 311)
|
19
|
+
|
20
|
+
include ReportUtil
|
21
|
+
|
22
|
+
def initialize(context, expr_tokens)
|
23
|
+
@context = context
|
24
|
+
@expr_tokens = expr_tokens
|
25
|
+
@macro_table = context.macro_table
|
26
|
+
@fpath = expr_tokens.first.location.fpath
|
27
|
+
@last_line_no = expr_tokens.last.location.line_no
|
28
|
+
end
|
29
|
+
|
30
|
+
extend Pluggable
|
31
|
+
|
32
|
+
def_plugin :on_illformed_defined_op_found
|
33
|
+
def_plugin :on_undefined_macro_referred
|
34
|
+
|
35
|
+
def evaluate
|
36
|
+
@token_queue = relex(@expr_tokens)
|
37
|
+
if expression = do_parse
|
38
|
+
expression
|
39
|
+
else
|
40
|
+
ErrorExpression.new(nil)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
def relex(expr_tokens)
|
46
|
+
token_queue = []
|
47
|
+
expr_tokens.each do |token|
|
48
|
+
case token.value
|
49
|
+
when /\A(?:0x[0-9a-f]+|[0-9]+)[UL]*\z/i
|
50
|
+
token_queue.push(Token.new(:CONSTANT, token.value, token.location))
|
51
|
+
when /\A(?:[0-9]*\.[0-9]*e[+-]?[0-9]+|[0-9]+\.?e[+-]?[0-9]+)[FL]*/i
|
52
|
+
token_queue.push(Token.new(:CONSTANT, token.value, token.location))
|
53
|
+
when /\AL?'.*'\z/i
|
54
|
+
token_queue.push(Token.new(:CONSTANT, token.value, token.location))
|
55
|
+
when /\AL?".*"\z/i
|
56
|
+
token_queue.push(Token.new(:CONSTANT, token.value, token.location))
|
57
|
+
when "(", ")", "+", "-", "~", "!", "*", "/", "%", "<<", ">>", "<", ">",
|
58
|
+
"<=", ">=", "==", "!=", "&", "^", "|", "&&", "||", "?", ":"
|
59
|
+
token_queue.push(Token.new(token.value, token.value, token.location))
|
60
|
+
when "defined"
|
61
|
+
token_queue.push(Token.new(:DEFINED, token.value, token.location))
|
62
|
+
else
|
63
|
+
token_queue.push(Token.new(:IDENTIFIER, token.value, token.location))
|
64
|
+
end
|
65
|
+
end
|
66
|
+
token_queue
|
67
|
+
end
|
68
|
+
|
69
|
+
def next_token
|
70
|
+
(token = @token_queue.shift) ? [token.type, token] : nil
|
71
|
+
end
|
72
|
+
|
73
|
+
def on_error(error_token_id, error_value, value_stack)
|
74
|
+
E(:E0007, location_of(error_value), value_of(error_value))
|
75
|
+
end
|
76
|
+
|
77
|
+
def location_of(token)
|
78
|
+
token == "$" ? Location.new(@fpath, @last_line_no) : token.location
|
79
|
+
end
|
80
|
+
|
81
|
+
def value_of(token)
|
82
|
+
token == "$" ? "EOF" : token.value
|
83
|
+
end
|
84
|
+
|
85
|
+
def notify_illformed_defined_operator(location)
|
86
|
+
on_illformed_defined_op_found.invoke(location)
|
87
|
+
end
|
88
|
+
|
89
|
+
def notify_undefined_macro_referred(identifier)
|
90
|
+
on_undefined_macro_referred.invoke(identifier)
|
91
|
+
end
|
92
|
+
|
93
|
+
def report
|
94
|
+
@context.report
|
95
|
+
end
|
96
|
+
|
97
|
+
# vim:ft=racc:sw=2:ts=2:sts=2:et:
|
98
|
+
...end constexpr.y/module_eval...
|
99
|
+
##### State transition tables begin ###
|
100
|
+
|
101
|
+
racc_action_table = [
|
102
|
+
2, 3, 11, 4, 24, 7, 8, 9, 10, 2,
|
103
|
+
3, 11, 4, 77, 7, 8, 9, 10, 2, 3,
|
104
|
+
11, 4, 47, 7, 8, 9, 10, 2, 3, 11,
|
105
|
+
4, 48, 7, 8, 9, 10, 2, 3, 11, 4,
|
106
|
+
49, 7, 8, 9, 10, 2, 3, 11, 4, 50,
|
107
|
+
7, 8, 9, 10, 2, 3, 11, 4, 53, 7,
|
108
|
+
8, 9, 10, 2, 3, 11, 4, 54, 7, 8,
|
109
|
+
9, 10, 2, 3, 11, 4, 55, 7, 8, 9,
|
110
|
+
10, 2, 3, 11, 4, 47, 7, 8, 9, 10,
|
111
|
+
2, 3, 11, 4, 48, 7, 8, 9, 10, 2,
|
112
|
+
3, 11, 4, 49, 7, 8, 9, 10, 2, 3,
|
113
|
+
11, 4, 50, 7, 8, 9, 10, 2, 3, 11,
|
114
|
+
4, 78, 7, 8, 9, 10, 2, 3, 11, 4,
|
115
|
+
56, 7, 8, 9, 10, 2, 3, 11, 4, nil,
|
116
|
+
7, 8, 9, 10, 2, 3, 11, 4, nil, 7,
|
117
|
+
8, 9, 10, 2, 3, 11, 4, nil, 7, 8,
|
118
|
+
9, 10, 2, 3, 11, 4, nil, 7, 8, 9,
|
119
|
+
10, 2, 3, 11, 4, nil, 7, 8, 9, 10,
|
120
|
+
2, 3, 11, 4, nil, 7, 8, 9, 10, 2,
|
121
|
+
3, 11, 4, nil, 7, 8, 9, 10, 2, 3,
|
122
|
+
11, 4, nil, 7, 8, 9, 10, 2, 3, 11,
|
123
|
+
4, nil, 7, 8, 9, 10, 2, 3, 11, 4,
|
124
|
+
nil, 7, 8, 9, 10, 2, 3, 11, 4, nil,
|
125
|
+
7, 8, 9, 10, 2, 3, 11, 4, nil, 7,
|
126
|
+
8, 9, 10, 33, nil, 32, nil, 31, 41, 42,
|
127
|
+
43, 44, 41, 42, 43, 44, 41, 42, 43, 44,
|
128
|
+
34, 35, 36, 34, 35, 36, 34, 35, 36, 39,
|
129
|
+
40, 39, 40, 45, 46, 39, 40, 39, 40, 37,
|
130
|
+
38, 51, 52, 45, 46, 37, 38, 39, 40, 37,
|
131
|
+
38 ]
|
132
|
+
|
133
|
+
racc_action_check = [
|
134
|
+
0, 0, 0, 0, 1, 0, 0, 0, 0, 38,
|
135
|
+
38, 38, 38, 56, 38, 38, 38, 38, 4, 4,
|
136
|
+
4, 4, 18, 4, 4, 4, 4, 7, 7, 7,
|
137
|
+
7, 19, 7, 7, 7, 7, 8, 8, 8, 8,
|
138
|
+
20, 8, 8, 8, 8, 9, 9, 9, 9, 21,
|
139
|
+
9, 9, 9, 9, 10, 10, 10, 10, 24, 10,
|
140
|
+
10, 10, 10, 55, 55, 55, 55, 25, 55, 55,
|
141
|
+
55, 55, 52, 52, 52, 52, 26, 52, 52, 52,
|
142
|
+
52, 51, 51, 51, 51, 71, 51, 51, 51, 51,
|
143
|
+
50, 50, 50, 50, 72, 50, 50, 50, 50, 49,
|
144
|
+
49, 49, 49, 73, 49, 49, 49, 49, 48, 48,
|
145
|
+
48, 48, 74, 48, 48, 48, 48, 47, 47, 47,
|
146
|
+
47, 75, 47, 47, 47, 47, 46, 46, 46, 46,
|
147
|
+
31, 46, 46, 46, 46, 45, 45, 45, 45, nil,
|
148
|
+
45, 45, 45, 45, 44, 44, 44, 44, nil, 44,
|
149
|
+
44, 44, 44, 43, 43, 43, 43, nil, 43, 43,
|
150
|
+
43, 43, 42, 42, 42, 42, nil, 42, 42, 42,
|
151
|
+
42, 41, 41, 41, 41, nil, 41, 41, 41, 41,
|
152
|
+
40, 40, 40, 40, nil, 40, 40, 40, 40, 39,
|
153
|
+
39, 39, 39, nil, 39, 39, 39, 39, 34, 34,
|
154
|
+
34, 34, nil, 34, 34, 34, 34, 35, 35, 35,
|
155
|
+
35, nil, 35, 35, 35, 35, 36, 36, 36, 36,
|
156
|
+
nil, 36, 36, 36, 36, 37, 37, 37, 37, nil,
|
157
|
+
37, 37, 37, 37, 78, 78, 78, 78, nil, 78,
|
158
|
+
78, 78, 78, 11, nil, 11, nil, 11, 16, 16,
|
159
|
+
16, 16, 69, 69, 69, 69, 68, 68, 68, 68,
|
160
|
+
13, 13, 13, 60, 60, 60, 61, 61, 61, 65,
|
161
|
+
65, 66, 66, 17, 17, 67, 67, 15, 15, 14,
|
162
|
+
14, 22, 22, 70, 70, 63, 63, 64, 64, 62,
|
163
|
+
62 ]
|
164
|
+
|
165
|
+
racc_action_pointer = [
|
166
|
+
-2, 4, nil, nil, 16, nil, nil, 25, 34, 43,
|
167
|
+
52, 242, nil, 249, 272, 263, 232, 253, 0, 8,
|
168
|
+
16, 24, 255, nil, 58, 61, 47, nil, nil, nil,
|
169
|
+
nil, 127, nil, nil, 196, 205, 214, 223, 7, 187,
|
170
|
+
178, 169, 160, 151, 142, 133, 124, 115, 106, 97,
|
171
|
+
88, 79, 70, nil, nil, 61, 7, nil, nil, nil,
|
172
|
+
252, 255, 282, 278, 273, 255, 257, 261, 240, 236,
|
173
|
+
263, 63, 71, 79, 87, 93, nil, nil, 232, nil ]
|
174
|
+
|
175
|
+
racc_action_default = [
|
176
|
+
-46, -46, -1, -2, -46, -4, -5, -46, -46, -46,
|
177
|
+
-46, -46, -13, -17, -20, -23, -28, -31, -33, -35,
|
178
|
+
-37, -39, -41, -43, -46, -46, -44, -6, -7, -8,
|
179
|
+
-9, -46, -11, -12, -46, -46, -46, -46, -46, -46,
|
180
|
+
-46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
|
181
|
+
-46, -46, -46, 80, -3, -46, -46, -14, -15, -16,
|
182
|
+
-18, -19, -21, -22, -24, -25, -26, -27, -29, -30,
|
183
|
+
-32, -34, -36, -38, -40, -46, -45, -10, -46, -42 ]
|
184
|
+
|
185
|
+
racc_goto_table = [
|
186
|
+
25, 27, 28, 29, 30, 64, 65, 66, 67, 60,
|
187
|
+
61, 62, 63, 68, 69, 1, 70, 71, 72, 73,
|
188
|
+
74, 79, nil, nil, nil, nil, nil, nil, 57, 58,
|
189
|
+
59, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
190
|
+
nil, nil, nil, nil, nil, nil, nil, nil, 75, nil,
|
191
|
+
nil, 76 ]
|
192
|
+
|
193
|
+
racc_goto_check = [
|
194
|
+
3, 5, 5, 5, 5, 8, 8, 8, 8, 6,
|
195
|
+
6, 7, 7, 9, 9, 1, 10, 11, 12, 13,
|
196
|
+
14, 16, nil, nil, nil, nil, nil, nil, 5, 5,
|
197
|
+
5, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
198
|
+
nil, nil, nil, nil, nil, nil, nil, nil, 3, nil,
|
199
|
+
nil, 3 ]
|
200
|
+
|
201
|
+
racc_goto_pointer = [
|
202
|
+
nil, 15, nil, -4, nil, -6, -28, -28, -36, -32,
|
203
|
+
-31, -31, -31, -31, -31, nil, -57 ]
|
204
|
+
|
205
|
+
racc_goto_default = [
|
206
|
+
nil, 26, 5, nil, 6, 12, 13, 14, 15, 16,
|
207
|
+
17, 18, 19, 20, 21, 22, 23 ]
|
208
|
+
|
209
|
+
racc_reduce_table = [
|
210
|
+
0, 0, :racc_error,
|
211
|
+
1, 32, :_reduce_1,
|
212
|
+
1, 32, :_reduce_2,
|
213
|
+
3, 32, :_reduce_3,
|
214
|
+
1, 34, :_reduce_none,
|
215
|
+
1, 35, :_reduce_none,
|
216
|
+
2, 35, :_reduce_6,
|
217
|
+
2, 35, :_reduce_7,
|
218
|
+
2, 35, :_reduce_8,
|
219
|
+
2, 35, :_reduce_9,
|
220
|
+
4, 35, :_reduce_10,
|
221
|
+
2, 35, :_reduce_11,
|
222
|
+
2, 35, :_reduce_12,
|
223
|
+
1, 36, :_reduce_none,
|
224
|
+
3, 36, :_reduce_14,
|
225
|
+
3, 36, :_reduce_15,
|
226
|
+
3, 36, :_reduce_16,
|
227
|
+
1, 37, :_reduce_none,
|
228
|
+
3, 37, :_reduce_18,
|
229
|
+
3, 37, :_reduce_19,
|
230
|
+
1, 38, :_reduce_none,
|
231
|
+
3, 38, :_reduce_21,
|
232
|
+
3, 38, :_reduce_22,
|
233
|
+
1, 39, :_reduce_none,
|
234
|
+
3, 39, :_reduce_24,
|
235
|
+
3, 39, :_reduce_25,
|
236
|
+
3, 39, :_reduce_26,
|
237
|
+
3, 39, :_reduce_27,
|
238
|
+
1, 40, :_reduce_none,
|
239
|
+
3, 40, :_reduce_29,
|
240
|
+
3, 40, :_reduce_30,
|
241
|
+
1, 41, :_reduce_none,
|
242
|
+
3, 41, :_reduce_32,
|
243
|
+
1, 42, :_reduce_none,
|
244
|
+
3, 42, :_reduce_34,
|
245
|
+
1, 43, :_reduce_none,
|
246
|
+
3, 43, :_reduce_36,
|
247
|
+
1, 44, :_reduce_none,
|
248
|
+
3, 44, :_reduce_38,
|
249
|
+
1, 45, :_reduce_none,
|
250
|
+
3, 45, :_reduce_40,
|
251
|
+
1, 46, :_reduce_none,
|
252
|
+
5, 46, :_reduce_42,
|
253
|
+
1, 31, :_reduce_none,
|
254
|
+
1, 33, :_reduce_none,
|
255
|
+
3, 33, :_reduce_45 ]
|
256
|
+
|
257
|
+
racc_reduce_n = 46
|
258
|
+
|
259
|
+
racc_shift_n = 80
|
260
|
+
|
261
|
+
racc_token_table = {
|
262
|
+
false => 0,
|
263
|
+
:error => 1,
|
264
|
+
:CONSTANT => 2,
|
265
|
+
:IDENTIFIER => 3,
|
266
|
+
:DEFINED => 4,
|
267
|
+
"(" => 5,
|
268
|
+
")" => 6,
|
269
|
+
"+" => 7,
|
270
|
+
"-" => 8,
|
271
|
+
"~" => 9,
|
272
|
+
"!" => 10,
|
273
|
+
"*" => 11,
|
274
|
+
"/" => 12,
|
275
|
+
"%" => 13,
|
276
|
+
"<<" => 14,
|
277
|
+
">>" => 15,
|
278
|
+
"<" => 16,
|
279
|
+
">" => 17,
|
280
|
+
"<=" => 18,
|
281
|
+
">=" => 19,
|
282
|
+
"==" => 20,
|
283
|
+
"!=" => 21,
|
284
|
+
"&" => 22,
|
285
|
+
"^" => 23,
|
286
|
+
"|" => 24,
|
287
|
+
"&&" => 25,
|
288
|
+
"||" => 26,
|
289
|
+
"?" => 27,
|
290
|
+
":" => 28,
|
291
|
+
"," => 29 }
|
292
|
+
|
293
|
+
racc_nt_base = 30
|
294
|
+
|
295
|
+
racc_use_result_var = true
|
296
|
+
|
297
|
+
Racc_arg = [
|
298
|
+
racc_action_table,
|
299
|
+
racc_action_check,
|
300
|
+
racc_action_default,
|
301
|
+
racc_action_pointer,
|
302
|
+
racc_goto_table,
|
303
|
+
racc_goto_check,
|
304
|
+
racc_goto_default,
|
305
|
+
racc_goto_pointer,
|
306
|
+
racc_nt_base,
|
307
|
+
racc_reduce_table,
|
308
|
+
racc_token_table,
|
309
|
+
racc_shift_n,
|
310
|
+
racc_reduce_n,
|
311
|
+
racc_use_result_var ]
|
312
|
+
|
313
|
+
Racc_token_to_s_table = [
|
314
|
+
"$end",
|
315
|
+
"error",
|
316
|
+
"CONSTANT",
|
317
|
+
"IDENTIFIER",
|
318
|
+
"DEFINED",
|
319
|
+
"\"(\"",
|
320
|
+
"\")\"",
|
321
|
+
"\"+\"",
|
322
|
+
"\"-\"",
|
323
|
+
"\"~\"",
|
324
|
+
"\"!\"",
|
325
|
+
"\"*\"",
|
326
|
+
"\"/\"",
|
327
|
+
"\"%\"",
|
328
|
+
"\"<<\"",
|
329
|
+
"\">>\"",
|
330
|
+
"\"<\"",
|
331
|
+
"\">\"",
|
332
|
+
"\"<=\"",
|
333
|
+
"\">=\"",
|
334
|
+
"\"==\"",
|
335
|
+
"\"!=\"",
|
336
|
+
"\"&\"",
|
337
|
+
"\"^\"",
|
338
|
+
"\"|\"",
|
339
|
+
"\"&&\"",
|
340
|
+
"\"||\"",
|
341
|
+
"\"?\"",
|
342
|
+
"\":\"",
|
343
|
+
"\",\"",
|
344
|
+
"$start",
|
345
|
+
"constant_expression",
|
346
|
+
"primary_expression",
|
347
|
+
"expression",
|
348
|
+
"postfix_expression",
|
349
|
+
"unary_expression",
|
350
|
+
"multiplicative_expression",
|
351
|
+
"additive_expression",
|
352
|
+
"shift_expression",
|
353
|
+
"relational_expression",
|
354
|
+
"equality_expression",
|
355
|
+
"and_expression",
|
356
|
+
"exclusive_or_expression",
|
357
|
+
"inclusive_or_expression",
|
358
|
+
"logical_and_expression",
|
359
|
+
"logical_or_expression",
|
360
|
+
"conditional_expression" ]
|
361
|
+
|
362
|
+
Racc_debug_parser = false
|
363
|
+
|
364
|
+
##### State transition tables end #####
|
365
|
+
|
366
|
+
# reduce 0 omitted
|
367
|
+
|
368
|
+
module_eval(<<'.,.,', 'constexpr.y', 44)
|
369
|
+
def _reduce_1(val, _values, result)
|
370
|
+
case val[0].value
|
371
|
+
when /\A0b([01]+)[UL]*\z/i
|
372
|
+
value = $1.to_i(2)
|
373
|
+
when /\A(0[0-9]*)[UL]*\z/i
|
374
|
+
value = $1.to_i(8)
|
375
|
+
when /\A([1-9][0-9]*)[UL]*\z/i
|
376
|
+
value = $1.to_i(10)
|
377
|
+
when /\A0x([0-9a-f]+)[UL]*\z/i
|
378
|
+
value = $1.to_i(16)
|
379
|
+
when /\A([0-9]*\.[0-9]*E[+-]?[0-9]+|[0-9]+\.?E[+-]?[0-9]+)[FL]*\z/i,
|
380
|
+
/\A([0-9]*\.[0-9]+|[0-9]+\.)[FL]*/i
|
381
|
+
value = $1.to_f
|
382
|
+
when /\AL?'(.*)'\z/i
|
383
|
+
if $1.length > 1 && $1[0] == "\\"
|
384
|
+
value = EscapeSequence.new($1).value
|
385
|
+
else
|
386
|
+
value = $1[0].ord
|
387
|
+
end
|
388
|
+
else
|
389
|
+
value = 0
|
390
|
+
end
|
391
|
+
result = ConstantSpecifier.new(value, val[0])
|
392
|
+
yyerrok
|
393
|
+
|
394
|
+
result
|
395
|
+
end
|
396
|
+
.,.,
|
397
|
+
|
398
|
+
module_eval(<<'.,.,', 'constexpr.y', 70)
|
399
|
+
def _reduce_2(val, _values, result)
|
400
|
+
notify_undefined_macro_referred(val[0])
|
401
|
+
result = ErrorExpression.new(val[0])
|
402
|
+
yyerrok
|
403
|
+
|
404
|
+
result
|
405
|
+
end
|
406
|
+
.,.,
|
407
|
+
|
408
|
+
module_eval(<<'.,.,', 'constexpr.y', 76)
|
409
|
+
def _reduce_3(val, _values, result)
|
410
|
+
result = GroupedExpression.new(val[1].value, val[1])
|
411
|
+
yyerrok
|
412
|
+
|
413
|
+
result
|
414
|
+
end
|
415
|
+
.,.,
|
416
|
+
|
417
|
+
# reduce 4 omitted
|
418
|
+
|
419
|
+
# reduce 5 omitted
|
420
|
+
|
421
|
+
module_eval(<<'.,.,', 'constexpr.y', 89)
|
422
|
+
def _reduce_6(val, _values, result)
|
423
|
+
value = val[1].value
|
424
|
+
result = UnaryArithmeticExpression.new(value, val[0], val[1])
|
425
|
+
|
426
|
+
result
|
427
|
+
end
|
428
|
+
.,.,
|
429
|
+
|
430
|
+
module_eval(<<'.,.,', 'constexpr.y', 94)
|
431
|
+
def _reduce_7(val, _values, result)
|
432
|
+
value = -val[1].value
|
433
|
+
result = UnaryArithmeticExpression.new(value, val[0], val[1])
|
434
|
+
|
435
|
+
result
|
436
|
+
end
|
437
|
+
.,.,
|
438
|
+
|
439
|
+
module_eval(<<'.,.,', 'constexpr.y', 99)
|
440
|
+
def _reduce_8(val, _values, result)
|
441
|
+
value = ~val[1].value
|
442
|
+
result = UnaryArithmeticExpression.new(value, val[0], val[1])
|
443
|
+
|
444
|
+
result
|
445
|
+
end
|
446
|
+
.,.,
|
447
|
+
|
448
|
+
module_eval(<<'.,.,', 'constexpr.y', 104)
|
449
|
+
def _reduce_9(val, _values, result)
|
450
|
+
value = val[1].value == 0 ? 1 : 0
|
451
|
+
result = UnaryArithmeticExpression.new(value, val[0], val[1])
|
452
|
+
|
453
|
+
result
|
454
|
+
end
|
455
|
+
.,.,
|
456
|
+
|
457
|
+
module_eval(<<'.,.,', 'constexpr.y', 109)
|
458
|
+
def _reduce_10(val, _values, result)
|
459
|
+
if macro = @macro_table.lookup(val[2].value)
|
460
|
+
macro.define_line.mark_as_referred_by(val[2])
|
461
|
+
value = 1
|
462
|
+
else
|
463
|
+
value = 0
|
464
|
+
end
|
465
|
+
result = DefinedExpression.new(value, val[0], val[2])
|
466
|
+
|
467
|
+
result
|
468
|
+
end
|
469
|
+
.,.,
|
470
|
+
|
471
|
+
module_eval(<<'.,.,', 'constexpr.y', 119)
|
472
|
+
def _reduce_11(val, _values, result)
|
473
|
+
if macro = @macro_table.lookup(val[1].value)
|
474
|
+
macro.define_line.mark_as_referred_by(val[1])
|
475
|
+
value = 1
|
476
|
+
else
|
477
|
+
value = 0
|
478
|
+
end
|
479
|
+
result = DefinedExpression.new(value, val[0], val[1])
|
480
|
+
|
481
|
+
result
|
482
|
+
end
|
483
|
+
.,.,
|
484
|
+
|
485
|
+
module_eval(<<'.,.,', 'constexpr.y', 129)
|
486
|
+
def _reduce_12(val, _values, result)
|
487
|
+
notify_illformed_defined_operator(location_of(val[0]))
|
488
|
+
result = ErrorExpression.new(val[1])
|
489
|
+
|
490
|
+
result
|
491
|
+
end
|
492
|
+
.,.,
|
493
|
+
|
494
|
+
# reduce 13 omitted
|
495
|
+
|
496
|
+
module_eval(<<'.,.,', 'constexpr.y', 138)
|
497
|
+
def _reduce_14(val, _values, result)
|
498
|
+
value = val[0].value * val[2].value
|
499
|
+
result = MultiplicativeExpression.new(value, val[1], val[0], val[2])
|
500
|
+
|
501
|
+
result
|
502
|
+
end
|
503
|
+
.,.,
|
504
|
+
|
505
|
+
module_eval(<<'.,.,', 'constexpr.y', 143)
|
506
|
+
def _reduce_15(val, _values, result)
|
507
|
+
unless val[2].value == 0
|
508
|
+
value = val[0].value / val[2].value
|
509
|
+
else
|
510
|
+
value = 0
|
511
|
+
end
|
512
|
+
result = MultiplicativeExpression.new(value, val[1], val[0], val[2])
|
513
|
+
|
514
|
+
result
|
515
|
+
end
|
516
|
+
.,.,
|
517
|
+
|
518
|
+
module_eval(<<'.,.,', 'constexpr.y', 152)
|
519
|
+
def _reduce_16(val, _values, result)
|
520
|
+
unless val[2].value == 0
|
521
|
+
value = val[0].value % val[2].value
|
522
|
+
else
|
523
|
+
value = 0
|
524
|
+
end
|
525
|
+
result = MultiplicativeExpression.new(value, val[1], val[0], val[2])
|
526
|
+
|
527
|
+
result
|
528
|
+
end
|
529
|
+
.,.,
|
530
|
+
|
531
|
+
# reduce 17 omitted
|
532
|
+
|
533
|
+
module_eval(<<'.,.,', 'constexpr.y', 165)
|
534
|
+
def _reduce_18(val, _values, result)
|
535
|
+
value = val[0].value + val[2].value
|
536
|
+
result = AdditiveExpression.new(value, val[1], val[0], val[2])
|
537
|
+
|
538
|
+
result
|
539
|
+
end
|
540
|
+
.,.,
|
541
|
+
|
542
|
+
module_eval(<<'.,.,', 'constexpr.y', 170)
|
543
|
+
def _reduce_19(val, _values, result)
|
544
|
+
value = val[0].value - val[2].value
|
545
|
+
result = AdditiveExpression.new(value, val[1], val[0], val[2])
|
546
|
+
|
547
|
+
result
|
548
|
+
end
|
549
|
+
.,.,
|
550
|
+
|
551
|
+
# reduce 20 omitted
|
552
|
+
|
553
|
+
module_eval(<<'.,.,', 'constexpr.y', 179)
|
554
|
+
def _reduce_21(val, _values, result)
|
555
|
+
value = val[0].value << val[2].value
|
556
|
+
result = ShiftExpression.new(value, val[1], val[0], val[2])
|
557
|
+
|
558
|
+
result
|
559
|
+
end
|
560
|
+
.,.,
|
561
|
+
|
562
|
+
module_eval(<<'.,.,', 'constexpr.y', 184)
|
563
|
+
def _reduce_22(val, _values, result)
|
564
|
+
value = val[0].value >> val[2].value
|
565
|
+
result = ShiftExpression.new(value, val[1], val[0], val[2])
|
566
|
+
|
567
|
+
result
|
568
|
+
end
|
569
|
+
.,.,
|
570
|
+
|
571
|
+
# reduce 23 omitted
|
572
|
+
|
573
|
+
module_eval(<<'.,.,', 'constexpr.y', 193)
|
574
|
+
def _reduce_24(val, _values, result)
|
575
|
+
value = val[0].value < val[2].value ? 1 : 0
|
576
|
+
result = RelationalExpression.new(value, val[1], val[0], val[2])
|
577
|
+
|
578
|
+
result
|
579
|
+
end
|
580
|
+
.,.,
|
581
|
+
|
582
|
+
module_eval(<<'.,.,', 'constexpr.y', 198)
|
583
|
+
def _reduce_25(val, _values, result)
|
584
|
+
value = val[0].value > val[2].value ? 1 : 0
|
585
|
+
result = RelationalExpression.new(value, val[1], val[0], val[2])
|
586
|
+
|
587
|
+
result
|
588
|
+
end
|
589
|
+
.,.,
|
590
|
+
|
591
|
+
module_eval(<<'.,.,', 'constexpr.y', 203)
|
592
|
+
def _reduce_26(val, _values, result)
|
593
|
+
value = val[0].value <= val[2].value ? 1 : 0
|
594
|
+
result = RelationalExpression.new(value, val[1], val[0], val[2])
|
595
|
+
|
596
|
+
result
|
597
|
+
end
|
598
|
+
.,.,
|
599
|
+
|
600
|
+
module_eval(<<'.,.,', 'constexpr.y', 208)
|
601
|
+
def _reduce_27(val, _values, result)
|
602
|
+
value = val[0].value >= val[2].value ? 1 : 0
|
603
|
+
result = RelationalExpression.new(value, val[1], val[0], val[2])
|
604
|
+
|
605
|
+
result
|
606
|
+
end
|
607
|
+
.,.,
|
608
|
+
|
609
|
+
# reduce 28 omitted
|
610
|
+
|
611
|
+
module_eval(<<'.,.,', 'constexpr.y', 217)
|
612
|
+
def _reduce_29(val, _values, result)
|
613
|
+
value = val[0].value == val[2].value ? 1 : 0
|
614
|
+
result = EqualityExpression.new(value, val[1], val[0], val[2])
|
615
|
+
|
616
|
+
result
|
617
|
+
end
|
618
|
+
.,.,
|
619
|
+
|
620
|
+
module_eval(<<'.,.,', 'constexpr.y', 222)
|
621
|
+
def _reduce_30(val, _values, result)
|
622
|
+
value = val[0].value != val[2].value ? 1 : 0
|
623
|
+
result = EqualityExpression.new(value, val[1], val[0], val[2])
|
624
|
+
|
625
|
+
result
|
626
|
+
end
|
627
|
+
.,.,
|
628
|
+
|
629
|
+
# reduce 31 omitted
|
630
|
+
|
631
|
+
module_eval(<<'.,.,', 'constexpr.y', 231)
|
632
|
+
def _reduce_32(val, _values, result)
|
633
|
+
value = val[0].value & val[2].value
|
634
|
+
result = AndExpression.new(value, val[1], val[0], val[2])
|
635
|
+
|
636
|
+
result
|
637
|
+
end
|
638
|
+
.,.,
|
639
|
+
|
640
|
+
# reduce 33 omitted
|
641
|
+
|
642
|
+
module_eval(<<'.,.,', 'constexpr.y', 240)
|
643
|
+
def _reduce_34(val, _values, result)
|
644
|
+
value = val[0].value ^ val[2].value
|
645
|
+
result = ExclusiveOrExpression.new(value, val[1], val[0], val[2])
|
646
|
+
|
647
|
+
result
|
648
|
+
end
|
649
|
+
.,.,
|
650
|
+
|
651
|
+
# reduce 35 omitted
|
652
|
+
|
653
|
+
module_eval(<<'.,.,', 'constexpr.y', 249)
|
654
|
+
def _reduce_36(val, _values, result)
|
655
|
+
value = val[0].value | val[2].value
|
656
|
+
result = InclusiveOrExpression.new(value, val[1], val[0], val[2])
|
657
|
+
|
658
|
+
result
|
659
|
+
end
|
660
|
+
.,.,
|
661
|
+
|
662
|
+
# reduce 37 omitted
|
663
|
+
|
664
|
+
module_eval(<<'.,.,', 'constexpr.y', 258)
|
665
|
+
def _reduce_38(val, _values, result)
|
666
|
+
value = val[0].value == 1 && val[2].value == 1 ? 1 : 0
|
667
|
+
result = LogicalAndExpression.new(value, val[1], val[0], val[2])
|
668
|
+
|
669
|
+
result
|
670
|
+
end
|
671
|
+
.,.,
|
672
|
+
|
673
|
+
# reduce 39 omitted
|
674
|
+
|
675
|
+
module_eval(<<'.,.,', 'constexpr.y', 267)
|
676
|
+
def _reduce_40(val, _values, result)
|
677
|
+
value = val[0].value == 1 || val[2].value == 1 ? 1 : 0
|
678
|
+
result = LogicalOrExpression.new(value, val[1], val[0], val[2])
|
679
|
+
|
680
|
+
result
|
681
|
+
end
|
682
|
+
.,.,
|
683
|
+
|
684
|
+
# reduce 41 omitted
|
685
|
+
|
686
|
+
module_eval(<<'.,.,', 'constexpr.y', 276)
|
687
|
+
def _reduce_42(val, _values, result)
|
688
|
+
value = val[0].value == 1 ? val[2].value : val[4].value
|
689
|
+
result = ConditionalExpression.new(value, val[0], val[2], val[4])
|
690
|
+
|
691
|
+
result
|
692
|
+
end
|
693
|
+
.,.,
|
694
|
+
|
695
|
+
# reduce 43 omitted
|
696
|
+
|
697
|
+
# reduce 44 omitted
|
698
|
+
|
699
|
+
module_eval(<<'.,.,', 'constexpr.y', 289)
|
700
|
+
def _reduce_45(val, _values, result)
|
701
|
+
case val[0]
|
702
|
+
when CommaSeparatedExpression then
|
703
|
+
val[0].value = val[2].value
|
704
|
+
result = val[0].push(val[2])
|
705
|
+
else
|
706
|
+
value = val[2].value
|
707
|
+
result =
|
708
|
+
CommaSeparatedExpression.new(value).push(val[0]).push(val[2])
|
709
|
+
end
|
710
|
+
|
711
|
+
result
|
712
|
+
end
|
713
|
+
.,.,
|
714
|
+
|
715
|
+
def _reduce_none(val, _values, result)
|
716
|
+
val[0]
|
717
|
+
end
|
718
|
+
|
719
|
+
end # class ConstantExpression
|
720
|
+
end # module Cpp
|
721
|
+
end # module AdLint
|