home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / local_argument.e < prev    next >
Text File  |  1999-06-05  |  3KB  |  150 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. deferred class LOCAL_ARGUMENT
  17.    --
  18.    -- Common root to handle local variables (LOCAL_NAME) or formal
  19.    -- argument names (ARGUMENT_NAME).
  20.    --
  21.  
  22. inherit NAME; EXPRESSION;
  23.  
  24. feature
  25.  
  26.    start_position: POSITION;
  27.          -- Of the first character of the name.
  28.  
  29.    is_void: BOOLEAN is false;
  30.  
  31.    is_manifest_string: BOOLEAN is false;
  32.  
  33.    is_result: BOOLEAN is false;
  34.  
  35.    can_be_dropped: BOOLEAN is true;
  36.  
  37.    c_simple: BOOLEAN is true;
  38.  
  39.    is_pre_computable: BOOLEAN is false;
  40.  
  41.    is_static: BOOLEAN is false;
  42.  
  43.    use_current: BOOLEAN is false;
  44.  
  45.    to_string: STRING is
  46.       deferred
  47.       end;
  48.  
  49.    rank: INTEGER is
  50.          -- in the corresponding flat list.
  51.       deferred
  52.       ensure
  53.          Result >= 1
  54.       end;
  55.  
  56.    result_type: TYPE is
  57.          -- Type declaration mark.
  58.       deferred
  59.       end;
  60.  
  61.    frozen static_result_base_class: BASE_CLASS is
  62.       local
  63.          bcn: CLASS_NAME;
  64.       do
  65.          bcn := result_type.static_base_class_name;
  66.          if bcn /= Void then
  67.             Result := bcn.base_class;
  68.          end;
  69.       end;
  70.  
  71.    frozen afd_check is
  72.       do
  73.       end;
  74.  
  75.    frozen static_value: INTEGER is
  76.       do
  77.       end;
  78.  
  79.    frozen to_key: STRING is
  80.       do
  81.          Result := to_string;
  82.       end;
  83.  
  84.    frozen collect_c_tmp is
  85.       do
  86.       end;
  87.  
  88.    frozen c_declare_for_old is
  89.       do
  90.       end;
  91.  
  92.    frozen compile_to_c_old is
  93.       do
  94.       end;
  95.  
  96.    frozen compile_to_jvm_old is
  97.       do
  98.       end;
  99.  
  100.    frozen compile_target_to_jvm is
  101.       do
  102.          standard_compile_target_to_jvm;
  103.       end;
  104.  
  105.    frozen precedence: INTEGER is
  106.       do
  107.          Result := atomic_precedence;
  108.       end;
  109.  
  110.    frozen print_as_target is
  111.       do
  112.          fmt.put_string(to_string);
  113.          fmt.put_character('.');
  114.       end;
  115.  
  116.    frozen short is
  117.       local
  118.          i: INTEGER;
  119.          c: CHARACTER;
  120.       do
  121.          short_print.hook("Ban");
  122.          from
  123.             i := 1;
  124.          until
  125.             i > to_string.count
  126.          loop
  127.             c := to_string.item(i);
  128.             if c = '_' then
  129.                short_print.hook_or("Uan","_");
  130.             else
  131.                short_print.a_character(c);
  132.             end;
  133.             i := i + 1;
  134.          end;
  135.          short_print.hook("Aan");
  136.       end;
  137.  
  138.    frozen short_target is
  139.       do
  140.          short;
  141.          short_print.a_dot;
  142.       end;
  143.  
  144. invariant
  145.  
  146.    start_position /= Void;
  147.  
  148. end -- LOCAL_ARGUMENT
  149.  
  150.