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 / sinfo-cn.ads < prev    next >
Text File  |  1996-09-28  |  4KB  |  68 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT COMPILER COMPONENTS                         --
  4. --                                                                          --
  5. --                             S I N F O . C N                              --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.6 $                              --
  10. --                                                                          --
  11. --        Copyright (c) 1992,1993,1994,1995 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 child package of Sinfo contains some routines that permit in place
  26. --  alteration of existing tree nodes by changing the value in the Nkind
  27. --  field. Since Nkind functions logically in a manner similar to a variant
  28. --  record discriminant part, such alterations cannot be permitted in a
  29. --  general manner, but in some specific cases, the fields of related nodes
  30. --  have been deliberately laid out in a manner that permits such alteration.
  31.  
  32. package Sinfo.CN is
  33.  
  34.    procedure Change_Identifier_To_Defining_Identifier (N : in out Node_Id);
  35.    --  N must refer to a node of type N_Identifier. This node is modified to
  36.    --  be of type N_Defining_Identifier. The scanner always returns identifiers
  37.    --  as N_Identifier. The parser then uses this routine to change the node
  38.    --  to be a defining identifier where the context demands it. This routine
  39.    --  also allocates the necessary extension node. Note that this procedure
  40.    --  may (but is not required to) change the Id of the node in question.
  41.  
  42.    procedure Change_Character_Literal_To_Defining_Character_Literal
  43.      (N : in out Node_Id);
  44.    --  Similar processing for a character literal
  45.  
  46.    procedure Change_Operator_Symbol_To_Defining_Operator_Symbol
  47.      (N : in out Node_Id);
  48.    --  Similar processing for an operator symbol
  49.  
  50.    procedure Change_Conversion_To_Unchecked (N : Node_Id);
  51.    --  Change checked conversion node to unchecked conversion node, clearing
  52.    --  irrelevant check flags (other fields in the two nodes are identical)
  53.  
  54.    procedure Change_Operator_Symbol_To_String_Literal (N : Node_Id);
  55.    --  The scanner returns any string that looks like an operator symbol as
  56.    --  a N_Operator_Symbol node. The parser then uses this procedure to change
  57.    --  the node to a normal N_String_Literal node if the context is not one
  58.    --  in which an operator symbol is required. There are some cases where the
  59.    --  parser cannot tell, in which case this transformation happens later on.
  60.  
  61.    procedure Change_Selected_Component_To_Expanded_Name (N : Node_Id);
  62.    --  The parser always generates Selected_Component nodes. The semantics
  63.    --  modifies these to Expanded_Name nodes where appropriate. Note that
  64.    --  on return the Chars field is set to a copy of the contents of the
  65.    --  Chars field of the Selector_Name field.
  66.  
  67. end Sinfo.CN;
  68.