home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / lib_se / infix_name.e < prev    next >
Encoding:
Text File  |  1998-01-16  |  1.8 KB  |  72 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. class INFIX_NAME
  17.    --   
  18.    -- To store an infix name of operator.
  19.    --
  20.  
  21. inherit FEATURE_NAME;
  22.    
  23. creation make
  24.    
  25. feature    
  26.  
  27.    to_key: STRING;
  28.    
  29. feature {NONE}
  30.  
  31.    make(n: STRING; sp: like start_position) is
  32.       do
  33.      to_string := unique_string.item(n);
  34.      start_position := sp;
  35.      to_key := unique_string.for_infix(to_string);
  36.       end;
  37.  
  38. feature
  39.  
  40.    fill_tagged_out_memory is
  41.       do
  42.      tagged_out_memory.append(to_key);
  43.       end;
  44.  
  45.    cpp_put_infix_or_prefix is
  46.       do
  47.      cpp.put_string(fz_infix);
  48.      cpp.put_character(' ');
  49.       end;
  50.  
  51. feature -- For pretty :
  52.  
  53.    definition_pretty_print is
  54.       do
  55.      fmt.keyword(fz_infix);
  56.      fmt.put_character('%"');
  57.      fmt.put_string(to_string);
  58.      fmt.put_character('%"');
  59.       end;
  60.  
  61. feature
  62.  
  63.    short is
  64.       do
  65.      short_print.a_infix_name("Bifn","infix %"",
  66.                   "Aifn","%"",
  67.                   Current);
  68.       end;
  69.  
  70. end -- INFIX_NAME
  71.  
  72.