home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / compile_to_jvm.e < prev    next >
Text File  |  1999-06-05  |  4KB  |  103 lines

  1. --          This file is part of SmallEiffel The GNU Eiffel Compiler.
  2. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  3. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr
  4. --                       http://SmallEiffel.loria.fr
  5. -- SmallEiffel is  free  software;  you can  redistribute it and/or modify it
  6. -- under the terms of the GNU General Public License as published by the Free
  7. -- Software  Foundation;  either  version  2, or (at your option)  any  later
  8. -- version. SmallEiffel is distributed in the hope that it will be useful,but
  9. -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. -- or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU General Public License
  11. -- for  more  details.  You  should  have  received a copy of the GNU General
  12. -- Public  License  along  with  SmallEiffel;  see the file COPYING.  If not,
  13. -- write to the  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  14. -- Boston, MA 02111-1307, USA.
  15. --
  16. class COMPILE_TO_JVM
  17.    --
  18.    -- The `compile_to_jvm' command.
  19.    --
  20.  
  21. inherit COMMAND_FLAGS;
  22.  
  23. creation make
  24.  
  25. feature {NONE}
  26.  
  27.    command_name: STRING is "compile_to_jvm";
  28.  
  29.    make is
  30.       local
  31.          argc, argi: INTEGER;
  32.          arg: STRING;
  33.       do
  34.          eiffel_parser.set_drop_comments;
  35.          argc := argument_count;
  36.          if argc < 1 then
  37.             system_tools.bad_use_exit(command_name);
  38.          end;
  39.          search_for_verbose_flag;
  40.          from
  41.             argi := 1;
  42.          until
  43.             argi > argc
  44.          loop
  45.             arg := argument(argi);
  46.             if is_flag_case_insensitive(arg) then
  47.                argi := argi + 1;
  48.             elseif is_flag_no_style_warning(arg) then
  49.                argi := argi + 1;
  50.             elseif is_flag_no_warning(arg) then
  51.                argi := argi + 1;
  52.             elseif is_flag_version(arg) then
  53.                argi := argi + 1;
  54.             elseif is_flag_verbose(arg) then
  55.                argi := argi + 1;
  56.             elseif is_flag_boost(arg) then
  57.                argi := argi + 1;
  58.             elseif is_flag_no_check(arg) then
  59.                argi := argi + 1;
  60.             elseif is_flag_require_check(arg) then
  61.                argi := argi + 1;
  62.             elseif is_flag_ensure_check(arg) then
  63.                argi := argi + 1;
  64.             elseif is_flag_invariant_check(arg) then
  65.                argi := argi + 1;
  66.             elseif is_flag_loop_check(arg) then
  67.                argi := argi + 1;
  68.             elseif is_flag_all_check(arg) then
  69.                argi := argi + 1;
  70.             elseif is_flag_debug_check(arg) then
  71.                argi := argi + 1;
  72.             elseif is_flag_trace(arg) then
  73.                argi := argi + 1;
  74.             elseif is_flag_cecil(arg,argi,argc) then
  75.                argi := argi + 2;
  76.             elseif is_flag_o(arg,argi,argc,jvm) then
  77.                argi := argi + 2;
  78.             elseif arg.item(1) /= '-' then
  79.                run_control.compute_root_class(arg);
  80.                argi := argi + 1;
  81.                if argi <= argc then
  82.                   arg := argument(argi);
  83.                   if arg.item(1) /= '-' then
  84.                      run_control.set_root_procedure(arg);
  85.                      argi := argi + 1;
  86.                   end;
  87.                end;
  88.             else
  89.                unknown_flag_exit(arg);
  90.             end;
  91.          end;
  92.          if run_control.trace then
  93.             if run_control.boost then
  94.                run_control.set_no_check
  95.             end;
  96.          end;
  97.          check_for_root_class;
  98.          small_eiffel.compile_to_jvm;
  99.          string_aliaser.echo_information;
  100.       end;
  101.  
  102. end -- COMPILE_TO_JVM
  103.