home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / name.e < prev    next >
Text File  |  1999-06-05  |  3KB  |  92 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 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 (deferred)
  23.    --      INFIX_NAME : infix feature name.
  24.    --      PREFIX_NAME : prefix feature name.
  25.    --      SIMPLE_FEATURE_NAME : ordinary name.
  26.    --      FROZEN_FEATURE_NAME : frozen FEATURE_NAME
  27.    --      PRECURSOR_NAME : for Precursor routines.
  28.    --   LOCAL_ARGUMENT (deferred)
  29.    --      LOCAL_NAME (deferred)
  30.    --         LOCAL_NAME1: in a declaration list.
  31.    --         LOCAL_NAME2: used in an expression.
  32.    --      ARGUMENT_NAME (deferred)
  33.    --         ARGUMENT_NAME1: in a declaration list.
  34.    --         ARGUMENT_NAME2: used in an expression.
  35.    --
  36.  
  37. inherit GLOBALS;
  38.  
  39. feature
  40.  
  41.    to_string: STRING is
  42.          -- The corresponding name (alone in a STRING).
  43.       deferred
  44.       ensure
  45.          not Result.empty;
  46.          Result = string_aliaser.item(Result)
  47.       end;
  48.  
  49. feature
  50.  
  51.    start_position: POSITION is
  52.          -- The position of the first character of `to_string' in
  53.          -- the text source.
  54.       deferred
  55.       end;
  56.  
  57.    to_key: STRING is
  58.          -- To avoid clash between different kinds of names (for
  59.          -- example when using same infix/prefix operator).
  60.          -- Also used to compute the C name or the JVM name.
  61.       deferred
  62.       ensure
  63.          not Result.empty;
  64.          Result = string_aliaser.item(Result)
  65.       end;
  66.  
  67.    pretty_print is
  68.       deferred
  69.       end;
  70.  
  71.    frozen bracketed_pretty_print is
  72.       do
  73.          pretty_print;
  74.       end;
  75.  
  76.    frozen line: INTEGER is
  77.       require
  78.          start_position /= Void
  79.       do
  80.          Result := start_position.line;
  81.       end;
  82.  
  83.    frozen column: INTEGER is
  84.       require
  85.          start_position /= Void
  86.       do
  87.          Result := start_position.column;
  88.       end;
  89.  
  90. end -- NAME
  91.  
  92.