2005-12-29 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / ada / sinfo-cn.ads
blob9372d68d1c448972fda45c1512f882dd352f1234
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O . C N --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
21 -- --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 -- --
25 ------------------------------------------------------------------------------
27 -- This child package of Sinfo contains some routines that permit in place
28 -- alteration of existing tree nodes by changing the value in the Nkind
29 -- field. Since Nkind functions logically in a manner similar to a variant
30 -- record discriminant part, such alterations cannot be permitted in a
31 -- general manner, but in some specific cases, the fields of related nodes
32 -- have been deliberately laid out in a manner that permits such alteration.
34 package Sinfo.CN is
36 procedure Change_Identifier_To_Defining_Identifier (N : in out Node_Id);
37 -- N must refer to a node of type N_Identifier. This node is modified to
38 -- be of type N_Defining_Identifier. The scanner always returns identifiers
39 -- as N_Identifier. The parser then uses this routine to change the node
40 -- to be a defining identifier where the context demands it. This routine
41 -- also allocates the necessary extension node. Note that this procedure
42 -- may (but is not required to) change the Id of the node in question.
44 procedure Change_Character_Literal_To_Defining_Character_Literal
45 (N : in out Node_Id);
46 -- Similar processing for a character literal
48 procedure Change_Operator_Symbol_To_Defining_Operator_Symbol
49 (N : in out Node_Id);
50 -- Similar processing for an operator symbol
52 procedure Change_Conversion_To_Unchecked (N : Node_Id);
53 -- Change checked conversion node to unchecked conversion node, clearing
54 -- irrelevant check flags (other fields in the two nodes are identical)
56 procedure Change_Operator_Symbol_To_String_Literal (N : Node_Id);
57 -- The scanner returns any string that looks like an operator symbol as
58 -- a N_Operator_Symbol node. The parser then uses this procedure to change
59 -- the node to a normal N_String_Literal node if the context is not one
60 -- in which an operator symbol is required. There are some cases where the
61 -- parser cannot tell, in which case this transformation happens later on.
63 procedure Change_Selected_Component_To_Expanded_Name (N : Node_Id);
64 -- The parser always generates Selected_Component nodes. The semantics
65 -- modifies these to Expanded_Name nodes where appropriate. Note that
66 -- on return the Chars field is set to a copy of the contents of the
67 -- Chars field of the Selector_Name field.
69 end Sinfo.CN;