annotate gcc/ada/sinfo-cn.ads @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- S I N F O . C N --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 -- This child package of Sinfo contains some routines that permit in place
kono
parents:
diff changeset
27 -- alteration of existing tree nodes by changing the value in the Nkind
kono
parents:
diff changeset
28 -- field. Since Nkind functions logically in a manner similar to a variant
kono
parents:
diff changeset
29 -- record discriminant part, such alterations cannot be permitted in a
kono
parents:
diff changeset
30 -- general manner, but in some specific cases, the fields of related nodes
kono
parents:
diff changeset
31 -- have been deliberately laid out in a manner that permits such alteration.
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 package Sinfo.CN is
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 procedure Change_Identifier_To_Defining_Identifier (N : in out Node_Id);
kono
parents:
diff changeset
36 -- N must refer to a node of type N_Identifier. This node is modified to
kono
parents:
diff changeset
37 -- be of type N_Defining_Identifier. The scanner always returns identifiers
kono
parents:
diff changeset
38 -- as N_Identifier. The parser then uses this routine to change the node
kono
parents:
diff changeset
39 -- to be a defining identifier where the context demands it. This routine
kono
parents:
diff changeset
40 -- also allocates the necessary extension node. Note that this procedure
kono
parents:
diff changeset
41 -- may (but is not required to) change the Id of the node in question.
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 procedure Change_Character_Literal_To_Defining_Character_Literal
kono
parents:
diff changeset
44 (N : in out Node_Id);
kono
parents:
diff changeset
45 -- Similar processing for a character literal
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 procedure Change_Operator_Symbol_To_Defining_Operator_Symbol
kono
parents:
diff changeset
48 (N : in out Node_Id);
kono
parents:
diff changeset
49 -- Similar processing for an operator symbol
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 procedure Change_Conversion_To_Unchecked (N : Node_Id);
kono
parents:
diff changeset
52 -- Change checked conversion node to unchecked conversion node, clearing
kono
parents:
diff changeset
53 -- irrelevant check flags (other fields in the two nodes are identical)
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 procedure Change_Operator_Symbol_To_String_Literal (N : Node_Id);
kono
parents:
diff changeset
56 -- The scanner returns any string that looks like an operator symbol as
kono
parents:
diff changeset
57 -- a N_Operator_Symbol node. The parser then uses this procedure to change
kono
parents:
diff changeset
58 -- the node to a normal N_String_Literal node if the context is not one
kono
parents:
diff changeset
59 -- in which an operator symbol is required. There are some cases where the
kono
parents:
diff changeset
60 -- parser cannot tell, in which case this transformation happens later on.
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 procedure Change_Selected_Component_To_Expanded_Name (N : Node_Id);
kono
parents:
diff changeset
63 -- The parser always generates Selected_Component nodes. The semantics
kono
parents:
diff changeset
64 -- modifies these to Expanded_Name nodes where appropriate. Note that
kono
parents:
diff changeset
65 -- on return the Chars field is set to a copy of the contents of the
kono
parents:
diff changeset
66 -- Chars field of the Selector_Name field.
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 procedure Change_Name_To_Procedure_Call_Statement (N : Node_Id);
kono
parents:
diff changeset
69 -- Some statements (procedure call statements) are in the form of a name
kono
parents:
diff changeset
70 -- and are parsed as such. This routine takes the scanned name as input
kono
parents:
diff changeset
71 -- and returns the corresponding N_Procedure_Call_Statement.
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 end Sinfo.CN;