home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gnat-2.06-src.tgz / tar.out / fsf / gnat / ada / treeprs.adt < prev    next >
Text File  |  1996-09-28  |  5KB  |  105 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT COMPILER COMPONENTS                         --
  4. --                                                                          --
  5. --                              T R E E P R S                               --
  6. --                                                                          --
  7. --                             T e m p l a t e                              --
  8. --                                                                          --
  9. --                            $Revision: 1.14 $                             --
  10. --                                                                          --
  11. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  12. --                                                                          --
  13. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  14. -- terms of the  GNU General Public License as published  by the Free Soft- --
  15. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  16. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  17. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  18. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  19. -- for  more details.  You should have  received  a copy of the GNU General --
  20. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  21. -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
  22. --                                                                          --
  23. ------------------------------------------------------------------------------
  24.  
  25. --  This file is a template used as input to the utility program xtreeprs.spt
  26. --  which reads this template, and the spec of Sinfo (sinfo.ads) and generates
  27. --  the spec for the Treeprs package (file treeprs.ads)
  28.  
  29. --  This package contains the declaration of the string used by the Tree_Print
  30. --  package. It must be updated whenever the arrangements of the field names
  31. --  in package Sinfo is changed. The utility program XTREEPRS is used to
  32. --  do this update correctly using the template treeprs.adt as input.
  33.  
  34. with Sinfo; use Sinfo;
  35.  
  36. package Treeprs is
  37.  
  38.    --------------------------------
  39.    -- String Data for Node Print --
  40.    --------------------------------
  41.  
  42.    --  String data for print out. The Pchars array is a long string with the
  43.    --  the entry for each node type consisting of a single blank, followed by
  44.    --  a series of entries, one for each Op or Flag field used for the node.
  45.    --  Each entry has a single character which identifies the field, followed
  46.    --  by the synonym name. The starting location for a given node type is
  47.    --  found from the corresponding entry in the Pchars_Pos_Array.
  48.  
  49.    --  The following characters identify the field. These are characters
  50.    --  which  could never occur in a field name, so they also mark the
  51.    --  end of the previous name.
  52.  
  53.    subtype Fchar is Character range '#' .. '9';
  54.  
  55.    F_Field1     : constant Fchar := '#'; -- Character'Val (16#23#)
  56.    F_Field2     : constant Fchar := '$'; -- Character'Val (16#24#)
  57.    F_Field3     : constant Fchar := '%'; -- Character'Val (16#25#)
  58.    F_Field4     : constant Fchar := '&'; -- Character'Val (16#26#)
  59.    F_Field5     : constant Fchar := '''; -- Character'Val (16#27#)
  60.    F_Flag1      : constant Fchar := '('; -- Character'Val (16#28#)
  61.    F_Flag2      : constant Fchar := ')'; -- Character'Val (16#29#)
  62.    F_Flag3      : constant Fchar := '*'; -- Character'Val (16#2A#)
  63.    F_Flag4      : constant Fchar := '+'; -- Character'Val (16#2B#)
  64.    F_Flag5      : constant Fchar := ','; -- Character'Val (16#2C#)
  65.    F_Flag6      : constant Fchar := '-'; -- Character'Val (16#2D#)
  66.    F_Flag7      : constant Fchar := '.'; -- Character'Val (16#2E#)
  67.    F_Flag8      : constant Fchar := '/'; -- Character'Val (16#2F#)
  68.    F_Flag9      : constant Fchar := '0'; -- Character'Val (16#30#)
  69.    F_Flag10     : constant Fchar := '1'; -- Character'Val (16#31#)
  70.    F_Flag11     : constant Fchar := '2'; -- Character'Val (16#32#)
  71.    F_Flag12     : constant Fchar := '3'; -- Character'Val (16#33#)
  72.    F_Flag13     : constant Fchar := '4'; -- Character'Val (16#34#)
  73.    F_Flag14     : constant Fchar := '5'; -- Character'Val (16#35#)
  74.    F_Flag15     : constant Fchar := '6'; -- Character'Val (16#36#)
  75.    F_Flag16     : constant Fchar := '7'; -- Character'Val (16#37#)
  76.    F_Flag17     : constant Fchar := '8'; -- Character'Val (16#38#)
  77.    F_Flag18     : constant Fchar := '9'; -- Character'Val (16#39#)
  78.  
  79.    --  Note this table does not include entity field and flags whose access
  80.    --  functions are in Einfo (these are handled by the Print_Entity_Info
  81.    --  procedure in Treepr, which uses the routines in Einfo to get the
  82.    --  proper symbolic information). In addition, the following fields are
  83.    --  handled by Treepr, and do not appear in the Pchars array:
  84.  
  85.    --    Analyzed
  86.    --    Cannot_Be_Constant
  87.    --    Chars
  88.    --    Comes_From_Source
  89.    --    Error_Posted
  90.    --    Etype
  91.    --    Has_No_Side_Effects
  92.    --    Is_Controlling_Actual
  93.    --    Is_Overloaded
  94.    --    Is_Static_Expression
  95.    --    Left_Opnd
  96.    --    Must_Check_Expr
  97.    --    No_Overflow_Expr
  98.    --    Paren_Count
  99.    --    Raises_Constraint_Error
  100.    --    Right_Opnd
  101.  
  102. !!TEMPLATE INSERTION POINT
  103.  
  104. end Treeprs;
  105.