home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / lib_se / name.e < prev    next >
Encoding:
Text File  |  1998-01-16  |  2.6 KB  |  86 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://www.loria.fr/SmallEiffel
  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 NAME
  17.    -- 
  18.    -- Handling of all sort of names you can find in an Eiffel
  19.    -- source file :
  20.    --
  21.    --   CLASS_NAME : a base class name.
  22.    --   FEATURE_NAME : ordinary feature name.
  23.    --      INFIX_NAME : infix feature name.
  24.    --      PREFIX_NAME : prefix feature name.
  25.    --      SIMPLE_FEATURE_NAME : ordinary name.
  26.    --   LOCAL_ARGUMENT (deferred)
  27.    --      LOCAL_NAME : using a local variable.
  28.    --      ARGUMENT_NAME : using an argument.
  29.    --   E_RESULT : using pseudo Result.
  30.    --   E_CURRENT : using pseudo Current.
  31.    --   E_VOID : using Void.
  32.    --   TAG_NAME : a tag name.
  33.    --
  34.  
  35. inherit 
  36.    GLOBALS
  37.       undefine fill_tagged_out_memory
  38.       end;
  39.    
  40. feature
  41.    
  42.    to_string: STRING;
  43.      -- The corresponding name (alone in a STRING).
  44.    
  45.    c_simple: BOOLEAN is true;
  46.  
  47.    start_position: POSITION is
  48.      -- The position of the first character of `to_string' in
  49.      -- the text source.
  50.       deferred
  51.       end;
  52.    
  53.    to_key: STRING is
  54.      -- To avoid clash between different kinds of names (for
  55.      -- example when using same infix/prefix operator).
  56.      -- Also used to compute the C name or the JVM name.
  57.       deferred
  58.       ensure
  59.      not Result.empty;
  60.      Result = unique_string.item(Result)
  61.       end;
  62.    
  63.    pretty_print, bracketed_pretty_print is
  64.       do
  65.      fmt.put_string(to_string);
  66.       end;
  67.    
  68.    line: INTEGER is
  69.       require
  70.      start_position /= Void
  71.       do
  72.      Result := start_position.line;
  73.       end;
  74.    
  75.    column: INTEGER is
  76.       require
  77.      start_position /= Void
  78.       do
  79.      Result := start_position.column;
  80.       end;
  81.    
  82.    frozen afd_check is do end;
  83.  
  84. end -- NAME
  85.  
  86.