OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [ada/] [sinfo.ads] - Blame information for rev 706

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 706 jeremybenn
------------------------------------------------------------------------------
2
--                                                                          --
3
--                         GNAT COMPILER COMPONENTS                         --
4
--                                                                          --
5
--                                S I N F O                                 --
6
--                                                                          --
7
--                                 S p e c                                  --
8
--                                                                          --
9
--          Copyright (C) 1992-2011, 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 3,  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.                                     --
17
--                                                                          --
18
-- As a special exception under Section 7 of GPL version 3, you are granted --
19
-- additional permissions described in the GCC Runtime Library Exception,   --
20
-- version 3.1, as published by the Free Software Foundation.               --
21
--                                                                          --
22
-- You should have received a copy of the GNU General Public License and    --
23
-- a copy of the GCC Runtime Library Exception along with this program;     --
24
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
25
-- <http://www.gnu.org/licenses/>.                                          --
26
--                                                                          --
27
-- GNAT was originally developed  by the GNAT team at  New York University. --
28
-- Extensive contributions were provided by Ada Core Technologies Inc.      --
29
--                                                                          --
30
------------------------------------------------------------------------------
31
 
32
--  This package defines the structure of the abstract syntax tree. The Tree
33
--  package provides a basic tree structure. Sinfo describes how this structure
34
--  is used to represent the syntax of an Ada program.
35
 
36
--  The grammar in the RM is followed very closely in the tree design, and is
37
--  repeated as part of this source file.
38
 
39
--  The tree contains not only the full syntactic representation of the
40
--  program, but also the results of semantic analysis. In particular, the
41
--  nodes for defining identifiers, defining character literals and defining
42
--  operator symbols, collectively referred to as entities, represent what
43
--  would normally be regarded as the symbol table information. In addition a
44
--  number of the tree nodes contain semantic information.
45
 
46
--  WARNING: Several files are automatically generated from this package.
47
--  See below for details.
48
 
49
with Namet;  use Namet;
50
with Types;  use Types;
51
with Uintp;  use Uintp;
52
with Urealp; use Urealp;
53
 
54
package Sinfo is
55
 
56
   ---------------------------------
57
   -- Making Changes to This File --
58
   ---------------------------------
59
 
60
   --  If changes are made to this file, a number of related steps must be
61
   --  carried out to ensure consistency. First, if a field access function is
62
   --  added, it appears in these places:
63
 
64
   --    In sinfo.ads:
65
   --      The documentation associated with the field (if semantic)
66
   --      The documentation associated with the node
67
   --      The spec of the access function
68
   --      The spec of the set procedure
69
   --      The entries in Is_Syntactic_Field
70
   --      The pragma Inline for the access function
71
   --      The pragma Inline for the set procedure
72
   --    In sinfo.adb:
73
   --      The body of the access function
74
   --      The body of the set procedure
75
 
76
   --  The field chosen must be consistent in all places, and, for a node that
77
   --  is a subexpression, must not overlap any of the standard expression
78
   --  fields.
79
 
80
   --  In addition, if any of the standard expression fields is changed, then
81
   --  the utility program which creates the Treeprs spec (in file treeprs.ads)
82
   --  must be updated appropriately, since it special cases expression fields.
83
 
84
   --  If a new tree node is added, then the following changes are made
85
 
86
   --    Add it to the documentation in the appropriate place
87
   --    Add its fields to this documentation section
88
   --    Define it in the appropriate classification in Node_Kind
89
   --    In the body (sinfo), add entries to the access functions for all
90
   --     its fields (except standard expression fields) to include the new
91
   --     node in the checks.
92
   --    Add an appropriate section to the case statement in sprint.adb
93
   --    Add an appropriate section to the case statement in sem.adb
94
   --    Add an appropriate section to the case statement in exp_util.adb
95
   --     (Insert_Actions procedure)
96
   --    For a subexpression, add an appropriate section to the case
97
   --     statement in sem_eval.adb
98
   --    For a subexpression, add an appropriate section to the case
99
   --     statement in sem_res.adb
100
 
101
   --  Finally, four utility programs must be run:
102
 
103
   --    (Optional.) Run CSinfo to check that you have made the changes
104
   --     consistently. It checks most of the rules given above. This utility
105
   --     reads sinfo.ads and sinfo.adb and generates a report to standard
106
   --     output. This step is optional because XSinfo runs CSinfo.
107
 
108
   --    Run XSinfo to create sinfo.h, the corresponding C header. This
109
   --     utility reads sinfo.ads and generates sinfo.h. Note that it does
110
   --     not need to read sinfo.adb, since the contents of the body are
111
   --     algorithmically determinable from the spec.
112
 
113
   --    Run XTreeprs to create treeprs.ads, an updated version of the module
114
   --     that is used to drive the tree print routine. This utility reads (but
115
   --     does not modify) treeprs.adt, the template that provides the basic
116
   --     structure of the file, and then fills in the data from the comments
117
   --     in sinfo.ads.
118
 
119
   --    Run XNmake to create nmake.ads and nmake.adb, the package body and
120
   --     spec of the Nmake package which contains functions for constructing
121
   --     nodes.
122
 
123
   --  The above steps are done automatically by the build scripts when you do
124
   --  a full bootstrap.
125
 
126
   --  Note: sometime we could write a utility that actually generated the body
127
   --  of sinfo from the spec instead of simply checking it, since, as noted
128
   --  above, the contents of the body can be determined from the spec.
129
 
130
   --------------------------------
131
   -- Implicit Nodes in the Tree --
132
   --------------------------------
133
 
134
   --  Generally the structure of the tree very closely follows the grammar as
135
   --  defined in the RM. However, certain nodes are omitted to save space and
136
   --  simplify semantic processing. Two general classes of such omitted nodes
137
   --  are as follows:
138
 
139
   --   If the only possibilities for a non-terminal are one or more other
140
   --   non-terminals (i.e. the rule is a "skinny" rule), then usually the
141
   --   corresponding node is omitted from the tree, and the target construct
142
   --   appears directly. For example, a real type definition is either
143
   --   floating point definition or a fixed point definition. No explicit node
144
   --   appears for real type definition. Instead either the floating point
145
   --   definition or fixed point definition appears directly.
146
 
147
   --   If a non-terminal corresponds to a list of some other non-terminal
148
   --   (possibly with separating punctuation), then usually it is omitted from
149
   --   the tree, and a list of components appears instead. For example,
150
   --   sequence of statements does not appear explicitly in the tree. Instead
151
   --   a list of statements appears directly.
152
 
153
   --  Some additional cases of omitted nodes occur and are documented
154
   --  individually. In particular, many nodes are omitted in the tree
155
   --  generated for an expression.
156
 
157
   -------------------------------------------
158
   -- Handling of Defining Identifier Lists --
159
   -------------------------------------------
160
 
161
   --  In several declarative forms in the syntax, lists of defining
162
   --  identifiers appear (object declarations, component declarations, number
163
   --  declarations etc.)
164
 
165
   --  The semantics of such statements are equivalent to a series of identical
166
   --  declarations of single defining identifiers (except that conformance
167
   --  checks require the same grouping of identifiers in the parameter case).
168
 
169
   --  To simplify semantic processing, the parser breaks down such multiple
170
   --  declaration cases into sequences of single declarations, duplicating
171
   --  type and initialization information as required. The flags More_Ids and
172
   --  Prev_Ids are used to record the original form of the source in the case
173
   --  where the original source used a list of names, More_Ids being set on
174
   --  all but the last name and Prev_Ids being set on all but the first name.
175
   --  These flags are used to reconstruct the original source (e.g. in the
176
   --  Sprint package), and also are included in the conformance checks, but
177
   --  otherwise have no semantic significance.
178
 
179
   --  Note: the reason that we use More_Ids and Prev_Ids rather than
180
   --  First_Name and Last_Name flags is so that the flags are off in the
181
   --  normal one identifier case, which minimizes tree print output.
182
 
183
   -----------------------
184
   -- Use of Node Lists --
185
   -----------------------
186
 
187
   --  With a few exceptions, if a construction of the form {non-terminal}
188
   --  appears in the tree, lists are used in the corresponding tree node (see
189
   --  package Nlists for handling of node lists). In this case a field of the
190
   --  parent node points to a list of nodes for the non-terminal. The field
191
   --  name for such fields has a plural name which always ends in "s". For
192
   --  example, a case statement has a field Alternatives pointing to list of
193
   --  case statement alternative nodes.
194
 
195
   --  Only fields pointing to lists have names ending in "s", so generally the
196
   --  structure is strongly typed, fields not ending in s point to single
197
   --  nodes, and fields ending in s point to lists.
198
 
199
   --  The following example shows how a traversal of a list is written. We
200
   --  suppose here that Stmt points to a N_Case_Statement node which has a
201
   --  list field called Alternatives:
202
 
203
   --   Alt := First (Alternatives (Stmt));
204
   --   while Present (Alt) loop
205
   --      ..
206
   --      -- processing for case statement alternative Alt
207
   --      ..
208
   --      Alt := Next (Alt);
209
   --   end loop;
210
 
211
   --  The Present function tests for Empty, which in this case signals the end
212
   --  of the list. First returns Empty immediately if the list is empty.
213
   --  Present is defined in Atree, First and Next are defined in Nlists.
214
 
215
   --  The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
216
   --  contexts, which is handled as described in the previous section, and
217
   --  with {,library_unit_NAME} in the N_With_Clause mode, which is handled
218
   --  using the First_Name and Last_Name flags, as further detailed in the
219
   --  description of the N_With_Clause node.
220
 
221
   -------------
222
   -- Pragmas --
223
   -------------
224
 
225
   --  Pragmas can appear in many different context, but are not included in
226
   --  the grammar. Still they must appear in the tree, so they can be properly
227
   --  processed.
228
 
229
   --  Two approaches are used. In some cases, an extra field is defined in an
230
   --  appropriate node that contains a list of pragmas appearing in the
231
   --  expected context. For example pragmas can appear before an
232
   --  Accept_Alternative in a Selective_Accept_Statement, and these pragmas
233
   --  appear in the Pragmas_Before field of the N_Accept_Alternative node.
234
 
235
   --  The other approach is to simply allow pragmas to appear in syntactic
236
   --  lists where the grammar (of course) does not include the possibility.
237
   --  For example, the Variants field of an N_Variant_Part node points to a
238
   --  list that can contain both N_Pragma and N_Variant nodes.
239
 
240
   --  To make processing easier in the latter case, the Nlists package
241
   --  provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
242
   --  Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
243
   --  ignoring all pragmas.
244
 
245
   --  In the case of the variants list, we can either write:
246
 
247
   --      Variant := First (Variants (N));
248
   --      while Present (Variant) loop
249
   --         ...
250
   --         Variant := Next (Variant);
251
   --      end loop;
252
 
253
   --  or
254
 
255
   --      Variant := First_Non_Pragma (Variants (N));
256
   --      while Present (Variant) loop
257
   --         ...
258
   --         Variant := Next_Non_Pragma (Variant);
259
   --      end loop;
260
 
261
   --  In the first form of the loop, Variant can either be an N_Pragma or an
262
   --  N_Variant node. In the second form, Variant can only be N_Variant since
263
   --  all pragmas are skipped.
264
 
265
   ---------------------
266
   -- Optional Fields --
267
   ---------------------
268
 
269
   --  Fields which correspond to a section of the syntax enclosed in square
270
   --  brackets are generally omitted (and the corresponding field set to Empty
271
   --  for a node, or No_List for a list). The documentation of such fields
272
   --  notes these cases. One exception to this rule occurs in the case of
273
   --  possibly empty statement sequences (such as the sequence of statements
274
   --  in an entry call alternative). Such cases appear in the syntax rules as
275
   --  [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
276
   --  statement sequences always contain an empty list (not No_List) if no
277
   --  statements are present.
278
 
279
   --  Note: the utility program that constructs the body and spec of the Nmake
280
   --  package relies on the format of the comments to determine if a field
281
   --  should have a default value in the corresponding make routine. The rule
282
   --  is that if the first line of the description of the field contains the
283
   --  string "(set to xxx if", then a default value of xxx is provided for
284
   --  this field in the corresponding Make_yyy routine.
285
 
286
   -----------------------------------
287
   -- Note on Body/Spec Terminology --
288
   -----------------------------------
289
 
290
   --  In informal discussions about Ada, it is customary to refer to package
291
   --  and subprogram specs and bodies. However, this is not technically
292
   --  correct, what is normally referred to as a spec or specification is in
293
   --  fact a package declaration or subprogram declaration. We are careful in
294
   --  GNAT to use the correct terminology and in particular, the full word
295
   --  specification is never used as an incorrect substitute for declaration.
296
   --  The structure and terminology used in the tree also reflects the grammar
297
   --  and thus uses declaration and specification in the technically correct
298
   --  manner.
299
 
300
   --  However, there are contexts in which the informal terminology is useful.
301
   --  We have the word "body" to refer to the Interp_Etype declared by the
302
   --  declaration of a unit body, and in some contexts we need similar term to
303
   --  refer to the entity declared by the package or subprogram declaration,
304
   --  and simply using declaration can be confusing since the body also has a
305
   --  declaration.
306
 
307
   --  An example of such a context is the link between the package body and
308
   --  its declaration. With_Declaration is confusing, since the package body
309
   --  itself is a declaration.
310
 
311
   --  To deal with this problem, we reserve the informal term Spec, i.e. the
312
   --  popular abbreviation used in this context, to refer to the entity
313
   --  declared by the package or subprogram declaration. So in the above
314
   --  example case, the field in the body is called With_Spec.
315
 
316
   --  Another important context for the use of the word Spec is in error
317
   --  messages, where a hyper-correct use of declaration would be confusing to
318
   --  a typical Ada programmer, and even for an expert programmer can cause
319
   --  confusion since the body has a declaration as well.
320
 
321
   --  So, to summarize:
322
 
323
   --     Declaration    always refers to the syntactic entity that is called
324
   --                    a declaration. In particular, subprogram declaration
325
   --                    and package declaration are used to describe the
326
   --                    syntactic entity that includes the semicolon.
327
 
328
   --     Specification  always refers to the syntactic entity that is called
329
   --                    a specification. In particular, the terms procedure
330
   --                    specification, function specification, package
331
   --                    specification, subprogram specification always refer
332
   --                    to the syntactic entity that has no semicolon.
333
 
334
   --     Spec           is an informal term, used to refer to the entity
335
   --                    that is declared by a task declaration, protected
336
   --                    declaration, generic declaration, subprogram
337
   --                    declaration or package declaration.
338
 
339
   --  This convention is followed throughout the GNAT documentation
340
   --  both internal and external, and in all error message text.
341
 
342
   ------------------------
343
   -- Internal Use Nodes --
344
   ------------------------
345
 
346
   --  These are Node_Kind settings used in the internal implementation which
347
   --  are not logically part of the specification.
348
 
349
   --  N_Unused_At_Start
350
   --  Completely unused entry at the start of the enumeration type. This
351
   --  is inserted so that no legitimate value is zero, which helps to get
352
   --  better debugging behavior, since zero is a likely uninitialized value).
353
 
354
   --  N_Unused_At_End
355
   --  Completely unused entry at the end of the enumeration type. This is
356
   --  handy so that arrays with Node_Kind as the index type have an extra
357
   --  entry at the end (see for example the use of the Pchar_Pos_Array in
358
   --  Treepr, where the extra entry provides the limit value when dealing with
359
   --  the last used entry in the array).
360
 
361
   -----------------------------------------
362
   -- Note on the settings of Sloc fields --
363
   -----------------------------------------
364
 
365
   --  The Sloc field of nodes that come from the source is set by the parser.
366
   --  For internal nodes, and nodes generated during expansion the Sloc is
367
   --  usually set in the call to the constructor for the node. In general the
368
   --  Sloc value chosen for an internal node is the Sloc of the source node
369
   --  whose processing is responsible for the expansion. For example, the Sloc
370
   --  of an inherited primitive operation is the Sloc of the corresponding
371
   --  derived type declaration.
372
 
373
   --  For the nodes of a generic instantiation, the Sloc value is encoded to
374
   --  represent both the original Sloc in the generic unit, and the Sloc of
375
   --  the instantiation itself. See Sinput.ads for details.
376
 
377
   --  Subprogram instances create two callable entities: one is the visible
378
   --  subprogram instance, and the other is an anonymous subprogram nested
379
   --  within a wrapper package that contains the renamings for the actuals.
380
   --  Both of these entities have the Sloc of the defining entity in the
381
   --  instantiation node. This simplifies some ASIS queries.
382
 
383
   -----------------------
384
   -- Field Definitions --
385
   -----------------------
386
 
387
   --  In the following node definitions, all fields, both syntactic and
388
   --  semantic, are documented. The one exception is in the case of entities
389
   --  (defining identifiers, character literals and operator symbols), where
390
   --  the usage of the fields depends on the entity kind. Entity fields are
391
   --  fully documented in the separate package Einfo.
392
 
393
   --  In the node definitions, three common sets of fields are abbreviated to
394
   --  save both space in the documentation, and also space in the string
395
   --  (defined in Tree_Print_Strings) used to print trees. The following
396
   --  abbreviations are used:
397
 
398
   --  Note: the utility program that creates the Treeprs spec (in the file
399
   --  xtreeprs.adb) knows about the special fields here, so it must be
400
   --  modified if any change is made to these fields.
401
 
402
   --    "plus fields for binary operator"
403
   --       Chars                    (Name1)      Name_Id for the operator
404
   --       Left_Opnd                (Node2)      left operand expression
405
   --       Right_Opnd               (Node3)      right operand expression
406
   --       Entity                   (Node4-Sem)  defining entity for operator
407
   --       Associated_Node          (Node4-Sem)  for generic processing
408
   --       Do_Overflow_Check        (Flag17-Sem) set if overflow check needed
409
   --       Has_Private_View         (Flag11-Sem) set in generic units.
410
 
411
   --    "plus fields for unary operator"
412
   --       Chars                    (Name1)      Name_Id for the operator
413
   --       Right_Opnd               (Node3)      right operand expression
414
   --       Entity                   (Node4-Sem)  defining entity for operator
415
   --       Associated_Node          (Node4-Sem)  for generic processing
416
   --       Do_Overflow_Check        (Flag17-Sem) set if overflow check needed
417
   --       Has_Private_View         (Flag11-Sem) set in generic units.
418
 
419
   --    "plus fields for expression"
420
   --       Paren_Count                           number of parentheses levels
421
   --       Etype                    (Node5-Sem)  type of the expression
422
   --       Is_Overloaded            (Flag5-Sem)  >1 type interpretation exists
423
   --       Is_Static_Expression     (Flag6-Sem)  set for static expression
424
   --       Raises_Constraint_Error  (Flag7-Sem)  evaluation raises CE
425
   --       Must_Not_Freeze          (Flag8-Sem)  set if must not freeze
426
   --       Do_Range_Check           (Flag9-Sem)  set if a range check needed
427
   --       Has_Dynamic_Length_Check (Flag10-Sem) set if length check inserted
428
   --       Has_Dynamic_Range_Check  (Flag12-Sem) set if range check inserted
429
   --       Assignment_OK            (Flag15-Sem) set if modification is OK
430
   --       Is_Controlling_Actual    (Flag16-Sem) set for controlling argument
431
 
432
   --  Note: see under (EXPRESSION) for further details on the use of
433
   --  the Paren_Count field to record the number of parentheses levels.
434
 
435
   --  Node_Kind is the type used in the Nkind field to indicate the node kind.
436
   --  The actual definition of this type is given later (the reason for this
437
   --  is that we want the descriptions ordered by logical chapter in the RM,
438
   --  but the type definition is reordered to facilitate the definition of
439
   --  some subtype ranges. The individual descriptions of the nodes show how
440
   --  the various fields are used in each node kind, as well as providing
441
   --  logical names for the fields. Functions and procedures are provided for
442
   --  accessing and setting these fields using these logical names.
443
 
444
   -----------------------
445
   -- Gigi Restrictions --
446
   -----------------------
447
 
448
   --  The tree passed to Gigi is more restricted than the general tree form.
449
   --  For example, as a result of expansion, most of the tasking nodes can
450
   --  never appear. For each node to which either a complete or partial
451
   --  restriction applies, a note entitled "Gigi restriction" appears which
452
   --  documents the restriction.
453
 
454
   --  Note that most of these restrictions apply only to trees generated when
455
   --  code is being generated, since they involved expander actions that
456
   --  destroy the tree.
457
 
458
   ------------------------
459
   -- Common Flag Fields --
460
   ------------------------
461
 
462
   --  The following flag fields appear in all nodes
463
 
464
   --  Analyzed
465
   --    This flag is used to indicate that a node (and all its children have
466
   --    been analyzed. It is used to avoid reanalysis of a node that has
467
   --    already been analyzed, both for efficiency and functional correctness
468
   --    reasons.
469
 
470
   --  Comes_From_Source
471
   --    This flag is set if the node comes directly from an explicit construct
472
   --    in the source. It is normally on for any nodes built by the scanner or
473
   --    parser from the source program, with the exception that in a few cases
474
   --    the parser adds nodes to normalize the representation (in particular
475
   --    a null statement is added to a package body if there is no begin/end
476
   --    initialization section.
477
   --
478
   --    Most nodes inserted by the analyzer or expander are not considered
479
   --    as coming from source, so the flag is off for such nodes. In a few
480
   --    cases, the expander constructs nodes closely equivalent to nodes
481
   --    from the source program (e.g. the allocator built for build-in-place
482
   --    case), and the Comes_From_Source flag is deliberately set.
483
 
484
   --  Error_Posted
485
   --    This flag is used to avoid multiple error messages being posted on or
486
   --    referring to the same node. This flag is set if an error message
487
   --    refers to a node or is posted on its source location, and has the
488
   --    effect of inhibiting further messages involving this same node.
489
 
490
   ------------------------------------
491
   -- Description of Semantic Fields --
492
   ------------------------------------
493
 
494
   --  The meaning of the syntactic fields is generally clear from their names
495
   --  without any further description, since the names are chosen to
496
   --  correspond very closely to the syntax in the reference manual. This
497
   --  section describes the usage of the semantic fields, which are used to
498
   --  contain additional information determined during semantic analysis.
499
 
500
   --  ABE_Is_Certain (Flag18-Sem)
501
   --    This flag is set in an instantiation node or a call node is determined
502
   --    to be sure to raise an ABE. This is used to trigger special handling
503
   --    of such cases, particularly in the instantiation case where we avoid
504
   --    instantiating the body if this flag is set. This flag is also present
505
   --    in an N_Formal_Package_Declaration_Node since formal package
506
   --    declarations are treated like instantiations, but it is always set to
507
   --    False in this context.
508
 
509
   --  Accept_Handler_Records (List5-Sem)
510
   --    This field is present only in an N_Accept_Alternative node. It is used
511
   --    to temporarily hold the exception handler records from an accept
512
   --    statement in a selective accept. These exception handlers will
513
   --    eventually be placed in the Handler_Records list of the procedure
514
   --    built for this accept (see Expand_N_Selective_Accept procedure in
515
   --    Exp_Ch9 for further details).
516
 
517
   --  Access_Types_To_Process (Elist2-Sem)
518
   --    Present in N_Freeze_Entity nodes for Incomplete or private types.
519
   --    Contains the list of access types which may require specific treatment
520
   --    when the nature of the type completion is completely known. An example
521
   --    of such treatment is the generation of the associated_final_chain.
522
 
523
   --  Actions (List1-Sem)
524
   --    This field contains a sequence of actions that are associated with the
525
   --    node holding the field. See the individual node types for details of
526
   --    how this field is used, as well as the description of the specific use
527
   --    for a particular node type.
528
 
529
   --  Activation_Chain_Entity (Node3-Sem)
530
   --    This is used in tree nodes representing task activators (blocks,
531
   --    subprogram bodies, package declarations, and task bodies). It is
532
   --    initially Empty, and then gets set to point to the entity for the
533
   --    declared Activation_Chain variable when the first task is declared.
534
   --    When tasks are declared in the corresponding declarative region this
535
   --    entity is located by name (its name is always _Chain) and the declared
536
   --    tasks are added to the chain. Note that N_Extended_Return_Statement
537
   --    does not have this attribute, although it does have an activation
538
   --    chain. This chain is used to store the tasks temporarily, and is not
539
   --    used for activating them. On successful completion of the return
540
   --    statement, the tasks are moved to the caller's chain, and the caller
541
   --    activates them.
542
 
543
   --  Acts_As_Spec (Flag4-Sem)
544
   --    A flag set in the N_Subprogram_Body node for a subprogram body which
545
   --    is acting as its own spec, except in the case of a library level
546
   --    subprogram, in which case the flag is set on the parent compilation
547
   --    unit node instead (see further description in spec of Lib package).
548
   --    ??? Above note about Lib is dubious since lib.ads does not mention
549
   --    Acts_As_Spec at all.
550
 
551
   --  Actual_Designated_Subtype (Node4-Sem)
552
   --    Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
553
   --    needs to known the dynamic constrained subtype of the designated
554
   --    object, this attribute is set to that type. This is done for
555
   --    N_Free_Statements for access-to-classwide types and access to
556
   --    unconstrained packed array types, and for N_Explicit_Dereference when
557
   --    the designated type is an unconstrained packed array and the
558
   --    dereference is the prefix of a 'Size attribute reference.
559
 
560
   --  Address_Warning_Posted (Flag18-Sem)
561
   --    Present in N_Attribute_Definition nodes. Set to indicate that we have
562
   --    posted a warning for the address clause regarding size or alignment
563
   --    issues. Used to inhibit multiple redundant messages.
564
 
565
   --  Aggregate_Bounds (Node3-Sem)
566
   --    Present in array N_Aggregate nodes. If the bounds of the aggregate are
567
   --    known at compile time, this field points to an N_Range node with those
568
   --    bounds. Otherwise Empty.
569
 
570
   --  All_Others (Flag11-Sem)
571
   --    Present in an N_Others_Choice node. This flag is set for an others
572
   --    exception where all exceptions are to be caught, even those that are
573
   --    not normally handled (in particular the tasking abort signal). This
574
   --    is used for translation of the at end handler into a normal exception
575
   --    handler.
576
 
577
   --  Aspect_Rep_Item (Node2-Sem)
578
   --    Present in N_Aspect_Specification nodes. Points to the corresponding
579
   --    pragma/attribute definition node used to process the aspect.
580
 
581
   --  Assignment_OK (Flag15-Sem)
582
   --    This flag is set in a subexpression node for an object, indicating
583
   --    that the associated object can be modified, even if this would not
584
   --    normally be permissible (either by direct assignment, or by being
585
   --    passed as an out or in-out parameter). This is used by the expander
586
   --    for a number of purposes, including initialization of constants and
587
   --    limited type objects (such as tasks), setting discriminant fields,
588
   --    setting tag values, etc. N_Object_Declaration nodes also have this
589
   --    flag defined. Here it is used to indicate that an initialization
590
   --    expression is valid, even where it would normally not be allowed
591
   --    (e.g. where the type involved is limited).
592
 
593
   --  Associated_Node (Node4-Sem)
594
   --    Present in nodes that can denote an entity: identifiers, character
595
   --    literals, operator symbols, expanded names, operator nodes, and
596
   --    attribute reference nodes (all these nodes have an Entity field).
597
   --    This field is also present in N_Aggregate, N_Selected_Component, and
598
   --    N_Extension_Aggregate nodes. This field is used in generic processing
599
   --    to create links between the generic template and the generic copy.
600
   --    See Sem_Ch12.Get_Associated_Node for full details. Note that this
601
   --    field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
602
   --    the normal function of Entity is not required at the point where the
603
   --    Associated_Node is set. Note also, that in generic templates, this
604
   --    means that the Entity field does not necessarily point to an Entity.
605
   --    Since the back end is expected to ignore generic templates, this is
606
   --    harmless.
607
 
608
   --  Atomic_Sync_Required (Flag14-Sem)
609
   --    This flag is set on a node for which atomic synchronization is
610
   --    required for the corresponding reference or modification.
611
 
612
   --  At_End_Proc (Node1)
613
   --    This field is present in an N_Handled_Sequence_Of_Statements node.
614
   --    It contains an identifier reference for the cleanup procedure to be
615
   --    called. See description of this node for further details.
616
 
617
   --  Backwards_OK (Flag6-Sem)
618
   --    A flag present in the N_Assignment_Statement node. It is used only
619
   --    if the type being assigned is an array type, and is set if analysis
620
   --    determines that it is definitely safe to do the copy backwards, i.e.
621
   --    starting at the highest addressed element. This is the case if either
622
   --    the operands do not overlap, or they may overlap, but if they do,
623
   --    then the left operand is at a higher address than the right operand.
624
   --
625
   --    Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
626
   --    means that the front end could not determine that either direction is
627
   --    definitely safe, and a runtime check may be required if the backend
628
   --    cannot figure it out. If both flags Forwards_OK and Backwards_OK are
629
   --    set, it means that the front end can assure no overlap of operands.
630
 
631
   --  Body_To_Inline (Node3-Sem)
632
   --    present in subprogram declarations. Denotes analyzed but unexpanded
633
   --    body of subprogram, to be used when inlining calls. Present when the
634
   --    subprogram has an Inline pragma and inlining is enabled. If the
635
   --    declaration is completed by a renaming_as_body, and the renamed en-
636
   --    tity is a subprogram, the Body_To_Inline is the name of that entity,
637
   --    which is used directly in later calls to the original subprogram.
638
 
639
   --  Body_Required (Flag13-Sem)
640
   --    A flag that appears in the N_Compilation_Unit node indicating that
641
   --    the corresponding unit requires a body. For the package case, this
642
   --    indicates that a completion is required. In Ada 95, if the flag is not
643
   --    set for the package case, then a body may not be present. In Ada 83,
644
   --    if the flag is not set for the package case, then body is optional.
645
   --    For a subprogram declaration, the flag is set except in the case where
646
   --    a pragma Import or Interface applies, in which case no body is
647
   --    permitted (in Ada 83 or Ada 95).
648
 
649
   --  By_Ref (Flag5-Sem)
650
   --    Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
651
   --    this flag is set when the returned expression is already allocated on
652
   --    the secondary stack and thus the result is passed by reference rather
653
   --    than copied another time.
654
 
655
   --  Check_Address_Alignment (Flag11-Sem)
656
   --    A flag present in N_Attribute_Definition clause for a 'Address
657
   --    attribute definition. This flag is set if a dynamic check should be
658
   --    generated at the freeze point for the entity to which this address
659
   --    clause applies. The reason that we need this flag is that we want to
660
   --    check for range checks being suppressed at the point where the
661
   --    attribute definition clause is given, rather than testing this at the
662
   --    freeze point.
663
 
664
   --  Comes_From_Extended_Return_Statement (Flag18-Sem)
665
   --    Present in N_Simple_Return_Statement nodes. True if this node was
666
   --    constructed as part of the N_Extended_Return_Statement expansion.
667
 
668
   --  Compile_Time_Known_Aggregate (Flag18-Sem)
669
   --    Present in N_Aggregate nodes. Set for aggregates which can be fully
670
   --    evaluated at compile time without raising constraint error. Such
671
   --    aggregates can be passed as is to Gigi without any expansion. See
672
   --    Sem_Aggr for the specific conditions under which an aggregate has this
673
   --    flag set. See also the flag Static_Processing_OK.
674
 
675
   --  Componentwise_Assignment (Flag14-Sem)
676
   --    Present in N_Assignment_Statement nodes. Set for a record assignment
677
   --    where all that needs doing is to expand it into component-by-component
678
   --    assignments. This is used internally for the case of tagged types with
679
   --    rep clauses, where we need to avoid recursion (we don't want to try to
680
   --    generate a call to the primitive operation, because this is the case
681
   --    where we are compiling the primitive operation). Note that when we are
682
   --    expanding component assignments in this case, we never assign the _tag
683
   --    field, but we recursively assign components of the parent type.
684
 
685
   --  Condition_Actions (List3-Sem)
686
   --    This field appears in else-if nodes and in the iteration scheme node
687
   --    for while loops. This field is only used during semantic processing to
688
   --    temporarily hold actions inserted into the tree. In the tree passed
689
   --    to gigi, the condition actions field is always set to No_List. For
690
   --    details on how this field is used, see the routine Insert_Actions in
691
   --    package Exp_Util, and also the expansion routines for the relevant
692
   --    nodes.
693
 
694
   --  Context_Pending (Flag16-Sem)
695
   --    This field appears in Compilation_Unit nodes, to indicate that the
696
   --    context of the unit is being compiled. Used to detect circularities
697
   --    that are not otherwise detected by the loading mechanism. Such
698
   --    circularities can occur in the presence of limited and non-limited
699
   --    with_clauses that mention the same units.
700
 
701
   --  Controlling_Argument (Node1-Sem)
702
   --    This field is set in procedure and function call nodes if the call
703
   --    is a dispatching call (it is Empty for a non-dispatching call). It
704
   --    indicates the source of the call's controlling tag. For procedure
705
   --    calls, the Controlling_Argument is one of the actuals. For function
706
   --    that has a dispatching result, it is an entity in the context of the
707
   --    call that can provide a tag, or else it is the tag of the root type
708
   --    of the class. It can also specify a tag directly rather than being a
709
   --    tagged object. The latter is needed by the implementations of AI-239
710
   --    and AI-260.
711
 
712
   --  Conversion_OK (Flag14-Sem)
713
   --    A flag set on type conversion nodes to indicate that the conversion
714
   --    is to be considered as being valid, even though it is the case that
715
   --    the conversion is not valid Ada. This is used for attributes Enum_Rep,
716
   --    Fixed_Value and Integer_Value, for internal conversions done for
717
   --    fixed-point operations, and for certain conversions for calls to
718
   --    initialization procedures. If Conversion_OK is set, then Etype must be
719
   --    set (the analyzer assumes that Etype has been set). For the case of
720
   --    fixed-point operands, it also indicates that the conversion is to be
721
   --    direct conversion of the underlying integer result, with no regard to
722
   --    the small operand.
723
 
724
   --  Corresponding_Aspect (Node3-Sem)
725
   --    Present in N_Pragma node. Used to point back to the source aspect from
726
   --    the corresponding pragma. This field is Empty for source pragmas.
727
 
728
   --  Corresponding_Body (Node5-Sem)
729
   --    This field is set in subprogram declarations, package declarations,
730
   --    entry declarations of protected types, and in generic units. It points
731
   --    to the defining entity for the corresponding body (NOT the node for
732
   --    the body itself).
733
 
734
   --  Corresponding_Formal_Spec (Node3-Sem)
735
   --    This field is set in subprogram renaming declarations, where it points
736
   --    to the defining entity for a formal subprogram in the case where the
737
   --    renaming corresponds to a generic formal subprogram association in an
738
   --    instantiation. The field is Empty if the renaming does not correspond
739
   --    to such a formal association.
740
 
741
   --  Corresponding_Generic_Association (Node5-Sem)
742
   --    This field is defined for object declarations and object renaming
743
   --    declarations. It is set for the declarations within an instance that
744
   --    map generic formals to their actuals. If set, the field points to
745
   --    a generic_association which is the original parent of the expression
746
   --    or name appearing in the declaration. This simplifies ASIS queries.
747
 
748
   --  Corresponding_Integer_Value (Uint4-Sem)
749
   --    This field is set in real literals of fixed-point types (it is not
750
   --    used for floating-point types). It contains the integer value used
751
   --    to represent the fixed-point value. It is also set on the universal
752
   --    real literals used to represent bounds of fixed-point base types
753
   --    and their first named subtypes.
754
 
755
   --  Corresponding_Spec (Node5-Sem)
756
   --    This field is set in subprogram, package, task, and protected body
757
   --    nodes, where it points to the defining entity in the corresponding
758
   --    spec. The attribute is also set in N_With_Clause nodes where it points
759
   --    to the defining entity for the with'ed spec, and in a subprogram
760
   --    renaming declaration when it is a Renaming_As_Body. The field is Empty
761
   --    if there is no corresponding spec, as in the case of a subprogram body
762
   --    that serves as its own spec.
763
   --
764
   --    In Ada 2012, Corresponding_Spec is set on expression functions that
765
   --    complete a subprogram declaration.
766
 
767
   --  Corresponding_Stub (Node3-Sem)
768
   --    This field is present in an N_Subunit node. It holds the node in
769
   --    the parent unit that is the stub declaration for the subunit. It is
770
   --    set when analysis of the stub forces loading of the proper body. If
771
   --    expansion of the proper body creates new declarative nodes, they are
772
   --    inserted at the point of the corresponding_stub.
773
 
774
   --  Dcheck_Function (Node5-Sem)
775
   --    This field is present in an N_Variant node, It references the entity
776
   --    for the discriminant checking function for the variant.
777
 
778
   --  Default_Expression (Node5-Sem)
779
   --    This field is Empty if there is no default expression. If there is a
780
   --    simple default expression (one with no side effects), then this field
781
   --    simply contains a copy of the Expression field (both point to the tree
782
   --    for the default expression). Default_Expression is used for
783
   --    conformance checking.
784
 
785
   --  Default_Storage_Pool (Node3-Sem)
786
   --    This field is present in N_Compilation_Unit_Aux nodes. It is set to a
787
   --    copy of Opt.Default_Pool at the end of the compilation unit. See
788
   --    package Opt for details. This is used for inheriting the
789
   --    Default_Storage_Pool in child units.
790
 
791
   --  Discr_Check_Funcs_Built (Flag11-Sem)
792
   --    This flag is present in N_Full_Type_Declaration nodes. It is set when
793
   --    discriminant checking functions are constructed. The purpose is to
794
   --    avoid attempting to set these functions more than once.
795
 
796
   --  Do_Accessibility_Check (Flag13-Sem)
797
   --    This flag is set on N_Parameter_Specification nodes to indicate
798
   --    that an accessibility check is required for the parameter. It is
799
   --    not yet decided who takes care of this check (TBD ???).
800
 
801
   --  Do_Discriminant_Check (Flag13-Sem)
802
   --    This flag is set on N_Selected_Component nodes to indicate that a
803
   --    discriminant check is required using the discriminant check routine
804
   --    associated with the selector. The actual check is generated by the
805
   --    expander when processing selected components.
806
 
807
   --  Do_Division_Check (Flag13-Sem)
808
   --    This flag is set on a division operator (/ mod rem) to indicate
809
   --    that a zero divide check is required. The actual check is dealt
810
   --    with by the backend (all the front end does is to set the flag).
811
 
812
   --  Do_Length_Check (Flag4-Sem)
813
   --    This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
814
   --    N_Op_Xor, or N_Type_Conversion node to indicate that a length check
815
   --    is required. It is not determined who deals with this flag (???).
816
 
817
   --  Do_Overflow_Check (Flag17-Sem)
818
   --    This flag is set on an operator where an overflow check is required on
819
   --    the operation. The actual check is dealt with by the backend (all the
820
   --    front end does is to set the flag). The other cases where this flag is
821
   --    used is on a Type_Conversion node and for attribute reference nodes.
822
   --    For a type conversion, it means that the conversion is from one base
823
   --    type to another, and the value may not fit in the target base type.
824
   --    See also the description of Do_Range_Check for this case. The only
825
   --    attribute references which use this flag are Pred and Succ, where it
826
   --    means that the result should be checked for going outside the base
827
   --    range. Note that this flag is not set for modular types.
828
 
829
   --  Do_Range_Check (Flag9-Sem)
830
   --    This flag is set on an expression which appears in a context where a
831
   --    range check is required. The target type is clear from the context.
832
   --    The contexts in which this flag can appear are the following:
833
 
834
   --      Right side of an assignment. In this case the target type is
835
   --      taken from the left side of the assignment, which is referenced
836
   --      by the Name of the N_Assignment_Statement node.
837
 
838
   --      Subscript expressions in an indexed component. In this case the
839
   --      target type is determined from the type of the array, which is
840
   --      referenced by the Prefix of the N_Indexed_Component node.
841
 
842
   --      Argument expression for a parameter, appearing either directly in
843
   --      the Parameter_Associations list of a call or as the Expression of an
844
   --      N_Parameter_Association node that appears in this list. In either
845
   --      case, the check is against the type of the formal. Note that the
846
   --      flag is relevant only in IN and IN OUT parameters, and will be
847
   --      ignored for OUT parameters, where no check is required in the call,
848
   --      and if a check is required on the return, it is generated explicitly
849
   --      with a type conversion.
850
 
851
   --      Initialization expression for the initial value in an object
852
   --      declaration. In this case the Do_Range_Check flag is set on
853
   --      the initialization expression, and the check is against the
854
   --      range of the type of the object being declared.
855
 
856
   --      The expression of a type conversion. In this case the range check is
857
   --      against the target type of the conversion. See also the use of
858
   --      Do_Overflow_Check on a type conversion. The distinction is that the
859
   --      overflow check protects against a value that is outside the range of
860
   --      the target base type, whereas a range check checks that the
861
   --      resulting value (which is a value of the base type of the target
862
   --      type), satisfies the range constraint of the target type.
863
 
864
   --    Note: when a range check is required in contexts other than those
865
   --    listed above (e.g. in a return statement), an additional type
866
   --    conversion node is introduced to represent the required check.
867
 
868
   --  Do_Storage_Check (Flag17-Sem)
869
   --    This flag is set in an N_Allocator node to indicate that a storage
870
   --    check is required for the allocation, or in an N_Subprogram_Body node
871
   --    to indicate that a stack check is required in the subprogram prolog.
872
   --    The N_Allocator case is handled by the routine that expands the call
873
   --    to the runtime routine. The N_Subprogram_Body case is handled by the
874
   --    backend, and all the semantics does is set the flag.
875
 
876
   --  Do_Tag_Check (Flag13-Sem)
877
   --    This flag is set on an N_Assignment_Statement, N_Function_Call,
878
   --    N_Procedure_Call_Statement, N_Type_Conversion,
879
   --    N_Simple_Return_Statement, or N_Extended_Return_Statement
880
   --    node to indicate that the tag check can be suppressed. It is not
881
   --    yet decided how this flag is used (TBD ???).
882
 
883
   --  Elaborate_Present (Flag4-Sem)
884
   --    This flag is set in the N_With_Clause node to indicate that pragma
885
   --    Elaborate pragma appears for the with'ed units.
886
 
887
   --  Elaborate_All_Desirable (Flag9-Sem)
888
   --    This flag is set in the N_With_Clause mode to indicate that the static
889
   --    elaboration processing has determined that an Elaborate_All pragma is
890
   --    desirable for correct elaboration for this unit.
891
 
892
   --  Elaborate_All_Present (Flag14-Sem)
893
   --    This flag is set in the N_With_Clause node to indicate that a
894
   --    pragma Elaborate_All pragma appears for the with'ed units.
895
 
896
   --  Elaborate_Desirable (Flag11-Sem)
897
   --    This flag is set in the N_With_Clause mode to indicate that the static
898
   --    elaboration processing has determined that an Elaborate pragma is
899
   --    desirable for correct elaboration for this unit.
900
 
901
   --  Elaboration_Boolean (Node2-Sem)
902
   --    This field is present in function and procedure specification nodes.
903
   --    If set, it points to the entity for a Boolean flag that must be tested
904
   --    for certain calls to check for access before elaboration. See body of
905
   --    Sem_Elab for further details. This field is Empty if no elaboration
906
   --    boolean is required.
907
 
908
   --  Else_Actions (List3-Sem)
909
   --    This field is present in conditional expression nodes. During code
910
   --    expansion we use the Insert_Actions procedure (in Exp_Util) to insert
911
   --    actions at an appropriate place in the tree to get elaborated at the
912
   --    right time. For conditional expressions, we have to be sure that the
913
   --    actions for the Else branch are only elaborated if the condition is
914
   --    False. The Else_Actions field is used as a temporary parking place for
915
   --    these actions. The final tree is always rewritten to eliminate the
916
   --    need for this field, so in the tree passed to Gigi, this field is
917
   --    always set to No_List.
918
 
919
   --  Enclosing_Variant (Node2-Sem)
920
   --    This field is present in the N_Variant node and identifies the Node_Id
921
   --    corresponding to the immediately enclosing variant when the variant is
922
   --    nested, and N_Empty otherwise. Set during semantic processing of the
923
   --    variant part of a record type.
924
 
925
   --  Entity (Node4-Sem)
926
   --    Appears in all direct names (identifiers, character literals, and
927
   --    operator symbols), as well as expanded names, and attributes that
928
   --    denote entities, such as 'Class. Points to entity for corresponding
929
   --    defining occurrence. Set after name resolution. For identifiers in a
930
   --    WITH list, the corresponding defining occurrence is in a separately
931
   --    compiled file, and Entity must be set by the library Load procedure.
932
   --
933
   --    Note: During name resolution, the value in Entity may be temporarily
934
   --    incorrect (e.g. during overload resolution, Entity is initially set to
935
   --    the first possible correct interpretation, and then later modified if
936
   --    necessary to contain the correct value after resolution).
937
   --
938
   --    Note: This field overlaps Associated_Node, which is used during
939
   --    generic processing (see Sem_Ch12 for details). Note also that in
940
   --    generic templates, this means that the Entity field does not always
941
   --    point to an Entity. Since the back end is expected to ignore generic
942
   --    templates, this is harmless.
943
   --
944
   --    Note: This field also appears in N_Attribute_Definition_Clause nodes.
945
   --    It is used only for stream attributes definition clauses. In this
946
   --    case, it denotes a (possibly dummy) subprogram entity that is declared
947
   --    conceptually at the point of the clause. Thus the visibility of the
948
   --    attribute definition clause (in the sense of 8.3(23) as amended by
949
   --    AI-195) can be checked by testing the visibility of that subprogram.
950
   --
951
   --    Note: Normally the Entity field of an identifier points to the entity
952
   --    for the corresponding defining identifier, and hence the Chars field
953
   --    of an identifier will match the Chars field of the entity. However,
954
   --    there is no requirement that these match, and there are obscure cases
955
   --    of generated code where they do not match.
956
 
957
   --    Note: Ada 2012 aspect specifications require additional links between
958
   --    identifiers and various attributes. These attributes can be of
959
   --    arbitrary types, and the entity field of identifiers that denote
960
   --    aspects must be used to store arbitrary expressions for later semantic
961
   --    checks. See section on aspect specifications for details.
962
 
963
   --  Entity_Or_Associated_Node (Node4-Sem)
964
   --    A synonym for both Entity and Associated_Node. Used by convention in
965
   --    the code when referencing this field in cases where it is not known
966
   --    whether the field contains an Entity or an Associated_Node.
967
 
968
   --  Etype (Node5-Sem)
969
   --    Appears in all expression nodes, all direct names, and all entities.
970
   --    Points to the entity for the related type. Set after type resolution.
971
   --    Normally this is the actual subtype of the expression. However, in
972
   --    certain contexts such as the right side of an assignment, subscripts,
973
   --    arguments to calls, returned value in a function, initial value etc.
974
   --    it is the desired target type. In the event that this is different
975
   --    from the actual type, the Do_Range_Check flag will be set if a range
976
   --    check is required. Note: if the Is_Overloaded flag is set, then Etype
977
   --    points to an essentially arbitrary choice from the possible set of
978
   --    types.
979
 
980
   --  Exception_Junk (Flag8-Sem)
981
   --    This flag is set in a various nodes appearing in a statement sequence
982
   --    to indicate that the corresponding node is an artifact of the
983
   --    generated code for exception handling, and should be ignored when
984
   --    analyzing the control flow of the relevant sequence of statements
985
   --    (e.g. to check that it does not end with a bad return statement).
986
 
987
   --  Exception_Label (Node5-Sem)
988
   --    Appears in N_Push_xxx_Label nodes. Points to the entity of the label
989
   --    to be used for transforming the corresponding exception into a goto,
990
   --    or contains Empty, if this exception is not to be transformed. Also
991
   --    appears in N_Exception_Handler nodes, where, if set, it indicates
992
   --    that there may be a local raise for the handler, so that expansion
993
   --    to allow a goto is required (and this field contains the label for
994
   --    this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
995
 
996
   --  Expansion_Delayed (Flag11-Sem)
997
   --    Set on aggregates and extension aggregates that need a top-down rather
998
   --    than bottom-up expansion. Typically aggregate expansion happens bottom
999
   --    up. For nested aggregates the expansion is delayed until the enclosing
1000
   --    aggregate itself is expanded, e.g. in the context of a declaration. To
1001
   --    delay it we set this flag. This is done to avoid creating a temporary
1002
   --    for each level of a nested aggregates, and also to prevent the
1003
   --    premature generation of constraint checks. This is also a requirement
1004
   --    if we want to generate the proper attachment to the internal
1005
   --    finalization lists (for record with controlled components). Top down
1006
   --    expansion of aggregates is also used for in-place array aggregate
1007
   --    assignment or initialization. When the full context is known, the
1008
   --    target of the assignment or initialization is used to generate the
1009
   --    left-hand side of individual assignment to each sub-component.
1010
 
1011
   --  First_Inlined_Subprogram (Node3-Sem)
1012
   --    Present in the N_Compilation_Unit node for the main program. Points
1013
   --    to a chain of entities for subprograms that are to be inlined. The
1014
   --    Next_Inlined_Subprogram field of these entities is used as a link
1015
   --    pointer with Empty marking the end of the list. This field is Empty
1016
   --    if there are no inlined subprograms or inlining is not active.
1017
 
1018
   --  First_Named_Actual (Node4-Sem)
1019
   --    Present in procedure call statement and function call nodes, and also
1020
   --    in Intrinsic nodes. Set during semantic analysis to point to the first
1021
   --    named parameter where parameters are ordered by declaration order (as
1022
   --    opposed to the actual order in the call which may be different due to
1023
   --    named associations). Note: this field points to the explicit actual
1024
   --    parameter itself, not the N_Parameter_Association node (its parent).
1025
 
1026
   --  First_Real_Statement (Node2-Sem)
1027
   --    Present in N_Handled_Sequence_Of_Statements node. Normally set to
1028
   --    Empty. Used only when declarations are moved into the statement part
1029
   --    of a construct as a result of wrapping an AT END handler that is
1030
   --    required to cover the declarations. In this case, this field is used
1031
   --    to remember the location in the statements list of the first real
1032
   --    statement, i.e. the statement that used to be first in the statement
1033
   --    list before the declarations were prepended.
1034
 
1035
   --  First_Subtype_Link (Node5-Sem)
1036
   --    Present in N_Freeze_Entity node for an anonymous base type that is
1037
   --    implicitly created by the declaration of a first subtype. It points
1038
   --    to the entity for the first subtype.
1039
 
1040
   --  Float_Truncate (Flag11-Sem)
1041
   --    A flag present in type conversion nodes. This is used for float to
1042
   --    integer conversions where truncation is required rather than rounding.
1043
   --    Note that Gigi does not handle type conversions from real to integer
1044
   --    with rounding (see Expand_N_Type_Conversion).
1045
 
1046
   --  Forwards_OK (Flag5-Sem)
1047
   --    A flag present in the N_Assignment_Statement node. It is used only
1048
   --    if the type being assigned is an array type, and is set if analysis
1049
   --    determines that it is definitely safe to do the copy forwards, i.e.
1050
   --    starting at the lowest addressed element. This is the case if either
1051
   --    the operands do not overlap, or they may overlap, but if they do,
1052
   --    then the left operand is at a lower address than the right operand.
1053
   --
1054
   --    Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1055
   --    means that the front end could not determine that either direction is
1056
   --    definitely safe, and a runtime check may be required if the backend
1057
   --    cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1058
   --    set, it means that the front end can assure no overlap of operands.
1059
 
1060
   --  From_Aspect_Specification (Flag13-Sem)
1061
   --    Processing of aspect specifications typically results in insertion in
1062
   --    the tree of corresponding pragma or attribute definition clause nodes.
1063
   --    These generated nodes have the From_Aspect_Specification flag set to
1064
   --    indicate that they came from aspect specifications originally.
1065
 
1066
   --  From_At_End (Flag4-Sem)
1067
   --    This flag is set on an N_Raise_Statement node if it corresponds to
1068
   --    the reraise statement generated as the last statement of an AT END
1069
   --    handler when SJLJ exception handling is active. It is used to stop
1070
   --    a bogus violation of restriction (No_Exception_Propagation), bogus
1071
   --    because if the restriction is set, the reraise is not generated.
1072
 
1073
   --  From_At_Mod (Flag4-Sem)
1074
   --    This flag is set on the attribute definition clause node that is
1075
   --    generated by a transformation of an at mod phrase in a record
1076
   --    representation clause. This is used to give slightly different (Ada 83
1077
   --    compatible) semantics to such a clause, namely it is used to specify a
1078
   --    minimum acceptable alignment for the base type and all subtypes. In
1079
   --    Ada 95 terms, the actual alignment of the base type and all subtypes
1080
   --    must be a multiple of the given value, and the representation clause
1081
   --    is considered to be type specific instead of subtype specific.
1082
 
1083
   --  From_Default (Flag6-Sem)
1084
   --    This flag is set on the subprogram renaming declaration created in an
1085
   --    instance for a formal subprogram, when the formal is declared with a
1086
   --    box, and there is no explicit actual. If the flag is present, the
1087
   --    declaration is treated as an implicit reference to the formal in the
1088
   --    ali file.
1089
 
1090
   --  Generic_Parent (Node5-Sem)
1091
   --    Generic_Parent is defined on declaration nodes that are instances. The
1092
   --    value of Generic_Parent is the generic entity from which the instance
1093
   --    is obtained. Generic_Parent is also defined for the renaming
1094
   --    declarations and object declarations created for the actuals in an
1095
   --    instantiation. The generic parent of such a declaration is the
1096
   --    corresponding generic association in the Instantiation node.
1097
 
1098
   --  Generic_Parent_Type (Node4-Sem)
1099
   --    Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1100
   --    actuals of formal private and derived types. Within the instance, the
1101
   --    operations on the actual are those inherited from the parent. For a
1102
   --    formal private type, the parent type is the generic type itself. The
1103
   --    Generic_Parent_Type is also used in an instance to determine whether a
1104
   --    private operation overrides an inherited one.
1105
 
1106
   --  Handler_List_Entry (Node2-Sem)
1107
   --    This field is present in N_Object_Declaration nodes. It is set only
1108
   --    for the Handler_Record entry generated for an exception in zero cost
1109
   --    exception handling mode. It references the corresponding item in the
1110
   --    handler list, and is used to delete this entry if the corresponding
1111
   --    handler is deleted during optimization. For further details on why
1112
   --    this is required, see Exp_Ch11.Remove_Handler_Entries.
1113
 
1114
   --  Has_Dynamic_Length_Check (Flag10-Sem)
1115
   --    This flag is present in all expression nodes. It is set to indicate
1116
   --    that one of the routines in unit Checks has generated a length check
1117
   --    action which has been inserted at the flagged node. This is used to
1118
   --    avoid the generation of duplicate checks.
1119
 
1120
   --  Has_Dynamic_Range_Check (Flag12-Sem)
1121
   --    This flag is present in N_Subtype_Declaration nodes and on all
1122
   --    expression nodes. It is set to indicate that one of the routines in
1123
   --    unit Checks has generated a range check action which has been inserted
1124
   --    at the flagged node. This is used to avoid the generation of duplicate
1125
   --    checks. Why does this occur on N_Subtype_Declaration nodes, what does
1126
   --    it mean in that context???
1127
 
1128
   --  Has_Local_Raise (Flag8-Sem)
1129
   --    Present in exception handler nodes. Set if the handler can be entered
1130
   --    via a local raise that gets transformed to a goto statement. This will
1131
   --    always be set if Local_Raise_Statements is non-empty, but can also be
1132
   --    set as a result of generation of N_Raise_xxx nodes, or flags set in
1133
   --    nodes requiring generation of back end checks.
1134
 
1135
   --  Has_No_Elaboration_Code (Flag17-Sem)
1136
   --    A flag that appears in the N_Compilation_Unit node to indicate whether
1137
   --    or not elaboration code is present for this unit. It is initially set
1138
   --    true for subprogram specs and bodies and for all generic units and
1139
   --    false for non-generic package specs and bodies. Gigi may set the flag
1140
   --    in the non-generic package case if it determines that no elaboration
1141
   --    code is generated. Note that this flag is not related to the
1142
   --    Is_Preelaborated status, there can be preelaborated packages that
1143
   --    generate elaboration code, and non-preelaborated packages which do
1144
   --    not generate elaboration code.
1145
 
1146
   --  Has_Pragma_CPU (Flag14-Sem)
1147
   --    A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1148
   --    flag the presence of a CPU pragma in the declaration sequence (public
1149
   --    or private in the task case).
1150
 
1151
   --  Has_Pragma_Dispatching_Domain (Flag15-Sem)
1152
   --    A flag present in N_Task_Definition nodes to flag the presence of a
1153
   --    Dispatching_Domain pragma in the declaration sequence (public or
1154
   --    private in the task case).
1155
 
1156
   --  Has_Pragma_Suppress_All (Flag14-Sem)
1157
   --    This flag is set in an N_Compilation_Unit node if the Suppress_All
1158
   --    pragma appears anywhere in the unit. This accommodates the rather
1159
   --    strange placement rules of other compilers (DEC permits it at the
1160
   --    end of a unit, and Rational allows it as a program unit pragma). We
1161
   --    allow it anywhere at all, and consider it equivalent to a pragma
1162
   --    Suppress (All_Checks) appearing at the start of the configuration
1163
   --    pragmas for the unit.
1164
 
1165
   --  Has_Pragma_Priority (Flag6-Sem)
1166
   --    A flag present in N_Subprogram_Body, N_Task_Definition and
1167
   --    N_Protected_Definition nodes to flag the presence of either a Priority
1168
   --    or Interrupt_Priority pragma in the declaration sequence (public or
1169
   --    private in the task and protected cases)
1170
 
1171
   --  Has_Private_View (Flag11-Sem)
1172
   --    A flag present in generic nodes that have an entity, to indicate that
1173
   --    the node has a private type. Used to exchange private and full
1174
   --    declarations if the visibility at instantiation is different from the
1175
   --    visibility at generic definition.
1176
 
1177
   --  Has_Relative_Deadline_Pragma (Flag9-Sem)
1178
   --    A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1179
   --    flag the presence of a pragma Relative_Deadline.
1180
 
1181
   --  Has_Self_Reference (Flag13-Sem)
1182
   --    Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1183
   --    of the expressions contains an access attribute reference to the
1184
   --    enclosing type. Such a self-reference can only appear in default-
1185
   --    initialized aggregate for a record type.
1186
 
1187
   --  Has_Storage_Size_Pragma (Flag5-Sem)
1188
   --    A flag present in an N_Task_Definition node to flag the presence of a
1189
   --    Storage_Size pragma.
1190
 
1191
   --  Has_Task_Info_Pragma (Flag7-Sem)
1192
   --    A flag present in an N_Task_Definition node to flag the presence of a
1193
   --    Task_Info pragma. Used to detect duplicate pragmas.
1194
 
1195
   --  Has_Task_Name_Pragma (Flag8-Sem)
1196
   --    A flag present in N_Task_Definition nodes to flag the presence of a
1197
   --    Task_Name pragma in the declaration sequence for the task.
1198
 
1199
   --  Has_Wide_Character (Flag11-Sem)
1200
   --    Present in string literals, set if any wide character (i.e. character
1201
   --    code outside the Character range but within Wide_Character range)
1202
   --    appears in the string. Used to implement pragma preference rules.
1203
 
1204
   --  Has_Wide_Wide_Character (Flag13-Sem)
1205
   --    Present in string literals, set if any wide character (i.e. character
1206
   --    code outside the Wide_Character range) appears in the string. Used to
1207
   --    implement pragma preference rules.
1208
 
1209
   --  Header_Size_Added (Flag11-Sem)
1210
   --    Present in N_Attribute_Reference nodes, set only for attribute
1211
   --    Max_Size_In_Storage_Elements. The flag indicates that the size of the
1212
   --    hidden list header used by the runtime finalization support has been
1213
   --    added to the size of the prefix. The flag also prevents the infinite
1214
   --    expansion of the same attribute in the said context.
1215
 
1216
   --  Hidden_By_Use_Clause (Elist4-Sem)
1217
   --     An entity list present in use clauses that appear within
1218
   --     instantiations. For the resolution of local entities, entities
1219
   --     introduced by these use clauses have priority over global ones, and
1220
   --     outer entities must be explicitly hidden/restored on exit.
1221
 
1222
   --  Implicit_With (Flag16-Sem)
1223
   --    This flag is set in the N_With_Clause node that is implicitly
1224
   --    generated for runtime units that are loaded by the expander, and also
1225
   --    for package System, if it is loaded implicitly by a use of the
1226
   --    'Address or 'Tag attribute. ???There are other implicit with clauses
1227
   --    as well.
1228
 
1229
   --  Import_Interface_Present (Flag16-Sem)
1230
   --     This flag is set in an Interface or Import pragma if a matching
1231
   --     pragma of the other kind is also present. This is used to avoid
1232
   --     generating some unwanted error messages.
1233
 
1234
   --  Includes_Infinities (Flag11-Sem)
1235
   --    This flag is present in N_Range nodes. It is set for the range of
1236
   --    unconstrained float types defined in Standard, which include not only
1237
   --    the given range of values, but also legitimately can include infinite
1238
   --    values. This flag is false for any float type for which an explicit
1239
   --    range is given by the programmer, even if that range is identical to
1240
   --    the range for Float.
1241
 
1242
   --  Inherited_Discriminant (Flag13-Sem)
1243
   --    This flag is present in N_Component_Association nodes. It indicates
1244
   --    that a given component association in an extension aggregate is the
1245
   --    value obtained from a constraint on an ancestor. Used to prevent
1246
   --    double expansion when the aggregate has expansion delayed.
1247
 
1248
   --  Instance_Spec (Node5-Sem)
1249
   --    This field is present in generic instantiation nodes, and also in
1250
   --    formal package declaration nodes (formal package declarations are
1251
   --    treated in a manner very similar to package instantiations). It points
1252
   --    to the node for the spec of the instance, inserted as part of the
1253
   --    semantic processing for instantiations in Sem_Ch12.
1254
 
1255
   --  Is_Accessibility_Actual (Flag12-Sem)
1256
   --    Present in N_Parameter_Association nodes. True if the parameter is
1257
   --    an extra actual that carries the accessibility level of the actual
1258
   --    for an access parameter, in a function that dispatches on result and
1259
   --    is called in a dispatching context. Used to prevent a formal/actual
1260
   --    mismatch when the call is rewritten as a dispatching call.
1261
 
1262
   --  Is_Asynchronous_Call_Block (Flag7-Sem)
1263
   --    A flag set in a Block_Statement node to indicate that it is the
1264
   --    expansion of an asynchronous entry call. Such a block needs cleanup
1265
   --    handler to assure that the call is cancelled.
1266
 
1267
   --  Is_Boolean_Aspect (Flag16-Sem)
1268
   --    Present in N_Aspect_Specification node. Set if the aspect is for a
1269
   --    boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1270
 
1271
   --  Is_Component_Left_Opnd  (Flag13-Sem)
1272
   --  Is_Component_Right_Opnd (Flag14-Sem)
1273
   --    Present in concatenation nodes, to indicate that the corresponding
1274
   --    operand is of the component type of the result. Used in resolving
1275
   --    concatenation nodes in instances.
1276
 
1277
   --  Is_Delayed_Aspect (Flag14-Sem)
1278
   --    Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1279
   --    come from aspect specifications, where the evaluation of the aspect
1280
   --    must be delayed to the freeze point. This flag is also set True in
1281
   --    the corresponding N_Aspect_Specification node.
1282
 
1283
   --  Is_Controlling_Actual (Flag16-Sem)
1284
   --    This flag is set on in an expression that is a controlling argument in
1285
   --    a dispatching call. It is off in all other cases. See Sem_Disp for
1286
   --    details of its use.
1287
 
1288
   --  Is_Dynamic_Coextension (Flag18-Sem)
1289
   --    Present in allocator nodes, to indicate that this is an allocator
1290
   --    for an access discriminant of a dynamically allocated object. The
1291
   --    coextension must be deallocated and finalized at the same time as
1292
   --    the enclosing object.
1293
 
1294
   --  Is_Entry_Barrier_Function (Flag8-Sem)
1295
   --    This flag is set in an N_Subprogram_Body node which is the expansion
1296
   --    of an entry barrier from a protected entry body. It is used for the
1297
   --    circuitry checking for incorrect use of Current_Task.
1298
 
1299
   --  Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1300
   --    This flag is set in an N_Function_Call node to indicate that the extra
1301
   --    actuals to support a build-in-place style of call have been added to
1302
   --    the call.
1303
 
1304
   --  Is_In_Discriminant_Check (Flag11-Sem)
1305
   --    This flag is present in a selected component, and is used to indicate
1306
   --    that the reference occurs within a discriminant check. The
1307
   --    significance is that optimizations based on assuming that the
1308
   --    discriminant check has a correct value cannot be performed in this
1309
   --    case (or the discriminant check may be optimized away!)
1310
 
1311
   --  Is_Machine_Number (Flag11-Sem)
1312
   --    This flag is set in an N_Real_Literal node to indicate that the value
1313
   --    is a machine number. This avoids some unnecessary cases of converting
1314
   --    real literals to machine numbers.
1315
 
1316
   --  Is_Null_Loop (Flag16-Sem)
1317
   --    This flag is set in an N_Loop_Statement node if the corresponding loop
1318
   --    can be determined to be null at compile time. This is used to remove
1319
   --    the loop entirely at expansion time.
1320
 
1321
   --  Is_Overloaded (Flag5-Sem)
1322
   --    A flag present in all expression nodes. Used temporarily during
1323
   --    overloading determination. The setting of this flag is not relevant
1324
   --    once overloading analysis is complete.
1325
 
1326
   --  Is_Power_Of_2_For_Shift (Flag13-Sem)
1327
   --    A flag present only in N_Op_Expon nodes. It is set when the
1328
   --    exponentiation is of the form 2 ** N, where the type of N is an
1329
   --    unsigned integral subtype whose size does not exceed the size of
1330
   --    Standard_Integer (i.e. a type that can be safely converted to
1331
   --    Natural), and the exponentiation appears as the right operand of an
1332
   --    integer multiplication or an integer division where the dividend is
1333
   --    unsigned. It is also required that overflow checking is off for both
1334
   --    the exponentiation and the multiply/divide node. If this set of
1335
   --    conditions holds, and the flag is set, then the division or
1336
   --    multiplication can be (and is) converted to a shift.
1337
 
1338
   --  Is_Prefixed_Call (Flag17-Sem)
1339
   --    This flag is set in a selected component within a generic unit, if
1340
   --    it resolves to a prefixed call to a primitive operation. The flag
1341
   --    is used to prevent accidental overloadings in an instance, when a
1342
   --    primitive operation and a private record component may be homographs.
1343
 
1344
   --  Is_Protected_Subprogram_Body (Flag7-Sem)
1345
   --    A flag set in a Subprogram_Body block to indicate that it is the
1346
   --    implementation of a protected subprogram. Such a body needs cleanup
1347
   --    handler to make sure that the associated protected object is unlocked
1348
   --    when the subprogram completes.
1349
 
1350
   --  Is_Static_Coextension (Flag14-Sem)
1351
   --    Present in N_Allocator nodes. Set if the allocator is a coextension
1352
   --    of an object allocated on the stack rather than the heap.
1353
 
1354
   --  Is_Static_Expression (Flag6-Sem)
1355
   --    Indicates that an expression is a static expression (RM 4.9). See spec
1356
   --    of package Sem_Eval for full details on the use of this flag.
1357
 
1358
   --  Is_Subprogram_Descriptor (Flag16-Sem)
1359
   --    Present in N_Object_Declaration, and set only for the object
1360
   --    declaration generated for a subprogram descriptor in fast exception
1361
   --    mode. See Exp_Ch11 for details of use.
1362
 
1363
   --  Is_Task_Allocation_Block (Flag6-Sem)
1364
   --    A flag set in a Block_Statement node to indicate that it is the
1365
   --    expansion of a task allocator, or the allocator of an object
1366
   --    containing tasks. Such a block requires a cleanup handler to call
1367
   --    Expunge_Unactivated_Tasks to complete any tasks that have been
1368
   --    allocated but not activated when the allocator completes abnormally.
1369
 
1370
   --  Is_Task_Master (Flag5-Sem)
1371
   --    A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1372
   --    indicate that the construct is a task master (i.e. has declared tasks
1373
   --    or declares an access to a task type).
1374
 
1375
   --  Itype (Node1-Sem)
1376
   --    Used in N_Itype_Reference node to reference an itype for which it is
1377
   --    important to ensure that it is defined. See description of this node
1378
   --    for further details.
1379
 
1380
   --  Kill_Range_Check (Flag11-Sem)
1381
   --    Used in an N_Unchecked_Type_Conversion node to indicate that the
1382
   --    result should not be subjected to range checks. This is used for the
1383
   --    implementation of Normalize_Scalars.
1384
 
1385
   --  Label_Construct (Node2-Sem)
1386
   --    Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1387
   --    N_Block_Statement or N_Loop_Statement node to which the label
1388
   --    declaration applies. This is not currently used in the compiler
1389
   --    itself, but it is useful in the implementation of ASIS queries.
1390
   --    This field is left empty for the special labels generated as part
1391
   --    of expanding raise statements with a local exception handler.
1392
 
1393
   --  Library_Unit (Node4-Sem)
1394
   --    In a stub node, Library_Unit points to the compilation unit node of
1395
   --    the corresponding subunit.
1396
   --
1397
   --    In a with clause node, Library_Unit points to the spec of the with'ed
1398
   --    unit.
1399
   --
1400
   --    In a compilation unit node, the usage depends on the unit type:
1401
   --
1402
   --     For a library unit body, Library_Unit points to the compilation unit
1403
   --     node of the corresponding spec, unless it's a subprogram body with
1404
   --     Acts_As_Spec set, in which case it points to itself.
1405
   --
1406
   --     For a spec, Library_Unit points to the compilation unit node of the
1407
   --     corresponding body, if present. The body will be present if the spec
1408
   --     is or contains generics that we needed to instantiate. Similarly, the
1409
   --     body will be present if we needed it for inlining purposes. Thus, if
1410
   --     we have a spec/body pair, both of which are present, they point to
1411
   --     each other via Library_Unit.
1412
   --
1413
   --     For a subunit, Library_Unit points to the compilation unit node of
1414
   --     the parent body.
1415
   --
1416
   --    Note that this field is not used to hold the parent pointer for child
1417
   --    unit (which might in any case need to use it for some other purpose as
1418
   --    described above). Instead for a child unit, implicit with's are
1419
   --    generated for all parents.
1420
 
1421
   --  Local_Raise_Statements (Elist1)
1422
   --    This field is present in exception handler nodes. It is set to
1423
   --    No_Elist in the normal case. If there is at least one raise statement
1424
   --    which can potentially be handled as a local raise, then this field
1425
   --    points to a list of raise nodes, which are calls to a routine to raise
1426
   --    an exception. These are raise nodes which can be optimized into gotos
1427
   --    if the handler turns out to meet the conditions which permit this
1428
   --    transformation. Note that this does NOT include instances of the
1429
   --    N_Raise_xxx_Error nodes since the transformation of these nodes is
1430
   --    handled by the back end (using the N_Push/N_Pop mechanism).
1431
 
1432
   --  Loop_Actions (List2-Sem)
1433
   --    A list present in Component_Association nodes in array aggregates.
1434
   --    Used to collect actions that must be executed within the loop because
1435
   --    they may need to be evaluated anew each time through.
1436
 
1437
   --  Limited_View_Installed (Flag18-Sem)
1438
   --    Present in With_Clauses and in package specifications. If set on
1439
   --    with_clause, it indicates that this clause has created the current
1440
   --    limited view of the designated package. On a package specification, it
1441
   --    indicates that the limited view has already been created because the
1442
   --    package is mentioned in a limited_with_clause in the closure of the
1443
   --    unit being compiled.
1444
 
1445
   --  Local_Raise_Not_OK (Flag7-Sem)
1446
   --    Present in N_Exception_Handler nodes. Set if the handler contains
1447
   --    a construct (reraise statement, or call to subprogram in package
1448
   --    GNAT.Current_Exception) that makes the handler unsuitable as a target
1449
   --    for a local raise (one that could otherwise be converted to a goto).
1450
 
1451
   --  Must_Be_Byte_Aligned (Flag14-Sem)
1452
   --    This flag is present in N_Attribute_Reference nodes. It can be set
1453
   --    only for the Address and Unrestricted_Access attributes. If set it
1454
   --    means that the object for which the address/access is given must be on
1455
   --    a byte (more accurately a storage unit) boundary. If necessary, a copy
1456
   --    of the object is to be made before taking the address (this copy is in
1457
   --    the current scope on the stack frame). This is used for certain cases
1458
   --    of code generated by the expander that passes parameters by address.
1459
   --
1460
   --    The reason the copy is not made by the front end is that the back end
1461
   --    has more information about type layout and may be able to (but is not
1462
   --    guaranteed to) prevent making unnecessary copies.
1463
 
1464
   --  Must_Not_Freeze (Flag8-Sem)
1465
   --    A flag present in all expression nodes. Normally expressions cause
1466
   --    freezing as described in the RM. If this flag is set, then this is
1467
   --    inhibited. This is used by the analyzer and expander to label nodes
1468
   --    that are created by semantic analysis or expansion and which must not
1469
   --    cause freezing even though they normally would. This flag is also
1470
   --    present in an N_Subtype_Indication node, since we also use these in
1471
   --    calls to Freeze_Expression.
1472
 
1473
   --  Next_Entity (Node2-Sem)
1474
   --    Present in defining identifiers, defining character literals and
1475
   --    defining operator symbols (i.e. in all entities). The entities of a
1476
   --    scope are chained, and this field is used as the forward pointer for
1477
   --    this list. See Einfo for further details.
1478
 
1479
   --  Next_Exit_Statement (Node3-Sem)
1480
   --    Present in N_Exit_Statement nodes. The exit statements for a loop are
1481
   --    chained (in reverse order of appearance) from the First_Exit_Statement
1482
   --    field of the E_Loop entity for the loop. Next_Exit_Statement points to
1483
   --    the next entry on this chain (Empty = end of list).
1484
 
1485
   --  Next_Implicit_With (Node3-Sem)
1486
   --    Present in N_With_Clause. Part of a chain of with_clauses generated
1487
   --    in rtsfind to indicate implicit dependencies on predefined units. Used
1488
   --    to prevent multiple with_clauses for the same unit in a given context.
1489
   --    A postorder traversal of the tree whose nodes are units and whose
1490
   --    links are with_clauses defines the order in which Inspector must
1491
   --    examine a compiled unit and its full context. This ordering ensures
1492
   --    that any subprogram call is examined after the subprogram declaration
1493
   --    has been seen.
1494
 
1495
   --  Next_Named_Actual (Node4-Sem)
1496
   --    Present in parameter association node. Set during semantic analysis to
1497
   --    point to the next named parameter, where parameters are ordered by
1498
   --    declaration order (as opposed to the actual order in the call, which
1499
   --    may be different due to named associations). Not that this field
1500
   --    points to the explicit actual parameter itself, not to the
1501
   --    N_Parameter_Association node (its parent).
1502
 
1503
   --  Next_Pragma (Node1-Sem)
1504
   --    Present in N_Pragma nodes. Used to create a linked list of pragma
1505
   --    nodes. Currently used for two purposes:
1506
   --
1507
   --      Create a list of linked Check_Policy pragmas. The head of this list
1508
   --      is stored in Opt.Check_Policy_List (which has further details).
1509
   --
1510
   --      Used by processing for Pre/Postcondition pragmas to store a list of
1511
   --      pragmas associated with the spec of a subprogram (see Sem_Prag for
1512
   --      details).
1513
 
1514
   --  Next_Rep_Item (Node5-Sem)
1515
   --    Present in pragma nodes, attribute definition nodes, enumeration rep
1516
   --    clauses, record rep clauses, aspect specification nodes. Used to link
1517
   --    representation items that apply to an entity. See full description of
1518
   --    First_Rep_Item field in Einfo for further details.
1519
 
1520
   --  Next_Use_Clause (Node3-Sem)
1521
   --    While use clauses are active during semantic processing, they are
1522
   --    chained from the scope stack entry, using Next_Use_Clause as a link
1523
   --    pointer, with Empty marking the end of the list. The head pointer is
1524
   --    in the scope stack entry (First_Use_Clause). At the end of semantic
1525
   --    processing (i.e. when Gigi sees the tree, the contents of this field
1526
   --    is undefined and should not be read).
1527
 
1528
   --  No_Ctrl_Actions (Flag7-Sem)
1529
   --    Present in N_Assignment_Statement to indicate that no finalize nor
1530
   --    adjust should take place on this assignment even though the rhs is
1531
   --    controlled. This is used in init procs and aggregate expansions where
1532
   --    the generated assignments are more initialisations than real
1533
   --    assignments.
1534
 
1535
   --  No_Elaboration_Check (Flag14-Sem)
1536
   --    Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1537
   --    that no elaboration check is needed on the call, because it appears in
1538
   --    the context of a local Suppress pragma. This is used on calls within
1539
   --    task bodies, where the actual elaboration checks are applied after
1540
   --    analysis, when the local scope stack is not present.
1541
 
1542
   --  No_Entities_Ref_In_Spec (Flag8-Sem)
1543
   --    Present in N_With_Clause nodes. Set if the with clause is on the
1544
   --    package or subprogram spec where the main unit is the corresponding
1545
   --    body, and no entities of the with'ed unit are referenced by the spec
1546
   --    (an entity may still be referenced in the body, so this flag is used
1547
   --    to generate the proper message (see Sem_Util.Check_Unused_Withs for
1548
   --    full details)
1549
 
1550
   --  No_Initialization (Flag13-Sem)
1551
   --    Present in N_Object_Declaration and N_Allocator to indicate that the
1552
   --    object must not be initialized (by Initialize or call to an init
1553
   --    proc). This is needed for controlled aggregates. When the Object
1554
   --    declaration has an expression, this flag means that this expression
1555
   --    should not be taken into account (needed for in place initialization
1556
   --    with aggregates).
1557
 
1558
   --  No_Truncation (Flag17-Sem)
1559
   --    Present in N_Unchecked_Type_Conversion node. This flag has an effect
1560
   --    only if the RM_Size of the source is greater than the RM_Size of the
1561
   --    target for scalar operands. Normally in such a case we truncate some
1562
   --    higher order bits of the source, and then sign/zero extend the result
1563
   --    to form the output value. But if this flag is set, then we do not do
1564
   --    any truncation, so for example, if an 8 bit input is converted to 5
1565
   --    bit result which is in fact stored in 8 bits, then the high order
1566
   --    three bits of the target result will be copied from the source. This
1567
   --    is used for properly setting out of range values for use by pragmas
1568
   --    Initialize_Scalars and Normalize_Scalars.
1569
 
1570
   --  Original_Discriminant (Node2-Sem)
1571
   --    Present in identifiers. Used in references to discriminants that
1572
   --    appear in generic units. Because the names of the discriminants may be
1573
   --    different in an instance, we use this field to recover the position of
1574
   --    the discriminant in the original type, and replace it with the
1575
   --    discriminant at the same position in the instantiated type.
1576
 
1577
   --  Original_Entity (Node2-Sem)
1578
   --    Present in numeric literals. Used to denote the named number that has
1579
   --    been constant-folded into the given literal. If literal is from
1580
   --    source, or the result of some other constant-folding operation, then
1581
   --    Original_Entity is empty. This field is needed to handle properly
1582
   --    named numbers in generic units, where the Associated_Node field
1583
   --    interferes with the Entity field, making it impossible to preserve the
1584
   --    original entity at the point of instantiation (ASIS problem).
1585
 
1586
   --  Others_Discrete_Choices (List1-Sem)
1587
   --    When a case statement or variant is analyzed, the semantic checks
1588
   --    determine the actual list of choices that correspond to an others
1589
   --    choice. This list is materialized for later use by the expander and
1590
   --    the Others_Discrete_Choices field of an N_Others_Choice node points to
1591
   --    this materialized list of choices, which is in standard format for a
1592
   --    list of discrete choices, except that of course it cannot contain an
1593
   --    N_Others_Choice entry.
1594
 
1595
   --  Parameter_List_Truncated (Flag17-Sem)
1596
   --    Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1597
   --    (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1598
   --    a result of a First_Optional_Parameter specification in an
1599
   --    Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1600
   --    The truncation is done by the expander by removing trailing parameters
1601
   --    from the argument list, in accordance with the set of rules allowing
1602
   --    such parameter removal. In particular, parameters can be removed
1603
   --    working from the end of the parameter list backwards up to and
1604
   --    including the entry designated by First_Optional_Parameter in the
1605
   --    Import pragma. Parameters can be removed if they are implicit and the
1606
   --    default value is a known-at-compile-time value, including the use of
1607
   --    the Null_Parameter attribute, or if explicit parameter values are
1608
   --    present that match the corresponding defaults.
1609
 
1610
   --  Parent_Spec (Node4-Sem)
1611
   --    For a library unit that is a child unit spec (package or subprogram
1612
   --    declaration, generic declaration or instantiation, or library level
1613
   --    rename, this field points to the compilation unit node for the parent
1614
   --    package specification. This field is Empty for library bodies (the
1615
   --    parent spec in this case can be found from the corresponding spec).
1616
 
1617
   --  Premature_Use (Node5-Sem)
1618
   --    Present in N_Incomplete_Type_Declaration node. Used for improved
1619
   --    error diagnostics: if there is a premature usage of an incomplete
1620
   --    type, a subsequently generated error message indicates the position
1621
   --    of its full declaration.
1622
 
1623
   --  Present_Expr (Uint3-Sem)
1624
   --    Present in an N_Variant node. This has a meaningful value only after
1625
   --    Gigi has back annotated the tree with representation information. At
1626
   --    this point, it contains a reference to a gcc expression that depends
1627
   --    on the values of one or more discriminants. Give a set of discriminant
1628
   --    values, this expression evaluates to False (zero) if variant is not
1629
   --    present, and True (non-zero) if it is present. See unit Repinfo for
1630
   --    further details on gigi back annotation. This field is used during
1631
   --    ASIS processing (data decomposition annex) to determine if a field is
1632
   --    present or not.
1633
 
1634
   --  Print_In_Hex (Flag13-Sem)
1635
   --    Set on an N_Integer_Literal node to indicate that the value should be
1636
   --    printed in hexadecimal in the sprint listing. Has no effect on
1637
   --    legality or semantics of program, only on the displayed output. This
1638
   --    is used to clarify output from the packed array cases.
1639
 
1640
   --  Procedure_To_Call (Node2-Sem)
1641
   --    Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1642
   --    and N_Extended_Return_Statement nodes. References the entity for the
1643
   --    declaration of the procedure to be called to accomplish the required
1644
   --    operation (i.e. for the Allocate procedure in the case of N_Allocator
1645
   --    and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1646
   --    allocating the return value), and for the Deallocate procedure in the
1647
   --    case of N_Free_Statement.
1648
 
1649
   --  Raises_Constraint_Error (Flag7-Sem)
1650
   --    Set on an expression whose evaluation will definitely fail constraint
1651
   --    error check. In the case of static expressions, this flag must be set
1652
   --    accurately (and if it is set, the expression is typically illegal
1653
   --    unless it appears as a non-elaborated branch of a short-circuit form).
1654
   --    For a non-static expression, this flag may be set whenever an
1655
   --    expression (e.g. an aggregate) is known to raise constraint error. If
1656
   --    set, the expression definitely will raise CE if elaborated at runtime.
1657
   --    If not set, the expression may or may not raise CE. In other words, on
1658
   --    static expressions, the flag is set accurately, on non-static
1659
   --    expressions it is set conservatively.
1660
 
1661
   --  Redundant_Use (Flag13-Sem)
1662
   --    Present in nodes that can appear as an operand in a use clause or use
1663
   --    type clause (identifiers, expanded names, attribute references). Set
1664
   --    to indicate that a use is redundant (and therefore need not be undone
1665
   --    on scope exit).
1666
 
1667
   --  Renaming_Exception (Node2-Sem)
1668
   --    Present in N_Exception_Declaration node. Used to point back to the
1669
   --    exception renaming for an exception declared within a subprogram.
1670
   --    What happens is that an exception declared in a subprogram is moved
1671
   --    to the library level with a unique name, and the original exception
1672
   --    becomes a renaming. This link from the library level exception to the
1673
   --    renaming declaration allows registering of the proper exception name.
1674
 
1675
   --  Return_Statement_Entity (Node5-Sem)
1676
   --    Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1677
   --    Points to an E_Return_Statement representing the return statement.
1678
 
1679
   --  Return_Object_Declarations (List3)
1680
   --    Present in N_Extended_Return_Statement. Points to a list initially
1681
   --    containing a single N_Object_Declaration representing the return
1682
   --    object. We use a list (instead of just a pointer to the object decl)
1683
   --    because Analyze wants to insert extra actions on this list.
1684
 
1685
   --  Rounded_Result (Flag18-Sem)
1686
   --    Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1687
   --    Used in the fixed-point cases to indicate that the result must be
1688
   --    rounded as a result of the use of the 'Round attribute. Also used for
1689
   --    integer N_Op_Divide nodes to indicate that the result should be
1690
   --    rounded to the nearest integer (breaking ties away from zero), rather
1691
   --    than truncated towards zero as usual. These rounded integer operations
1692
   --    are the result of expansion of rounded fixed-point divide, conversion
1693
   --    and multiplication operations.
1694
 
1695
   --  SCIL_Entity (Node4-Sem)
1696
   --    Present in SCIL nodes. Used to reference the tagged type associated
1697
   --    with the SCIL node.
1698
 
1699
   --  SCIL_Controlling_Tag (Node5-Sem)
1700
   --    Present in N_SCIL_Dispatching_Call nodes. Used to reference the
1701
   --    controlling tag of a dispatching call.
1702
 
1703
   --  SCIL_Tag_Value (Node5-Sem)
1704
   --    Present in N_SCIL_Membership_Test nodes. Used to reference the tag
1705
   --    value that is being tested.
1706
 
1707
   --  SCIL_Target_Prim (Node2-Sem)
1708
   --    Present in N_SCIL_Dispatching_Call nodes. Used to reference the tagged
1709
   --    type primitive associated with the SCIL node.
1710
 
1711
   --  Scope (Node3-Sem)
1712
   --    Present in defining identifiers, defining character literals and
1713
   --    defining operator symbols (i.e. in all entities). The entities of a
1714
   --    scope all use this field to reference the corresponding scope entity.
1715
   --    See Einfo for further details.
1716
 
1717
   --  Shift_Count_OK (Flag4-Sem)
1718
   --    A flag present in shift nodes to indicate that the shift count is
1719
   --    known to be in range, i.e. is in the range from zero to word length
1720
   --    minus one. If this flag is not set, then the shift count may be
1721
   --    outside this range, i.e. larger than the word length, and the code
1722
   --    must ensure that such shift counts give the appropriate result.
1723
 
1724
   --  Source_Type (Node1-Sem)
1725
   --    Used in an N_Validate_Unchecked_Conversion node to point to the
1726
   --    source type entity for the unchecked conversion instantiation
1727
   --    which gigi must do size validation for.
1728
 
1729
   --  Split_PPC (Flag17)
1730
   --    When a Pre or Post aspect specification is processed, it is broken
1731
   --    into AND THEN sections. The left most section has Split_PPC set to
1732
   --    False, indicating that it is the original specification (e.g. for
1733
   --    posting errors). For other sections, Split_PPC is set to True.
1734
   --    This flag is set in both the N_Aspect_Specification node itself,
1735
   --    and in the pragma which is generated from this node.
1736
 
1737
   --  Static_Processing_OK (Flag4-Sem)
1738
   --    Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1739
   --    flag is set, the full value of the aggregate can be determined at
1740
   --    compile time and the aggregate can be passed as is to the back-end.
1741
   --    In this event it is irrelevant whether this flag is set or not.
1742
   --    However, if the flag Compile_Time_Known_Aggregate is not set but
1743
   --    Static_Processing_OK is set, the aggregate can (but need not) be
1744
   --    converted into a compile time known aggregate by the expander. See
1745
   --    Sem_Aggr for the specific conditions under which an aggregate has its
1746
   --    Static_Processing_OK flag set.
1747
 
1748
   --  Storage_Pool (Node1-Sem)
1749
   --    Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1750
   --    and N_Extended_Return_Statement nodes. References the entity for the
1751
   --    storage pool to be used for the allocate or free call or for the
1752
   --    allocation of the returned value from function. Empty indicates that
1753
   --    the global default pool is to be used. Note that in the case
1754
   --    of a return statement, this field is set only if the function returns
1755
   --    value of a type whose size is not known at compile time on the
1756
   --    secondary stack.
1757
 
1758
   --  Suppress_Assignment_Checks (Flag18-Sem)
1759
   --    Used in generated N_Assignment_Statement nodes to suppress predicate
1760
   --    and range checks in cases where the generated code knows that the
1761
   --    value being assigned is in range and satisfies any predicate. Also
1762
   --    can be set in N_Object_Declaration nodes, to similarly suppress any
1763
   --    checks on the initializing value.
1764
 
1765
   --  Suppress_Loop_Warnings (Flag17-Sem)
1766
   --    Used in N_Loop_Statement node to indicate that warnings within the
1767
   --    body of the loop should be suppressed. This is set when the range
1768
   --    of a FOR loop is known to be null, or is probably null (loop would
1769
   --    only execute if invalid values are present).
1770
 
1771
   --  Target_Type (Node2-Sem)
1772
   --    Used in an N_Validate_Unchecked_Conversion node to point to the target
1773
   --    type entity for the unchecked conversion instantiation which gigi must
1774
   --    do size validation for.
1775
 
1776
   --  Then_Actions (List3-Sem)
1777
   --    This field is present in conditional expression nodes. During code
1778
   --    expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1779
   --    actions at an appropriate place in the tree to get elaborated at the
1780
   --    right time. For conditional expressions, we have to be sure that the
1781
   --    actions for the Then branch are only elaborated if the condition is
1782
   --    True. The Then_Actions field is used as a temporary parking place for
1783
   --    these actions. The final tree is always rewritten to eliminate the
1784
   --    need for this field, so in the tree passed to Gigi, this field is
1785
   --    always set to No_List.
1786
 
1787
   --  Treat_Fixed_As_Integer (Flag14-Sem)
1788
   --    This flag appears in operator nodes for divide, multiply, mod and rem
1789
   --    on fixed-point operands. It indicates that the operands are to be
1790
   --    treated as integer values, ignoring small values. This flag is only
1791
   --    set as a result of expansion of fixed-point operations. Typically a
1792
   --    fixed-point multiplication in the source generates subsidiary
1793
   --    multiplication and division operations that work with the underlying
1794
   --    integer values and have this flag set. Note that this flag is not
1795
   --    needed on other arithmetic operations (add, neg, subtract etc.) since
1796
   --    in these cases it is always the case that fixed is treated as integer.
1797
   --    The Etype field MUST be set if this flag is set. The analyzer knows to
1798
   --    leave such nodes alone, and whoever makes them must set the correct
1799
   --    Etype value.
1800
 
1801
   --  TSS_Elist (Elist3-Sem)
1802
   --    Present in N_Freeze_Entity nodes. Holds an element list containing
1803
   --    entries for each TSS (type support subprogram) associated with the
1804
   --    frozen type. The elements of the list are the entities for the
1805
   --    subprograms (see package Exp_TSS for further details). Set to No_Elist
1806
   --    if there are no type support subprograms for the type or if the freeze
1807
   --    node is not for a type.
1808
 
1809
   --  Unreferenced_In_Spec (Flag7-Sem)
1810
   --    Present in N_With_Clause nodes. Set if the with clause is on the
1811
   --    package or subprogram spec where the main unit is the corresponding
1812
   --    body, and is not referenced by the spec (it may still be referenced by
1813
   --    the body, so this flag is used to generate the proper message (see
1814
   --    Sem_Util.Check_Unused_Withs for details)
1815
 
1816
   --  Used_Operations (Elist5-Sem)
1817
   --    Present in N_Use_Type_Clause nodes. Holds the list of operations that
1818
   --    are made potentially use-visible by the clause. Simplifies processing
1819
   --    on exit from the scope of the use_type_clause, in particular in the
1820
   --    case of Use_All_Type, when those operations several scopes.
1821
 
1822
   --  Was_Originally_Stub (Flag13-Sem)
1823
   --    This flag is set in the node for a proper body that replaces stub.
1824
   --    During the analysis procedure, stubs in some situations get rewritten
1825
   --    by the corresponding bodies, and we set this flag to remember that
1826
   --    this happened. Note that it is not good enough to rely on the use of
1827
   --    Original_Node here because of the case of nested instantiations where
1828
   --    the substituted node can be copied.
1829
 
1830
   --  Withed_Body (Node1-Sem)
1831
   --    Present in N_With_Clause nodes. Set if the unit in whose context
1832
   --    the with_clause appears instantiates a generic contained in the
1833
   --    library unit of the with_clause and as a result loads its body.
1834
   --    Used for a more precise unit traversal for CodePeer.
1835
 
1836
   --------------------------------------------------
1837
   -- Note on Use of End_Label and End_Span Fields --
1838
   --------------------------------------------------
1839
 
1840
   --  Several constructs have end lines:
1841
 
1842
   --    Loop Statement             end loop [loop_IDENTIFIER];
1843
   --    Package Specification      end [[PARENT_UNIT_NAME .] IDENTIFIER]
1844
   --    Task Definition            end [task_IDENTIFIER]
1845
   --    Protected Definition       end [protected_IDENTIFIER]
1846
   --    Protected Body             end [protected_IDENTIFIER]
1847
 
1848
   --    Block Statement            end [block_IDENTIFIER];
1849
   --    Subprogram Body            end [DESIGNATOR];
1850
   --    Package Body               end [[PARENT_UNIT_NAME .] IDENTIFIER];
1851
   --    Task Body                  end [task_IDENTIFIER];
1852
   --    Accept Statement           end [entry_IDENTIFIER]];
1853
   --    Entry Body                 end [entry_IDENTIFIER];
1854
 
1855
   --    If Statement               end if;
1856
   --    Case Statement             end case;
1857
 
1858
   --    Record Definition          end record;
1859
   --    Enumeration Definition     );
1860
 
1861
   --  The End_Label and End_Span fields are used to mark the locations of
1862
   --  these lines, and also keep track of the label in the case where a label
1863
   --  is present.
1864
 
1865
   --  For the first group above, the End_Label field of the corresponding node
1866
   --  is used to point to the label identifier. In the case where there is no
1867
   --  label in the source, the parser supplies a dummy identifier (with
1868
   --  Comes_From_Source set to False), and the Sloc of this dummy identifier
1869
   --  marks the location of the token following the END token.
1870
 
1871
   --  For the second group, the use of End_Label is similar, but the End_Label
1872
   --  is found in the N_Handled_Sequence_Of_Statements node. This is done
1873
   --  simply because in some cases there is no room in the parent node.
1874
 
1875
   --  For the third group, there is never any label, and instead of using
1876
   --  End_Label, we use the End_Span field which gives the location of the
1877
   --  token following END, relative to the starting Sloc of the construct,
1878
   --  i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1879
   --  following the End_Label.
1880
 
1881
   --  The record definition case is handled specially, we treat it as though
1882
   --  it required an optional label which is never present, and so the parser
1883
   --  always builds a dummy identifier with Comes From Source set False. The
1884
   --  reason we do this, rather than using End_Span in this case, is that we
1885
   --  want to generate a cross-ref entry for the end of a record, since it
1886
   --  represents a scope for name declaration purposes.
1887
 
1888
   --  The enumeration definition case is handled in an exactly similar manner,
1889
   --  building a dummy identifier to get a cross-reference.
1890
 
1891
   --  Note: the reason we store the difference as a Uint, instead of storing
1892
   --  the Source_Ptr value directly, is that Source_Ptr values cannot be
1893
   --  distinguished from other types of values, and we count on all general
1894
   --  use fields being self describing. To make things easier for clients,
1895
   --  note that we provide function End_Location, and procedure
1896
   --  Set_End_Location to allow access to the logical value (which is the
1897
   --  Source_Ptr value for the end token).
1898
 
1899
   ---------------------
1900
   -- Syntactic Nodes --
1901
   ---------------------
1902
 
1903
      ---------------------
1904
      -- 2.3  Identifier --
1905
      ---------------------
1906
 
1907
      --  IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1908
      --  LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1909
 
1910
      --  An IDENTIFIER shall not be a reserved word
1911
 
1912
      --  In the Ada grammar identifiers are the bottom level tokens which have
1913
      --  very few semantics. Actual program identifiers are direct names. If
1914
      --  we were being 100% honest with the grammar, then we would have a node
1915
      --  called N_Direct_Name which would point to an identifier. However,
1916
      --  that's too many extra nodes, so we just use the N_Identifier node
1917
      --  directly as a direct name, and it contains the expression fields and
1918
      --  Entity field that correspond to its use as a direct name. In those
1919
      --  few cases where identifiers appear in contexts where they are not
1920
      --  direct names (pragmas, pragma argument associations, attribute
1921
      --  references and attribute definition clauses), the Chars field of the
1922
      --  node contains the Name_Id for the identifier name.
1923
 
1924
      --  Note: in GNAT, a reserved word can be treated as an identifier in two
1925
      --  cases. First, an incorrect use of a reserved word as an identifier is
1926
      --  diagnosed and then treated as a normal identifier. Second, an
1927
      --  attribute designator of the form of a reserved word (access, delta,
1928
      --  digits, range) is treated as an identifier.
1929
 
1930
      --  Note: The set of letters that is permitted in an identifier depends
1931
      --  on the character set in use. See package Csets for full details.
1932
 
1933
      --  N_Identifier
1934
      --  Sloc points to identifier
1935
      --  Chars (Name1) contains the Name_Id for the identifier
1936
      --  Entity (Node4-Sem)
1937
      --  Associated_Node (Node4-Sem)
1938
      --  Original_Discriminant (Node2-Sem)
1939
      --  Redundant_Use (Flag13-Sem)
1940
      --  Atomic_Sync_Required (Flag14-Sem)
1941
      --  Has_Private_View (Flag11-Sem) (set in generic units)
1942
      --  plus fields for expression
1943
 
1944
      --------------------------
1945
      -- 2.4  Numeric Literal --
1946
      --------------------------
1947
 
1948
      --  NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1949
 
1950
      ----------------------------
1951
      -- 2.4.1  Decimal Literal --
1952
      ----------------------------
1953
 
1954
      --  DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1955
 
1956
      --  NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1957
 
1958
      --  EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1959
 
1960
      --  Decimal literals appear in the tree as either integer literal nodes
1961
      --  or real literal nodes, depending on whether a period is present.
1962
 
1963
      --  Note: literal nodes appear as a result of direct use of literals
1964
      --  in the source program, and also as the result of evaluating
1965
      --  expressions at compile time. In the latter case, it is possible
1966
      --  to construct real literals that have no syntactic representation
1967
      --  using the standard literal format. Such literals are listed by
1968
      --  Sprint using the notation [numerator / denominator].
1969
 
1970
      --  Note: the value of an integer literal node created by the front end
1971
      --  is never outside the range of values of the base type. However, it
1972
      --  can be the case that the created value is outside the range of the
1973
      --  particular subtype. This happens in the case of integer overflows
1974
      --  with checks suppressed.
1975
 
1976
      --  N_Integer_Literal
1977
      --  Sloc points to literal
1978
      --  Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1979
      --  has been constant-folded into its literal value.
1980
      --  Intval (Uint3) contains integer value of literal
1981
      --  plus fields for expression
1982
      --  Print_In_Hex (Flag13-Sem)
1983
 
1984
      --  N_Real_Literal
1985
      --  Sloc points to literal
1986
      --  Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1987
      --  has been constant-folded into its literal value.
1988
      --  Realval (Ureal3) contains real value of literal
1989
      --  Corresponding_Integer_Value (Uint4-Sem)
1990
      --  Is_Machine_Number (Flag11-Sem)
1991
      --  plus fields for expression
1992
 
1993
      --------------------------
1994
      -- 2.4.2  Based Literal --
1995
      --------------------------
1996
 
1997
      --  BASED_LITERAL ::=
1998
      --   BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1999
 
2000
      --  BASE ::= NUMERAL
2001
 
2002
      --  BASED_NUMERAL ::=
2003
      --    EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
2004
 
2005
      --  EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
2006
 
2007
      --  Based literals appear in the tree as either integer literal nodes
2008
      --  or real literal nodes, depending on whether a period is present.
2009
 
2010
      ----------------------------
2011
      -- 2.5  Character Literal --
2012
      ----------------------------
2013
 
2014
      --  CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
2015
 
2016
      --  N_Character_Literal
2017
      --  Sloc points to literal
2018
      --  Chars (Name1) contains the Name_Id for the identifier
2019
      --  Char_Literal_Value (Uint2) contains the literal value
2020
      --  Entity (Node4-Sem)
2021
      --  Associated_Node (Node4-Sem)
2022
      --  Has_Private_View (Flag11-Sem) set in generic units.
2023
      --  plus fields for expression
2024
 
2025
      --  Note: the Entity field will be missing (set to Empty) for character
2026
      --  literals whose type is Standard.Wide_Character or Standard.Character
2027
      --  or a type derived from one of these two. In this case the character
2028
      --  literal stands for its own coding. The reason we take this irregular
2029
      --  short cut is to avoid the need to build lots of junk defining
2030
      --  character literal nodes.
2031
 
2032
      -------------------------
2033
      -- 2.6  String Literal --
2034
      -------------------------
2035
 
2036
      --  STRING LITERAL ::= "{STRING_ELEMENT}"
2037
 
2038
      --  A STRING_ELEMENT is either a pair of quotation marks ("), or a
2039
      --  single GRAPHIC_CHARACTER other than a quotation mark.
2040
      --
2041
      --  Is_Folded_In_Parser is True if the parser created this literal by
2042
      --  folding a sequence of "&" operators. For example, if the source code
2043
      --  says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2044
      --  is set. This flag is needed because the parser doesn't know about
2045
      --  visibility, so the folded result might be wrong, and semantic
2046
      --  analysis needs to check for that.
2047
 
2048
      --  N_String_Literal
2049
      --  Sloc points to literal
2050
      --  Strval (Str3) contains Id of string value
2051
      --  Has_Wide_Character (Flag11-Sem)
2052
      --  Has_Wide_Wide_Character (Flag13-Sem)
2053
      --  Is_Folded_In_Parser (Flag4)
2054
      --  plus fields for expression
2055
 
2056
      ------------------
2057
      -- 2.7  Comment --
2058
      ------------------
2059
 
2060
      --  A COMMENT starts with two adjacent hyphens and extends up to the
2061
      --  end of the line. A COMMENT may appear on any line of a program.
2062
 
2063
      --  Comments are skipped by the scanner and do not appear in the tree.
2064
      --  It is possible to reconstruct the position of comments with respect
2065
      --  to the elements of the tree by using the source position (Sloc)
2066
      --  pointers that appear in every tree node.
2067
 
2068
      -----------------
2069
      -- 2.8  Pragma --
2070
      -----------------
2071
 
2072
      --  PRAGMA ::= pragma IDENTIFIER
2073
      --    [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2074
 
2075
      --  Note that a pragma may appear in the tree anywhere a declaration
2076
      --  or a statement may appear, as well as in some other situations
2077
      --  which are explicitly documented.
2078
 
2079
      --  N_Pragma
2080
      --  Sloc points to PRAGMA
2081
      --  Next_Pragma (Node1-Sem)
2082
      --  Pragma_Argument_Associations (List2) (set to No_List if none)
2083
      --  Corresponding_Aspect (Node3-Sem) (set to Empty if not present)
2084
      --  Pragma_Identifier (Node4)
2085
      --  Next_Rep_Item (Node5-Sem)
2086
      --  From_Aspect_Specification (Flag13-Sem)
2087
      --  Is_Delayed_Aspect (Flag14-Sem)
2088
      --  Import_Interface_Present (Flag16-Sem)
2089
      --  Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2090
      --  Class_Present (Flag6) set if from Aspect with 'Class
2091
 
2092
      --  Note: we should have a section on what pragmas are passed on to
2093
      --  the back end to be processed. This section should note that pragma
2094
      --  Psect_Object is always converted to Common_Object, but there are
2095
      --  undoubtedly many other similar notes required ???
2096
 
2097
      --  Note: a utility function Pragma_Name may be applied to pragma nodes
2098
      --  to conveniently obtain the Chars field of the Pragma_Identifier.
2099
 
2100
      --  Note: if From_Aspect_Specification is set, then Sloc points to the
2101
      --  aspect name, as does the Pragma_Identifier. In this case if the
2102
      --  pragma has a local name argument (such as pragma Inline), it is
2103
      --  resolved to point to the specific entity affected by the pragma.
2104
 
2105
      --------------------------------------
2106
      -- 2.8  Pragma Argument Association --
2107
      --------------------------------------
2108
 
2109
      --  PRAGMA_ARGUMENT_ASSOCIATION ::=
2110
      --    [pragma_argument_IDENTIFIER =>] NAME
2111
      --  | [pragma_argument_IDENTIFIER =>] EXPRESSION
2112
 
2113
      --  N_Pragma_Argument_Association
2114
      --  Sloc points to first token in association
2115
      --  Chars (Name1) (set to No_Name if no pragma argument identifier)
2116
      --  Expression (Node3)
2117
 
2118
      ------------------------
2119
      -- 2.9  Reserved Word --
2120
      ------------------------
2121
 
2122
      --  Reserved words are parsed by the scanner, and returned as the
2123
      --  corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2124
 
2125
      ----------------------------
2126
      -- 3.1  Basic Declaration --
2127
      ----------------------------
2128
 
2129
      --  BASIC_DECLARATION ::=
2130
      --    TYPE_DECLARATION          | SUBTYPE_DECLARATION
2131
      --  | OBJECT_DECLARATION        | NUMBER_DECLARATION
2132
      --  | SUBPROGRAM_DECLARATION    | ABSTRACT_SUBPROGRAM_DECLARATION
2133
      --  | PACKAGE_DECLARATION       | RENAMING_DECLARATION
2134
      --  | EXCEPTION_DECLARATION     | GENERIC_DECLARATION
2135
      --  | GENERIC_INSTANTIATION
2136
 
2137
      --  Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2138
      --  see further description in section on semantic nodes.
2139
 
2140
      --  Also, in the tree that is constructed, a pragma may appear
2141
      --  anywhere that a declaration may appear.
2142
 
2143
      ------------------------------
2144
      -- 3.1  Defining Identifier --
2145
      ------------------------------
2146
 
2147
      --  DEFINING_IDENTIFIER ::= IDENTIFIER
2148
 
2149
      --  A defining identifier is an entity, which has additional fields
2150
      --  depending on the setting of the Ekind field. These additional
2151
      --  fields are defined (and access subprograms declared) in package
2152
      --  Einfo.
2153
 
2154
      --  Note: N_Defining_Identifier is an extended node whose fields are
2155
      --  deliberate layed out to match the layout of fields in an ordinary
2156
      --  N_Identifier node allowing for easy alteration of an identifier
2157
      --  node into a defining identifier node. For details, see procedure
2158
      --  Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2159
 
2160
      --  N_Defining_Identifier
2161
      --  Sloc points to identifier
2162
      --  Chars (Name1) contains the Name_Id for the identifier
2163
      --  Next_Entity (Node2-Sem)
2164
      --  Scope (Node3-Sem)
2165
      --  Etype (Node5-Sem)
2166
 
2167
      -----------------------------
2168
      -- 3.2.1  Type Declaration --
2169
      -----------------------------
2170
 
2171
      --  TYPE_DECLARATION ::=
2172
      --    FULL_TYPE_DECLARATION
2173
      --  | INCOMPLETE_TYPE_DECLARATION
2174
      --  | PRIVATE_TYPE_DECLARATION
2175
      --  | PRIVATE_EXTENSION_DECLARATION
2176
 
2177
      ----------------------------------
2178
      -- 3.2.1  Full Type Declaration --
2179
      ----------------------------------
2180
 
2181
      --  FULL_TYPE_DECLARATION ::=
2182
      --    type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2183
      --      is TYPE_DEFINITION
2184
      --        [ASPECT_SPECIFICATIONS];
2185
      --  | TASK_TYPE_DECLARATION
2186
      --  | PROTECTED_TYPE_DECLARATION
2187
 
2188
      --  The full type declaration node is used only for the first case. The
2189
      --  second case (concurrent type declaration), is represented directly
2190
      --  by a task type declaration or a protected type declaration.
2191
 
2192
      --  N_Full_Type_Declaration
2193
      --  Sloc points to TYPE
2194
      --  Defining_Identifier (Node1)
2195
      --  Discriminant_Specifications (List4) (set to No_List if none)
2196
      --  Type_Definition (Node3)
2197
      --  Discr_Check_Funcs_Built (Flag11-Sem)
2198
 
2199
      ----------------------------
2200
      -- 3.2.1  Type Definition --
2201
      ----------------------------
2202
 
2203
      --  TYPE_DEFINITION ::=
2204
      --    ENUMERATION_TYPE_DEFINITION  | INTEGER_TYPE_DEFINITION
2205
      --  | REAL_TYPE_DEFINITION         | ARRAY_TYPE_DEFINITION
2206
      --  | RECORD_TYPE_DEFINITION       | ACCESS_TYPE_DEFINITION
2207
      --  | DERIVED_TYPE_DEFINITION      | INTERFACE_TYPE_DEFINITION
2208
 
2209
      --------------------------------
2210
      -- 3.2.2  Subtype Declaration --
2211
      --------------------------------
2212
 
2213
      --  SUBTYPE_DECLARATION ::=
2214
      --    subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
2215
      --      [ASPECT_SPECIFICATIONS];
2216
 
2217
      --  The subtype indication field is set to Empty for subtypes
2218
      --  declared in package Standard (Positive, Natural).
2219
 
2220
      --  N_Subtype_Declaration
2221
      --  Sloc points to SUBTYPE
2222
      --  Defining_Identifier (Node1)
2223
      --  Null_Exclusion_Present (Flag11)
2224
      --  Subtype_Indication (Node5)
2225
      --  Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2226
      --  Exception_Junk (Flag8-Sem)
2227
      --  Has_Dynamic_Range_Check (Flag12-Sem)
2228
 
2229
      -------------------------------
2230
      -- 3.2.2  Subtype Indication --
2231
      -------------------------------
2232
 
2233
      --  SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2234
 
2235
      --  Note: if no constraint is present, the subtype indication appears
2236
      --  directly in the tree as a subtype mark. The N_Subtype_Indication
2237
      --  node is used only if a constraint is present.
2238
 
2239
      --  Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2240
      --  with the null-exclusion part (see AI-231), we had to introduce a new
2241
      --  attribute in all the parents of subtype_indication nodes to indicate
2242
      --  if the null-exclusion is present.
2243
 
2244
      --  Note: the reason that this node has expression fields is that a
2245
      --  subtype indication can appear as an operand of a membership test.
2246
 
2247
      --  N_Subtype_Indication
2248
      --  Sloc points to first token of subtype mark
2249
      --  Subtype_Mark (Node4)
2250
      --  Constraint (Node3)
2251
      --  Etype (Node5-Sem)
2252
      --  Must_Not_Freeze (Flag8-Sem)
2253
 
2254
      --  Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2255
      --  reason for this redundancy is so that in a list of array index types,
2256
      --  the Etype can be uniformly accessed to determine the subscript type.
2257
      --  This means that no Itype is constructed for the actual subtype that
2258
      --  is created by the subtype indication. If such an Itype is required,
2259
      --  it is constructed in the context in which the indication appears.
2260
 
2261
      -------------------------
2262
      -- 3.2.2  Subtype Mark --
2263
      -------------------------
2264
 
2265
      --  SUBTYPE_MARK ::= subtype_NAME
2266
 
2267
      -----------------------
2268
      -- 3.2.2  Constraint --
2269
      -----------------------
2270
 
2271
      --  CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2272
 
2273
      ------------------------------
2274
      -- 3.2.2  Scalar Constraint --
2275
      ------------------------------
2276
 
2277
      --  SCALAR_CONSTRAINT ::=
2278
      --    RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2279
 
2280
      ---------------------------------
2281
      -- 3.2.2  Composite Constraint --
2282
      ---------------------------------
2283
 
2284
      --  COMPOSITE_CONSTRAINT ::=
2285
      --    INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2286
 
2287
      -------------------------------
2288
      -- 3.3.1  Object Declaration --
2289
      -------------------------------
2290
 
2291
      --  OBJECT_DECLARATION ::=
2292
      --    DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2293
      --      [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2294
      --        [ASPECT_SPECIFICATIONS];
2295
      --  | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2296
      --      ACCESS_DEFINITION [:= EXPRESSION]
2297
      --        [ASPECT_SPECIFICATIONS];
2298
      --  | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2299
      --      ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2300
      --        [ASPECT_SPECIFICATIONS];
2301
      --  | SINGLE_TASK_DECLARATION
2302
      --  | SINGLE_PROTECTED_DECLARATION
2303
 
2304
      --  Note: aliased is not permitted in Ada 83 mode
2305
 
2306
      --  The N_Object_Declaration node is only for the first two cases.
2307
      --  Single task declaration is handled by P_Task (9.1)
2308
      --  Single protected declaration is handled by P_protected (9.5)
2309
 
2310
      --  Although the syntax allows multiple identifiers in the list, the
2311
      --  semantics is as though successive declarations were given with
2312
      --  identical type definition and expression components. To simplify
2313
      --  semantic processing, the parser represents a multiple declaration
2314
      --  case as a sequence of single declarations, using the More_Ids and
2315
      --  Prev_Ids flags to preserve the original source form as described
2316
      --  in the section on "Handling of Defining Identifier Lists".
2317
 
2318
      --  The flag Has_Init_Expression is set if an initializing expression
2319
      --  is present. Normally it is set if and only if Expression contains
2320
      --  a non-empty value, but there is an exception to this. When the
2321
      --  initializing expression is an aggregate which requires explicit
2322
      --  assignments, the Expression field gets set to Empty, but this flag
2323
      --  is still set, so we don't forget we had an initializing expression.
2324
 
2325
      --  Note: if a range check is required for the initialization
2326
      --  expression then the Do_Range_Check flag is set in the Expression,
2327
      --  with the check being done against the type given by the object
2328
      --  definition, which is also the Etype of the defining identifier.
2329
 
2330
      --  Note: the contents of the Expression field must be ignored (i.e.
2331
      --  treated as though it were Empty) if No_Initialization is set True.
2332
 
2333
      --  Note: the back end places some restrictions on the form of the
2334
      --  Expression field. If the object being declared is Atomic, then
2335
      --  the Expression may not have the form of an aggregate (since this
2336
      --  might cause the back end to generate separate assignments). In this
2337
      --  case the front end must generate an extra temporary and initialize
2338
      --  this temporary as required (the temporary itself is not atomic).
2339
 
2340
      --  Note: there is not node kind for object definition. Instead, the
2341
      --  corresponding field holds a subtype indication, an array type
2342
      --  definition, or (Ada 2005, AI-406) an access definition.
2343
 
2344
      --  N_Object_Declaration
2345
      --  Sloc points to first identifier
2346
      --  Defining_Identifier (Node1)
2347
      --  Aliased_Present (Flag4)
2348
      --  Constant_Present (Flag17) set if CONSTANT appears
2349
      --  Null_Exclusion_Present (Flag11)
2350
      --  Object_Definition (Node4) subtype indic./array type def./access def.
2351
      --  Expression (Node3) (set to Empty if not present)
2352
      --  Handler_List_Entry (Node2-Sem)
2353
      --  Corresponding_Generic_Association (Node5-Sem)
2354
      --  More_Ids (Flag5) (set to False if no more identifiers in list)
2355
      --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2356
      --  No_Initialization (Flag13-Sem)
2357
      --  Assignment_OK (Flag15-Sem)
2358
      --  Exception_Junk (Flag8-Sem)
2359
      --  Is_Subprogram_Descriptor (Flag16-Sem)
2360
      --  Has_Init_Expression (Flag14)
2361
      --  Suppress_Assignment_Checks (Flag18-Sem)
2362
 
2363
      -------------------------------------
2364
      -- 3.3.1  Defining Identifier List --
2365
      -------------------------------------
2366
 
2367
      --  DEFINING_IDENTIFIER_LIST ::=
2368
      --    DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2369
 
2370
      -------------------------------
2371
      -- 3.3.2  Number Declaration --
2372
      -------------------------------
2373
 
2374
      --  NUMBER_DECLARATION ::=
2375
      --    DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2376
 
2377
      --  Although the syntax allows multiple identifiers in the list, the
2378
      --  semantics is as though successive declarations were given with
2379
      --  identical expressions. To simplify semantic processing, the parser
2380
      --  represents a multiple declaration case as a sequence of single
2381
      --  declarations, using the More_Ids and Prev_Ids flags to preserve
2382
      --  the original source form as described in the section on "Handling
2383
      --  of Defining Identifier Lists".
2384
 
2385
      --  N_Number_Declaration
2386
      --  Sloc points to first identifier
2387
      --  Defining_Identifier (Node1)
2388
      --  Expression (Node3)
2389
      --  More_Ids (Flag5) (set to False if no more identifiers in list)
2390
      --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2391
 
2392
      ----------------------------------
2393
      -- 3.4  Derived Type Definition --
2394
      ----------------------------------
2395
 
2396
      --  DERIVED_TYPE_DEFINITION ::=
2397
      --    [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2398
      --    [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2399
 
2400
      --  Note: ABSTRACT, LIMITED and record extension part are not permitted
2401
      --  in Ada 83 mode
2402
 
2403
      --  Note: a record extension part is required if ABSTRACT is present
2404
 
2405
      --  N_Derived_Type_Definition
2406
      --  Sloc points to NEW
2407
      --  Abstract_Present (Flag4)
2408
      --  Null_Exclusion_Present (Flag11) (set to False if not present)
2409
      --  Subtype_Indication (Node5)
2410
      --  Record_Extension_Part (Node3) (set to Empty if not present)
2411
      --  Limited_Present (Flag17)
2412
      --  Task_Present (Flag5) set in task interfaces
2413
      --  Protected_Present (Flag6) set in protected interfaces
2414
      --  Synchronized_Present (Flag7) set in interfaces
2415
      --  Interface_List (List2) (set to No_List if none)
2416
      --  Interface_Present (Flag16) set in abstract interfaces
2417
 
2418
      --  Note: Task_Present, Protected_Present, Synchronized_Present,
2419
      --        Interface_List, and Interface_Present are used for abstract
2420
      --        interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2421
 
2422
      ---------------------------
2423
      -- 3.5  Range Constraint --
2424
      ---------------------------
2425
 
2426
      --  RANGE_CONSTRAINT ::= range RANGE
2427
 
2428
      --  N_Range_Constraint
2429
      --  Sloc points to RANGE
2430
      --  Range_Expression (Node4)
2431
 
2432
      ----------------
2433
      -- 3.5  Range --
2434
      ----------------
2435
 
2436
      --  RANGE ::=
2437
      --    RANGE_ATTRIBUTE_REFERENCE
2438
      --  | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2439
 
2440
      --  Note: the case of a range given as a range attribute reference
2441
      --  appears directly in the tree as an attribute reference.
2442
 
2443
      --  Note: the field name for a reference to a range is Range_Expression
2444
      --  rather than Range, because range is a reserved keyword in Ada!
2445
 
2446
      --  Note: the reason that this node has expression fields is that a
2447
      --  range can appear as an operand of a membership test. The Etype
2448
      --  field is the type of the range (we do NOT construct an implicit
2449
      --  subtype to represent the range exactly).
2450
 
2451
      --  N_Range
2452
      --  Sloc points to ..
2453
      --  Low_Bound (Node1)
2454
      --  High_Bound (Node2)
2455
      --  Includes_Infinities (Flag11)
2456
      --  plus fields for expression
2457
 
2458
      --  Note: if the range appears in a context, such as a subtype
2459
      --  declaration, where range checks are required on one or both of
2460
      --  the expression fields, then type conversion nodes are inserted
2461
      --  to represent the required checks.
2462
 
2463
      ----------------------------------------
2464
      -- 3.5.1  Enumeration Type Definition --
2465
      ----------------------------------------
2466
 
2467
      --  ENUMERATION_TYPE_DEFINITION ::=
2468
      --    (ENUMERATION_LITERAL_SPECIFICATION
2469
      --      {, ENUMERATION_LITERAL_SPECIFICATION})
2470
 
2471
      --  Note: the Literals field in the node described below is null for
2472
      --  the case of the standard types CHARACTER and WIDE_CHARACTER, for
2473
      --  which special processing handles these types as special cases.
2474
 
2475
      --  N_Enumeration_Type_Definition
2476
      --  Sloc points to left parenthesis
2477
      --  Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2478
      --  End_Label (Node4) (set to Empty if internally generated record)
2479
 
2480
      ----------------------------------------------
2481
      -- 3.5.1  Enumeration Literal Specification --
2482
      ----------------------------------------------
2483
 
2484
      --  ENUMERATION_LITERAL_SPECIFICATION ::=
2485
      --    DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2486
 
2487
      ---------------------------------------
2488
      -- 3.5.1  Defining Character Literal --
2489
      ---------------------------------------
2490
 
2491
      --  DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2492
 
2493
      --  A defining character literal is an entity, which has additional
2494
      --  fields depending on the setting of the Ekind field. These
2495
      --  additional fields are defined (and access subprograms declared)
2496
      --  in package Einfo.
2497
 
2498
      --  Note: N_Defining_Character_Literal is an extended node whose fields
2499
      --  are deliberate layed out to match the layout of fields in an ordinary
2500
      --  N_Character_Literal node allowing for easy alteration of a character
2501
      --  literal node into a defining character literal node. For details, see
2502
      --  Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2503
 
2504
      --  N_Defining_Character_Literal
2505
      --  Sloc points to literal
2506
      --  Chars (Name1) contains the Name_Id for the identifier
2507
      --  Next_Entity (Node2-Sem)
2508
      --  Scope (Node3-Sem)
2509
      --  Etype (Node5-Sem)
2510
 
2511
      ------------------------------------
2512
      -- 3.5.4  Integer Type Definition --
2513
      ------------------------------------
2514
 
2515
      --  Note: there is an error in this rule in the latest version of the
2516
      --  grammar, so we have retained the old rule pending clarification.
2517
 
2518
      --  INTEGER_TYPE_DEFINITION ::=
2519
      --    SIGNED_INTEGER_TYPE_DEFINITION
2520
      --  | MODULAR_TYPE_DEFINITION
2521
 
2522
      -------------------------------------------
2523
      -- 3.5.4  Signed Integer Type Definition --
2524
      -------------------------------------------
2525
 
2526
      --  SIGNED_INTEGER_TYPE_DEFINITION ::=
2527
      --    range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2528
 
2529
      --  Note: the Low_Bound and High_Bound fields are set to Empty
2530
      --  for integer types defined in package Standard.
2531
 
2532
      --  N_Signed_Integer_Type_Definition
2533
      --  Sloc points to RANGE
2534
      --  Low_Bound (Node1)
2535
      --  High_Bound (Node2)
2536
 
2537
      ------------------------------------
2538
      -- 3.5.4  Modular Type Definition --
2539
      ------------------------------------
2540
 
2541
      --  MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2542
 
2543
      --  N_Modular_Type_Definition
2544
      --  Sloc points to MOD
2545
      --  Expression (Node3)
2546
 
2547
      ---------------------------------
2548
      -- 3.5.6  Real Type Definition --
2549
      ---------------------------------
2550
 
2551
      --  REAL_TYPE_DEFINITION ::=
2552
      --    FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2553
 
2554
      --------------------------------------
2555
      -- 3.5.7  Floating Point Definition --
2556
      --------------------------------------
2557
 
2558
      --  FLOATING_POINT_DEFINITION ::=
2559
      --    digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2560
 
2561
      --  Note: The Digits_Expression and Real_Range_Specifications fields
2562
      --  are set to Empty for floating-point types declared in Standard.
2563
 
2564
      --  N_Floating_Point_Definition
2565
      --  Sloc points to DIGITS
2566
      --  Digits_Expression (Node2)
2567
      --  Real_Range_Specification (Node4) (set to Empty if not present)
2568
 
2569
      -------------------------------------
2570
      -- 3.5.7  Real Range Specification --
2571
      -------------------------------------
2572
 
2573
      --  REAL_RANGE_SPECIFICATION ::=
2574
      --    range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2575
 
2576
      --  N_Real_Range_Specification
2577
      --  Sloc points to RANGE
2578
      --  Low_Bound (Node1)
2579
      --  High_Bound (Node2)
2580
 
2581
      -----------------------------------
2582
      -- 3.5.9  Fixed Point Definition --
2583
      -----------------------------------
2584
 
2585
      --  FIXED_POINT_DEFINITION ::=
2586
      --    ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2587
 
2588
      --------------------------------------------
2589
      -- 3.5.9  Ordinary Fixed Point Definition --
2590
      --------------------------------------------
2591
 
2592
      --  ORDINARY_FIXED_POINT_DEFINITION ::=
2593
      --    delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2594
 
2595
      --  Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2596
 
2597
      --  N_Ordinary_Fixed_Point_Definition
2598
      --  Sloc points to DELTA
2599
      --  Delta_Expression (Node3)
2600
      --  Real_Range_Specification (Node4)
2601
 
2602
      -------------------------------------------
2603
      -- 3.5.9  Decimal Fixed Point Definition --
2604
      -------------------------------------------
2605
 
2606
      --  DECIMAL_FIXED_POINT_DEFINITION ::=
2607
      --    delta static_EXPRESSION
2608
      --      digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2609
 
2610
      --  Note: decimal types are not permitted in Ada 83 mode
2611
 
2612
      --  N_Decimal_Fixed_Point_Definition
2613
      --  Sloc points to DELTA
2614
      --  Delta_Expression (Node3)
2615
      --  Digits_Expression (Node2)
2616
      --  Real_Range_Specification (Node4) (set to Empty if not present)
2617
 
2618
      ------------------------------
2619
      -- 3.5.9  Digits Constraint --
2620
      ------------------------------
2621
 
2622
      --  DIGITS_CONSTRAINT ::=
2623
      --    digits static_EXPRESSION [RANGE_CONSTRAINT]
2624
 
2625
      --  Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2626
      --  Note: in Ada 95, reduced accuracy subtypes are obsolescent
2627
 
2628
      --  N_Digits_Constraint
2629
      --  Sloc points to DIGITS
2630
      --  Digits_Expression (Node2)
2631
      --  Range_Constraint (Node4) (set to Empty if not present)
2632
 
2633
      --------------------------------
2634
      -- 3.6  Array Type Definition --
2635
      --------------------------------
2636
 
2637
      --  ARRAY_TYPE_DEFINITION ::=
2638
      --    UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2639
 
2640
      -----------------------------------------
2641
      -- 3.6  Unconstrained Array Definition --
2642
      -----------------------------------------
2643
 
2644
      --  UNCONSTRAINED_ARRAY_DEFINITION ::=
2645
      --    array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2646
      --      COMPONENT_DEFINITION
2647
 
2648
      --  Note: dimensionality of array is indicated by number of entries in
2649
      --  the Subtype_Marks list, which has one entry for each dimension.
2650
 
2651
      --  N_Unconstrained_Array_Definition
2652
      --  Sloc points to ARRAY
2653
      --  Subtype_Marks (List2)
2654
      --  Component_Definition (Node4)
2655
 
2656
      -----------------------------------
2657
      -- 3.6  Index Subtype Definition --
2658
      -----------------------------------
2659
 
2660
      --  INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2661
 
2662
      --  There is no explicit node in the tree for an index subtype
2663
      --  definition since the N_Unconstrained_Array_Definition node
2664
      --  incorporates the type marks which appear in this context.
2665
 
2666
      ---------------------------------------
2667
      -- 3.6  Constrained Array Definition --
2668
      ---------------------------------------
2669
 
2670
      --  CONSTRAINED_ARRAY_DEFINITION ::=
2671
      --    array (DISCRETE_SUBTYPE_DEFINITION
2672
      --      {, DISCRETE_SUBTYPE_DEFINITION})
2673
      --        of COMPONENT_DEFINITION
2674
 
2675
      --  Note: dimensionality of array is indicated by number of entries
2676
      --  in the Discrete_Subtype_Definitions list, which has one entry
2677
      --  for each dimension.
2678
 
2679
      --  N_Constrained_Array_Definition
2680
      --  Sloc points to ARRAY
2681
      --  Discrete_Subtype_Definitions (List2)
2682
      --  Component_Definition (Node4)
2683
 
2684
      --------------------------------------
2685
      -- 3.6  Discrete Subtype Definition --
2686
      --------------------------------------
2687
 
2688
      --  DISCRETE_SUBTYPE_DEFINITION ::=
2689
      --    discrete_SUBTYPE_INDICATION | RANGE
2690
 
2691
      -------------------------------
2692
      -- 3.6  Component Definition --
2693
      -------------------------------
2694
 
2695
      --  COMPONENT_DEFINITION ::=
2696
      --    [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2697
 
2698
      --  Note: although the syntax does not permit a component definition to
2699
      --  be an anonymous array (and the parser will diagnose such an attempt
2700
      --  with an appropriate message), it is possible for anonymous arrays
2701
      --  to appear as component definitions. The semantics and back end handle
2702
      --  this case properly, and the expander in fact generates such cases.
2703
      --  Access_Definition is an optional field that gives support to
2704
      --  Ada 2005 (AI-230). The parser generates nodes that have either the
2705
      --  Subtype_Indication field or else the Access_Definition field.
2706
 
2707
      --  N_Component_Definition
2708
      --  Sloc points to ALIASED, ACCESS or to first token of subtype mark
2709
      --  Aliased_Present (Flag4)
2710
      --  Null_Exclusion_Present (Flag11)
2711
      --  Subtype_Indication (Node5) (set to Empty if not present)
2712
      --  Access_Definition (Node3) (set to Empty if not present)
2713
 
2714
      -----------------------------
2715
      -- 3.6.1  Index Constraint --
2716
      -----------------------------
2717
 
2718
      --  INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2719
 
2720
      --  It is not in general possible to distinguish between discriminant
2721
      --  constraints and index constraints at parse time, since a simple
2722
      --  name could be either the subtype mark of a discrete range, or an
2723
      --  expression in a discriminant association with no name. Either
2724
      --  entry appears simply as the name, and the semantic parse must
2725
      --  distinguish between the two cases. Thus we use a common tree
2726
      --  node format for both of these constraint types.
2727
 
2728
      --  See Discriminant_Constraint for format of node
2729
 
2730
      ---------------------------
2731
      -- 3.6.1  Discrete Range --
2732
      ---------------------------
2733
 
2734
      --  DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2735
 
2736
      ----------------------------
2737
      -- 3.7  Discriminant Part --
2738
      ----------------------------
2739
 
2740
      --  DISCRIMINANT_PART ::=
2741
      --    UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2742
 
2743
      ------------------------------------
2744
      -- 3.7  Unknown Discriminant Part --
2745
      ------------------------------------
2746
 
2747
      --  UNKNOWN_DISCRIMINANT_PART ::= (<>)
2748
 
2749
      --  Note: unknown discriminant parts are not permitted in Ada 83 mode
2750
 
2751
      --  There is no explicit node in the tree for an unknown discriminant
2752
      --  part. Instead the Unknown_Discriminants_Present flag is set in the
2753
      --  parent node.
2754
 
2755
      ----------------------------------
2756
      -- 3.7  Known Discriminant Part --
2757
      ----------------------------------
2758
 
2759
      --  KNOWN_DISCRIMINANT_PART ::=
2760
      --    (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2761
 
2762
      -------------------------------------
2763
      -- 3.7  Discriminant Specification --
2764
      -------------------------------------
2765
 
2766
      --  DISCRIMINANT_SPECIFICATION ::=
2767
      --    DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2768
      --      [:= DEFAULT_EXPRESSION]
2769
      --  | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2770
      --      [:= DEFAULT_EXPRESSION]
2771
 
2772
      --  Although the syntax allows multiple identifiers in the list, the
2773
      --  semantics is as though successive specifications were given with
2774
      --  identical type definition and expression components. To simplify
2775
      --  semantic processing, the parser represents a multiple declaration
2776
      --  case as a sequence of single specifications, using the More_Ids and
2777
      --  Prev_Ids flags to preserve the original source form as described
2778
      --  in the section on "Handling of Defining Identifier Lists".
2779
 
2780
      --  N_Discriminant_Specification
2781
      --  Sloc points to first identifier
2782
      --  Defining_Identifier (Node1)
2783
      --  Null_Exclusion_Present (Flag11)
2784
      --  Discriminant_Type (Node5) subtype mark or access parameter definition
2785
      --  Expression (Node3) (set to Empty if no default expression)
2786
      --  More_Ids (Flag5) (set to False if no more identifiers in list)
2787
      --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2788
 
2789
      -----------------------------
2790
      -- 3.7  Default Expression --
2791
      -----------------------------
2792
 
2793
      --  DEFAULT_EXPRESSION ::= EXPRESSION
2794
 
2795
      ------------------------------------
2796
      -- 3.7.1  Discriminant Constraint --
2797
      ------------------------------------
2798
 
2799
      --  DISCRIMINANT_CONSTRAINT ::=
2800
      --    (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2801
 
2802
      --  It is not in general possible to distinguish between discriminant
2803
      --  constraints and index constraints at parse time, since a simple
2804
      --  name could be either the subtype mark of a discrete range, or an
2805
      --  expression in a discriminant association with no name. Either
2806
      --  entry appears simply as the name, and the semantic parse must
2807
      --  distinguish between the two cases. Thus we use a common tree
2808
      --  node format for both of these constraint types.
2809
 
2810
      --  N_Index_Or_Discriminant_Constraint
2811
      --  Sloc points to left paren
2812
      --  Constraints (List1) points to list of discrete ranges or
2813
      --    discriminant associations
2814
 
2815
      -------------------------------------
2816
      -- 3.7.1  Discriminant Association --
2817
      -------------------------------------
2818
 
2819
      --  DISCRIMINANT_ASSOCIATION ::=
2820
      --    [discriminant_SELECTOR_NAME
2821
      --      {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2822
 
2823
      --  Note: a discriminant association that has no selector name list
2824
      --  appears directly as an expression in the tree.
2825
 
2826
      --  N_Discriminant_Association
2827
      --  Sloc points to first token of discriminant association
2828
      --  Selector_Names (List1) (always non-empty, since if no selector
2829
      --   names are present, this node is not used, see comment above)
2830
      --  Expression (Node3)
2831
 
2832
      ---------------------------------
2833
      -- 3.8  Record Type Definition --
2834
      ---------------------------------
2835
 
2836
      --  RECORD_TYPE_DEFINITION ::=
2837
      --    [[abstract] tagged] [limited] RECORD_DEFINITION
2838
 
2839
      --  Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2840
 
2841
      --  There is no explicit node in the tree for a record type definition.
2842
      --  Instead the flags for Tagged_Present and Limited_Present appear in
2843
      --  the N_Record_Definition node for a record definition appearing in
2844
      --  the context of a record type definition.
2845
 
2846
      ----------------------------
2847
      -- 3.8  Record Definition --
2848
      ----------------------------
2849
 
2850
      --  RECORD_DEFINITION ::=
2851
      --    record
2852
      --      COMPONENT_LIST
2853
      --    end record
2854
      --  | null record
2855
 
2856
      --  Note: the Abstract_Present, Tagged_Present and Limited_Present
2857
      --  flags appear only for a record definition appearing in a record
2858
      --  type definition.
2859
 
2860
      --  Note: the NULL RECORD case is not permitted in Ada 83
2861
 
2862
      --  N_Record_Definition
2863
      --  Sloc points to RECORD or NULL
2864
      --  End_Label (Node4) (set to Empty if internally generated record)
2865
      --  Abstract_Present (Flag4)
2866
      --  Tagged_Present (Flag15)
2867
      --  Limited_Present (Flag17)
2868
      --  Component_List (Node1) empty in null record case
2869
      --  Null_Present (Flag13) set in null record case
2870
      --  Task_Present (Flag5) set in task interfaces
2871
      --  Protected_Present (Flag6) set in protected interfaces
2872
      --  Synchronized_Present (Flag7) set in interfaces
2873
      --  Interface_Present (Flag16) set in abstract interfaces
2874
      --  Interface_List (List2) (set to No_List if none)
2875
 
2876
      --  Note: Task_Present, Protected_Present, Synchronized _Present,
2877
      --        Interface_List and Interface_Present are used for abstract
2878
      --        interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2879
 
2880
      -------------------------
2881
      -- 3.8  Component List --
2882
      -------------------------
2883
 
2884
      --  COMPONENT_LIST ::=
2885
      --    COMPONENT_ITEM {COMPONENT_ITEM}
2886
      --  | {COMPONENT_ITEM} VARIANT_PART
2887
      --  | null;
2888
 
2889
      --  N_Component_List
2890
      --  Sloc points to first token of component list
2891
      --  Component_Items (List3)
2892
      --  Variant_Part (Node4) (set to Empty if no variant part)
2893
      --  Null_Present (Flag13)
2894
 
2895
      -------------------------
2896
      -- 3.8  Component Item --
2897
      -------------------------
2898
 
2899
      --  COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2900
 
2901
      --  Note: A component item can also be a pragma, and in the tree
2902
      --  that is obtained after semantic processing, a component item
2903
      --  can be an N_Null node resulting from a non-recognized pragma.
2904
 
2905
      --------------------------------
2906
      -- 3.8  Component Declaration --
2907
      --------------------------------
2908
 
2909
      --  COMPONENT_DECLARATION ::=
2910
      --    DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2911
      --      [:= DEFAULT_EXPRESSION]
2912
      --        [ASPECT_SPECIFICATIONS];
2913
 
2914
      --  Note: although the syntax does not permit a component definition to
2915
      --  be an anonymous array (and the parser will diagnose such an attempt
2916
      --  with an appropriate message), it is possible for anonymous arrays
2917
      --  to appear as component definitions. The semantics and back end handle
2918
      --  this case properly, and the expander in fact generates such cases.
2919
 
2920
      --  Although the syntax allows multiple identifiers in the list, the
2921
      --  semantics is as though successive declarations were given with the
2922
      --  same component definition and expression components. To simplify
2923
      --  semantic processing, the parser represents a multiple declaration
2924
      --  case as a sequence of single declarations, using the More_Ids and
2925
      --  Prev_Ids flags to preserve the original source form as described
2926
      --  in the section on "Handling of Defining Identifier Lists".
2927
 
2928
      --  N_Component_Declaration
2929
      --  Sloc points to first identifier
2930
      --  Defining_Identifier (Node1)
2931
      --  Component_Definition (Node4)
2932
      --  Expression (Node3) (set to Empty if no default expression)
2933
      --  More_Ids (Flag5) (set to False if no more identifiers in list)
2934
      --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2935
 
2936
      -------------------------
2937
      -- 3.8.1  Variant Part --
2938
      -------------------------
2939
 
2940
      --  VARIANT_PART ::=
2941
      --    case discriminant_DIRECT_NAME is
2942
      --      VARIANT
2943
      --      {VARIANT}
2944
      --    end case;
2945
 
2946
      --  Note: the variants list can contain pragmas as well as variants.
2947
      --  In a properly formed program there is at least one variant.
2948
 
2949
      --  N_Variant_Part
2950
      --  Sloc points to CASE
2951
      --  Name (Node2)
2952
      --  Variants (List1)
2953
 
2954
      --------------------
2955
      -- 3.8.1  Variant --
2956
      --------------------
2957
 
2958
      --  VARIANT ::=
2959
      --    when DISCRETE_CHOICE_LIST =>
2960
      --      COMPONENT_LIST
2961
 
2962
      --  N_Variant
2963
      --  Sloc points to WHEN
2964
      --  Discrete_Choices (List4)
2965
      --  Component_List (Node1)
2966
      --  Enclosing_Variant (Node2-Sem)
2967
      --  Present_Expr (Uint3-Sem)
2968
      --  Dcheck_Function (Node5-Sem)
2969
 
2970
      ---------------------------------
2971
      -- 3.8.1  Discrete Choice List --
2972
      ---------------------------------
2973
 
2974
      --  DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2975
 
2976
      ----------------------------
2977
      -- 3.8.1  Discrete Choice --
2978
      ----------------------------
2979
 
2980
      --  DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2981
 
2982
      --  Note: in Ada 83 mode, the expression must be a simple expression
2983
 
2984
      --  The only choice that appears explicitly is the OTHERS choice, as
2985
      --  defined here. Other cases of discrete choice (expression and
2986
      --  discrete range) appear directly. This production is also used
2987
      --  for the OTHERS possibility of an exception choice.
2988
 
2989
      --  Note: in accordance with the syntax, the parser does not check that
2990
      --  OTHERS appears at the end on its own in a choice list context. This
2991
      --  is a semantic check.
2992
 
2993
      --  N_Others_Choice
2994
      --  Sloc points to OTHERS
2995
      --  Others_Discrete_Choices (List1-Sem)
2996
      --  All_Others (Flag11-Sem)
2997
 
2998
      ----------------------------------
2999
      -- 3.9.1  Record Extension Part --
3000
      ----------------------------------
3001
 
3002
      --  RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
3003
 
3004
      --  Note: record extension parts are not permitted in Ada 83 mode
3005
 
3006
      --------------------------------------
3007
      -- 3.9.4  Interface Type Definition --
3008
      --------------------------------------
3009
 
3010
      --  INTERFACE_TYPE_DEFINITION ::=
3011
      --    [limited | task | protected | synchronized]
3012
      --    interface [interface_list]
3013
 
3014
      --  Note: Interfaces are implemented with N_Record_Definition and
3015
      --        N_Derived_Type_Definition nodes because most of the support
3016
      --        for the analysis of abstract types has been reused to
3017
      --        analyze abstract interfaces.
3018
 
3019
      ----------------------------------
3020
      -- 3.10  Access Type Definition --
3021
      ----------------------------------
3022
 
3023
      --  ACCESS_TYPE_DEFINITION ::=
3024
      --    ACCESS_TO_OBJECT_DEFINITION
3025
      --  | ACCESS_TO_SUBPROGRAM_DEFINITION
3026
 
3027
      --------------------------
3028
      -- 3.10  Null Exclusion --
3029
      --------------------------
3030
 
3031
      --  NULL_EXCLUSION ::= not null
3032
 
3033
      ---------------------------------------
3034
      -- 3.10  Access To Object Definition --
3035
      ---------------------------------------
3036
 
3037
      --  ACCESS_TO_OBJECT_DEFINITION ::=
3038
      --    [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3039
      --    SUBTYPE_INDICATION
3040
 
3041
      --  N_Access_To_Object_Definition
3042
      --  Sloc points to ACCESS
3043
      --  All_Present (Flag15)
3044
      --  Null_Exclusion_Present (Flag11)
3045
      --  Subtype_Indication (Node5)
3046
      --  Constant_Present (Flag17)
3047
 
3048
      -----------------------------------
3049
      -- 3.10  General Access Modifier --
3050
      -----------------------------------
3051
 
3052
      --  GENERAL_ACCESS_MODIFIER ::= all | constant
3053
 
3054
      --  Note: general access modifiers are not permitted in Ada 83 mode
3055
 
3056
      --  There is no explicit node in the tree for general access modifier.
3057
      --  Instead the All_Present or Constant_Present flags are set in the
3058
      --  parent node.
3059
 
3060
      -------------------------------------------
3061
      -- 3.10  Access To Subprogram Definition --
3062
      -------------------------------------------
3063
 
3064
      --  ACCESS_TO_SUBPROGRAM_DEFINITION
3065
      --    [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3066
      --  | [NULL_EXCLUSION] access [protected] function
3067
      --    PARAMETER_AND_RESULT_PROFILE
3068
 
3069
      --  Note: access to subprograms are not permitted in Ada 83 mode
3070
 
3071
      --  N_Access_Function_Definition
3072
      --  Sloc points to ACCESS
3073
      --  Null_Exclusion_Present (Flag11)
3074
      --  Null_Exclusion_In_Return_Present (Flag14)
3075
      --  Protected_Present (Flag6)
3076
      --  Parameter_Specifications (List3) (set to No_List if no formal part)
3077
      --  Result_Definition (Node4) result subtype (subtype mark or access def)
3078
 
3079
      --  N_Access_Procedure_Definition
3080
      --  Sloc points to ACCESS
3081
      --  Null_Exclusion_Present (Flag11)
3082
      --  Protected_Present (Flag6)
3083
      --  Parameter_Specifications (List3) (set to No_List if no formal part)
3084
 
3085
      -----------------------------
3086
      -- 3.10  Access Definition --
3087
      -----------------------------
3088
 
3089
      --  ACCESS_DEFINITION ::=
3090
      --    [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3091
      --  | ACCESS_TO_SUBPROGRAM_DEFINITION
3092
 
3093
      --  Note: access to subprograms are an Ada 2005 (AI-254) extension
3094
 
3095
      --  N_Access_Definition
3096
      --  Sloc points to ACCESS
3097
      --  Null_Exclusion_Present (Flag11)
3098
      --  All_Present (Flag15)
3099
      --  Constant_Present (Flag17)
3100
      --  Subtype_Mark (Node4)
3101
      --  Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3102
 
3103
      -----------------------------------------
3104
      -- 3.10.1  Incomplete Type Declaration --
3105
      -----------------------------------------
3106
 
3107
      --  INCOMPLETE_TYPE_DECLARATION ::=
3108
      --    type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3109
 
3110
      --  N_Incomplete_Type_Declaration
3111
      --  Sloc points to TYPE
3112
      --  Defining_Identifier (Node1)
3113
      --  Discriminant_Specifications (List4) (set to No_List if no
3114
      --   discriminant part, or if the discriminant part is an
3115
      --   unknown discriminant part)
3116
      --  Premature_Use (Node5-Sem) used for improved diagnostics.
3117
      --  Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3118
      --  Tagged_Present (Flag15)
3119
 
3120
      ----------------------------
3121
      -- 3.11  Declarative Part --
3122
      ----------------------------
3123
 
3124
      --  DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3125
 
3126
      --  Note: although the parser enforces the syntactic requirement that
3127
      --  a declarative part can contain only declarations, the semantic
3128
      --  processing may add statements to the list of actions in a
3129
      --  declarative part, so the code generator should be prepared
3130
      --  to accept a statement in this position.
3131
 
3132
      ----------------------------
3133
      -- 3.11  Declarative Item --
3134
      ----------------------------
3135
 
3136
      --  DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3137
 
3138
      ----------------------------------
3139
      -- 3.11  Basic Declarative Item --
3140
      ----------------------------------
3141
 
3142
      --  BASIC_DECLARATIVE_ITEM ::=
3143
      --    BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3144
 
3145
      ----------------
3146
      -- 3.11  Body --
3147
      ----------------
3148
 
3149
      --  BODY ::= PROPER_BODY | BODY_STUB
3150
 
3151
      -----------------------
3152
      -- 3.11  Proper Body --
3153
      -----------------------
3154
 
3155
      --  PROPER_BODY ::=
3156
      --    SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3157
 
3158
      ---------------
3159
      -- 4.1  Name --
3160
      ---------------
3161
 
3162
      --  NAME ::=
3163
      --    DIRECT_NAME        | EXPLICIT_DEREFERENCE
3164
      --  | INDEXED_COMPONENT  | SLICE
3165
      --  | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3166
      --  | TYPE_CONVERSION    | FUNCTION_CALL
3167
      --  | CHARACTER_LITERAL
3168
 
3169
      ----------------------
3170
      -- 4.1  Direct Name --
3171
      ----------------------
3172
 
3173
      --  DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3174
 
3175
      -----------------
3176
      -- 4.1  Prefix --
3177
      -----------------
3178
 
3179
      --  PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3180
 
3181
      -------------------------------
3182
      -- 4.1  Explicit Dereference --
3183
      -------------------------------
3184
 
3185
      --  EXPLICIT_DEREFERENCE ::= NAME . all
3186
 
3187
      --  N_Explicit_Dereference
3188
      --  Sloc points to ALL
3189
      --  Prefix (Node3)
3190
      --  Actual_Designated_Subtype (Node4-Sem)
3191
      --  Atomic_Sync_Required (Flag14-Sem)
3192
      --  plus fields for expression
3193
 
3194
      -------------------------------
3195
      -- 4.1  Implicit Dereference --
3196
      -------------------------------
3197
 
3198
      --  IMPLICIT_DEREFERENCE ::= NAME
3199
 
3200
      ------------------------------
3201
      -- 4.1.1  Indexed Component --
3202
      ------------------------------
3203
 
3204
      --  INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3205
 
3206
      --  Note: the parser may generate this node in some situations where it
3207
      --  should be a function call. The semantic  pass must correct this
3208
      --  misidentification (which is inevitable at the parser level).
3209
 
3210
      --  N_Indexed_Component
3211
      --  Sloc contains a copy of the Sloc value of the Prefix
3212
      --  Prefix (Node3)
3213
      --  Expressions (List1)
3214
      --  Atomic_Sync_Required (Flag14-Sem)
3215
      --  plus fields for expression
3216
 
3217
      --  Note: if any of the subscripts requires a range check, then the
3218
      --  Do_Range_Check flag is set on the corresponding expression, with
3219
      --  the index type being determined from the type of the Prefix, which
3220
      --  references the array being indexed.
3221
 
3222
      --  Note: in a fully analyzed and expanded indexed component node, and
3223
      --  hence in any such node that gigi sees, if the prefix is an access
3224
      --  type, then an explicit dereference operation has been inserted.
3225
 
3226
      ------------------
3227
      -- 4.1.2  Slice --
3228
      ------------------
3229
 
3230
      --  SLICE ::= PREFIX (DISCRETE_RANGE)
3231
 
3232
      --  Note: an implicit subtype is created to describe the resulting
3233
      --  type, so that the bounds of this type are the bounds of the slice.
3234
 
3235
      --  N_Slice
3236
      --  Sloc points to first token of prefix
3237
      --  Prefix (Node3)
3238
      --  Discrete_Range (Node4)
3239
      --  plus fields for expression
3240
 
3241
      -------------------------------
3242
      -- 4.1.3  Selected Component --
3243
      -------------------------------
3244
 
3245
      --  SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3246
 
3247
      --  Note: selected components that are semantically expanded names get
3248
      --  changed during semantic processing into the separate N_Expanded_Name
3249
      --  node. See description of this node in the section on semantic nodes.
3250
 
3251
      --  N_Selected_Component
3252
      --  Sloc points to period
3253
      --  Prefix (Node3)
3254
      --  Selector_Name (Node2)
3255
      --  Associated_Node (Node4-Sem)
3256
      --  Do_Discriminant_Check (Flag13-Sem)
3257
      --  Is_In_Discriminant_Check (Flag11-Sem)
3258
      --  Is_Prefixed_Call (Flag17-Sem)
3259
      --  Atomic_Sync_Required (Flag14-Sem)
3260
      --  plus fields for expression
3261
 
3262
      --------------------------
3263
      -- 4.1.3  Selector Name --
3264
      --------------------------
3265
 
3266
      --  SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3267
 
3268
      --------------------------------
3269
      -- 4.1.4  Attribute Reference --
3270
      --------------------------------
3271
 
3272
      --  ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3273
 
3274
      --  Note: the syntax is quite ambiguous at this point. Consider:
3275
 
3276
      --    A'Length (X)  X is part of the attribute designator
3277
      --    A'Pos (X)     X is an explicit actual parameter of function A'Pos
3278
      --    A'Class (X)   X is the expression of a type conversion
3279
 
3280
      --  It would be possible for the parser to distinguish these cases
3281
      --  by looking at the attribute identifier. However, that would mean
3282
      --  more work in introducing new implementation defined attributes,
3283
      --  and also it would mean that special processing for attributes
3284
      --  would be scattered around, instead of being centralized in the
3285
      --  semantic routine that handles an N_Attribute_Reference node.
3286
      --  Consequently, the parser in all the above cases stores the
3287
      --  expression (X in these examples) as a single element list in
3288
      --  in the Expressions field of the N_Attribute_Reference node.
3289
 
3290
      --  Similarly, for attributes like Max which take two arguments,
3291
      --  we store the two arguments as a two element list in the
3292
      --  Expressions field. Of course it is clear at parse time that
3293
      --  this case is really a function call with an attribute as the
3294
      --  prefix, but it turns out to be convenient to handle the two
3295
      --  argument case in a similar manner to the one argument case,
3296
      --  and indeed in general the parser will accept any number of
3297
      --  expressions in this position and store them as a list in the
3298
      --  attribute reference node. This allows for future addition of
3299
      --  attributes that take more than two arguments.
3300
 
3301
      --  Note: named associates are not permitted in function calls where
3302
      --  the function is an attribute (see RM 6.4(3)) so it is legitimate
3303
      --  to skip the normal subprogram argument processing.
3304
 
3305
      --  Note: for the attributes whose designators are technically keywords,
3306
      --  i.e. digits, access, delta, range, the Attribute_Name field contains
3307
      --  the corresponding name, even though no identifier is involved.
3308
 
3309
      --  Note: the generated code may contain stream attributes applied to
3310
      --  limited types for which no stream routines exist officially. In such
3311
      --  case, the result is to use the stream attribute for the underlying
3312
      --  full type, or in the case of a protected type, the components
3313
      --  (including any discriminants) are merely streamed in order.
3314
 
3315
      --  See Exp_Attr for a complete description of which attributes are
3316
      --  passed onto Gigi, and which are handled entirely by the front end.
3317
 
3318
      --  Gigi restriction: For the Pos attribute, the prefix cannot be
3319
      --  a non-standard enumeration type or a nonzero/zero semantics
3320
      --  boolean type, so the value is simply the stored representation.
3321
 
3322
      --  Gigi requirement: For the Mechanism_Code attribute, if the prefix
3323
      --  references a subprogram that is a renaming, then the front end must
3324
      --  rewrite the attribute to refer directly to the renamed entity.
3325
 
3326
      --  Note: In generated code, the Address and Unrestricted_Access
3327
      --  attributes can be applied to any expression, and the meaning is
3328
      --  to create an object containing the value (the object is in the
3329
      --  current stack frame), and pass the address of this value. If the
3330
      --  Must_Be_Byte_Aligned flag is set, then the object whose address
3331
      --  is taken must be on a byte (storage unit) boundary, and if it is
3332
      --  not (or may not be), then the generated code must create a copy
3333
      --  that is byte aligned, and pass the address of this copy.
3334
 
3335
      --  N_Attribute_Reference
3336
      --  Sloc points to apostrophe
3337
      --  Prefix (Node3)
3338
      --  Attribute_Name (Name2) identifier name from attribute designator
3339
      --  Expressions (List1) (set to No_List if no associated expressions)
3340
      --  Entity (Node4-Sem) used if the attribute yields a type
3341
      --  Associated_Node (Node4-Sem)
3342
      --  Do_Overflow_Check (Flag17-Sem)
3343
      --  Header_Size_Added (Flag11-Sem)
3344
      --  Redundant_Use (Flag13-Sem)
3345
      --  Must_Be_Byte_Aligned (Flag14)
3346
      --  plus fields for expression
3347
 
3348
      ---------------------------------
3349
      -- 4.1.4  Attribute Designator --
3350
      ---------------------------------
3351
 
3352
      --  ATTRIBUTE_DESIGNATOR ::=
3353
      --    IDENTIFIER [(static_EXPRESSION)]
3354
      --  | access | delta | digits
3355
 
3356
      --  There is no explicit node in the tree for an attribute designator.
3357
      --  Instead the Attribute_Name and Expressions fields of the parent
3358
      --  node (N_Attribute_Reference node) hold the information.
3359
 
3360
      --  Note: if ACCESS, DELTA or DIGITS appears in an attribute
3361
      --  designator, then they are treated as identifiers internally
3362
      --  rather than the keywords of the same name.
3363
 
3364
      --------------------------------------
3365
      -- 4.1.4  Range Attribute Reference --
3366
      --------------------------------------
3367
 
3368
      --  RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3369
 
3370
      --  A range attribute reference is represented in the tree using the
3371
      --  normal N_Attribute_Reference node.
3372
 
3373
      ---------------------------------------
3374
      -- 4.1.4  Range Attribute Designator --
3375
      ---------------------------------------
3376
 
3377
      --  RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3378
 
3379
      --  A range attribute designator is represented in the tree using the
3380
      --  normal N_Attribute_Reference node.
3381
 
3382
      --------------------
3383
      -- 4.3  Aggregate --
3384
      --------------------
3385
 
3386
      --  AGGREGATE ::=
3387
      --    RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3388
 
3389
      -----------------------------
3390
      -- 4.3.1  Record Aggregate --
3391
      -----------------------------
3392
 
3393
      --  RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3394
 
3395
      --  N_Aggregate
3396
      --  Sloc points to left parenthesis
3397
      --  Expressions (List1) (set to No_List if none or null record case)
3398
      --  Component_Associations (List2) (set to No_List if none)
3399
      --  Null_Record_Present (Flag17)
3400
      --  Aggregate_Bounds (Node3-Sem)
3401
      --  Associated_Node (Node4-Sem)
3402
      --  Static_Processing_OK (Flag4-Sem)
3403
      --  Compile_Time_Known_Aggregate (Flag18-Sem)
3404
      --  Expansion_Delayed (Flag11-Sem)
3405
      --  Has_Self_Reference (Flag13-Sem)
3406
      --  plus fields for expression
3407
 
3408
      --  Note: this structure is used for both record and array aggregates
3409
      --  since the two cases are not separable by the parser. The parser
3410
      --  makes no attempt to enforce consistency here, so it is up to the
3411
      --  semantic phase to make sure that the aggregate is consistent (i.e.
3412
      --  that it is not a "half-and-half" case that mixes record and array
3413
      --  syntax. In particular, for a record aggregate, the expressions
3414
      --  field will be set if there are positional associations.
3415
 
3416
      --  Note: N_Aggregate is not used for all aggregates; in particular,
3417
      --  there is a separate node kind for extension aggregates.
3418
 
3419
      --  Note: gigi/gcc can handle array aggregates correctly providing that
3420
      --  they are entirely positional, and the array subtype involved has a
3421
      --  known at compile time length and is not bit packed, or a convention
3422
      --  Fortran array with more than one dimension. If these conditions
3423
      --  are not met, then the front end must translate the aggregate into
3424
      --  an appropriate set of assignments into a temporary.
3425
 
3426
      --  Note: for the record aggregate case, gigi/gcc can handle all cases of
3427
      --  record aggregates, including those for packed, and rep-claused
3428
      --  records, and also variant records, providing that there are no
3429
      --  variable length fields whose size is not known at compile time, and
3430
      --  providing that the aggregate is presented in fully named form.
3431
 
3432
      ----------------------------------------------
3433
      -- 4.3.1  Record Component Association List --
3434
      ----------------------------------------------
3435
 
3436
      --  RECORD_COMPONENT_ASSOCIATION_LIST ::=
3437
      --     RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3438
      --   | null record
3439
 
3440
      --  There is no explicit node in the tree for a record component
3441
      --  association list. Instead the Null_Record_Present flag is set in
3442
      --  the parent node for the NULL RECORD case.
3443
 
3444
      ------------------------------------------------------
3445
      -- 4.3.1  Record Component Association (also 4.3.3) --
3446
      ------------------------------------------------------
3447
 
3448
      --  RECORD_COMPONENT_ASSOCIATION ::=
3449
      --    [COMPONENT_CHOICE_LIST =>] EXPRESSION
3450
 
3451
      --  N_Component_Association
3452
      --  Sloc points to first selector name
3453
      --  Choices (List1)
3454
      --  Loop_Actions (List2-Sem)
3455
      --  Expression (Node3)
3456
      --  Box_Present (Flag15)
3457
      --  Inherited_Discriminant (Flag13)
3458
 
3459
      --  Note: this structure is used for both record component associations
3460
      --  and array component associations, since the two cases aren't always
3461
      --  separable by the parser. The choices list may represent either a
3462
      --  list of selector names in the record aggregate case, or a list of
3463
      --  discrete choices in the array aggregate case or an N_Others_Choice
3464
      --  node (which appears as a singleton list). Box_Present gives support
3465
      --  to Ada 2005 (AI-287).
3466
 
3467
      ----------------------------------
3468
      -- 4.3.1  Component Choice List --
3469
      ----------------------------------
3470
 
3471
      --  COMPONENT_CHOICE_LIST ::=
3472
      --    component_SELECTOR_NAME {| component_SELECTOR_NAME}
3473
      --  | others
3474
 
3475
      --  The entries of a component choice list appear in the Choices list of
3476
      --  the associated N_Component_Association, as either selector names, or
3477
      --  as an N_Others_Choice node.
3478
 
3479
      --------------------------------
3480
      -- 4.3.2  Extension Aggregate --
3481
      --------------------------------
3482
 
3483
      --  EXTENSION_AGGREGATE ::=
3484
      --    (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3485
 
3486
      --  Note: extension aggregates are not permitted in Ada 83 mode
3487
 
3488
      --  N_Extension_Aggregate
3489
      --  Sloc points to left parenthesis
3490
      --  Ancestor_Part (Node3)
3491
      --  Associated_Node (Node4-Sem)
3492
      --  Expressions (List1) (set to No_List if none or null record case)
3493
      --  Component_Associations (List2) (set to No_List if none)
3494
      --  Null_Record_Present (Flag17)
3495
      --  Expansion_Delayed (Flag11-Sem)
3496
      --  Has_Self_Reference (Flag13-Sem)
3497
      --  plus fields for expression
3498
 
3499
      --------------------------
3500
      -- 4.3.2  Ancestor Part --
3501
      --------------------------
3502
 
3503
      --  ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3504
 
3505
      ----------------------------
3506
      -- 4.3.3  Array Aggregate --
3507
      ----------------------------
3508
 
3509
      --  ARRAY_AGGREGATE ::=
3510
      --    POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3511
 
3512
      ---------------------------------------
3513
      -- 4.3.3  Positional Array Aggregate --
3514
      ---------------------------------------
3515
 
3516
      --  POSITIONAL_ARRAY_AGGREGATE ::=
3517
      --    (EXPRESSION, EXPRESSION {, EXPRESSION})
3518
      --  | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3519
 
3520
      --  See Record_Aggregate (4.3.1) for node structure
3521
 
3522
      ----------------------------------
3523
      -- 4.3.3  Named Array Aggregate --
3524
      ----------------------------------
3525
 
3526
      --  NAMED_ARRAY_AGGREGATE ::=
3527
      --  | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3528
 
3529
      --  See Record_Aggregate (4.3.1) for node structure
3530
 
3531
      ----------------------------------------
3532
      -- 4.3.3  Array Component Association --
3533
      ----------------------------------------
3534
 
3535
      --  ARRAY_COMPONENT_ASSOCIATION ::=
3536
      --    DISCRETE_CHOICE_LIST => EXPRESSION
3537
 
3538
      --  See Record_Component_Association (4.3.1) for node structure
3539
 
3540
      --------------------------------------------------
3541
      -- 4.4  Expression/Relation/Term/Factor/Primary --
3542
      --------------------------------------------------
3543
 
3544
      --  EXPRESSION ::=
3545
      --    RELATION {LOGICAL_OPERATOR RELATION}
3546
 
3547
      --  CHOICE_EXPRESSION ::=
3548
      --    CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
3549
 
3550
      --  CHOICE_RELATION ::=
3551
      --    SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3552
 
3553
      --  RELATION ::=
3554
      --    SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
3555
 
3556
      --  MEMBERSHIP_CHOICE_LIST ::=
3557
      --    MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
3558
 
3559
      --  MEMBERSHIP_CHOICE ::=
3560
      --    CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
3561
 
3562
      --  LOGICAL_OPERATOR ::= and | and then | or | or else | xor
3563
 
3564
      --  SIMPLE_EXPRESSION ::=
3565
      --    [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3566
 
3567
      --  TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3568
 
3569
      --  FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3570
 
3571
      --  No nodes are generated for any of these constructs. Instead, the
3572
      --  node for the operator appears directly. When we refer to an
3573
      --  expression in this description, we mean any of the possible
3574
      --  constituent components of an expression (e.g. identifier is
3575
      --  an example of an expression).
3576
 
3577
      --  Note: the above syntax is that Ada 2012 syntax which restricts
3578
      --  choice relations to simple expressions to avoid ambiguities in
3579
      --  some contexts with set membership notation. It has been decided
3580
      --  that in retrospect, the Ada 95 change allowing general expressions
3581
      --  in this context was a mistake, so we have reverted to the above
3582
      --  syntax in Ada 95 and Ada 2005 modes (the restriction to simple
3583
      --  expressions was there in Ada 83 from the start).
3584
 
3585
      ------------------
3586
      -- 4.4  Primary --
3587
      ------------------
3588
 
3589
      --  PRIMARY ::=
3590
      --    NUMERIC_LITERAL  | null
3591
      --  | STRING_LITERAL   | AGGREGATE
3592
      --  | NAME             | QUALIFIED_EXPRESSION
3593
      --  | ALLOCATOR        | (EXPRESSION)
3594
 
3595
      --  Usually there is no explicit node in the tree for primary. Instead
3596
      --  the constituent (e.g. AGGREGATE) appears directly. There are two
3597
      --  exceptions. First, there is an explicit node for a null primary.
3598
 
3599
      --  N_Null
3600
      --  Sloc points to NULL
3601
      --  plus fields for expression
3602
 
3603
      --  Second, the case of (EXPRESSION) is handled specially. Ada requires
3604
      --  that the parser keep track of which subexpressions are enclosed
3605
      --  in parentheses, and how many levels of parentheses are used. This
3606
      --  information is required for optimization purposes, and also for
3607
      --  some semantic checks (e.g. (((1))) in a procedure spec does not
3608
      --  conform with ((((1)))) in the body).
3609
 
3610
      --  The parentheses are recorded by keeping a Paren_Count field in every
3611
      --  subexpression node (it is actually present in all nodes, but only
3612
      --  used in subexpression nodes). This count records the number of
3613
      --  levels of parentheses. If the number of levels in the source exceeds
3614
      --  the maximum accommodated by this count, then the count is simply left
3615
      --  at the maximum value. This means that there are some pathological
3616
      --  cases of failure to detect conformance failures (e.g. an expression
3617
      --  with 500 levels of parens will conform with one with 501 levels),
3618
      --  but we do not need to lose sleep over this.
3619
 
3620
      --  Historical note: in versions of GNAT prior to 1.75, there was a node
3621
      --  type N_Parenthesized_Expression used to accurately record unlimited
3622
      --  numbers of levels of parentheses. However, it turned out to be a
3623
      --  real nuisance to have to take into account the possible presence of
3624
      --  this node during semantic analysis, since basically parentheses have
3625
      --  zero relevance to semantic analysis.
3626
 
3627
      --  Note: the level of parentheses always present in things like
3628
      --  aggregates does not count, only the parentheses in the primary
3629
      --  (EXPRESSION) affect the setting of the Paren_Count field.
3630
 
3631
      --  2nd Note: the contents of the Expression field must be ignored (i.e.
3632
      --  treated as though it were Empty) if No_Initialization is set True.
3633
 
3634
      --------------------------------------
3635
      -- 4.5  Short Circuit Control Forms --
3636
      --------------------------------------
3637
 
3638
      --  EXPRESSION ::=
3639
      --    RELATION {and then RELATION} | RELATION {or else RELATION}
3640
 
3641
      --  Gigi restriction: For both these control forms, the operand and
3642
      --  result types are always Standard.Boolean. The expander inserts the
3643
      --  required conversion operations where needed to ensure this is the
3644
      --  case.
3645
 
3646
      --  N_And_Then
3647
      --  Sloc points to AND of AND THEN
3648
      --  Left_Opnd (Node2)
3649
      --  Right_Opnd (Node3)
3650
      --  Actions (List1-Sem)
3651
      --  plus fields for expression
3652
 
3653
      --  N_Or_Else
3654
      --  Sloc points to OR of OR ELSE
3655
      --  Left_Opnd (Node2)
3656
      --  Right_Opnd (Node3)
3657
      --  Actions (List1-Sem)
3658
      --  plus fields for expression
3659
 
3660
      --  Note: The Actions field is used to hold actions associated with
3661
      --  the right hand operand. These have to be treated specially since
3662
      --  they are not unconditionally executed. See Insert_Actions for a
3663
      --  more detailed description of how these actions are handled.
3664
 
3665
      ---------------------------
3666
      -- 4.5  Membership Tests --
3667
      ---------------------------
3668
 
3669
      --  RELATION ::=
3670
      --    SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
3671
 
3672
      --  MEMBERSHIP_CHOICE_LIST ::=
3673
      --    MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
3674
 
3675
      --  MEMBERSHIP_CHOICE ::=
3676
      --    CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
3677
 
3678
      --  Note: although the grammar above allows only a range or a subtype
3679
      --  mark, the parser in fact will accept any simple expression in place
3680
      --  of a subtype mark. This means that the semantic analyzer must be able
3681
      --  to deal with, and diagnose a simple expression other than a name for
3682
      --  the right operand. This simplifies error recovery in the parser.
3683
 
3684
      --  The Alternatives field below is present only if there is more
3685
      --  than one Membership_Choice present (which is legitimate only in
3686
      --  Ada 2012 mode) in which case Right_Opnd is Empty, and Alternatives
3687
      --  contains the list of choices. In the tree passed to the back end,
3688
      --  Alternatives is always No_List, and Right_Opnd is set (i.e. the
3689
      --  expansion circuitry expands out the complex set membership case
3690
      --  using simple membership operations).
3691
 
3692
      --  Should we rename Alternatives here to Membership_Choices ???
3693
 
3694
      --  N_In
3695
      --  Sloc points to IN
3696
      --  Left_Opnd (Node2)
3697
      --  Right_Opnd (Node3)
3698
      --  Alternatives (List4) (set to No_List if only one set alternative)
3699
      --  plus fields for expression
3700
 
3701
      --  N_Not_In
3702
      --  Sloc points to NOT of NOT IN
3703
      --  Left_Opnd (Node2)
3704
      --  Right_Opnd (Node3)
3705
      --  Alternatives (List4) (set to No_List if only one set alternative)
3706
      --  plus fields for expression
3707
 
3708
      --------------------
3709
      -- 4.5  Operators --
3710
      --------------------
3711
 
3712
      --  LOGICAL_OPERATOR             ::=  and | or  | xor
3713
 
3714
      --  RELATIONAL_OPERATOR          ::=  =   | /=  | <   | <= | > | >=
3715
 
3716
      --  BINARY_ADDING_OPERATOR       ::=  +   |  -  | &
3717
 
3718
      --  UNARY_ADDING_OPERATOR        ::=  +   |  -
3719
 
3720
      --  MULTIPLYING_OPERATOR         ::=  *   |  /  | mod | rem
3721
 
3722
      --  HIGHEST_PRECEDENCE_OPERATOR  ::=  **  | abs | not
3723
 
3724
      --  Sprint syntax if Treat_Fixed_As_Integer is set:
3725
 
3726
      --     x #* y
3727
      --     x #/ y
3728
      --     x #mod y
3729
      --     x #rem y
3730
 
3731
      --  Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3732
      --  will only be given nodes with the Treat_Fixed_As_Integer flag set.
3733
      --  All handling of smalls for multiplication and division is handled
3734
      --  by the front end (mod and rem result only from expansion). Gigi
3735
      --  thus never needs to worry about small values (for other operators
3736
      --  operating on fixed-point, e.g. addition, the small value does not
3737
      --  have any semantic effect anyway, these are always integer operations.
3738
 
3739
      --  Gigi restriction: For all operators taking Boolean operands, the
3740
      --  type is always Standard.Boolean. The expander inserts the required
3741
      --  conversion operations where needed to ensure this is the case.
3742
 
3743
      --  N_Op_And
3744
      --  Sloc points to AND
3745
      --  Do_Length_Check (Flag4-Sem)
3746
      --  plus fields for binary operator
3747
      --  plus fields for expression
3748
 
3749
      --  N_Op_Or
3750
      --  Sloc points to OR
3751
      --  Do_Length_Check (Flag4-Sem)
3752
      --  plus fields for binary operator
3753
      --  plus fields for expression
3754
 
3755
      --  N_Op_Xor
3756
      --  Sloc points to XOR
3757
      --  Do_Length_Check (Flag4-Sem)
3758
      --  plus fields for binary operator
3759
      --  plus fields for expression
3760
 
3761
      --  N_Op_Eq
3762
      --  Sloc points to =
3763
      --  plus fields for binary operator
3764
      --  plus fields for expression
3765
 
3766
      --  N_Op_Ne
3767
      --  Sloc points to /=
3768
      --  plus fields for binary operator
3769
      --  plus fields for expression
3770
 
3771
      --  N_Op_Lt
3772
      --  Sloc points to <
3773
      --  plus fields for binary operator
3774
      --  plus fields for expression
3775
 
3776
      --  N_Op_Le
3777
      --  Sloc points to <=
3778
      --  plus fields for binary operator
3779
      --  plus fields for expression
3780
 
3781
      --  N_Op_Gt
3782
      --  Sloc points to >
3783
      --  plus fields for binary operator
3784
      --  plus fields for expression
3785
 
3786
      --  N_Op_Ge
3787
      --  Sloc points to >=
3788
      --  plus fields for binary operator
3789
      --  plus fields for expression
3790
 
3791
      --  N_Op_Add
3792
      --  Sloc points to + (binary)
3793
      --  plus fields for binary operator
3794
      --  plus fields for expression
3795
 
3796
      --  N_Op_Subtract
3797
      --  Sloc points to - (binary)
3798
      --  plus fields for binary operator
3799
      --  plus fields for expression
3800
 
3801
      --  N_Op_Concat
3802
      --  Sloc points to &
3803
      --  Is_Component_Left_Opnd (Flag13-Sem)
3804
      --  Is_Component_Right_Opnd (Flag14-Sem)
3805
      --  plus fields for binary operator
3806
      --  plus fields for expression
3807
 
3808
      --  N_Op_Multiply
3809
      --  Sloc points to *
3810
      --  Treat_Fixed_As_Integer (Flag14-Sem)
3811
      --  Rounded_Result (Flag18-Sem)
3812
      --  plus fields for binary operator
3813
      --  plus fields for expression
3814
 
3815
      --  N_Op_Divide
3816
      --  Sloc points to /
3817
      --  Treat_Fixed_As_Integer (Flag14-Sem)
3818
      --  Do_Division_Check (Flag13-Sem)
3819
      --  Rounded_Result (Flag18-Sem)
3820
      --  plus fields for binary operator
3821
      --  plus fields for expression
3822
 
3823
      --  N_Op_Mod
3824
      --  Sloc points to MOD
3825
      --  Treat_Fixed_As_Integer (Flag14-Sem)
3826
      --  Do_Division_Check (Flag13-Sem)
3827
      --  plus fields for binary operator
3828
      --  plus fields for expression
3829
 
3830
      --  N_Op_Rem
3831
      --  Sloc points to REM
3832
      --  Treat_Fixed_As_Integer (Flag14-Sem)
3833
      --  Do_Division_Check (Flag13-Sem)
3834
      --  plus fields for binary operator
3835
      --  plus fields for expression
3836
 
3837
      --  N_Op_Expon
3838
      --  Is_Power_Of_2_For_Shift (Flag13-Sem)
3839
      --  Sloc points to **
3840
      --  plus fields for binary operator
3841
      --  plus fields for expression
3842
 
3843
      --  N_Op_Plus
3844
      --  Sloc points to + (unary)
3845
      --  plus fields for unary operator
3846
      --  plus fields for expression
3847
 
3848
      --  N_Op_Minus
3849
      --  Sloc points to - (unary)
3850
      --  plus fields for unary operator
3851
      --  plus fields for expression
3852
 
3853
      --  N_Op_Abs
3854
      --  Sloc points to ABS
3855
      --  plus fields for unary operator
3856
      --  plus fields for expression
3857
 
3858
      --  N_Op_Not
3859
      --  Sloc points to NOT
3860
      --  plus fields for unary operator
3861
      --  plus fields for expression
3862
 
3863
      --  See also shift operators in section B.2
3864
 
3865
      --  Note on fixed-point operations passed to Gigi: For adding operators,
3866
      --  the semantics is to treat these simply as integer operations, with
3867
      --  the small values being ignored (the bounds are already stored in
3868
      --  units of small, so that constraint checking works as usual). For the
3869
      --  case of multiply/divide/rem/mod operations, Gigi will only see fixed
3870
      --  point operands if the Treat_Fixed_As_Integer flag is set and will
3871
      --  thus treat these nodes in identical manner, ignoring small values.
3872
 
3873
      ---------------------------------
3874
      -- 4.5.9 Quantified Expression --
3875
      ---------------------------------
3876
 
3877
      --  QUANTIFIED_EXPRESSION ::=
3878
      --    for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
3879
      --  | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
3880
      --
3881
      --  QUANTIFIER ::= all | some
3882
 
3883
      --  At most one of (Iterator_Specification, Loop_Parameter_Specification)
3884
      --  is present at a time, in which case the other one is empty.
3885
 
3886
      --  N_Quantified_Expression
3887
      --  Sloc points to FOR
3888
      --  Iterator_Specification (Node2)
3889
      --  Loop_Parameter_Specification (Node4)
3890
      --  Condition (Node1)
3891
      --  All_Present (Flag15)
3892
 
3893
      --------------------------
3894
      -- 4.6  Type Conversion --
3895
      --------------------------
3896
 
3897
      --  TYPE_CONVERSION ::=
3898
      --    SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3899
 
3900
      --  In the (NAME) case, the name is stored as the expression
3901
 
3902
      --  Note: the parser never generates a type conversion node, since it
3903
      --  looks like an indexed component which is generated by preference.
3904
      --  The semantic pass must correct this misidentification.
3905
 
3906
      --  Gigi handles conversions that involve no change in the root type,
3907
      --  and also all conversions from integer to floating-point types.
3908
      --  Conversions from floating-point to integer are only handled in
3909
      --  the case where Float_Truncate flag set. Other conversions from
3910
      --  floating-point to integer (involving rounding) and all conversions
3911
      --  involving fixed-point types are handled by the expander.
3912
 
3913
      --  Sprint syntax if Float_Truncate set: X^(Y)
3914
      --  Sprint syntax if Conversion_OK set X?(Y)
3915
      --  Sprint syntax if both flags set X?^(Y)
3916
 
3917
      --  Note: If either the operand or result type is fixed-point, Gigi will
3918
      --  only see a type conversion node with Conversion_OK set. The front end
3919
      --  takes care of all handling of small's for fixed-point conversions.
3920
 
3921
      --  N_Type_Conversion
3922
      --  Sloc points to first token of subtype mark
3923
      --  Subtype_Mark (Node4)
3924
      --  Expression (Node3)
3925
      --  Do_Tag_Check (Flag13-Sem)
3926
      --  Do_Length_Check (Flag4-Sem)
3927
      --  Do_Overflow_Check (Flag17-Sem)
3928
      --  Float_Truncate (Flag11-Sem)
3929
      --  Rounded_Result (Flag18-Sem)
3930
      --  Conversion_OK (Flag14-Sem)
3931
      --  plus fields for expression
3932
 
3933
      --  Note: if a range check is required, then the Do_Range_Check flag
3934
      --  is set in the Expression with the check being done against the
3935
      --  target type range (after the base type conversion, if any).
3936
 
3937
      -------------------------------
3938
      -- 4.7  Qualified Expression --
3939
      -------------------------------
3940
 
3941
      --  QUALIFIED_EXPRESSION ::=
3942
      --    SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3943
 
3944
      --  Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3945
      --  the expression, so the Expression field of this node always points
3946
      --  to a parenthesized expression in this case (i.e. Paren_Count will
3947
      --  always be non-zero for the referenced expression if it is not an
3948
      --  aggregate).
3949
 
3950
      --  N_Qualified_Expression
3951
      --  Sloc points to apostrophe
3952
      --  Subtype_Mark (Node4)
3953
      --  Expression (Node3) expression or aggregate
3954
      --  plus fields for expression
3955
 
3956
      --------------------
3957
      -- 4.8  Allocator --
3958
      --------------------
3959
 
3960
      --  ALLOCATOR ::=
3961
      --      new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
3962
      --    | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
3963
      --
3964
      --  SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
3965
 
3966
      --  Sprint syntax (when storage pool present)
3967
      --    new xxx (storage_pool = pool)
3968
      --  or
3969
      --    new (subpool) xxx (storage_pool = pool)
3970
 
3971
      --  N_Allocator
3972
      --  Sloc points to NEW
3973
      --  Expression (Node3) subtype indication or qualified expression
3974
      --  Subpool_Handle_Name (Node4) (set to Empty if not present)
3975
      --  Storage_Pool (Node1-Sem)
3976
      --  Procedure_To_Call (Node2-Sem)
3977
      --  Null_Exclusion_Present (Flag11)
3978
      --  No_Initialization (Flag13-Sem)
3979
      --  Is_Static_Coextension (Flag14-Sem)
3980
      --  Do_Storage_Check (Flag17-Sem)
3981
      --  Is_Dynamic_Coextension (Flag18-Sem)
3982
      --  plus fields for expression
3983
 
3984
      --  Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3985
      --  This flag has a special function in conjunction with the restriction
3986
      --  No_Implicit_Heap_Allocations, which will be triggered if this flag
3987
      --  is not set. This means that if a source allocator is replaced with
3988
      --  a constructed allocator, the Comes_From_Source flag should be copied
3989
      --  to the newly created allocator.
3990
 
3991
      ---------------------------------
3992
      -- 5.1  Sequence Of Statements --
3993
      ---------------------------------
3994
 
3995
      --  SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3996
 
3997
      --  Note: Although the parser will not accept a declaration as a
3998
      --  statement, the semantic analyzer may insert declarations (e.g.
3999
      --  declarations of implicit types needed for execution of other
4000
      --  statements) into a sequence of statements, so the code generator
4001
      --  should be prepared to accept a declaration where a statement is
4002
      --  expected. Note also that pragmas can appear as statements.
4003
 
4004
      --------------------
4005
      -- 5.1  Statement --
4006
      --------------------
4007
 
4008
      --  STATEMENT ::=
4009
      --    {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
4010
 
4011
      --  There is no explicit node in the tree for a statement. Instead, the
4012
      --  individual statement appears directly. Labels are treated  as a
4013
      --  kind of statement, i.e. they are linked into a statement list at
4014
      --  the point they appear, so the labeled statement appears following
4015
      --  the label or labels in the statement list.
4016
 
4017
      ---------------------------
4018
      -- 5.1  Simple Statement --
4019
      ---------------------------
4020
 
4021
      --  SIMPLE_STATEMENT ::=        NULL_STATEMENT
4022
      --  | ASSIGNMENT_STATEMENT    | EXIT_STATEMENT
4023
      --  | GOTO_STATEMENT          | PROCEDURE_CALL_STATEMENT
4024
      --  | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
4025
      --  | REQUEUE_STATEMENT       | DELAY_STATEMENT
4026
      --  | ABORT_STATEMENT         | RAISE_STATEMENT
4027
      --  | CODE_STATEMENT
4028
 
4029
      -----------------------------
4030
      -- 5.1  Compound Statement --
4031
      -----------------------------
4032
 
4033
      --  COMPOUND_STATEMENT ::=
4034
      --    IF_STATEMENT              | CASE_STATEMENT
4035
      --  | LOOP_STATEMENT            | BLOCK_STATEMENT
4036
      --  | EXTENDED_RETURN_STATEMENT
4037
      --  | ACCEPT_STATEMENT          | SELECT_STATEMENT
4038
 
4039
      -------------------------
4040
      -- 5.1  Null Statement --
4041
      -------------------------
4042
 
4043
      --  NULL_STATEMENT ::= null;
4044
 
4045
      --  N_Null_Statement
4046
      --  Sloc points to NULL
4047
 
4048
      ----------------
4049
      -- 5.1  Label --
4050
      ----------------
4051
 
4052
      --  LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4053
 
4054
      --  Note that the occurrence of a label is not a defining identifier,
4055
      --  but rather a referencing occurrence. The defining occurrence is
4056
      --  in the implicit label declaration which occurs in the innermost
4057
      --  enclosing block.
4058
 
4059
      --  N_Label
4060
      --  Sloc points to <<
4061
      --  Identifier (Node1) direct name of statement identifier
4062
      --  Exception_Junk (Flag8-Sem)
4063
 
4064
      --  Note: Before Ada 2012, a label is always followed by a statement,
4065
      --  and this is true in the tree even in Ada 2012 mode (the parser
4066
      --  inserts a null statement marked with Comes_From_Source False).
4067
 
4068
      -------------------------------
4069
      -- 5.1  Statement Identifier --
4070
      -------------------------------
4071
 
4072
      --  STATEMENT_IDENTIFIER ::= DIRECT_NAME
4073
 
4074
      --  The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4075
      --  (not an OPERATOR_SYMBOL)
4076
 
4077
      -------------------------------
4078
      -- 5.2  Assignment Statement --
4079
      -------------------------------
4080
 
4081
      --  ASSIGNMENT_STATEMENT ::=
4082
      --    variable_NAME := EXPRESSION;
4083
 
4084
      --  N_Assignment_Statement
4085
      --  Sloc points to :=
4086
      --  Name (Node2)
4087
      --  Expression (Node3)
4088
      --  Do_Tag_Check (Flag13-Sem)
4089
      --  Do_Length_Check (Flag4-Sem)
4090
      --  Forwards_OK (Flag5-Sem)
4091
      --  Backwards_OK (Flag6-Sem)
4092
      --  No_Ctrl_Actions (Flag7-Sem)
4093
      --  Componentwise_Assignment (Flag14-Sem)
4094
      --  Suppress_Assignment_Checks (Flag18-Sem)
4095
 
4096
      --  Note: if a range check is required, then the Do_Range_Check flag
4097
      --  is set in the Expression (right hand side), with the check being
4098
      --  done against the type of the Name (left hand side).
4099
 
4100
      --  Note: the back end places some restrictions on the form of the
4101
      --  Expression field. If the object being assigned to is Atomic, then
4102
      --  the Expression may not have the form of an aggregate (since this
4103
      --  might cause the back end to generate separate assignments). In this
4104
      --  case the front end must generate an extra temporary and initialize
4105
      --  this temporary as required (the temporary itself is not atomic).
4106
 
4107
      -----------------------
4108
      -- 5.3  If Statement --
4109
      -----------------------
4110
 
4111
      --  IF_STATEMENT ::=
4112
      --    if CONDITION then
4113
      --      SEQUENCE_OF_STATEMENTS
4114
      --    {elsif CONDITION then
4115
      --      SEQUENCE_OF_STATEMENTS}
4116
      --    [else
4117
      --      SEQUENCE_OF_STATEMENTS]
4118
      --    end if;
4119
 
4120
      --  Gigi restriction: This expander ensures that the type of the
4121
      --  Condition fields is always Standard.Boolean, even if the type
4122
      --  in the source is some non-standard boolean type.
4123
 
4124
      --  N_If_Statement
4125
      --  Sloc points to IF
4126
      --  Condition (Node1)
4127
      --  Then_Statements (List2)
4128
      --  Elsif_Parts (List3) (set to No_List if none present)
4129
      --  Else_Statements (List4) (set to No_List if no else part present)
4130
      --  End_Span (Uint5) (set to No_Uint if expander generated)
4131
 
4132
      --  N_Elsif_Part
4133
      --  Sloc points to ELSIF
4134
      --  Condition (Node1)
4135
      --  Then_Statements (List2)
4136
      --  Condition_Actions (List3-Sem)
4137
 
4138
      --------------------
4139
      -- 5.3  Condition --
4140
      --------------------
4141
 
4142
      --  CONDITION ::= boolean_EXPRESSION
4143
 
4144
      -------------------------
4145
      -- 5.4  Case Statement --
4146
      -------------------------
4147
 
4148
      --  CASE_STATEMENT ::=
4149
      --    case EXPRESSION is
4150
      --      CASE_STATEMENT_ALTERNATIVE
4151
      --      {CASE_STATEMENT_ALTERNATIVE}
4152
      --    end case;
4153
 
4154
      --  Note: the Alternatives can contain pragmas. These only occur at
4155
      --  the start of the list, since any pragmas occurring after the first
4156
      --  alternative are absorbed into the corresponding statement sequence.
4157
 
4158
      --  N_Case_Statement
4159
      --  Sloc points to CASE
4160
      --  Expression (Node3)
4161
      --  Alternatives (List4)
4162
      --  End_Span (Uint5) (set to No_Uint if expander generated)
4163
 
4164
      --  Note: Before Ada 2012, a pragma in a statement sequence is always
4165
      --  followed by a statement, and this is true in the tree even in Ada
4166
      --  2012 mode (the parser inserts a null statement marked with the flag
4167
      --  Comes_From_Source False).
4168
 
4169
      -------------------------------------
4170
      -- 5.4  Case Statement Alternative --
4171
      -------------------------------------
4172
 
4173
      --  CASE_STATEMENT_ALTERNATIVE ::=
4174
      --    when DISCRETE_CHOICE_LIST =>
4175
      --      SEQUENCE_OF_STATEMENTS
4176
 
4177
      --  N_Case_Statement_Alternative
4178
      --  Sloc points to WHEN
4179
      --  Discrete_Choices (List4)
4180
      --  Statements (List3)
4181
 
4182
      -------------------------
4183
      -- 5.5  Loop Statement --
4184
      -------------------------
4185
 
4186
      --  LOOP_STATEMENT ::=
4187
      --    [loop_STATEMENT_IDENTIFIER :]
4188
      --      [ITERATION_SCHEME] loop
4189
      --        SEQUENCE_OF_STATEMENTS
4190
      --      end loop [loop_IDENTIFIER];
4191
 
4192
      --  Note: The occurrence of a loop label is not a defining identifier
4193
      --  but rather a referencing occurrence. The defining occurrence is in
4194
      --  the implicit label declaration which occurs in the innermost
4195
      --  enclosing block.
4196
 
4197
      --  Note: there is always a loop statement identifier present in
4198
      --  the tree, even if none was given in the source. In the case where
4199
      --  no loop identifier is given in the source, the parser creates
4200
      --  a name of the form _Loop_n, where n is a decimal integer (the
4201
      --  two underlines ensure that the loop names created in this manner
4202
      --  do not conflict with any user defined identifiers), and the flag
4203
      --  Has_Created_Identifier is set to True. The only exception to the
4204
      --  rule that all loop statement nodes have identifiers occurs for
4205
      --  loops constructed by the expander, and the semantic analyzer will
4206
      --  create and supply dummy loop identifiers in these cases.
4207
 
4208
      --  N_Loop_Statement
4209
      --  Sloc points to LOOP
4210
      --  Identifier (Node1) loop identifier (set to Empty if no identifier)
4211
      --  Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4212
      --  Statements (List3)
4213
      --  End_Label (Node4)
4214
      --  Has_Created_Identifier (Flag15)
4215
      --  Is_Null_Loop (Flag16)
4216
      --  Suppress_Loop_Warnings (Flag17)
4217
 
4218
      --  Note: the parser fills in the Identifier field if there is an
4219
      --  explicit loop identifier. Otherwise the parser leaves this field
4220
      --  set to Empty, and then the semantic processing for a loop statement
4221
      --  creates an identifier, setting the Has_Created_Identifier flag to
4222
      --  True. So after semantic analysis, the Identifier is always set,
4223
      --  referencing an identifier whose entity has an Ekind of E_Loop.
4224
 
4225
      ---------------------------
4226
      -- 5.5  Iteration Scheme --
4227
      ---------------------------
4228
 
4229
      --  ITERATION_SCHEME ::=
4230
      --    while CONDITION
4231
      --  | for LOOP_PARAMETER_SPECIFICATION
4232
      --  | for ITERATOR_SPECIFICATION
4233
 
4234
      --  At most one of (Iterator_Specification, Loop_Parameter_Specification)
4235
      --  is present at a time, in which case the other one is empty. Both are
4236
      --  empty in the case of a WHILE loop.
4237
 
4238
      --  Gigi restriction: This expander ensures that the type of the
4239
      --  Condition field is always Standard.Boolean, even if the type
4240
      --  in the source is some non-standard boolean type.
4241
 
4242
      --  N_Iteration_Scheme
4243
      --  Sloc points to WHILE or FOR
4244
      --  Condition (Node1) (set to Empty if FOR case)
4245
      --  Condition_Actions (List3-Sem)
4246
      --  Iterator_Specification (Node2) (set to Empty if WHILE case)
4247
      --  Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4248
 
4249
      ---------------------------------------
4250
      -- 5.5  Loop Parameter Specification --
4251
      ---------------------------------------
4252
 
4253
      --  LOOP_PARAMETER_SPECIFICATION ::=
4254
      --    DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4255
 
4256
      --  N_Loop_Parameter_Specification
4257
      --  Sloc points to first identifier
4258
      --  Defining_Identifier (Node1)
4259
      --  Reverse_Present (Flag15)
4260
      --  Discrete_Subtype_Definition (Node4)
4261
 
4262
      -----------------------------------
4263
      -- 5.5.1  Iterator Specification --
4264
      -----------------------------------
4265
 
4266
      --  ITERATOR_SPECIFICATION ::=
4267
      --    DEFINING_IDENTIFIER in [reverse] NAME
4268
      --  | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
4269
 
4270
      --  N_Iterator_Specification
4271
      --  Sloc points to defining identifier
4272
      --  Defining_Identifier (Node1)
4273
      --  Name (Node2)
4274
      --  Reverse_Present (Flag15)
4275
      --  Of_Present (Flag16)
4276
      --  Subtype_Indication (Node5)
4277
 
4278
      --  Note: The Of_Present flag distinguishes the two forms
4279
 
4280
      --------------------------
4281
      -- 5.6  Block Statement --
4282
      --------------------------
4283
 
4284
      --  BLOCK_STATEMENT ::=
4285
      --    [block_STATEMENT_IDENTIFIER:]
4286
      --      [declare
4287
      --        DECLARATIVE_PART]
4288
      --      begin
4289
      --        HANDLED_SEQUENCE_OF_STATEMENTS
4290
      --      end [block_IDENTIFIER];
4291
 
4292
      --  Note that the occurrence of a block identifier is not a defining
4293
      --  identifier, but rather a referencing occurrence. The defining
4294
      --  occurrence is an E_Block entity declared by the implicit label
4295
      --  declaration which occurs in the innermost enclosing block statement
4296
      --  or body; the block identifier denotes that E_Block.
4297
 
4298
      --  For block statements that come from source code, there is always a
4299
      --  block statement identifier present in the tree, denoting an
4300
      --  E_Block. In the case where no block identifier is given in the
4301
      --  source, the parser creates a name of the form B_n, where n is a
4302
      --  decimal integer, and the flag Has_Created_Identifier is set to
4303
      --  True. Blocks constructed by the expander usually have no identifier,
4304
      --  and no corresponding entity.
4305
 
4306
      --  Note: the block statement created for an extended return statement
4307
      --  has an entity, and this entity is an E_Return_Statement, rather than
4308
      --  the usual E_Block.
4309
 
4310
      --  Note: Exception_Junk is set for the wrapping blocks created during
4311
      --  local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4312
 
4313
      --  N_Block_Statement
4314
      --  Sloc points to DECLARE or BEGIN
4315
      --  Identifier (Node1) block direct name (set to Empty if not present)
4316
      --  Declarations (List2) (set to No_List if no DECLARE part)
4317
      --  Handled_Statement_Sequence (Node4)
4318
      --  Is_Task_Master (Flag5-Sem)
4319
      --  Activation_Chain_Entity (Node3-Sem)
4320
      --  Has_Created_Identifier (Flag15)
4321
      --  Is_Task_Allocation_Block (Flag6)
4322
      --  Is_Asynchronous_Call_Block (Flag7)
4323
      --  Exception_Junk (Flag8-Sem)
4324
 
4325
      -------------------------
4326
      -- 5.7  Exit Statement --
4327
      -------------------------
4328
 
4329
      --  EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4330
 
4331
      --  Gigi restriction: This expander ensures that the type of the
4332
      --  Condition field is always Standard.Boolean, even if the type
4333
      --  in the source is some non-standard boolean type.
4334
 
4335
      --  N_Exit_Statement
4336
      --  Sloc points to EXIT
4337
      --  Name (Node2) (set to Empty if no loop name present)
4338
      --  Condition (Node1) (set to Empty if no WHEN part present)
4339
      --  Next_Exit_Statement (Node3-Sem): Next exit on chain
4340
 
4341
      -------------------------
4342
      -- 5.9  Goto Statement --
4343
      -------------------------
4344
 
4345
      --  GOTO_STATEMENT ::= goto label_NAME;
4346
 
4347
      --  N_Goto_Statement
4348
      --  Sloc points to GOTO
4349
      --  Name (Node2)
4350
      --  Exception_Junk (Flag8-Sem)
4351
 
4352
      ---------------------------------
4353
      -- 6.1  Subprogram Declaration --
4354
      ---------------------------------
4355
 
4356
      --  SUBPROGRAM_DECLARATION ::=
4357
      --    SUBPROGRAM_SPECIFICATION
4358
      --      [ASPECT_SPECIFICATIONS];
4359
 
4360
      --  N_Subprogram_Declaration
4361
      --  Sloc points to FUNCTION or PROCEDURE
4362
      --  Specification (Node1)
4363
      --  Body_To_Inline (Node3-Sem)
4364
      --  Corresponding_Body (Node5-Sem)
4365
      --  Parent_Spec (Node4-Sem)
4366
 
4367
      ------------------------------------------
4368
      -- 6.1  Abstract Subprogram Declaration --
4369
      ------------------------------------------
4370
 
4371
      --  ABSTRACT_SUBPROGRAM_DECLARATION ::=
4372
      --    SUBPROGRAM_SPECIFICATION is abstract
4373
      --      [ASPECT_SPECIFICATIONS];
4374
 
4375
      --  N_Abstract_Subprogram_Declaration
4376
      --  Sloc points to ABSTRACT
4377
      --  Specification (Node1)
4378
 
4379
      -----------------------------------
4380
      -- 6.1  Subprogram Specification --
4381
      -----------------------------------
4382
 
4383
      --  SUBPROGRAM_SPECIFICATION ::=
4384
      --    [[not] overriding]
4385
      --    procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4386
      --  | [[not] overriding]
4387
      --    function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4388
 
4389
      --  Note: there are no separate nodes for the profiles, instead the
4390
      --  information appears directly in the following nodes.
4391
 
4392
      --  N_Function_Specification
4393
      --  Sloc points to FUNCTION
4394
      --  Defining_Unit_Name (Node1) (the designator)
4395
      --  Elaboration_Boolean (Node2-Sem)
4396
      --  Parameter_Specifications (List3) (set to No_List if no formal part)
4397
      --  Null_Exclusion_Present (Flag11)
4398
      --  Result_Definition (Node4) for result subtype
4399
      --  Generic_Parent (Node5-Sem)
4400
      --  Must_Override (Flag14) set if overriding indicator present
4401
      --  Must_Not_Override (Flag15) set if not_overriding indicator present
4402
 
4403
      --  N_Procedure_Specification
4404
      --  Sloc points to PROCEDURE
4405
      --  Defining_Unit_Name (Node1)
4406
      --  Elaboration_Boolean (Node2-Sem)
4407
      --  Parameter_Specifications (List3) (set to No_List if no formal part)
4408
      --  Generic_Parent (Node5-Sem)
4409
      --  Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4410
      --  Must_Override (Flag14) set if overriding indicator present
4411
      --  Must_Not_Override (Flag15) set if not_overriding indicator present
4412
 
4413
      --  Note: overriding indicator is an Ada 2005 feature
4414
 
4415
      ---------------------
4416
      -- 6.1  Designator --
4417
      ---------------------
4418
 
4419
      --  DESIGNATOR ::=
4420
      --    [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4421
 
4422
      --  Designators that are simply identifiers or operator symbols appear
4423
      --  directly in the tree in this form. The following node is used only
4424
      --  in the case where the designator has a parent unit name component.
4425
 
4426
      --  N_Designator
4427
      --  Sloc points to period
4428
      --  Name (Node2) holds the parent unit name. Note that this is always
4429
      --   non-Empty, since this node is only used for the case where a
4430
      --   parent library unit package name is present.
4431
      --  Identifier (Node1)
4432
 
4433
      --  Note that the identifier can also be an operator symbol here
4434
 
4435
      ------------------------------
4436
      -- 6.1  Defining Designator --
4437
      ------------------------------
4438
 
4439
      --  DEFINING_DESIGNATOR ::=
4440
      --    DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4441
 
4442
      -------------------------------------
4443
      -- 6.1  Defining Program Unit Name --
4444
      -------------------------------------
4445
 
4446
      --  DEFINING_PROGRAM_UNIT_NAME ::=
4447
      --    [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4448
 
4449
      --  The parent unit name is present only in the case of a child unit
4450
      --  name (permissible only for Ada 95 for a library level unit, i.e.
4451
      --  a unit at scope level one). If no such name is present, the defining
4452
      --  program unit name is represented simply as the defining identifier.
4453
      --  In the child unit case, the following node is used to represent the
4454
      --  child unit name.
4455
 
4456
      --  N_Defining_Program_Unit_Name
4457
      --  Sloc points to period
4458
      --  Name (Node2) holds the parent unit name. Note that this is always
4459
      --   non-Empty, since this node is only used for the case where a
4460
      --   parent unit name is present.
4461
      --  Defining_Identifier (Node1)
4462
 
4463
      --------------------------
4464
      -- 6.1  Operator Symbol --
4465
      --------------------------
4466
 
4467
      --  OPERATOR_SYMBOL ::= STRING_LITERAL
4468
 
4469
      --  Note: the fields of the N_Operator_Symbol node are laid out to
4470
      --  match the corresponding fields of an N_Character_Literal node. This
4471
      --  allows easy conversion of the operator symbol node into a character
4472
      --  literal node in the case where a string constant of the form of an
4473
      --  operator symbol is scanned out as such, but turns out semantically
4474
      --  to be a string literal that is not an operator. For details see
4475
      --  Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4476
 
4477
      --  N_Operator_Symbol
4478
      --  Sloc points to literal
4479
      --  Chars (Name1) contains the Name_Id for the operator symbol
4480
      --  Strval (Str3) Id of string value. This is used if the operator
4481
      --   symbol turns out to be a normal string after all.
4482
      --  Entity (Node4-Sem)
4483
      --  Associated_Node (Node4-Sem)
4484
      --  Has_Private_View (Flag11-Sem) set in generic units.
4485
      --  Etype (Node5-Sem)
4486
 
4487
      --  Note: the Strval field may be set to No_String for generated
4488
      --  operator symbols that are known not to be string literals
4489
      --  semantically.
4490
 
4491
      -----------------------------------
4492
      -- 6.1  Defining Operator Symbol --
4493
      -----------------------------------
4494
 
4495
      --  DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4496
 
4497
      --  A defining operator symbol is an entity, which has additional
4498
      --  fields depending on the setting of the Ekind field. These
4499
      --  additional fields are defined (and access subprograms declared)
4500
      --  in package Einfo.
4501
 
4502
      --  Note: N_Defining_Operator_Symbol is an extended node whose fields
4503
      --  are deliberately layed out to match the layout of fields in an
4504
      --  ordinary N_Operator_Symbol node allowing for easy alteration of
4505
      --  an operator symbol node into a defining operator symbol node.
4506
      --  See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4507
      --  for further details.
4508
 
4509
      --  N_Defining_Operator_Symbol
4510
      --  Sloc points to literal
4511
      --  Chars (Name1) contains the Name_Id for the operator symbol
4512
      --  Next_Entity (Node2-Sem)
4513
      --  Scope (Node3-Sem)
4514
      --  Etype (Node5-Sem)
4515
 
4516
      ----------------------------
4517
      -- 6.1  Parameter Profile --
4518
      ----------------------------
4519
 
4520
      --  PARAMETER_PROFILE ::= [FORMAL_PART]
4521
 
4522
      ---------------------------------------
4523
      -- 6.1  Parameter and Result Profile --
4524
      ---------------------------------------
4525
 
4526
      --  PARAMETER_AND_RESULT_PROFILE ::=
4527
      --    [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4528
      --  | [FORMAL_PART] return ACCESS_DEFINITION
4529
 
4530
      --  There is no explicit node in the tree for a parameter and result
4531
      --  profile. Instead the information appears directly in the parent.
4532
 
4533
      ----------------------
4534
      -- 6.1  Formal Part --
4535
      ----------------------
4536
 
4537
      --  FORMAL_PART ::=
4538
      --    (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4539
 
4540
      ----------------------------------
4541
      -- 6.1  Parameter Specification --
4542
      ----------------------------------
4543
 
4544
      --  PARAMETER_SPECIFICATION ::=
4545
      --    DEFINING_IDENTIFIER_LIST : [ALIASED] MODE [NULL_EXCLUSION]
4546
      --      SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
4547
      --  | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4548
      --      [:= DEFAULT_EXPRESSION]
4549
 
4550
      --  Although the syntax allows multiple identifiers in the list, the
4551
      --  semantics is as though successive specifications were given with
4552
      --  identical type definition and expression components. To simplify
4553
      --  semantic processing, the parser represents a multiple declaration
4554
      --  case as a sequence of single Specifications, using the More_Ids and
4555
      --  Prev_Ids flags to preserve the original source form as described
4556
      --  in the section on "Handling of Defining Identifier Lists".
4557
 
4558
      --  ALIASED can only be present in Ada 2012 mode
4559
 
4560
      --  N_Parameter_Specification
4561
      --  Sloc points to first identifier
4562
      --  Defining_Identifier (Node1)
4563
      --  Aliased_Present (Flag4)
4564
      --  In_Present (Flag15)
4565
      --  Out_Present (Flag17)
4566
      --  Null_Exclusion_Present (Flag11)
4567
      --  Parameter_Type (Node2) subtype mark or access definition
4568
      --  Expression (Node3) (set to Empty if no default expression present)
4569
      --  Do_Accessibility_Check (Flag13-Sem)
4570
      --  More_Ids (Flag5) (set to False if no more identifiers in list)
4571
      --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4572
      --  Default_Expression (Node5-Sem)
4573
 
4574
      ---------------
4575
      -- 6.1  Mode --
4576
      ---------------
4577
 
4578
      --  MODE ::= [in] | in out | out
4579
 
4580
      --  There is no explicit node in the tree for the Mode. Instead the
4581
      --  In_Present and Out_Present flags are set in the parent node to
4582
      --  record the presence of keywords specifying the mode.
4583
 
4584
      --------------------------
4585
      -- 6.3  Subprogram Body --
4586
      --------------------------
4587
 
4588
      --  SUBPROGRAM_BODY ::=
4589
      --    SUBPROGRAM_SPECIFICATION is
4590
      --      DECLARATIVE_PART
4591
      --    begin
4592
      --      HANDLED_SEQUENCE_OF_STATEMENTS
4593
      --    end [DESIGNATOR];
4594
 
4595
      --  N_Subprogram_Body
4596
      --  Sloc points to FUNCTION or PROCEDURE
4597
      --  Specification (Node1)
4598
      --  Declarations (List2)
4599
      --  Handled_Statement_Sequence (Node4)
4600
      --  Activation_Chain_Entity (Node3-Sem)
4601
      --  Corresponding_Spec (Node5-Sem)
4602
      --  Acts_As_Spec (Flag4-Sem)
4603
      --  Bad_Is_Detected (Flag15) used only by parser
4604
      --  Do_Storage_Check (Flag17-Sem)
4605
      --  Has_Pragma_Priority (Flag6-Sem)
4606
      --  Is_Protected_Subprogram_Body (Flag7-Sem)
4607
      --  Is_Entry_Barrier_Function (Flag8-Sem)
4608
      --  Is_Task_Master (Flag5-Sem)
4609
      --  Was_Originally_Stub (Flag13-Sem)
4610
      --  Has_Relative_Deadline_Pragma (Flag9-Sem)
4611
      --  Has_Pragma_CPU (Flag14-Sem)
4612
 
4613
      -------------------------
4614
      -- Expression Function --
4615
      -------------------------
4616
 
4617
      --  This is an Ada 2012 extension, we put it here for now, to be labeled
4618
      --  and put in its proper section when we know exactly where that is!
4619
 
4620
      --  EXPRESSION_FUNCTION ::=
4621
      --    FUNCTION SPECIFICATION IS (EXPRESSION);
4622
 
4623
      --  N_Expression_Function
4624
      --  Sloc points to FUNCTION
4625
      --  Specification (Node1)
4626
      --  Expression (Node3)
4627
      --  Corresponding_Spec (Node5-Sem)
4628
 
4629
      -----------------------------------
4630
      -- 6.4  Procedure Call Statement --
4631
      -----------------------------------
4632
 
4633
      --  PROCEDURE_CALL_STATEMENT ::=
4634
      --    procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4635
 
4636
      --  Note: the reason that a procedure call has expression fields is
4637
      --  that it semantically resembles an expression, e.g. overloading is
4638
      --  allowed and a type is concocted for semantic processing purposes.
4639
      --  Certain of these fields, such as Parens are not relevant, but it
4640
      --  is easier to just supply all of them together!
4641
 
4642
      --  N_Procedure_Call_Statement
4643
      --  Sloc points to first token of name or prefix
4644
      --  Name (Node2) stores name or prefix
4645
      --  Parameter_Associations (List3) (set to No_List if no
4646
      --   actual parameter part)
4647
      --  First_Named_Actual (Node4-Sem)
4648
      --  Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4649
      --  Do_Tag_Check (Flag13-Sem)
4650
      --  No_Elaboration_Check (Flag14-Sem)
4651
      --  Parameter_List_Truncated (Flag17-Sem)
4652
      --  ABE_Is_Certain (Flag18-Sem)
4653
      --  plus fields for expression
4654
 
4655
      --  If any IN parameter requires a range check, then the corresponding
4656
      --  argument expression has the Do_Range_Check flag set, and the range
4657
      --  check is done against the formal type. Note that this argument
4658
      --  expression may appear directly in the Parameter_Associations list,
4659
      --  or may be a descendent of an N_Parameter_Association node that
4660
      --  appears in this list.
4661
 
4662
      ------------------------
4663
      -- 6.4  Function Call --
4664
      ------------------------
4665
 
4666
      --  FUNCTION_CALL ::=
4667
      --    function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4668
 
4669
      --  Note: the parser may generate an indexed component node or simply
4670
      --  a name node instead of a function call node. The semantic pass must
4671
      --  correct this misidentification.
4672
 
4673
      --  N_Function_Call
4674
      --  Sloc points to first token of name or prefix
4675
      --  Name (Node2) stores name or prefix
4676
      --  Parameter_Associations (List3) (set to No_List if no
4677
      --   actual parameter part)
4678
      --  First_Named_Actual (Node4-Sem)
4679
      --  Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4680
      --  Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4681
      --  Do_Tag_Check (Flag13-Sem)
4682
      --  No_Elaboration_Check (Flag14-Sem)
4683
      --  Parameter_List_Truncated (Flag17-Sem)
4684
      --  ABE_Is_Certain (Flag18-Sem)
4685
      --  plus fields for expression
4686
 
4687
      --------------------------------
4688
      -- 6.4  Actual Parameter Part --
4689
      --------------------------------
4690
 
4691
      --  ACTUAL_PARAMETER_PART ::=
4692
      --    (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4693
 
4694
      --------------------------------
4695
      -- 6.4  Parameter Association --
4696
      --------------------------------
4697
 
4698
      --  PARAMETER_ASSOCIATION ::=
4699
      --    [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4700
 
4701
      --  Note: the N_Parameter_Association node is built only if a formal
4702
      --  parameter selector name is present, otherwise the parameter
4703
      --  association appears in the tree simply as the node for the
4704
      --  explicit actual parameter.
4705
 
4706
      --  N_Parameter_Association
4707
      --  Sloc points to formal parameter
4708
      --  Selector_Name (Node2) (always non-Empty)
4709
      --  Explicit_Actual_Parameter (Node3)
4710
      --  Next_Named_Actual (Node4-Sem)
4711
      --  Is_Accessibility_Actual (Flag13-Sem)
4712
 
4713
      ---------------------------
4714
      -- 6.4  Actual Parameter --
4715
      ---------------------------
4716
 
4717
      --  EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4718
 
4719
      ---------------------------
4720
      -- 6.5  Return Statement --
4721
      ---------------------------
4722
 
4723
      --  RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4724
 
4725
      --  In Ada 2005, we have:
4726
 
4727
      --  SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4728
 
4729
      --  EXTENDED_RETURN_STATEMENT ::=
4730
      --    return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4731
      --                                           [:= EXPRESSION] [do
4732
      --      HANDLED_SEQUENCE_OF_STATEMENTS
4733
      --    end return];
4734
 
4735
      --  RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4736
 
4737
      --  So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4738
      --  "return statement" is defined in 6.5 to mean a
4739
      --  SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4740
 
4741
      --  N_Return_Statement
4742
      --  Sloc points to RETURN
4743
      --  Return_Statement_Entity (Node5-Sem)
4744
      --  Expression (Node3) (set to Empty if no expression present)
4745
      --  Storage_Pool (Node1-Sem)
4746
      --  Procedure_To_Call (Node2-Sem)
4747
      --  Do_Tag_Check (Flag13-Sem)
4748
      --  By_Ref (Flag5-Sem)
4749
      --  Comes_From_Extended_Return_Statement (Flag18-Sem)
4750
 
4751
      --  N_Return_Statement represents a simple_return_statement, and is
4752
      --  renamed to be N_Simple_Return_Statement below. Clients should refer
4753
      --  to N_Simple_Return_Statement. We retain N_Return_Statement because
4754
      --  that's how gigi knows it. See also renaming of Make_Return_Statement
4755
      --  as Make_Simple_Return_Statement in Sem_Util.
4756
 
4757
      --  Note: Return_Statement_Entity points to an E_Return_Statement
4758
 
4759
      --  If a range check is required, then Do_Range_Check is set on the
4760
      --  Expression. The check is against the return subtype of the function.
4761
 
4762
      --  N_Extended_Return_Statement
4763
      --  Sloc points to RETURN
4764
      --  Return_Statement_Entity (Node5-Sem)
4765
      --  Return_Object_Declarations (List3)
4766
      --  Handled_Statement_Sequence (Node4) (set to Empty if not present)
4767
      --  Storage_Pool (Node1-Sem)
4768
      --  Procedure_To_Call (Node2-Sem)
4769
      --  Do_Tag_Check (Flag13-Sem)
4770
      --  By_Ref (Flag5-Sem)
4771
 
4772
      --  Note: Return_Statement_Entity points to an E_Return_Statement.
4773
 
4774
      --  Note that Return_Object_Declarations is a list containing the
4775
      --  N_Object_Declaration -- see comment on this field above.
4776
 
4777
      --  The declared object will have Is_Return_Object = True.
4778
 
4779
      --  There is no such syntactic category as return_object_declaration
4780
      --  in the RM. Return_Object_Declarations represents this portion of
4781
      --  the syntax for EXTENDED_RETURN_STATEMENT:
4782
      --      DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4783
      --                                      [:= EXPRESSION]
4784
 
4785
      --  There are two entities associated with an extended_return_statement:
4786
      --  the Return_Statement_Entity represents the statement itself, and the
4787
      --  Defining_Identifier of the Object_Declaration in
4788
      --  Return_Object_Declarations represents the object being
4789
      --  returned. N_Simple_Return_Statement has only the former.
4790
 
4791
      ------------------------------
4792
      -- 7.1  Package Declaration --
4793
      ------------------------------
4794
 
4795
      --  PACKAGE_DECLARATION ::=
4796
      --    PACKAGE_SPECIFICATION;
4797
 
4798
      --  Note: the activation chain entity for a package spec is used for
4799
      --  all tasks declared in the package spec, or in the package body.
4800
 
4801
      --  N_Package_Declaration
4802
      --  Sloc points to PACKAGE
4803
      --  Specification (Node1)
4804
      --  Corresponding_Body (Node5-Sem)
4805
      --  Parent_Spec (Node4-Sem)
4806
      --  Activation_Chain_Entity (Node3-Sem)
4807
 
4808
      --------------------------------
4809
      -- 7.1  Package Specification --
4810
      --------------------------------
4811
 
4812
      --  PACKAGE_SPECIFICATION ::=
4813
      --    package DEFINING_PROGRAM_UNIT_NAME
4814
      --      [ASPECT_SPECIFICATIONS]
4815
      --    is
4816
      --      {BASIC_DECLARATIVE_ITEM}
4817
      --    [private
4818
      --      {BASIC_DECLARATIVE_ITEM}]
4819
      --    end [[PARENT_UNIT_NAME .] IDENTIFIER]
4820
 
4821
      --  N_Package_Specification
4822
      --  Sloc points to PACKAGE
4823
      --  Defining_Unit_Name (Node1)
4824
      --  Visible_Declarations (List2)
4825
      --  Private_Declarations (List3) (set to No_List if no private
4826
      --   part present)
4827
      --  End_Label (Node4)
4828
      --  Generic_Parent (Node5-Sem)
4829
      --  Limited_View_Installed (Flag18-Sem)
4830
 
4831
      -----------------------
4832
      -- 7.1  Package Body --
4833
      -----------------------
4834
 
4835
      --  PACKAGE_BODY ::=
4836
      --    package body DEFINING_PROGRAM_UNIT_NAME
4837
      --      [ASPECT_SPECIFICATIONS]
4838
      --    is
4839
      --      DECLARATIVE_PART
4840
      --    [begin
4841
      --      HANDLED_SEQUENCE_OF_STATEMENTS]
4842
      --    end [[PARENT_UNIT_NAME .] IDENTIFIER];
4843
 
4844
      --  N_Package_Body
4845
      --  Sloc points to PACKAGE
4846
      --  Defining_Unit_Name (Node1)
4847
      --  Declarations (List2)
4848
      --  Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4849
      --  Corresponding_Spec (Node5-Sem)
4850
      --  Was_Originally_Stub (Flag13-Sem)
4851
 
4852
      --  Note: if a source level package does not contain a handled sequence
4853
      --  of statements, then the parser supplies a dummy one with a null
4854
      --  sequence of statements. Comes_From_Source will be False in this
4855
      --  constructed sequence. The reason we need this is for the End_Label
4856
      --  field in the HSS.
4857
 
4858
      -----------------------------------
4859
      -- 7.4  Private Type Declaration --
4860
      -----------------------------------
4861
 
4862
      --  PRIVATE_TYPE_DECLARATION ::=
4863
      --    type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4864
      --      is [[abstract] tagged] [limited] private;
4865
 
4866
      --  Note: TAGGED is not permitted in Ada 83 mode
4867
 
4868
      --  N_Private_Type_Declaration
4869
      --  Sloc points to TYPE
4870
      --  Defining_Identifier (Node1)
4871
      --  Discriminant_Specifications (List4) (set to No_List if no
4872
      --   discriminant part)
4873
      --  Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4874
      --  Abstract_Present (Flag4)
4875
      --  Tagged_Present (Flag15)
4876
      --  Limited_Present (Flag17)
4877
 
4878
      ----------------------------------------
4879
      -- 7.4  Private Extension Declaration --
4880
      ----------------------------------------
4881
 
4882
      --  PRIVATE_EXTENSION_DECLARATION ::=
4883
      --    type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4884
      --      [abstract] [limited | synchronized]
4885
      --        new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4886
      --           with private;
4887
 
4888
      --  Note: LIMITED, and private extension declarations are not allowed
4889
      --        in Ada 83 mode.
4890
 
4891
      --  N_Private_Extension_Declaration
4892
      --  Sloc points to TYPE
4893
      --  Defining_Identifier (Node1)
4894
      --  Discriminant_Specifications (List4) (set to No_List if no
4895
      --   discriminant part)
4896
      --  Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4897
      --  Abstract_Present (Flag4)
4898
      --  Limited_Present (Flag17)
4899
      --  Synchronized_Present (Flag7)
4900
      --  Subtype_Indication (Node5)
4901
      --  Interface_List (List2) (set to No_List if none)
4902
 
4903
      ---------------------
4904
      -- 8.4  Use Clause --
4905
      ---------------------
4906
 
4907
      --  USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4908
 
4909
      -----------------------------
4910
      -- 8.4  Use Package Clause --
4911
      -----------------------------
4912
 
4913
      --  USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4914
 
4915
      --  N_Use_Package_Clause
4916
      --  Sloc points to USE
4917
      --  Names (List2)
4918
      --  Next_Use_Clause (Node3-Sem)
4919
      --  Hidden_By_Use_Clause (Elist4-Sem)
4920
 
4921
      --------------------------
4922
      -- 8.4  Use Type Clause --
4923
      --------------------------
4924
 
4925
      --  USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
4926
 
4927
      --  Note: use type clause is not permitted in Ada 83 mode
4928
 
4929
      --  Note: the ALL keyword can appear only in Ada 2012 mode
4930
 
4931
      --  N_Use_Type_Clause
4932
      --  Sloc points to USE
4933
      --  Subtype_Marks (List2)
4934
      --  Next_Use_Clause (Node3-Sem)
4935
      --  Hidden_By_Use_Clause (Elist4-Sem)
4936
      --  Used_Operations (Elist5-Sem)
4937
      --  All_Present (Flag15)
4938
 
4939
      -------------------------------
4940
      -- 8.5  Renaming Declaration --
4941
      -------------------------------
4942
 
4943
      --  RENAMING_DECLARATION ::=
4944
      --    OBJECT_RENAMING_DECLARATION
4945
      --  | EXCEPTION_RENAMING_DECLARATION
4946
      --  | PACKAGE_RENAMING_DECLARATION
4947
      --  | SUBPROGRAM_RENAMING_DECLARATION
4948
      --  | GENERIC_RENAMING_DECLARATION
4949
 
4950
      --------------------------------------
4951
      -- 8.5  Object Renaming Declaration --
4952
      --------------------------------------
4953
 
4954
      --  OBJECT_RENAMING_DECLARATION ::=
4955
      --    DEFINING_IDENTIFIER :
4956
      --      [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4957
      --  | DEFINING_IDENTIFIER :
4958
      --      ACCESS_DEFINITION renames object_NAME;
4959
 
4960
      --  Note: Access_Definition is an optional field that gives support to
4961
      --  Ada 2005 (AI-230). The parser generates nodes that have either the
4962
      --  Subtype_Indication field or else the Access_Definition field.
4963
 
4964
      --  N_Object_Renaming_Declaration
4965
      --  Sloc points to first identifier
4966
      --  Defining_Identifier (Node1)
4967
      --  Null_Exclusion_Present (Flag11) (set to False if not present)
4968
      --  Subtype_Mark (Node4) (set to Empty if not present)
4969
      --  Access_Definition (Node3) (set to Empty if not present)
4970
      --  Name (Node2)
4971
      --  Corresponding_Generic_Association (Node5-Sem)
4972
 
4973
      -----------------------------------------
4974
      -- 8.5  Exception Renaming Declaration --
4975
      -----------------------------------------
4976
 
4977
      --  EXCEPTION_RENAMING_DECLARATION ::=
4978
      --    DEFINING_IDENTIFIER : exception renames exception_NAME;
4979
 
4980
      --  N_Exception_Renaming_Declaration
4981
      --  Sloc points to first identifier
4982
      --  Defining_Identifier (Node1)
4983
      --  Name (Node2)
4984
 
4985
      ---------------------------------------
4986
      -- 8.5  Package Renaming Declaration --
4987
      ---------------------------------------
4988
 
4989
      --  PACKAGE_RENAMING_DECLARATION ::=
4990
      --    package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4991
 
4992
      --  N_Package_Renaming_Declaration
4993
      --  Sloc points to PACKAGE
4994
      --  Defining_Unit_Name (Node1)
4995
      --  Name (Node2)
4996
      --  Parent_Spec (Node4-Sem)
4997
 
4998
      ------------------------------------------
4999
      -- 8.5  Subprogram Renaming Declaration --
5000
      ------------------------------------------
5001
 
5002
      --  SUBPROGRAM_RENAMING_DECLARATION ::=
5003
      --    SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
5004
 
5005
      --  N_Subprogram_Renaming_Declaration
5006
      --  Sloc points to RENAMES
5007
      --  Specification (Node1)
5008
      --  Name (Node2)
5009
      --  Parent_Spec (Node4-Sem)
5010
      --  Corresponding_Spec (Node5-Sem)
5011
      --  Corresponding_Formal_Spec (Node3-Sem)
5012
      --  From_Default (Flag6-Sem)
5013
 
5014
      -----------------------------------------
5015
      -- 8.5.5  Generic Renaming Declaration --
5016
      -----------------------------------------
5017
 
5018
      --  GENERIC_RENAMING_DECLARATION ::=
5019
      --    generic package DEFINING_PROGRAM_UNIT_NAME
5020
      --      renames generic_package_NAME
5021
      --  | generic procedure DEFINING_PROGRAM_UNIT_NAME
5022
      --      renames generic_procedure_NAME
5023
      --  | generic function DEFINING_PROGRAM_UNIT_NAME
5024
      --      renames generic_function_NAME
5025
 
5026
      --  N_Generic_Package_Renaming_Declaration
5027
      --  Sloc points to GENERIC
5028
      --  Defining_Unit_Name (Node1)
5029
      --  Name (Node2)
5030
      --  Parent_Spec (Node4-Sem)
5031
 
5032
      --  N_Generic_Procedure_Renaming_Declaration
5033
      --  Sloc points to GENERIC
5034
      --  Defining_Unit_Name (Node1)
5035
      --  Name (Node2)
5036
      --  Parent_Spec (Node4-Sem)
5037
 
5038
      --  N_Generic_Function_Renaming_Declaration
5039
      --  Sloc points to GENERIC
5040
      --  Defining_Unit_Name (Node1)
5041
      --  Name (Node2)
5042
      --  Parent_Spec (Node4-Sem)
5043
 
5044
      --------------------------------
5045
      -- 9.1  Task Type Declaration --
5046
      --------------------------------
5047
 
5048
      --  TASK_TYPE_DECLARATION ::=
5049
      --    task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5050
      --      [ASPECT_SPECIFICATIONS]
5051
      --    [is [new INTERFACE_LIST with] TASK_DEFINITION];
5052
 
5053
      --  N_Task_Type_Declaration
5054
      --  Sloc points to TASK
5055
      --  Defining_Identifier (Node1)
5056
      --  Discriminant_Specifications (List4) (set to No_List if no
5057
      --   discriminant part)
5058
      --  Interface_List (List2) (set to No_List if none)
5059
      --  Task_Definition (Node3) (set to Empty if not present)
5060
      --  Corresponding_Body (Node5-Sem)
5061
 
5062
      ----------------------------------
5063
      -- 9.1  Single Task Declaration --
5064
      ----------------------------------
5065
 
5066
      --  SINGLE_TASK_DECLARATION ::=
5067
      --    task DEFINING_IDENTIFIER
5068
      --      [ASPECT_SPECIFICATIONS]
5069
      --    [is [new INTERFACE_LIST with] TASK_DEFINITION];
5070
 
5071
      --  N_Single_Task_Declaration
5072
      --  Sloc points to TASK
5073
      --  Defining_Identifier (Node1)
5074
      --  Interface_List (List2) (set to No_List if none)
5075
      --  Task_Definition (Node3) (set to Empty if not present)
5076
 
5077
      --------------------------
5078
      -- 9.1  Task Definition --
5079
      --------------------------
5080
 
5081
      --  TASK_DEFINITION ::=
5082
      --      {TASK_ITEM}
5083
      --    [private
5084
      --      {TASK_ITEM}]
5085
      --    end [task_IDENTIFIER]
5086
 
5087
      --  Note: as a result of semantic analysis, the list of task items can
5088
      --  include implicit type declarations resulting from entry families.
5089
 
5090
      --  N_Task_Definition
5091
      --  Sloc points to first token of task definition
5092
      --  Visible_Declarations (List2)
5093
      --  Private_Declarations (List3) (set to No_List if no private part)
5094
      --  End_Label (Node4)
5095
      --  Has_Pragma_Priority (Flag6-Sem)
5096
      --  Has_Storage_Size_Pragma (Flag5-Sem)
5097
      --  Has_Task_Info_Pragma (Flag7-Sem)
5098
      --  Has_Task_Name_Pragma (Flag8-Sem)
5099
      --  Has_Relative_Deadline_Pragma (Flag9-Sem)
5100
      --  Has_Pragma_CPU (Flag14-Sem)
5101
      --  Has_Pragma_Dispatching_Domain (Flag15-Sem)
5102
 
5103
      --------------------
5104
      -- 9.1  Task Item --
5105
      --------------------
5106
 
5107
      --  TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5108
 
5109
      --------------------
5110
      -- 9.1  Task Body --
5111
      --------------------
5112
 
5113
      --  TASK_BODY ::=
5114
      --    task body task_DEFINING_IDENTIFIER
5115
      --      [ASPECT_SPECIFICATIONS]
5116
      --    is
5117
      --      DECLARATIVE_PART
5118
      --    begin
5119
      --      HANDLED_SEQUENCE_OF_STATEMENTS
5120
      --    end [task_IDENTIFIER];
5121
 
5122
      --  Gigi restriction: This node never appears
5123
 
5124
      --  N_Task_Body
5125
      --  Sloc points to TASK
5126
      --  Defining_Identifier (Node1)
5127
      --  Declarations (List2)
5128
      --  Handled_Statement_Sequence (Node4)
5129
      --  Is_Task_Master (Flag5-Sem)
5130
      --  Activation_Chain_Entity (Node3-Sem)
5131
      --  Corresponding_Spec (Node5-Sem)
5132
      --  Was_Originally_Stub (Flag13-Sem)
5133
 
5134
      -------------------------------------
5135
      -- 9.4  Protected Type Declaration --
5136
      -------------------------------------
5137
 
5138
      --  PROTECTED_TYPE_DECLARATION ::=
5139
      --    protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5140
      --      [ASPECT_SPECIFICATIONS]
5141
      --    is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5142
 
5143
      --  Note: protected type declarations are not permitted in Ada 83 mode
5144
 
5145
      --  N_Protected_Type_Declaration
5146
      --  Sloc points to PROTECTED
5147
      --  Defining_Identifier (Node1)
5148
      --  Discriminant_Specifications (List4) (set to No_List if no
5149
      --   discriminant part)
5150
      --  Interface_List (List2) (set to No_List if none)
5151
      --  Protected_Definition (Node3)
5152
      --  Corresponding_Body (Node5-Sem)
5153
 
5154
      ---------------------------------------
5155
      -- 9.4  Single Protected Declaration --
5156
      ---------------------------------------
5157
 
5158
      --  SINGLE_PROTECTED_DECLARATION ::=
5159
      --    protected DEFINING_IDENTIFIER
5160
      --      [ASPECT_SPECIFICATIONS]
5161
      --    is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5162
 
5163
      --  Note: single protected declarations are not allowed in Ada 83 mode
5164
 
5165
      --  N_Single_Protected_Declaration
5166
      --  Sloc points to PROTECTED
5167
      --  Defining_Identifier (Node1)
5168
      --  Interface_List (List2) (set to No_List if none)
5169
      --  Protected_Definition (Node3)
5170
 
5171
      -------------------------------
5172
      -- 9.4  Protected Definition --
5173
      -------------------------------
5174
 
5175
      --  PROTECTED_DEFINITION ::=
5176
      --      {PROTECTED_OPERATION_DECLARATION}
5177
      --    [private
5178
      --      {PROTECTED_ELEMENT_DECLARATION}]
5179
      --    end [protected_IDENTIFIER]
5180
 
5181
      --  N_Protected_Definition
5182
      --  Sloc points to first token of protected definition
5183
      --  Visible_Declarations (List2)
5184
      --  Private_Declarations (List3) (set to No_List if no private part)
5185
      --  End_Label (Node4)
5186
      --  Has_Pragma_Priority (Flag6-Sem)
5187
 
5188
      ------------------------------------------
5189
      -- 9.4  Protected Operation Declaration --
5190
      ------------------------------------------
5191
 
5192
      --  PROTECTED_OPERATION_DECLARATION ::=
5193
      --    SUBPROGRAM_DECLARATION
5194
      --  | ENTRY_DECLARATION
5195
      --  | REPRESENTATION_CLAUSE
5196
 
5197
      ----------------------------------------
5198
      -- 9.4  Protected Element Declaration --
5199
      ----------------------------------------
5200
 
5201
      --  PROTECTED_ELEMENT_DECLARATION ::=
5202
      --    PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
5203
 
5204
      -------------------------
5205
      -- 9.4  Protected Body --
5206
      -------------------------
5207
 
5208
      --  PROTECTED_BODY ::=
5209
      --    protected body DEFINING_IDENTIFIER
5210
      --      [ASPECT_SPECIFICATIONS];
5211
      --    is
5212
      --      {PROTECTED_OPERATION_ITEM}
5213
      --    end [protected_IDENTIFIER];
5214
 
5215
      --  Note: protected bodies are not allowed in Ada 83 mode
5216
 
5217
      --  Gigi restriction: This node never appears
5218
 
5219
      --  N_Protected_Body
5220
      --  Sloc points to PROTECTED
5221
      --  Defining_Identifier (Node1)
5222
      --  Declarations (List2) protected operation items (and pragmas)
5223
      --  End_Label (Node4)
5224
      --  Corresponding_Spec (Node5-Sem)
5225
      --  Was_Originally_Stub (Flag13-Sem)
5226
 
5227
      -----------------------------------
5228
      -- 9.4  Protected Operation Item --
5229
      -----------------------------------
5230
 
5231
      --  PROTECTED_OPERATION_ITEM ::=
5232
      --    SUBPROGRAM_DECLARATION
5233
      --  | SUBPROGRAM_BODY
5234
      --  | ENTRY_BODY
5235
      --  | REPRESENTATION_CLAUSE
5236
 
5237
      ------------------------------
5238
      -- 9.5.2  Entry Declaration --
5239
      ------------------------------
5240
 
5241
      --  ENTRY_DECLARATION ::=
5242
      --    [[not] overriding]
5243
      --    entry DEFINING_IDENTIFIER
5244
      --      [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
5245
 
5246
      --  N_Entry_Declaration
5247
      --  Sloc points to ENTRY
5248
      --  Defining_Identifier (Node1)
5249
      --  Discrete_Subtype_Definition (Node4) (set to Empty if not present)
5250
      --  Parameter_Specifications (List3) (set to No_List if no formal part)
5251
      --  Corresponding_Body (Node5-Sem)
5252
      --  Must_Override (Flag14) set if overriding indicator present
5253
      --  Must_Not_Override (Flag15) set if not_overriding indicator present
5254
 
5255
      --  Note: overriding indicator is an Ada 2005 feature
5256
 
5257
      -----------------------------
5258
      -- 9.5.2  Accept statement --
5259
      -----------------------------
5260
 
5261
      --  ACCEPT_STATEMENT ::=
5262
      --    accept entry_DIRECT_NAME
5263
      --      [(ENTRY_INDEX)] PARAMETER_PROFILE [do
5264
      --        HANDLED_SEQUENCE_OF_STATEMENTS
5265
      --    end [entry_IDENTIFIER]];
5266
 
5267
      --  Gigi restriction: This node never appears
5268
 
5269
      --  Note: there are no explicit declarations allowed in an accept
5270
      --  statement. However, the implicit declarations for any statement
5271
      --  identifiers (labels and block/loop identifiers) are declarations
5272
      --  that belong logically to the accept statement, and that is why
5273
      --  there is a Declarations field in this node.
5274
 
5275
      --  N_Accept_Statement
5276
      --  Sloc points to ACCEPT
5277
      --  Entry_Direct_Name (Node1)
5278
      --  Entry_Index (Node5) (set to Empty if not present)
5279
      --  Parameter_Specifications (List3) (set to No_List if no formal part)
5280
      --  Handled_Statement_Sequence (Node4)
5281
      --  Declarations (List2) (set to No_List if no declarations)
5282
 
5283
      ------------------------
5284
      -- 9.5.2  Entry Index --
5285
      ------------------------
5286
 
5287
      --  ENTRY_INDEX ::= EXPRESSION
5288
 
5289
      -----------------------
5290
      -- 9.5.2  Entry Body --
5291
      -----------------------
5292
 
5293
      --  ENTRY_BODY ::=
5294
      --    entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5295
      --      DECLARATIVE_PART
5296
      --    begin
5297
      --      HANDLED_SEQUENCE_OF_STATEMENTS
5298
      --    end [entry_IDENTIFIER];
5299
 
5300
      --  ENTRY_BARRIER ::= when CONDITION
5301
 
5302
      --  Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5303
      --  the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5304
      --  too full (it would otherwise have too many fields)
5305
 
5306
      --  Gigi restriction: This node never appears
5307
 
5308
      --  N_Entry_Body
5309
      --  Sloc points to ENTRY
5310
      --  Defining_Identifier (Node1)
5311
      --  Entry_Body_Formal_Part (Node5)
5312
      --  Declarations (List2)
5313
      --  Handled_Statement_Sequence (Node4)
5314
      --  Activation_Chain_Entity (Node3-Sem)
5315
 
5316
      -----------------------------------
5317
      -- 9.5.2  Entry Body Formal Part --
5318
      -----------------------------------
5319
 
5320
      --  ENTRY_BODY_FORMAL_PART ::=
5321
      --    [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5322
 
5323
      --  Note that an entry body formal part node is present even if it is
5324
      --  empty. This reflects the grammar, in which it is the components of
5325
      --  the entry body formal part that are optional, not the entry body
5326
      --  formal part itself. Also this means that the barrier condition
5327
      --  always has somewhere to be stored.
5328
 
5329
      --  Gigi restriction: This node never appears
5330
 
5331
      --  N_Entry_Body_Formal_Part
5332
      --  Sloc points to first token
5333
      --  Entry_Index_Specification (Node4) (set to Empty if not present)
5334
      --  Parameter_Specifications (List3) (set to No_List if no formal part)
5335
      --  Condition (Node1) from entry barrier of entry body
5336
 
5337
      --------------------------
5338
      -- 9.5.2  Entry Barrier --
5339
      --------------------------
5340
 
5341
      --  ENTRY_BARRIER ::= when CONDITION
5342
 
5343
      --------------------------------------
5344
      -- 9.5.2  Entry Index Specification --
5345
      --------------------------------------
5346
 
5347
      --  ENTRY_INDEX_SPECIFICATION ::=
5348
      --    for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5349
 
5350
      --  Gigi restriction: This node never appears
5351
 
5352
      --  N_Entry_Index_Specification
5353
      --  Sloc points to FOR
5354
      --  Defining_Identifier (Node1)
5355
      --  Discrete_Subtype_Definition (Node4)
5356
 
5357
      ---------------------------------
5358
      -- 9.5.3  Entry Call Statement --
5359
      ---------------------------------
5360
 
5361
      --  ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5362
 
5363
      --  The parser may generate a procedure call for this construct. The
5364
      --  semantic pass must correct this misidentification where needed.
5365
 
5366
      --  Gigi restriction: This node never appears
5367
 
5368
      --  N_Entry_Call_Statement
5369
      --  Sloc points to first token of name
5370
      --  Name (Node2)
5371
      --  Parameter_Associations (List3) (set to No_List if no
5372
      --   actual parameter part)
5373
      --  First_Named_Actual (Node4-Sem)
5374
 
5375
      ------------------------------
5376
      -- 9.5.4  Requeue Statement --
5377
      ------------------------------
5378
 
5379
      --  REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5380
 
5381
      --  Note: requeue statements are not permitted in Ada 83 mode
5382
 
5383
      --  Gigi restriction: This node never appears
5384
 
5385
      --  N_Requeue_Statement
5386
      --  Sloc points to REQUEUE
5387
      --  Name (Node2)
5388
      --  Abort_Present (Flag15)
5389
 
5390
      --------------------------
5391
      -- 9.6  Delay Statement --
5392
      --------------------------
5393
 
5394
      --  DELAY_STATEMENT ::=
5395
      --    DELAY_UNTIL_STATEMENT
5396
      --  | DELAY_RELATIVE_STATEMENT
5397
 
5398
      --------------------------------
5399
      -- 9.6  Delay Until Statement --
5400
      --------------------------------
5401
 
5402
      --  DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5403
 
5404
      --  Note: delay until statements are not permitted in Ada 83 mode
5405
 
5406
      --  Gigi restriction: This node never appears
5407
 
5408
      --  N_Delay_Until_Statement
5409
      --  Sloc points to DELAY
5410
      --  Expression (Node3)
5411
 
5412
      -----------------------------------
5413
      -- 9.6  Delay Relative Statement --
5414
      -----------------------------------
5415
 
5416
      --  DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5417
 
5418
      --  Gigi restriction: This node never appears
5419
 
5420
      --  N_Delay_Relative_Statement
5421
      --  Sloc points to DELAY
5422
      --  Expression (Node3)
5423
 
5424
      ---------------------------
5425
      -- 9.7  Select Statement --
5426
      ---------------------------
5427
 
5428
      --  SELECT_STATEMENT ::=
5429
      --    SELECTIVE_ACCEPT
5430
      --  | TIMED_ENTRY_CALL
5431
      --  | CONDITIONAL_ENTRY_CALL
5432
      --  | ASYNCHRONOUS_SELECT
5433
 
5434
      -----------------------------
5435
      -- 9.7.1  Selective Accept --
5436
      -----------------------------
5437
 
5438
      --  SELECTIVE_ACCEPT ::=
5439
      --    select
5440
      --      [GUARD]
5441
      --        SELECT_ALTERNATIVE
5442
      --    {or
5443
      --      [GUARD]
5444
      --        SELECT_ALTERNATIVE}
5445
      --    [else
5446
      --      SEQUENCE_OF_STATEMENTS]
5447
      --    end select;
5448
 
5449
      --  Gigi restriction: This node never appears
5450
 
5451
      --  Note: the guard expression, if present, appears in the node for
5452
      --  the select alternative.
5453
 
5454
      --  N_Selective_Accept
5455
      --  Sloc points to SELECT
5456
      --  Select_Alternatives (List1)
5457
      --  Else_Statements (List4) (set to No_List if no else part)
5458
 
5459
      ------------------
5460
      -- 9.7.1  Guard --
5461
      ------------------
5462
 
5463
      --  GUARD ::= when CONDITION =>
5464
 
5465
      --  As noted above, the CONDITION that is part of a GUARD is included
5466
      --  in the node for the select alternative for convenience.
5467
 
5468
      -------------------------------
5469
      -- 9.7.1  Select Alternative --
5470
      -------------------------------
5471
 
5472
      --  SELECT_ALTERNATIVE ::=
5473
      --    ACCEPT_ALTERNATIVE
5474
      --  | DELAY_ALTERNATIVE
5475
      --  | TERMINATE_ALTERNATIVE
5476
 
5477
      -------------------------------
5478
      -- 9.7.1  Accept Alternative --
5479
      -------------------------------
5480
 
5481
      --  ACCEPT_ALTERNATIVE ::=
5482
      --    ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5483
 
5484
      --  Gigi restriction: This node never appears
5485
 
5486
      --  N_Accept_Alternative
5487
      --  Sloc points to ACCEPT
5488
      --  Accept_Statement (Node2)
5489
      --  Condition (Node1) from the guard (set to Empty if no guard present)
5490
      --  Statements (List3) (set to Empty_List if no statements)
5491
      --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5492
      --  Accept_Handler_Records (List5-Sem)
5493
 
5494
      ------------------------------
5495
      -- 9.7.1  Delay Alternative --
5496
      ------------------------------
5497
 
5498
      --  DELAY_ALTERNATIVE ::=
5499
      --    DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5500
 
5501
      --  Gigi restriction: This node never appears
5502
 
5503
      --  N_Delay_Alternative
5504
      --  Sloc points to DELAY
5505
      --  Delay_Statement (Node2)
5506
      --  Condition (Node1) from the guard (set to Empty if no guard present)
5507
      --  Statements (List3) (set to Empty_List if no statements)
5508
      --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5509
 
5510
      ----------------------------------
5511
      -- 9.7.1  Terminate Alternative --
5512
      ----------------------------------
5513
 
5514
      --  TERMINATE_ALTERNATIVE ::= terminate;
5515
 
5516
      --  Gigi restriction: This node never appears
5517
 
5518
      --  N_Terminate_Alternative
5519
      --  Sloc points to TERMINATE
5520
      --  Condition (Node1) from the guard (set to Empty if no guard present)
5521
      --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5522
      --  Pragmas_After (List5) pragmas after alt (set to No_List if none)
5523
 
5524
      -----------------------------
5525
      -- 9.7.2  Timed Entry Call --
5526
      -----------------------------
5527
 
5528
      --  TIMED_ENTRY_CALL ::=
5529
      --    select
5530
      --      ENTRY_CALL_ALTERNATIVE
5531
      --    or
5532
      --      DELAY_ALTERNATIVE
5533
      --    end select;
5534
 
5535
      --  Gigi restriction: This node never appears
5536
 
5537
      --  N_Timed_Entry_Call
5538
      --  Sloc points to SELECT
5539
      --  Entry_Call_Alternative (Node1)
5540
      --  Delay_Alternative (Node4)
5541
 
5542
      -----------------------------------
5543
      -- 9.7.2  Entry Call Alternative --
5544
      -----------------------------------
5545
 
5546
      --  ENTRY_CALL_ALTERNATIVE ::=
5547
      --    PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5548
 
5549
      --  PROCEDURE_OR_ENTRY_CALL ::=
5550
      --    PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5551
 
5552
      --  Gigi restriction: This node never appears
5553
 
5554
      --  N_Entry_Call_Alternative
5555
      --  Sloc points to first token of entry call statement
5556
      --  Entry_Call_Statement (Node1)
5557
      --  Statements (List3) (set to Empty_List if no statements)
5558
      --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5559
 
5560
      -----------------------------------
5561
      -- 9.7.3  Conditional Entry Call --
5562
      -----------------------------------
5563
 
5564
      --  CONDITIONAL_ENTRY_CALL ::=
5565
      --    select
5566
      --      ENTRY_CALL_ALTERNATIVE
5567
      --    else
5568
      --      SEQUENCE_OF_STATEMENTS
5569
      --    end select;
5570
 
5571
      --  Gigi restriction: This node never appears
5572
 
5573
      --  N_Conditional_Entry_Call
5574
      --  Sloc points to SELECT
5575
      --  Entry_Call_Alternative (Node1)
5576
      --  Else_Statements (List4)
5577
 
5578
      --------------------------------
5579
      -- 9.7.4  Asynchronous Select --
5580
      --------------------------------
5581
 
5582
      --  ASYNCHRONOUS_SELECT ::=
5583
      --    select
5584
      --      TRIGGERING_ALTERNATIVE
5585
      --    then abort
5586
      --      ABORTABLE_PART
5587
      --    end select;
5588
 
5589
      --  Note: asynchronous select is not permitted in Ada 83 mode
5590
 
5591
      --  Gigi restriction: This node never appears
5592
 
5593
      --  N_Asynchronous_Select
5594
      --  Sloc points to SELECT
5595
      --  Triggering_Alternative (Node1)
5596
      --  Abortable_Part (Node2)
5597
 
5598
      -----------------------------------
5599
      -- 9.7.4  Triggering Alternative --
5600
      -----------------------------------
5601
 
5602
      --  TRIGGERING_ALTERNATIVE ::=
5603
      --    TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5604
 
5605
      --  Gigi restriction: This node never appears
5606
 
5607
      --  N_Triggering_Alternative
5608
      --  Sloc points to first token of triggering statement
5609
      --  Triggering_Statement (Node1)
5610
      --  Statements (List3) (set to Empty_List if no statements)
5611
      --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5612
 
5613
      ---------------------------------
5614
      -- 9.7.4  Triggering Statement --
5615
      ---------------------------------
5616
 
5617
      --  TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5618
 
5619
      ---------------------------
5620
      -- 9.7.4  Abortable Part --
5621
      ---------------------------
5622
 
5623
      --  ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5624
 
5625
      --  Gigi restriction: This node never appears
5626
 
5627
      --  N_Abortable_Part
5628
      --  Sloc points to ABORT
5629
      --  Statements (List3)
5630
 
5631
      --------------------------
5632
      -- 9.8  Abort Statement --
5633
      --------------------------
5634
 
5635
      --  ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5636
 
5637
      --  Gigi restriction: This node never appears
5638
 
5639
      --  N_Abort_Statement
5640
      --  Sloc points to ABORT
5641
      --  Names (List2)
5642
 
5643
      -------------------------
5644
      -- 10.1.1  Compilation --
5645
      -------------------------
5646
 
5647
      --  COMPILATION ::= {COMPILATION_UNIT}
5648
 
5649
      --  There is no explicit node in the tree for a compilation, since in
5650
      --  general the compiler is processing only a single compilation unit
5651
      --  at a time. It is possible to parse multiple units in syntax check
5652
      --  only mode, but the trees are discarded in that case.
5653
 
5654
      ------------------------------
5655
      -- 10.1.1  Compilation Unit --
5656
      ------------------------------
5657
 
5658
      --  COMPILATION_UNIT ::=
5659
      --    CONTEXT_CLAUSE LIBRARY_ITEM
5660
      --  | CONTEXT_CLAUSE SUBUNIT
5661
 
5662
      --  The N_Compilation_Unit node itself represents the above syntax.
5663
      --  However, there are two additional items not reflected in the above
5664
      --  syntax. First we have the global declarations that are added by the
5665
      --  code generator. These are outer level declarations (so they cannot
5666
      --  be represented as being inside the units). An example is the wrapper
5667
      --  subprograms that are created to do ABE checking. As always a list of
5668
      --  declarations can contain actions as well (i.e. statements), and such
5669
      --  statements are executed as part of the elaboration of the unit. Note
5670
      --  that all such declarations are elaborated before the library unit.
5671
 
5672
      --  Similarly, certain actions need to be elaborated at the completion
5673
      --  of elaboration of the library unit (notably the statement that sets
5674
      --  the Boolean flag indicating that elaboration is complete).
5675
 
5676
      --  The third item not reflected in the syntax is pragmas that appear
5677
      --  after the compilation unit. As always pragmas are a problem since
5678
      --  they are not part of the formal syntax, but can be stuck into the
5679
      --  source following a set of ad hoc rules, and we have to find an ad
5680
      --  hoc way of sticking them into the tree. For pragmas that appear
5681
      --  before the library unit, we just consider them to be part of the
5682
      --  context clause, and pragmas can appear in the Context_Items list
5683
      --  of the compilation unit. However, pragmas can also appear after
5684
      --  the library item.
5685
 
5686
      --  To deal with all these problems, we create an auxiliary node for
5687
      --  a compilation unit, referenced from the N_Compilation_Unit node,
5688
      --  that contains these items.
5689
 
5690
      --  N_Compilation_Unit
5691
      --  Sloc points to first token of defining unit name
5692
      --  Library_Unit (Node4-Sem) corresponding/parent spec/body
5693
      --  Context_Items (List1) context items and pragmas preceding unit
5694
      --  Private_Present (Flag15) set if library unit has private keyword
5695
      --  Unit (Node2) library item or subunit
5696
      --  Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5697
      --  Has_No_Elaboration_Code (Flag17-Sem)
5698
      --  Body_Required (Flag13-Sem) set for spec if body is required
5699
      --  Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5700
      --  Context_Pending (Flag16-Sem)
5701
      --  First_Inlined_Subprogram (Node3-Sem)
5702
      --  Has_Pragma_Suppress_All (Flag14-Sem)
5703
 
5704
      --  N_Compilation_Unit_Aux
5705
      --  Sloc is a copy of the Sloc from the N_Compilation_Unit node
5706
      --  Declarations (List2) (set to No_List if no global declarations)
5707
      --  Actions (List1) (set to No_List if no actions)
5708
      --  Pragmas_After (List5) pragmas after unit (set to No_List if none)
5709
      --  Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5710
      --  Default_Storage_Pool (Node3-Sem)
5711
 
5712
      --------------------------
5713
      -- 10.1.1  Library Item --
5714
      --------------------------
5715
 
5716
      --  LIBRARY_ITEM ::=
5717
      --    [private] LIBRARY_UNIT_DECLARATION
5718
      --  | LIBRARY_UNIT_BODY
5719
      --  | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5720
 
5721
      --  Note: PRIVATE is not allowed in Ada 83 mode
5722
 
5723
      --  There is no explicit node in the tree for library item, instead
5724
      --  the declaration or body, and the flag for private if present,
5725
      --  appear in the N_Compilation_Unit node.
5726
 
5727
      --------------------------------------
5728
      -- 10.1.1  Library Unit Declaration --
5729
      --------------------------------------
5730
 
5731
      --  LIBRARY_UNIT_DECLARATION ::=
5732
      --    SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5733
      --  | GENERIC_DECLARATION    | GENERIC_INSTANTIATION
5734
 
5735
      -----------------------------------------------
5736
      -- 10.1.1  Library Unit Renaming Declaration --
5737
      -----------------------------------------------
5738
 
5739
      --  LIBRARY_UNIT_RENAMING_DECLARATION ::=
5740
      --    PACKAGE_RENAMING_DECLARATION
5741
      --  | GENERIC_RENAMING_DECLARATION
5742
      --  | SUBPROGRAM_RENAMING_DECLARATION
5743
 
5744
      -------------------------------
5745
      -- 10.1.1  Library unit body --
5746
      -------------------------------
5747
 
5748
      --  LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5749
 
5750
      ------------------------------
5751
      -- 10.1.1  Parent Unit Name --
5752
      ------------------------------
5753
 
5754
      --  PARENT_UNIT_NAME ::= NAME
5755
 
5756
      ----------------------------
5757
      -- 10.1.2  Context clause --
5758
      ----------------------------
5759
 
5760
      --  CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5761
 
5762
      --  The context clause can include pragmas, and any pragmas that appear
5763
      --  before the context clause proper (i.e. all configuration pragmas,
5764
      --  also appear at the front of this list).
5765
 
5766
      --------------------------
5767
      -- 10.1.2  Context_Item --
5768
      --------------------------
5769
 
5770
      --  CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE  | WITH_TYPE_CLAUSE
5771
 
5772
      -------------------------
5773
      -- 10.1.2  With clause --
5774
      -------------------------
5775
 
5776
      --  WITH_CLAUSE ::=
5777
      --    with library_unit_NAME {,library_unit_NAME};
5778
 
5779
      --  A separate With clause is built for each name, so that we have
5780
      --  a Corresponding_Spec field for each with'ed spec. The flags
5781
      --  First_Name and Last_Name are used to reconstruct the exact
5782
      --  source form. When a list of names appears in one with clause,
5783
      --  the first name in the list has First_Name set, and the last
5784
      --  has Last_Name set. If the with clause has only one name, then
5785
      --  both of the flags First_Name and Last_Name are set in this name.
5786
 
5787
      --  Note: in the case of implicit with's that are installed by the
5788
      --  Rtsfind routine, Implicit_With is set, and the Sloc is typically
5789
      --  set to Standard_Location, but it is incorrect to test the Sloc
5790
      --  to find out if a with clause is implicit, test the flag instead.
5791
 
5792
      --  N_With_Clause
5793
      --  Sloc points to first token of library unit name
5794
      --  Withed_Body (Node1-Sem)
5795
      --  Name (Node2)
5796
      --  Next_Implicit_With (Node3-Sem)
5797
      --  Library_Unit (Node4-Sem)
5798
      --  Corresponding_Spec (Node5-Sem)
5799
      --  First_Name (Flag5) (set to True if first name or only one name)
5800
      --  Last_Name (Flag6) (set to True if last name or only one name)
5801
      --  Context_Installed (Flag13-Sem)
5802
      --  Elaborate_Present (Flag4-Sem)
5803
      --  Elaborate_All_Present (Flag14-Sem)
5804
      --  Elaborate_All_Desirable (Flag9-Sem)
5805
      --  Elaborate_Desirable (Flag11-Sem)
5806
      --  Private_Present (Flag15) set if with_clause has private keyword
5807
      --  Implicit_With (Flag16-Sem)
5808
      --  Limited_Present (Flag17) set if LIMITED is present
5809
      --  Limited_View_Installed (Flag18-Sem)
5810
      --  Unreferenced_In_Spec (Flag7-Sem)
5811
      --  No_Entities_Ref_In_Spec (Flag8-Sem)
5812
 
5813
      --  Note: Limited_Present and Limited_View_Installed give support to
5814
      --        Ada 2005 (AI-50217).
5815
      --  Similarly, Private_Present gives support to AI-50262.
5816
 
5817
      ----------------------
5818
      -- With_Type clause --
5819
      ----------------------
5820
 
5821
      --  This is a GNAT extension, used to implement mutually recursive
5822
      --  types declared in different packages.
5823
      --  Note: this is now obsolete. The functionality of this construct
5824
      --  is now implemented by the Ada 2005 Limited_with_Clause.
5825
 
5826
      ---------------------
5827
      -- 10.2  Body stub --
5828
      ---------------------
5829
 
5830
      --  BODY_STUB ::=
5831
      --    SUBPROGRAM_BODY_STUB
5832
      --  | PACKAGE_BODY_STUB
5833
      --  | TASK_BODY_STUB
5834
      --  | PROTECTED_BODY_STUB
5835
 
5836
      ----------------------------------
5837
      -- 10.1.3  Subprogram Body Stub --
5838
      ----------------------------------
5839
 
5840
      --  SUBPROGRAM_BODY_STUB ::=
5841
      --    SUBPROGRAM_SPECIFICATION is separate;
5842
 
5843
      --  N_Subprogram_Body_Stub
5844
      --  Sloc points to FUNCTION or PROCEDURE
5845
      --  Specification (Node1)
5846
      --  Library_Unit (Node4-Sem) points to the subunit
5847
      --  Corresponding_Body (Node5-Sem)
5848
 
5849
      -------------------------------
5850
      -- 10.1.3  Package Body Stub --
5851
      -------------------------------
5852
 
5853
      --  PACKAGE_BODY_STUB ::=
5854
      --    package body DEFINING_IDENTIFIER is separate;
5855
 
5856
      --  N_Package_Body_Stub
5857
      --  Sloc points to PACKAGE
5858
      --  Defining_Identifier (Node1)
5859
      --  Library_Unit (Node4-Sem) points to the subunit
5860
      --  Corresponding_Body (Node5-Sem)
5861
 
5862
      ----------------------------
5863
      -- 10.1.3  Task Body Stub --
5864
      ----------------------------
5865
 
5866
      --  TASK_BODY_STUB ::=
5867
      --    task body DEFINING_IDENTIFIER is separate;
5868
 
5869
      --  N_Task_Body_Stub
5870
      --  Sloc points to TASK
5871
      --  Defining_Identifier (Node1)
5872
      --  Library_Unit (Node4-Sem) points to the subunit
5873
      --  Corresponding_Body (Node5-Sem)
5874
 
5875
      ---------------------------------
5876
      -- 10.1.3  Protected Body Stub --
5877
      ---------------------------------
5878
 
5879
      --  PROTECTED_BODY_STUB ::=
5880
      --    protected body DEFINING_IDENTIFIER is separate;
5881
 
5882
      --  Note: protected body stubs are not allowed in Ada 83 mode
5883
 
5884
      --  N_Protected_Body_Stub
5885
      --  Sloc points to PROTECTED
5886
      --  Defining_Identifier (Node1)
5887
      --  Library_Unit (Node4-Sem) points to the subunit
5888
      --  Corresponding_Body (Node5-Sem)
5889
 
5890
      ---------------------
5891
      -- 10.1.3  Subunit --
5892
      ---------------------
5893
 
5894
      --  SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5895
 
5896
      --  N_Subunit
5897
      --  Sloc points to SEPARATE
5898
      --  Name (Node2) is the name of the parent unit
5899
      --  Proper_Body (Node1) is the subunit body
5900
      --  Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5901
 
5902
      ---------------------------------
5903
      -- 11.1  Exception Declaration --
5904
      ---------------------------------
5905
 
5906
      --  EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
5907
      --    [ASPECT_SPECIFICATIONS];
5908
 
5909
      --  For consistency with object declarations etc., the parser converts
5910
      --  the case of multiple identifiers being declared to a series of
5911
      --  declarations in which the expression is copied, using the More_Ids
5912
      --  and Prev_Ids flags to remember the source form as described in the
5913
      --  section on "Handling of Defining Identifier Lists".
5914
 
5915
      --  N_Exception_Declaration
5916
      --  Sloc points to EXCEPTION
5917
      --  Defining_Identifier (Node1)
5918
      --  Expression (Node3-Sem)
5919
      --  Renaming_Exception (Node2-Sem)
5920
      --  More_Ids (Flag5) (set to False if no more identifiers in list)
5921
      --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5922
 
5923
      ------------------------------------------
5924
      -- 11.2  Handled Sequence Of Statements --
5925
      ------------------------------------------
5926
 
5927
      --  HANDLED_SEQUENCE_OF_STATEMENTS ::=
5928
      --      SEQUENCE_OF_STATEMENTS
5929
      --    [exception
5930
      --      EXCEPTION_HANDLER
5931
      --      {EXCEPTION_HANDLER}]
5932
      --    [at end
5933
      --      cleanup_procedure_call (param, param, param, ...);]
5934
 
5935
      --  The AT END phrase is a GNAT extension to provide for cleanups. It is
5936
      --  used only internally currently, but is considered to be syntactic.
5937
      --  At the moment, the only cleanup action allowed is a single call to
5938
      --  a parameterless procedure, and the Identifier field of the node is
5939
      --  the procedure to be called. The cleanup action occurs whenever the
5940
      --  sequence of statements is left for any reason. The possible reasons
5941
      --  are:
5942
      --      1. reaching the end of the sequence
5943
      --      2. exit, return, or goto
5944
      --      3. exception or abort
5945
      --  For some back ends, such as gcc with ZCX, "at end" is implemented
5946
      --  entirely in the back end. In this case, a handled sequence of
5947
      --  statements with an "at end" cannot also have exception handlers.
5948
      --  For other back ends, such as gcc with SJLJ and .NET, the
5949
      --  implementation is split between the front end and back end; the front
5950
      --  end implements 3, and the back end implements 1 and 2. In this case,
5951
      --  if there is an "at end", the front end inserts the appropriate
5952
      --  exception handler, and this handler takes precedence over "at end"
5953
      --  in case of exception.
5954
 
5955
      --  The inserted exception handler is of the form:
5956
 
5957
      --     when all others =>
5958
      --        cleanup;
5959
      --        raise;
5960
 
5961
      --  where cleanup is the procedure to be called. The reason we do this is
5962
      --  so that the front end can handle the necessary entries in the
5963
      --  exception tables, and other exception handler actions required as
5964
      --  part of the normal handling for exception handlers.
5965
 
5966
      --  The AT END cleanup handler protects only the sequence of statements
5967
      --  (not the associated declarations of the parent), just like exception
5968
      --  handlers. The big difference is that the cleanup procedure is called
5969
      --  on either a normal or an abnormal exit from the statement sequence.
5970
 
5971
      --  Note: the list of Exception_Handlers can contain pragmas as well
5972
      --  as actual handlers. In practice these pragmas can only occur at
5973
      --  the start of the list, since any pragmas occurring later on will
5974
      --  be included in the statement list of the corresponding handler.
5975
 
5976
      --  Note: although in the Ada syntax, the sequence of statements in
5977
      --  a handled sequence of statements can only contain statements, we
5978
      --  allow free mixing of declarations and statements in the resulting
5979
      --  expanded tree. This is for example used to deal with the case of
5980
      --  a cleanup procedure that must handle declarations as well as the
5981
      --  statements of a block.
5982
 
5983
      --  N_Handled_Sequence_Of_Statements
5984
      --  Sloc points to first token of first statement
5985
      --  Statements (List3)
5986
      --  End_Label (Node4) (set to Empty if expander generated)
5987
      --  Exception_Handlers (List5) (set to No_List if none present)
5988
      --  At_End_Proc (Node1) (set to Empty if no clean up procedure)
5989
      --  First_Real_Statement (Node2-Sem)
5990
 
5991
      --  Note: the parent always contains a Declarations field which contains
5992
      --  declarations associated with the handled sequence of statements. This
5993
      --  is true even in the case of an accept statement (see description of
5994
      --  the N_Accept_Statement node).
5995
 
5996
      --  End_Label refers to the containing construct
5997
 
5998
      -----------------------------
5999
      -- 11.2  Exception Handler --
6000
      -----------------------------
6001
 
6002
      --  EXCEPTION_HANDLER ::=
6003
      --    when [CHOICE_PARAMETER_SPECIFICATION :]
6004
      --      EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
6005
      --        SEQUENCE_OF_STATEMENTS
6006
 
6007
      --  Note: choice parameter specification is not allowed in Ada 83 mode
6008
 
6009
      --  N_Exception_Handler
6010
      --  Sloc points to WHEN
6011
      --  Choice_Parameter (Node2) (set to Empty if not present)
6012
      --  Exception_Choices (List4)
6013
      --  Statements (List3)
6014
      --  Exception_Label (Node5-Sem) (set to Empty of not present)
6015
      --  Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
6016
      --  Local_Raise_Not_OK (Flag7-Sem)
6017
      --  Has_Local_Raise (Flag8-Sem)
6018
 
6019
      ------------------------------------------
6020
      -- 11.2  Choice parameter specification --
6021
      ------------------------------------------
6022
 
6023
      --  CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
6024
 
6025
      ----------------------------
6026
      -- 11.2  Exception Choice --
6027
      ----------------------------
6028
 
6029
      --  EXCEPTION_CHOICE ::= exception_NAME | others
6030
 
6031
      --  Except in the case of OTHERS, no explicit node appears in the tree
6032
      --  for exception choice. Instead the exception name appears directly.
6033
      --  An OTHERS choice is represented by a N_Others_Choice node (see
6034
      --  section 3.8.1.
6035
 
6036
      --  Note: for the exception choice created for an at end handler, the
6037
      --  exception choice is an N_Others_Choice node with All_Others set.
6038
 
6039
      ---------------------------
6040
      -- 11.3  Raise Statement --
6041
      ---------------------------
6042
 
6043
      --  RAISE_STATEMENT ::= raise [exception_NAME];
6044
 
6045
      --  In Ada 2005, we have
6046
 
6047
      --  RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
6048
 
6049
      --  N_Raise_Statement
6050
      --  Sloc points to RAISE
6051
      --  Name (Node2) (set to Empty if no exception name present)
6052
      --  Expression (Node3) (set to Empty if no expression present)
6053
      --  From_At_End (Flag4-Sem)
6054
 
6055
      -------------------------------
6056
      -- 12.1  Generic Declaration --
6057
      -------------------------------
6058
 
6059
      --  GENERIC_DECLARATION ::=
6060
      --    GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
6061
 
6062
      ------------------------------------------
6063
      -- 12.1  Generic Subprogram Declaration --
6064
      ------------------------------------------
6065
 
6066
      --  GENERIC_SUBPROGRAM_DECLARATION ::=
6067
      --    GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
6068
 
6069
      --  Note: Generic_Formal_Declarations can include pragmas
6070
 
6071
      --  N_Generic_Subprogram_Declaration
6072
      --  Sloc points to GENERIC
6073
      --  Specification (Node1) subprogram specification
6074
      --  Corresponding_Body (Node5-Sem)
6075
      --  Generic_Formal_Declarations (List2) from generic formal part
6076
      --  Parent_Spec (Node4-Sem)
6077
 
6078
      ---------------------------------------
6079
      -- 12.1  Generic Package Declaration --
6080
      ---------------------------------------
6081
 
6082
      --  GENERIC_PACKAGE_DECLARATION ::=
6083
      --    GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
6084
      --      [ASPECT_SPECIFICATIONS];
6085
 
6086
      --  Note: when we do generics right, the Activation_Chain_Entity entry
6087
      --  for this node can be removed (since the expander won't see generic
6088
      --  units any more)???.
6089
 
6090
      --  Note: Generic_Formal_Declarations can include pragmas
6091
 
6092
      --  N_Generic_Package_Declaration
6093
      --  Sloc points to GENERIC
6094
      --  Specification (Node1) package specification
6095
      --  Corresponding_Body (Node5-Sem)
6096
      --  Generic_Formal_Declarations (List2) from generic formal part
6097
      --  Parent_Spec (Node4-Sem)
6098
      --  Activation_Chain_Entity (Node3-Sem)
6099
 
6100
      -------------------------------
6101
      -- 12.1  Generic Formal Part --
6102
      -------------------------------
6103
 
6104
      --  GENERIC_FORMAL_PART ::=
6105
      --    generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
6106
 
6107
      ------------------------------------------------
6108
      -- 12.1  Generic Formal Parameter Declaration --
6109
      ------------------------------------------------
6110
 
6111
      --  GENERIC_FORMAL_PARAMETER_DECLARATION ::=
6112
      --    FORMAL_OBJECT_DECLARATION
6113
      --  | FORMAL_TYPE_DECLARATION
6114
      --  | FORMAL_SUBPROGRAM_DECLARATION
6115
      --  | FORMAL_PACKAGE_DECLARATION
6116
 
6117
      ---------------------------------
6118
      -- 12.3  Generic Instantiation --
6119
      ---------------------------------
6120
 
6121
      --  GENERIC_INSTANTIATION ::=
6122
      --    package DEFINING_PROGRAM_UNIT_NAME is
6123
      --      new generic_package_NAME [GENERIC_ACTUAL_PART]
6124
      --        [ASPECT_SPECIFICATIONS];
6125
      --  | [[not] overriding]
6126
      --    procedure DEFINING_PROGRAM_UNIT_NAME is
6127
      --      new generic_procedure_NAME [GENERIC_ACTUAL_PART]
6128
      --        [ASPECT_SPECIFICATIONS];
6129
      --  | [[not] overriding]
6130
      --    function DEFINING_DESIGNATOR is
6131
      --      new generic_function_NAME [GENERIC_ACTUAL_PART]
6132
      --        [ASPECT_SPECIFICATIONS];
6133
 
6134
      --  N_Package_Instantiation
6135
      --  Sloc points to PACKAGE
6136
      --  Defining_Unit_Name (Node1)
6137
      --  Name (Node2)
6138
      --  Generic_Associations (List3) (set to No_List if no
6139
      --   generic actual part)
6140
      --  Parent_Spec (Node4-Sem)
6141
      --  Instance_Spec (Node5-Sem)
6142
      --  ABE_Is_Certain (Flag18-Sem)
6143
 
6144
      --  N_Procedure_Instantiation
6145
      --  Sloc points to PROCEDURE
6146
      --  Defining_Unit_Name (Node1)
6147
      --  Name (Node2)
6148
      --  Parent_Spec (Node4-Sem)
6149
      --  Generic_Associations (List3) (set to No_List if no
6150
      --   generic actual part)
6151
      --  Instance_Spec (Node5-Sem)
6152
      --  Must_Override (Flag14) set if overriding indicator present
6153
      --  Must_Not_Override (Flag15) set if not_overriding indicator present
6154
      --  ABE_Is_Certain (Flag18-Sem)
6155
 
6156
      --  N_Function_Instantiation
6157
      --  Sloc points to FUNCTION
6158
      --  Defining_Unit_Name (Node1)
6159
      --  Name (Node2)
6160
      --  Generic_Associations (List3) (set to No_List if no
6161
      --   generic actual part)
6162
      --  Parent_Spec (Node4-Sem)
6163
      --  Instance_Spec (Node5-Sem)
6164
      --  Must_Override (Flag14) set if overriding indicator present
6165
      --  Must_Not_Override (Flag15) set if not_overriding indicator present
6166
      --  ABE_Is_Certain (Flag18-Sem)
6167
 
6168
      --  Note: overriding indicator is an Ada 2005 feature
6169
 
6170
      -------------------------------
6171
      -- 12.3  Generic Actual Part --
6172
      -------------------------------
6173
 
6174
      --  GENERIC_ACTUAL_PART ::=
6175
      --    (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
6176
 
6177
      -------------------------------
6178
      -- 12.3  Generic Association --
6179
      -------------------------------
6180
 
6181
      --  GENERIC_ASSOCIATION ::=
6182
      --    [generic_formal_parameter_SELECTOR_NAME =>]
6183
 
6184
      --  Note: unlike the procedure call case, a generic association node
6185
      --  is generated for every association, even if no formal parameter
6186
      --  selector name is present. In this case the parser will leave the
6187
      --  Selector_Name field set to Empty, to be filled in later by the
6188
      --  semantic pass.
6189
 
6190
      --  In Ada 2005, a formal may be associated with a box, if the
6191
      --  association is part of the list of actuals for a formal package.
6192
      --  If the association is given by  OTHERS => <>, the association is
6193
      --  an N_Others_Choice.
6194
 
6195
      --  N_Generic_Association
6196
      --  Sloc points to first token of generic association
6197
      --  Selector_Name (Node2) (set to Empty if no formal
6198
      --   parameter selector name)
6199
      --  Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
6200
      --  Box_Present (Flag15) (for formal_package associations with a box)
6201
 
6202
      ---------------------------------------------
6203
      -- 12.3  Explicit Generic Actual Parameter --
6204
      ---------------------------------------------
6205
 
6206
      --  EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
6207
      --    EXPRESSION      | variable_NAME   | subprogram_NAME
6208
      --  | entry_NAME      | SUBTYPE_MARK    | package_instance_NAME
6209
 
6210
      -------------------------------------
6211
      -- 12.4  Formal Object Declaration --
6212
      -------------------------------------
6213
 
6214
      --  FORMAL_OBJECT_DECLARATION ::=
6215
      --    DEFINING_IDENTIFIER_LIST :
6216
      --      MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
6217
      --        [ASPECT_SPECIFICATIONS];
6218
      --  | DEFINING_IDENTIFIER_LIST :
6219
      --      MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
6220
      --        [ASPECT_SPECIFICATIONS];
6221
 
6222
      --  Although the syntax allows multiple identifiers in the list, the
6223
      --  semantics is as though successive declarations were given with
6224
      --  identical type definition and expression components. To simplify
6225
      --  semantic processing, the parser represents a multiple declaration
6226
      --  case as a sequence of single declarations, using the More_Ids and
6227
      --  Prev_Ids flags to preserve the original source form as described
6228
      --  in the section on "Handling of Defining Identifier Lists".
6229
 
6230
      --  N_Formal_Object_Declaration
6231
      --  Sloc points to first identifier
6232
      --  Defining_Identifier (Node1)
6233
      --  In_Present (Flag15)
6234
      --  Out_Present (Flag17)
6235
      --  Null_Exclusion_Present (Flag11) (set to False if not present)
6236
      --  Subtype_Mark (Node4) (set to Empty if not present)
6237
      --  Access_Definition (Node3) (set to Empty if not present)
6238
      --  Default_Expression (Node5) (set to Empty if no default expression)
6239
      --  More_Ids (Flag5) (set to False if no more identifiers in list)
6240
      --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6241
 
6242
      -----------------------------------
6243
      -- 12.5  Formal Type Declaration --
6244
      -----------------------------------
6245
 
6246
      --  FORMAL_TYPE_DECLARATION ::=
6247
      --    type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
6248
      --      is FORMAL_TYPE_DEFINITION
6249
      --        [ASPECT_SPECIFICATIONS];
6250
      --  | type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [is tagged]
6251
 
6252
      --  N_Formal_Type_Declaration
6253
      --  Sloc points to TYPE
6254
      --  Defining_Identifier (Node1)
6255
      --  Formal_Type_Definition (Node3)
6256
      --  Discriminant_Specifications (List4) (set to No_List if no
6257
      --   discriminant part)
6258
      --  Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
6259
 
6260
      ----------------------------------
6261
      -- 12.5  Formal type definition --
6262
      ----------------------------------
6263
 
6264
      --  FORMAL_TYPE_DEFINITION ::=
6265
      --    FORMAL_PRIVATE_TYPE_DEFINITION
6266
      --  | FORMAL_DERIVED_TYPE_DEFINITION
6267
      --  | FORMAL_DISCRETE_TYPE_DEFINITION
6268
      --  | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
6269
      --  | FORMAL_MODULAR_TYPE_DEFINITION
6270
      --  | FORMAL_FLOATING_POINT_DEFINITION
6271
      --  | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
6272
      --  | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
6273
      --  | FORMAL_ARRAY_TYPE_DEFINITION
6274
      --  | FORMAL_ACCESS_TYPE_DEFINITION
6275
      --  | FORMAL_INTERFACE_TYPE_DEFINITION
6276
      --  | FORMAL_INCOMPLETE_TYPE_DEFINITION
6277
 
6278
      --  The Ada 2012 syntax introduces two new non-terminals:
6279
      --  Formal_{Complete,Incomplete}_Type_Declaration just to introduce
6280
      --  the latter category. Here we introduce an incomplete type definition
6281
      --  in order to preserve as much as possible the existing structure.
6282
 
6283
      ---------------------------------------------
6284
      -- 12.5.1  Formal Private Type Definition --
6285
      ---------------------------------------------
6286
 
6287
      --  FORMAL_PRIVATE_TYPE_DEFINITION ::=
6288
      --    [[abstract] tagged] [limited] private
6289
 
6290
      --  Note: TAGGED is not allowed in Ada 83 mode
6291
 
6292
      --  N_Formal_Private_Type_Definition
6293
      --  Sloc points to PRIVATE
6294
      --  Abstract_Present (Flag4)
6295
      --  Tagged_Present (Flag15)
6296
      --  Limited_Present (Flag17)
6297
 
6298
      --------------------------------------------
6299
      -- 12.5.1  Formal Derived Type Definition --
6300
      --------------------------------------------
6301
 
6302
      --  FORMAL_DERIVED_TYPE_DEFINITION ::=
6303
      --    [abstract] [limited | synchronized]
6304
      --       new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6305
      --  Note: this construct is not allowed in Ada 83 mode
6306
 
6307
      --  N_Formal_Derived_Type_Definition
6308
      --  Sloc points to NEW
6309
      --  Subtype_Mark (Node4)
6310
      --  Private_Present (Flag15)
6311
      --  Abstract_Present (Flag4)
6312
      --  Limited_Present (Flag17)
6313
      --  Synchronized_Present (Flag7)
6314
      --  Interface_List (List2) (set to No_List if none)
6315
 
6316
      -----------------------------------------------
6317
      -- 12.5.1  Formal Incomplete Type Definition --
6318
      -----------------------------------------------
6319
 
6320
      --  FORMAL_INCOMPLETE_TYPE_DEFINITION ::= [tagged]
6321
 
6322
      --  N_Formal_Incomplete_Type_Definition
6323
      --  Sloc points to identifier of parent
6324
      --  Tagged_Present (Flag15)
6325
 
6326
      ---------------------------------------------
6327
      -- 12.5.2  Formal Discrete Type Definition --
6328
      ---------------------------------------------
6329
 
6330
      --  FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6331
 
6332
      --  N_Formal_Discrete_Type_Definition
6333
      --  Sloc points to (
6334
 
6335
      ---------------------------------------------------
6336
      -- 12.5.2  Formal Signed Integer Type Definition --
6337
      ---------------------------------------------------
6338
 
6339
      --  FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6340
 
6341
      --  N_Formal_Signed_Integer_Type_Definition
6342
      --  Sloc points to RANGE
6343
 
6344
      --------------------------------------------
6345
      -- 12.5.2  Formal Modular Type Definition --
6346
      --------------------------------------------
6347
 
6348
      --  FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6349
 
6350
      --  N_Formal_Modular_Type_Definition
6351
      --  Sloc points to MOD
6352
 
6353
      ----------------------------------------------
6354
      -- 12.5.2  Formal Floating Point Definition --
6355
      ----------------------------------------------
6356
 
6357
      --  FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6358
 
6359
      --  N_Formal_Floating_Point_Definition
6360
      --  Sloc points to DIGITS
6361
 
6362
      ----------------------------------------------------
6363
      -- 12.5.2  Formal Ordinary Fixed Point Definition --
6364
      ----------------------------------------------------
6365
 
6366
      --  FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6367
 
6368
      --  N_Formal_Ordinary_Fixed_Point_Definition
6369
      --  Sloc points to DELTA
6370
 
6371
      ---------------------------------------------------
6372
      -- 12.5.2  Formal Decimal Fixed Point Definition --
6373
      ---------------------------------------------------
6374
 
6375
      --  FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6376
 
6377
      --  Note: formal decimal fixed point definition not allowed in Ada 83
6378
 
6379
      --  N_Formal_Decimal_Fixed_Point_Definition
6380
      --  Sloc points to DELTA
6381
 
6382
      ------------------------------------------
6383
      -- 12.5.3  Formal Array Type Definition --
6384
      ------------------------------------------
6385
 
6386
      --  FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6387
 
6388
      -------------------------------------------
6389
      -- 12.5.4  Formal Access Type Definition --
6390
      -------------------------------------------
6391
 
6392
      --  FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6393
 
6394
      ----------------------------------------------
6395
      -- 12.5.5  Formal Interface Type Definition --
6396
      ----------------------------------------------
6397
 
6398
      --  FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6399
 
6400
      -----------------------------------------
6401
      -- 12.6  Formal Subprogram Declaration --
6402
      -----------------------------------------
6403
 
6404
      --  FORMAL_SUBPROGRAM_DECLARATION ::=
6405
      --    FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6406
      --  | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6407
 
6408
      --------------------------------------------------
6409
      -- 12.6  Formal Concrete Subprogram Declaration --
6410
      --------------------------------------------------
6411
 
6412
      --  FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6413
      --    with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
6414
      --      [ASPECT_SPECIFICATIONS];
6415
 
6416
      --  N_Formal_Concrete_Subprogram_Declaration
6417
      --  Sloc points to WITH
6418
      --  Specification (Node1)
6419
      --  Default_Name (Node2) (set to Empty if no subprogram default)
6420
      --  Box_Present (Flag15)
6421
 
6422
      --  Note: if no subprogram default is present, then Name is set
6423
      --  to Empty, and Box_Present is False.
6424
 
6425
      --------------------------------------------------
6426
      -- 12.6  Formal Abstract Subprogram Declaration --
6427
      --------------------------------------------------
6428
 
6429
      --  FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6430
      --    with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
6431
      --      [ASPECT_SPECIFICATIONS];
6432
 
6433
      --  N_Formal_Abstract_Subprogram_Declaration
6434
      --  Sloc points to WITH
6435
      --  Specification (Node1)
6436
      --  Default_Name (Node2) (set to Empty if no subprogram default)
6437
      --  Box_Present (Flag15)
6438
 
6439
      --  Note: if no subprogram default is present, then Name is set
6440
      --  to Empty, and Box_Present is False.
6441
 
6442
      ------------------------------
6443
      -- 12.6  Subprogram Default --
6444
      ------------------------------
6445
 
6446
      --  SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6447
 
6448
      --  There is no separate node in the tree for a subprogram default.
6449
      --  Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6450
      --  or N_Formal_Abstract_Subprogram_Declaration) node contains the
6451
      --  default name or box indication, as needed.
6452
 
6453
      ------------------------
6454
      -- 12.6  Default Name --
6455
      ------------------------
6456
 
6457
      --  DEFAULT_NAME ::= NAME
6458
 
6459
      --------------------------------------
6460
      -- 12.7  Formal Package Declaration --
6461
      --------------------------------------
6462
 
6463
      --  FORMAL_PACKAGE_DECLARATION ::=
6464
      --    with package DEFINING_IDENTIFIER
6465
      --      is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
6466
      --        [ASPECT_SPECIFICATIONS];
6467
 
6468
      --  Note: formal package declarations not allowed in Ada 83 mode
6469
 
6470
      --  N_Formal_Package_Declaration
6471
      --  Sloc points to WITH
6472
      --  Defining_Identifier (Node1)
6473
      --  Name (Node2)
6474
      --  Generic_Associations (List3) (set to No_List if (<>) case or
6475
      --   empty generic actual part)
6476
      --  Box_Present (Flag15)
6477
      --  Instance_Spec (Node5-Sem)
6478
      --  ABE_Is_Certain (Flag18-Sem)
6479
 
6480
      --------------------------------------
6481
      -- 12.7  Formal Package Actual Part --
6482
      --------------------------------------
6483
 
6484
      --  FORMAL_PACKAGE_ACTUAL_PART ::=
6485
      --    ([OTHERS] => <>)
6486
      --    | [GENERIC_ACTUAL_PART]
6487
      --    (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6488
 
6489
      --  FORMAL_PACKAGE_ASSOCIATION ::=
6490
      --   GENERIC_ASSOCIATION
6491
      --  | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6492
 
6493
      --  There is no explicit node in the tree for a formal package actual
6494
      --  part. Instead the information appears in the parent node (i.e. the
6495
      --  formal package declaration node itself).
6496
 
6497
      --  There is no explicit node for a formal package association. All of
6498
      --  them are represented either by a generic association, possibly with
6499
      --  Box_Present, or by an N_Others_Choice.
6500
 
6501
      ---------------------------------
6502
      -- 13.1  Representation clause --
6503
      ---------------------------------
6504
 
6505
      --  REPRESENTATION_CLAUSE ::=
6506
      --    ATTRIBUTE_DEFINITION_CLAUSE
6507
      --  | ENUMERATION_REPRESENTATION_CLAUSE
6508
      --  | RECORD_REPRESENTATION_CLAUSE
6509
      --  | AT_CLAUSE
6510
 
6511
      ----------------------
6512
      -- 13.1  Local Name --
6513
      ----------------------
6514
 
6515
      --  LOCAL_NAME :=
6516
      --    DIRECT_NAME
6517
      --  | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6518
      --  | library_unit_NAME
6519
 
6520
      --  The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6521
      --  as an attribute reference, which has essentially the same form.
6522
 
6523
      ---------------------------------------
6524
      -- 13.3  Attribute definition clause --
6525
      ---------------------------------------
6526
 
6527
      --  ATTRIBUTE_DEFINITION_CLAUSE ::=
6528
      --    for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6529
      --  | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6530
 
6531
      --  In Ada 83, the expression must be a simple expression and the
6532
      --  local name must be a direct name.
6533
 
6534
      --  Note: the only attribute definition clause that is processed by
6535
      --  gigi is an address clause. For all other cases, the information
6536
      --  is extracted by the front end and either results in setting entity
6537
      --  information, e.g. Esize for the Size clause, or in appropriate
6538
      --  expansion actions (e.g. in the case of Storage_Size).
6539
 
6540
      --  For an address clause, Gigi constructs the appropriate addressing
6541
      --  code. It also ensures that no aliasing optimizations are made
6542
      --  for the object for which the address clause appears.
6543
 
6544
      --  Note: for an address clause used to achieve an overlay:
6545
 
6546
      --    A : Integer;
6547
      --    B : Integer;
6548
      --    for B'Address use A'Address;
6549
 
6550
      --  the above rule means that Gigi will ensure that no optimizations
6551
      --  will be made for B that would violate the implementation advice
6552
      --  of RM 13.3(19). However, this advice applies only to B and not
6553
      --  to A, which seems unfortunate. The GNAT front end will mark the
6554
      --  object A as volatile to also prevent unwanted optimization
6555
      --  assumptions based on no aliasing being made for B.
6556
 
6557
      --  N_Attribute_Definition_Clause
6558
      --  Sloc points to FOR
6559
      --  Name (Node2) the local name
6560
      --  Chars (Name1) the identifier name from the attribute designator
6561
      --  Expression (Node3) the expression or name
6562
      --  Entity (Node4-Sem)
6563
      --  Next_Rep_Item (Node5-Sem)
6564
      --  From_At_Mod (Flag4-Sem)
6565
      --  Check_Address_Alignment (Flag11-Sem)
6566
      --  From_Aspect_Specification (Flag13-Sem)
6567
      --  Is_Delayed_Aspect (Flag14-Sem)
6568
      --  Address_Warning_Posted (Flag18-Sem)
6569
 
6570
      --  Note: if From_Aspect_Specification is set, then Sloc points to the
6571
      --  aspect name, and Entity is resolved already to reference the entity
6572
      --  to which the aspect applies.
6573
 
6574
      -----------------------------------
6575
      -- 13.3.1  Aspect Specifications --
6576
      -----------------------------------
6577
 
6578
      --  We modify the RM grammar here, the RM grammar is:
6579
 
6580
      --     ASPECT_SPECIFICATION ::=
6581
      --       with ASPECT_MARK [=> ASPECT_DEFINITION] {,
6582
      --            ASPECT_MARK [=> ASPECT_DEFINITION] }
6583
 
6584
      --     ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6585
 
6586
      --     ASPECT_DEFINITION ::= NAME | EXPRESSION
6587
 
6588
      --  That's inconvenient, since there is no non-terminal name for a single
6589
      --  entry in the list of aspects. So we use this grammar instead:
6590
 
6591
      --     ASPECT_SPECIFICATIONS ::=
6592
      --       with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
6593
 
6594
      --     ASPECT_SPECIFICATION =>
6595
      --       ASPECT_MARK [=> ASPECT_DEFINITION]
6596
 
6597
      --     ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6598
 
6599
      --     ASPECT_DEFINITION ::= NAME | EXPRESSION
6600
 
6601
      --  See separate package Aspects for details on the incorporation of
6602
      --  these nodes into the tree, and how aspect specifications for a given
6603
      --  declaration node are associated with that node.
6604
 
6605
      --  N_Aspect_Specification
6606
      --  Sloc points to aspect identifier
6607
      --  Identifier (Node1) aspect identifier
6608
      --  Aspect_Rep_Item (Node2-Sem)
6609
      --  Expression (Node3) Aspect_Definition (set to Empty if none)
6610
      --  Entity (Node4-Sem) entity to which the aspect applies
6611
      --  Class_Present (Flag6) Set if 'Class present
6612
      --  Next_Rep_Item (Node5-Sem)
6613
      --  Split_PPC (Flag17) Set if split pre/post attribute
6614
      --  Is_Boolean_Aspect (Flag16-Sem)
6615
      --  Is_Delayed_Aspect (Flag14-Sem)
6616
 
6617
      --  Note: Aspect_Specification is an Ada 2012 feature
6618
 
6619
      --  Note: The Identifier serves to identify the aspect involved (it
6620
      --  is the aspect whose name corresponds to the Chars field). This
6621
      --  means that the other fields of this identifier are unused, and
6622
      --  in particular we use the Entity field of this identifier to save
6623
      --  a copy of the expression for visibility analysis, see spec of
6624
      --  Sem_Ch13 for full details of this usage.
6625
 
6626
      --  Note: When a Pre or Post aspect specification is processed, it is
6627
      --  broken into AND THEN sections. The left most section has Split_PPC
6628
      --  set to False, indicating that it is the original specification (e.g.
6629
      --  for posting errors). For the other sections, Split_PPC is set True.
6630
 
6631
      ---------------------------------------------
6632
      -- 13.4  Enumeration representation clause --
6633
      ---------------------------------------------
6634
 
6635
      --  ENUMERATION_REPRESENTATION_CLAUSE ::=
6636
      --    for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6637
 
6638
      --  In Ada 83, the name must be a direct name
6639
 
6640
      --  N_Enumeration_Representation_Clause
6641
      --  Sloc points to FOR
6642
      --  Identifier (Node1) direct name
6643
      --  Array_Aggregate (Node3)
6644
      --  Next_Rep_Item (Node5-Sem)
6645
 
6646
      ---------------------------------
6647
      -- 13.4  Enumeration aggregate --
6648
      ---------------------------------
6649
 
6650
      --  ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6651
 
6652
      ------------------------------------------
6653
      -- 13.5.1  Record representation clause --
6654
      ------------------------------------------
6655
 
6656
      --  RECORD_REPRESENTATION_CLAUSE ::=
6657
      --    for first_subtype_LOCAL_NAME use
6658
      --      record [MOD_CLAUSE]
6659
      --        {COMPONENT_CLAUSE}
6660
      --      end record;
6661
 
6662
      --  Gigi restriction: Mod_Clause is always Empty (if present it is
6663
      --  replaced by a corresponding Alignment attribute definition clause).
6664
 
6665
      --  Note: Component_Clauses can include pragmas
6666
 
6667
      --  N_Record_Representation_Clause
6668
      --  Sloc points to FOR
6669
      --  Identifier (Node1) direct name
6670
      --  Mod_Clause (Node2) (set to Empty if no mod clause present)
6671
      --  Component_Clauses (List3)
6672
      --  Next_Rep_Item (Node5-Sem)
6673
 
6674
      ------------------------------
6675
      -- 13.5.1  Component clause --
6676
      ------------------------------
6677
 
6678
      --  COMPONENT_CLAUSE ::=
6679
      --    component_LOCAL_NAME at POSITION
6680
      --      range FIRST_BIT .. LAST_BIT;
6681
 
6682
      --  N_Component_Clause
6683
      --  Sloc points to AT
6684
      --  Component_Name (Node1) points to Name or Attribute_Reference
6685
      --  Position (Node2)
6686
      --  First_Bit (Node3)
6687
      --  Last_Bit (Node4)
6688
 
6689
      ----------------------
6690
      -- 13.5.1  Position --
6691
      ----------------------
6692
 
6693
      --  POSITION ::= static_EXPRESSION
6694
 
6695
      -----------------------
6696
      -- 13.5.1  First_Bit --
6697
      -----------------------
6698
 
6699
      --  FIRST_BIT ::= static_SIMPLE_EXPRESSION
6700
 
6701
      ----------------------
6702
      -- 13.5.1  Last_Bit --
6703
      ----------------------
6704
 
6705
      --  LAST_BIT ::= static_SIMPLE_EXPRESSION
6706
 
6707
      --------------------------
6708
      -- 13.8  Code statement --
6709
      --------------------------
6710
 
6711
      --  CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6712
 
6713
      --  Note: in GNAT, the qualified expression has the form
6714
 
6715
      --    Asm_Insn'(Asm (...));
6716
 
6717
      --  See package System.Machine_Code in file s-maccod.ads for details on
6718
      --  the allowed parameters to Asm. There are two ways this node can
6719
      --  arise, as a code statement, in which case the expression is the
6720
      --  qualified expression, or as a result of the expansion of an intrinsic
6721
      --  call to the Asm or Asm_Input procedure.
6722
 
6723
      --  N_Code_Statement
6724
      --  Sloc points to first token of the expression
6725
      --  Expression (Node3)
6726
 
6727
      --  Note: package Exp_Code contains an abstract functional interface
6728
      --  for use by Gigi in accessing the data from N_Code_Statement nodes.
6729
 
6730
      ------------------------
6731
      -- 13.12  Restriction --
6732
      ------------------------
6733
 
6734
      --  RESTRICTION ::=
6735
      --    restriction_IDENTIFIER
6736
      --  | restriction_parameter_IDENTIFIER => EXPRESSION
6737
 
6738
      --  There is no explicit node for restrictions. Instead the restriction
6739
      --  appears in normal pragma syntax as a pragma argument association,
6740
      --  which has the same syntactic form.
6741
 
6742
      --------------------------
6743
      -- B.2  Shift Operators --
6744
      --------------------------
6745
 
6746
      --  Calls to the intrinsic shift functions are converted to one of
6747
      --  the following shift nodes, which have the form of normal binary
6748
      --  operator names. Note that for a given shift operation, one node
6749
      --  covers all possible types, as for normal operators.
6750
 
6751
      --  Note: it is perfectly permissible for the expander to generate
6752
      --  shift operation nodes directly, in which case they will be analyzed
6753
      --  and parsed in the usual manner.
6754
 
6755
      --  Sprint syntax: shift-function-name!(expr, count)
6756
 
6757
      --  Note: the Left_Opnd field holds the first argument (the value to
6758
      --  be shifted). The Right_Opnd field holds the second argument (the
6759
      --  shift count). The Chars field is the name of the intrinsic function.
6760
 
6761
      --  N_Op_Rotate_Left
6762
      --  Sloc points to the function name
6763
      --  plus fields for binary operator
6764
      --  plus fields for expression
6765
      --  Shift_Count_OK (Flag4-Sem)
6766
 
6767
      --  N_Op_Rotate_Right
6768
      --  Sloc points to the function name
6769
      --  plus fields for binary operator
6770
      --  plus fields for expression
6771
      --  Shift_Count_OK (Flag4-Sem)
6772
 
6773
      --  N_Op_Shift_Left
6774
      --  Sloc points to the function name
6775
      --  plus fields for binary operator
6776
      --  plus fields for expression
6777
      --  Shift_Count_OK (Flag4-Sem)
6778
 
6779
      --  N_Op_Shift_Right_Arithmetic
6780
      --  Sloc points to the function name
6781
      --  plus fields for binary operator
6782
      --  plus fields for expression
6783
      --  Shift_Count_OK (Flag4-Sem)
6784
 
6785
      --  N_Op_Shift_Right
6786
      --  Sloc points to the function name
6787
      --  plus fields for binary operator
6788
      --  plus fields for expression
6789
      --  Shift_Count_OK (Flag4-Sem)
6790
 
6791
   --------------------------
6792
   -- Obsolescent Features --
6793
   --------------------------
6794
 
6795
      --  The syntax descriptions and tree nodes for obsolescent features are
6796
      --  grouped together, corresponding to their location in appendix I in
6797
      --  the RM. However, parsing and semantic analysis for these constructs
6798
      --  is located in an appropriate chapter (see individual notes).
6799
 
6800
      ---------------------------
6801
      -- J.3  Delta Constraint --
6802
      ---------------------------
6803
 
6804
      --  Note: the parse routine for this construct is located in section
6805
      --  3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6806
      --  where delta constraint logically belongs.
6807
 
6808
      --  DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6809
 
6810
      --  N_Delta_Constraint
6811
      --  Sloc points to DELTA
6812
      --  Delta_Expression (Node3)
6813
      --  Range_Constraint (Node4) (set to Empty if not present)
6814
 
6815
      --------------------
6816
      -- J.7  At Clause --
6817
      --------------------
6818
 
6819
      --  AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6820
 
6821
      --  Note: the parse routine for this construct is located in Par-Ch13,
6822
      --  and the semantic analysis is in Sem_Ch13, where at clause logically
6823
      --  belongs if it were not obsolescent.
6824
 
6825
      --  Note: in Ada 83 the expression must be a simple expression
6826
 
6827
      --  Gigi restriction: This node never appears, it is rewritten as an
6828
      --  address attribute definition clause.
6829
 
6830
      --  N_At_Clause
6831
      --  Sloc points to FOR
6832
      --  Identifier (Node1)
6833
      --  Expression (Node3)
6834
 
6835
      ---------------------
6836
      -- J.8  Mod clause --
6837
      ---------------------
6838
 
6839
      --  MOD_CLAUSE ::= at mod static_EXPRESSION;
6840
 
6841
      --  Note: the parse routine for this construct is located in Par-Ch13,
6842
      --  and the semantic analysis is in Sem_Ch13, where mod clause logically
6843
      --  belongs if it were not obsolescent.
6844
 
6845
      --  Note: in Ada 83, the expression must be a simple expression
6846
 
6847
      --  Gigi restriction: this node never appears. It is replaced
6848
      --  by a corresponding Alignment attribute definition clause.
6849
 
6850
      --  Note: pragmas can appear before and after the MOD_CLAUSE since
6851
      --  its name has "clause" in it. This is rather strange, but is quite
6852
      --  definitely specified. The pragmas before are collected in the
6853
      --  Pragmas_Before field of the mod clause node itself, and pragmas
6854
      --  after are simply swallowed up in the list of component clauses.
6855
 
6856
      --  N_Mod_Clause
6857
      --  Sloc points to AT
6858
      --  Expression (Node3)
6859
      --  Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6860
 
6861
   --------------------
6862
   -- Semantic Nodes --
6863
   --------------------
6864
 
6865
   --  These semantic nodes are used to hold additional semantic information.
6866
   --  They are inserted into the tree as a result of semantic processing.
6867
   --  Although there are no legitimate source syntax constructions that
6868
   --  correspond directly to these nodes, we need a source syntax for the
6869
   --  reconstructed tree printed by Sprint, and the node descriptions here
6870
   --  show this syntax.
6871
 
6872
   --  Note: Case_Expression and Conditional_Expression is in this section for
6873
   --  now, since they are extensions. We will move them to their appropriate
6874
   --  places when they are officially approved as extensions (and then we will
6875
   --  know what the exact grammar and place in the Reference Manual is!)
6876
 
6877
      ---------------------
6878
      -- Case Expression --
6879
      ---------------------
6880
 
6881
      --  CASE_EXPRESSION ::=
6882
      --    case EXPRESSION is
6883
      --      CASE_EXPRESSION_ALTERNATIVE
6884
      --      {CASE_EXPRESSION_ALTERNATIVE}
6885
 
6886
      --  Note that the Alternatives cannot include pragmas (this contrasts
6887
      --  with the situation of case statements where pragmas are allowed).
6888
 
6889
      --  N_Case_Expression
6890
      --  Sloc points to CASE
6891
      --  Expression (Node3)
6892
      --  Alternatives (List4)
6893
 
6894
      ---------------------------------
6895
      -- Case Expression Alternative --
6896
      ---------------------------------
6897
 
6898
      --  CASE_STATEMENT_ALTERNATIVE ::=
6899
      --    when DISCRETE_CHOICE_LIST =>
6900
      --      EXPRESSION
6901
 
6902
      --  N_Case_Expression_Alternative
6903
      --  Sloc points to WHEN
6904
      --  Actions (List1)
6905
      --  Discrete_Choices (List4)
6906
      --  Expression (Node3)
6907
 
6908
      --  Note: The Actions field temporarily holds any actions associated with
6909
      --  evaluation of the Expression. During expansion of the case expression
6910
      --  these actions are wrapped into an N_Expressions_With_Actions node
6911
      --  replacing the original expression.
6912
 
6913
      ----------------------------
6914
      -- Conditional Expression --
6915
      ----------------------------
6916
 
6917
      --  This node is used to represent an expression corresponding to the
6918
      --  C construct (condition ? then-expression : else_expression), where
6919
      --  Expressions is a three element list, whose first expression is the
6920
      --  condition, and whose second and third expressions are the then and
6921
      --  else expressions respectively.
6922
 
6923
      --  Note: the Then_Actions and Else_Actions fields are always set to
6924
      --  No_List in the tree passed to Gigi. These fields are used only
6925
      --  for temporary processing purposes in the expander.
6926
 
6927
      --  The Ada language does not permit conditional expressions, however
6928
      --  this is under discussion as a possible extension by the ARG, and we
6929
      --  have implemented a form of this capability in GNAT under control of
6930
      --  the -gnatX switch. The syntax is:
6931
 
6932
      --  CONDITIONAL_EXPRESSION ::=
6933
      --    if EXPRESSION then EXPRESSION
6934
      --                  {elsif EXPRESSION then EXPRESSION}
6935
      --                  [else EXPRESSION]
6936
 
6937
      --  And we add the additional constructs
6938
 
6939
      --  PRIMARY ::= ( CONDITIONAL_EXPRESSION )
6940
      --  PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6941
 
6942
      --  Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6943
      --  is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6944
      --  the Is_Elsif flag is set on the inner conditional expression.
6945
 
6946
      --  N_Conditional_Expression
6947
      --  Sloc points to IF or ELSIF keyword
6948
      --  Expressions (List1)
6949
      --  Then_Actions (List2-Sem)
6950
      --  Else_Actions (List3-Sem)
6951
      --  Is_Elsif (Flag13) (set if comes from ELSIF)
6952
      --  plus fields for expression
6953
 
6954
      --------------
6955
      -- Contract --
6956
      --------------
6957
 
6958
      --  This node is used to hold the various parts of an entry or subprogram
6959
      --  contract, consisting in pre- and postconditions on the one hand, and
6960
      --  test-cases on the other hand.
6961
 
6962
      --  It is referenced from an entry, a subprogram or a generic subprogram
6963
      --  entity.
6964
 
6965
      --  Sprint syntax:  <none> as the node should not appear in the tree, but
6966
      --                  only attached to an entry or [generic] subprogram
6967
      --                  entity.
6968
 
6969
      --  N_Contract
6970
      --  Sloc points to the subprogram's name
6971
      --  Spec_PPC_List (Node1) (set to Empty if none)
6972
      --  Spec_TC_List (Node2) (set to Empty if none)
6973
 
6974
      --  Spec_PPC_List points to a list of Precondition and Postcondition
6975
      --  pragma nodes for preconditions and postconditions declared in the
6976
      --  spec of the entry/subprogram. The last pragma encountered is at the
6977
      --  head of this list, so it is in reverse order of textual appearance.
6978
      --  Note that this includes precondition/postcondition pragmas generated
6979
      --  to correspond to Pre/Post aspects.
6980
 
6981
      --  Spec_TC_List points to a list of Test_Case pragma nodes for
6982
      --  test-cases declared in the spec of the entry/subprogram. The last
6983
      --  pragma encountered is at the head of this list, so it is in reverse
6984
      --  order of textual appearance. Note that this includes test-case
6985
      --  pragmas generated to correspond to Test_Case aspects.
6986
 
6987
      -------------------
6988
      -- Expanded_Name --
6989
      -------------------
6990
 
6991
      --  The N_Expanded_Name node is used to represent a selected component
6992
      --  name that has been resolved to an expanded name. The semantic phase
6993
      --  replaces N_Selected_Component nodes that represent names by the use
6994
      --  of this node, leaving the N_Selected_Component node used only when
6995
      --  the prefix is a record or protected type.
6996
 
6997
      --  The fields of the N_Expanded_Name node are layed out identically
6998
      --  to those of the N_Selected_Component node, allowing conversion of
6999
      --  an expanded name node to a selected component node to be done
7000
      --  easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
7001
 
7002
      --  There is no special sprint syntax for an expanded name
7003
 
7004
      --  N_Expanded_Name
7005
      --  Sloc points to the period
7006
      --  Chars (Name1) copy of Chars field of selector name
7007
      --  Prefix (Node3)
7008
      --  Selector_Name (Node2)
7009
      --  Entity (Node4-Sem)
7010
      --  Associated_Node (Node4-Sem)
7011
      --  Has_Private_View (Flag11-Sem) set in generic units.
7012
      --  Redundant_Use (Flag13-Sem)
7013
      --  Atomic_Sync_Required (Flag14-Sem)
7014
      --  plus fields for expression
7015
 
7016
      -----------------------------
7017
      -- Expression with Actions --
7018
      -----------------------------
7019
 
7020
      --  This node is created by the analyzer/expander to handle some
7021
      --  expansion cases, notably short circuit forms where there are
7022
      --  actions associated with the right-hand side operand.
7023
 
7024
      --  The N_Expression_With_Actions node represents an expression with
7025
      --  an associated set of actions (which are executable statements and
7026
      --  declarations, as might occur in a handled statement sequence).
7027
 
7028
      --  The required semantics is that the set of actions is executed in
7029
      --  the order in which it appears just before the expression is
7030
      --  evaluated (and these actions must only be executed if the value
7031
      --  of the expression is evaluated). The node is considered to be
7032
      --  a subexpression, whose value is the value of the Expression after
7033
      --  executing all the actions.
7034
 
7035
      --  Note: if the actions contain declarations, then these declarations
7036
      --  may be referenced within the expression. It is thus appropriate for
7037
      --  the back-end to create a scope that encompasses the construct (any
7038
      --  declarations within the actions will definitely not be referenced
7039
      --  once elaboration of the construct is completed).
7040
 
7041
      --  Sprint syntax:  do
7042
      --                    action;
7043
      --                    action;
7044
      --                    ...
7045
      --                    action;
7046
      --                  in expression end
7047
 
7048
      --  N_Expression_With_Actions
7049
      --  Actions (List1)
7050
      --  Expression (Node3)
7051
      --  plus fields for expression
7052
 
7053
      --  Note: the actions list is always non-null, since we would
7054
      --  never have created this node if there weren't some actions.
7055
 
7056
      --------------------
7057
      -- Free Statement --
7058
      --------------------
7059
 
7060
      --  The N_Free_Statement node is generated as a result of a call to an
7061
      --  instantiation of Unchecked_Deallocation. The instantiation of this
7062
      --  generic is handled specially and generates this node directly.
7063
 
7064
      --  Sprint syntax: free expression
7065
 
7066
      --  N_Free_Statement
7067
      --  Sloc is copied from the unchecked deallocation call
7068
      --  Expression (Node3) argument to unchecked deallocation call
7069
      --  Storage_Pool (Node1-Sem)
7070
      --  Procedure_To_Call (Node2-Sem)
7071
      --  Actual_Designated_Subtype (Node4-Sem)
7072
 
7073
      --  Note: in the case where a debug source file is generated, the Sloc
7074
      --  for this node points to the FREE keyword in the Sprint file output.
7075
 
7076
      -------------------
7077
      -- Freeze Entity --
7078
      -------------------
7079
 
7080
      --  This node marks the point in a declarative part at which an entity
7081
      --  declared therein becomes frozen. The expander places initialization
7082
      --  procedures for types at those points. Gigi uses the freezing point
7083
      --  to elaborate entities that may depend on previous private types.
7084
 
7085
      --  See the section in Einfo "Delayed Freezing and Elaboration" for
7086
      --  a full description of the use of this node.
7087
 
7088
      --  The Entity field points back to the entity for the type (whose
7089
      --  Freeze_Node field points back to this freeze node).
7090
 
7091
      --  The Actions field contains a list of declarations and statements
7092
      --  generated by the expander which are associated with the freeze
7093
      --  node, and are elaborated as though the freeze node were replaced
7094
      --  by this sequence of actions.
7095
 
7096
      --  Note: the Sloc field in the freeze node references a construct
7097
      --  associated with the freezing point. This is used for posting
7098
      --  messages in some error/warning situations, e.g. the case where
7099
      --  a primitive operation of a tagged type is declared too late.
7100
 
7101
      --  Sprint syntax: freeze entity-name [
7102
      --                   freeze actions
7103
      --                 ]
7104
 
7105
      --  N_Freeze_Entity
7106
      --  Sloc points near freeze point (see above special note)
7107
      --  Entity (Node4-Sem)
7108
      --  Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
7109
      --  TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
7110
      --  Actions (List1) (set to No_List if no freeze actions)
7111
      --  First_Subtype_Link (Node5-Sem) (set to Empty if no link)
7112
 
7113
      --  The Actions field holds actions associated with the freeze. These
7114
      --  actions are elaborated at the point where the type is frozen.
7115
 
7116
      --  Note: in the case where a debug source file is generated, the Sloc
7117
      --  for this node points to the FREEZE keyword in the Sprint file output.
7118
 
7119
      --------------------------------
7120
      -- Implicit Label Declaration --
7121
      --------------------------------
7122
 
7123
      --  An implicit label declaration is created for every occurrence of a
7124
      --  label on a statement or a label on a block or loop. It is chained
7125
      --  in the declarations of the innermost enclosing block as specified
7126
      --  in RM section 5.1 (3).
7127
 
7128
      --  The Defining_Identifier is the actual identifier for the statement
7129
      --  identifier. Note that the occurrence of the label is a reference, NOT
7130
      --  the defining occurrence. The defining occurrence occurs at the head
7131
      --  of the innermost enclosing block, and is represented by this node.
7132
 
7133
      --  Note: from the grammar, this might better be called an implicit
7134
      --  statement identifier declaration, but the term we choose seems
7135
      --  friendlier, since at least informally statement identifiers are
7136
      --  called labels in both cases (i.e. when used in labels, and when
7137
      --  used as the identifiers of blocks and loops).
7138
 
7139
      --  Note: although this is logically a semantic node, since it does not
7140
      --  correspond directly to a source syntax construction, these nodes are
7141
      --  actually created by the parser in a post pass done just after parsing
7142
      --  is complete, before semantic analysis is started (see Par.Labl).
7143
 
7144
      --  Sprint syntax: labelname : label;
7145
 
7146
      --  N_Implicit_Label_Declaration
7147
      --  Sloc points to the << of the label
7148
      --  Defining_Identifier (Node1)
7149
      --  Label_Construct (Node2-Sem)
7150
 
7151
      --  Note: in the case where a debug source file is generated, the Sloc
7152
      --  for this node points to the label name in the generated declaration.
7153
 
7154
      ---------------------
7155
      -- Itype_Reference --
7156
      ---------------------
7157
 
7158
      --  This node is used to create a reference to an Itype. The only purpose
7159
      --  is to make sure the Itype is defined if this is the first reference.
7160
 
7161
      --  A typical use of this node is when an Itype is to be referenced in
7162
      --  two branches of an IF statement. In this case it is important that
7163
      --  the first use of the Itype not be inside the conditional, since then
7164
      --  it might not be defined if the other branch of the IF is taken, in
7165
      --  the case where the definition generates elaboration code.
7166
 
7167
      --  The Itype field points to the referenced Itype
7168
 
7169
      --  Sprint syntax: reference itype-name
7170
 
7171
      --  N_Itype_Reference
7172
      --  Sloc points to the node generating the reference
7173
      --  Itype (Node1-Sem)
7174
 
7175
      --  Note: in the case where a debug source file is generated, the Sloc
7176
      --  for this node points to the REFERENCE keyword in the file output.
7177
 
7178
      ---------------------
7179
      -- Raise_xxx_Error --
7180
      ---------------------
7181
 
7182
      --  One of these nodes is created during semantic analysis to replace
7183
      --  a node for an expression that is determined to definitely raise
7184
      --  the corresponding exception.
7185
 
7186
      --  The N_Raise_xxx_Error node may also stand alone in place
7187
      --  of a declaration or statement, in which case it simply causes
7188
      --  the exception to be raised (i.e. it is equivalent to a raise
7189
      --  statement that raises the corresponding exception). This use
7190
      --  is distinguished by the fact that the Etype in this case is
7191
      --  Standard_Void_Type, In the subexpression case, the Etype is the
7192
      --  same as the type of the subexpression which it replaces.
7193
 
7194
      --  If Condition is empty, then the raise is unconditional. If the
7195
      --  Condition field is non-empty, it is a boolean expression which
7196
      --  is first evaluated, and the exception is raised only if the
7197
      --  value of the expression is True. In the unconditional case, the
7198
      --  creation of this node is usually accompanied by a warning message
7199
      --  error. The creation of this node will usually be accompanied by a
7200
      --  message (unless it appears within the right operand of a short
7201
      --  circuit form whose left argument is static and decisively
7202
      --  eliminates elaboration of the raise operation. The condition field
7203
      --  can ONLY be present when the node is used as a statement form, it
7204
      --  may NOT be present in the case where the node appears within an
7205
      --  expression.
7206
 
7207
      --  The exception is generated with a message that contains the
7208
      --  file name and line number, and then appended text. The Reason
7209
      --  code shows the text to be added. The Reason code is an element
7210
      --  of the type Types.RT_Exception_Code, and indicates both the
7211
      --  message to be added, and the exception to be raised (which must
7212
      --  match the node type). The value is stored by storing a Uint which
7213
      --  is the Pos value of the enumeration element in this type.
7214
 
7215
      --  Gigi restriction: This expander ensures that the type of the
7216
      --  Condition field is always Standard.Boolean, even if the type
7217
      --  in the source is some non-standard boolean type.
7218
 
7219
      --  Sprint syntax: [xxx_error "msg"]
7220
      --             or: [xxx_error when condition "msg"]
7221
 
7222
      --  N_Raise_Constraint_Error
7223
      --  Sloc references related construct
7224
      --  Condition (Node1) (set to Empty if no condition)
7225
      --  Reason (Uint3)
7226
      --  plus fields for expression
7227
 
7228
      --  N_Raise_Program_Error
7229
      --  Sloc references related construct
7230
      --  Condition (Node1) (set to Empty if no condition)
7231
      --  Reason (Uint3)
7232
      --  plus fields for expression
7233
 
7234
      --  N_Raise_Storage_Error
7235
      --  Sloc references related construct
7236
      --  Condition (Node1) (set to Empty if no condition)
7237
      --  Reason (Uint3)
7238
      --  plus fields for expression
7239
 
7240
      --  Note: Sloc is copied from the expression generating the exception.
7241
      --  In the case where a debug source file is generated, the Sloc for
7242
      --  this node points to the left bracket in the Sprint file output.
7243
 
7244
      --  Note: the back end may be required to translate these nodes into
7245
      --  appropriate goto statements. See description of N_Push/Pop_xxx_Label.
7246
 
7247
      ---------------------------------------------
7248
      -- Optimization of Exception Raise to Goto --
7249
      ---------------------------------------------
7250
 
7251
      --  In some cases, the front end will determine that any exception raised
7252
      --  by the back end for a certain exception should be transformed into a
7253
      --  goto statement.
7254
 
7255
      --  There are three kinds of exceptions raised by the back end (note that
7256
      --  for this purpose we consider gigi to be part of the back end in the
7257
      --  gcc case):
7258
 
7259
      --     1. Exceptions resulting from N_Raise_xxx_Error nodes
7260
      --     2. Exceptions from checks triggered by Do_xxx_Check flags
7261
      --     3. Other cases not specifically marked by the front end
7262
 
7263
      --  Normally all such exceptions are translated into calls to the proper
7264
      --  Rcheck_xx procedure, where xx encodes both the exception to be raised
7265
      --  and the exception message.
7266
 
7267
      --  The front end may determine that for a particular sequence of code,
7268
      --  exceptions in any of these three categories for a particular builtin
7269
      --  exception should result in a goto, rather than a call to Rcheck_xx.
7270
      --  The exact sequence to be generated is:
7271
 
7272
      --      Local_Raise (exception'Identity);
7273
      --      goto Label
7274
 
7275
      --  The front end marks such a sequence of code by bracketing it with
7276
      --  push and pop nodes:
7277
 
7278
      --       N_Push_xxx_Label (referencing the label)
7279
      --       ...
7280
      --       (code where transformation is expected for exception xxx)
7281
      --       ...
7282
      --       N_Pop_xxx_Label
7283
 
7284
      --  The use of push/pop reflects the fact that such regions can properly
7285
      --  nest, and one special case is a subregion in which no transformation
7286
      --  is allowed. Such a region is marked by a N_Push_xxx_Label node whose
7287
      --  Exception_Label field is Empty.
7288
 
7289
      --  N_Push_Constraint_Error_Label
7290
      --  Sloc references first statement in region covered
7291
      --  Exception_Label (Node5-Sem)
7292
 
7293
      --  N_Push_Program_Error_Label
7294
      --  Sloc references first statement in region covered
7295
      --  Exception_Label (Node5-Sem)
7296
 
7297
      --  N_Push_Storage_Error_Label
7298
      --  Sloc references first statement in region covered
7299
      --  Exception_Label (Node5-Sem)
7300
 
7301
      --  N_Pop_Constraint_Error_Label
7302
      --  Sloc references last statement in region covered
7303
 
7304
      --  N_Pop_Program_Error_Label
7305
      --  Sloc references last statement in region covered
7306
 
7307
      --  N_Pop_Storage_Error_Label
7308
      --  Sloc references last statement in region covered
7309
 
7310
      ---------------
7311
      -- Reference --
7312
      ---------------
7313
 
7314
      --  For a number of purposes, we need to construct references to objects.
7315
      --  These references are subsequently treated as normal access values.
7316
      --  An example is the construction of the parameter block passed to a
7317
      --  task entry. The N_Reference node is provided for this purpose. It is
7318
      --  similar in effect to the use of the Unrestricted_Access attribute,
7319
      --  and like Unrestricted_Access can be applied to objects which would
7320
      --  not be valid prefixes for the Unchecked_Access attribute (e.g.
7321
      --  objects which are not aliased, and slices). In addition it can be
7322
      --  applied to composite type values as well as objects, including string
7323
      --  values and aggregates.
7324
 
7325
      --  Note: we use the Prefix field for this expression so that the
7326
      --  resulting node can be treated using common code with the attribute
7327
      --  nodes for the 'Access and related attributes. Logically it would make
7328
      --  more sense to call it an Expression field, but then we would have to
7329
      --  special case the treatment of the N_Reference node.
7330
 
7331
      --  Note: evaluating a N_Reference node is guaranteed to yield a non-null
7332
      --  value at run time. Therefore, it is valid to set Is_Known_Non_Null on
7333
      --  a temporary initialized to a N_Reference node in order to eliminate
7334
      --  superfluous access checks.
7335
 
7336
      --  Sprint syntax: prefix'reference
7337
 
7338
      --  N_Reference
7339
      --  Sloc is copied from the expression
7340
      --  Prefix (Node3)
7341
      --  plus fields for expression
7342
 
7343
      --  Note: in the case where a debug source file is generated, the Sloc
7344
      --  for this node points to the quote in the Sprint file output.
7345
 
7346
      -----------------
7347
      --  SCIL Nodes --
7348
      -----------------
7349
 
7350
      --  SCIL nodes are special nodes added to the tree when the CodePeer
7351
      --  mode is active. They help the CodePeer backend to locate nodes that
7352
      --  require special processing.
7353
 
7354
      --  Major documentation on the general design of the SCIL interface, and
7355
      --  in particular detailed description of these nodes is missing and is
7356
      --  to be supplied in the future, when the design has finalized ???
7357
 
7358
      --  Meanwhile these nodes should be considered in experimental form, and
7359
      --  should be ignored by all code generating back ends. ???
7360
 
7361
      --  N_SCIL_Dispatch_Table_Tag_Init
7362
      --  Sloc references a node for a tag initialization
7363
      --  SCIL_Entity (Node4-Sem)
7364
 
7365
      --  N_SCIL_Dispatching_Call
7366
      --  Sloc references the node of a dispatching call
7367
      --  SCIL_Target_Prim (Node2-Sem)
7368
      --  SCIL_Entity (Node4-Sem)
7369
      --  SCIL_Controlling_Tag (Node5-Sem)
7370
 
7371
      --  N_SCIL_Membership_Test
7372
      --  Sloc references the node of a membership test
7373
      --  SCIL_Tag_Value (Node5-Sem)
7374
      --  SCIL_Entity (Node4-Sem)
7375
 
7376
      ---------------------
7377
      -- Subprogram_Info --
7378
      ---------------------
7379
 
7380
      --  This node generates the appropriate Subprogram_Info value for a
7381
      --  given procedure. See Ada.Exceptions for further details
7382
 
7383
      --  Sprint syntax: subprog'subprogram_info
7384
 
7385
      --  N_Subprogram_Info
7386
      --  Sloc points to the entity for the procedure
7387
      --  Identifier (Node1) identifier referencing the procedure
7388
      --  Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
7389
 
7390
      --  Note: in the case where a debug source file is generated, the Sloc
7391
      --  for this node points to the quote in the Sprint file output.
7392
 
7393
      --------------------------
7394
      -- Unchecked Expression --
7395
      --------------------------
7396
 
7397
      --  An unchecked expression is one that must be analyzed and resolved
7398
      --  with all checks off, regardless of the current setting of scope
7399
      --  suppress flags.
7400
 
7401
      --  Sprint syntax: `(expression)
7402
 
7403
      --  Note: this node is always removed from the tree (and replaced by
7404
      --  its constituent expression) on completion of analysis, so it only
7405
      --  appears in intermediate trees, and will never be seen by Gigi.
7406
 
7407
      --  N_Unchecked_Expression
7408
      --  Sloc is a copy of the Sloc of the expression
7409
      --  Expression (Node3)
7410
      --  plus fields for expression
7411
 
7412
      --  Note: in the case where a debug source file is generated, the Sloc
7413
      --  for this node points to the back quote in the Sprint file output.
7414
 
7415
      -------------------------------
7416
      -- Unchecked Type Conversion --
7417
      -------------------------------
7418
 
7419
      --  An unchecked type conversion node represents the semantic action
7420
      --  corresponding to a call to an instantiation of Unchecked_Conversion.
7421
      --  It is generated as a result of actual use of Unchecked_Conversion
7422
      --  and also the expander generates unchecked type conversion nodes
7423
      --  directly for expansion of complex semantic actions.
7424
 
7425
      --  Note: an unchecked type conversion is a variable as far as the
7426
      --  semantics are concerned, which is convenient for the expander.
7427
      --  This does not change what Ada source programs are legal, since
7428
      --  clearly a function call to an instantiation of Unchecked_Conversion
7429
      --  is not a variable in any case.
7430
 
7431
      --  Sprint syntax: subtype-mark!(expression)
7432
 
7433
      --  N_Unchecked_Type_Conversion
7434
      --  Sloc points to related node in source
7435
      --  Subtype_Mark (Node4)
7436
      --  Expression (Node3)
7437
      --  Kill_Range_Check (Flag11-Sem)
7438
      --  No_Truncation (Flag17-Sem)
7439
      --  plus fields for expression
7440
 
7441
      --  Note: in the case where a debug source file is generated, the Sloc
7442
      --  for this node points to the exclamation in the Sprint file output.
7443
 
7444
      -----------------------------------
7445
      -- Validate_Unchecked_Conversion --
7446
      -----------------------------------
7447
 
7448
      --  The front end does most of the validation of unchecked conversion,
7449
      --  including checking sizes (this is done after the back end is called
7450
      --  to take advantage of back-annotation of calculated sizes).
7451
 
7452
      --  The front end also deals with specific cases that are not allowed
7453
      --  e.g. involving unconstrained array types.
7454
 
7455
      --  For the case of the standard gigi backend, this means that all
7456
      --  checks are done in the front-end.
7457
 
7458
      --  However, in the case of specialized back-ends, notably the JVM
7459
      --  backend for JGNAT, additional requirements and restrictions apply
7460
      --  to unchecked conversion, and these are most conveniently performed
7461
      --  in the specialized back-end.
7462
 
7463
      --  To accommodate this requirement, for such back ends, the following
7464
      --  special node is generated recording an unchecked conversion that
7465
      --  needs to be validated. The back end should post an appropriate
7466
      --  error message if the unchecked conversion is invalid or warrants
7467
      --  a special warning message.
7468
 
7469
      --  Source_Type and Target_Type point to the entities for the two
7470
      --  types involved in the unchecked conversion instantiation that
7471
      --  is to be validated.
7472
 
7473
      --  Sprint syntax: validate Unchecked_Conversion (source, target);
7474
 
7475
      --  N_Validate_Unchecked_Conversion
7476
      --  Sloc points to instantiation (location for warning message)
7477
      --  Source_Type (Node1-Sem)
7478
      --  Target_Type (Node2-Sem)
7479
 
7480
      --  Note: in the case where a debug source file is generated, the Sloc
7481
      --  for this node points to the VALIDATE keyword in the file output.
7482
 
7483
   -----------
7484
   -- Empty --
7485
   -----------
7486
 
7487
   --  Used as the contents of the Nkind field of the dummy Empty node
7488
   --  and in some other situations to indicate an uninitialized value.
7489
 
7490
   --  N_Empty
7491
   --  Chars (Name1) is set to No_Name
7492
 
7493
   -----------
7494
   -- Error --
7495
   -----------
7496
 
7497
   --  Used as the contents of the Nkind field of the dummy Error node.
7498
   --  Has an Etype field, which gets set to Any_Type later on, to help
7499
   --  error recovery (Error_Posted is also set in the Error node).
7500
 
7501
   --  N_Error
7502
   --  Chars (Name1) is set to Error_Name
7503
   --  Etype (Node5-Sem)
7504
 
7505
   --------------------------
7506
   -- Node Type Definition --
7507
   --------------------------
7508
 
7509
   --  The following is the definition of the Node_Kind type. As previously
7510
   --  discussed, this is separated off to allow rearrangement of the order to
7511
   --  facilitate definition of subtype ranges. The comments show the subtype
7512
   --  classes which apply to each set of node kinds. The first entry in the
7513
   --  comment characterizes the following list of nodes.
7514
 
7515
   type Node_Kind is (
7516
      N_Unused_At_Start,
7517
 
7518
      --  N_Representation_Clause
7519
 
7520
      N_At_Clause,
7521
      N_Component_Clause,
7522
      N_Enumeration_Representation_Clause,
7523
      N_Mod_Clause,
7524
      N_Record_Representation_Clause,
7525
 
7526
      --  N_Representation_Clause, N_Has_Chars
7527
 
7528
      N_Attribute_Definition_Clause,
7529
 
7530
      --  N_Has_Chars
7531
 
7532
      N_Empty,
7533
      N_Pragma_Argument_Association,
7534
 
7535
      --  N_Has_Etype, N_Has_Chars
7536
 
7537
      --  Note: of course N_Error does not really have Etype or Chars fields,
7538
      --  and any attempt to access these fields in N_Error will cause an
7539
      --  error, but historically this always has been positioned so that an
7540
      --  "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
7541
      --  Most likely this makes coding easier somewhere but still seems
7542
      --  undesirable. To be investigated some time ???
7543
 
7544
      N_Error,
7545
 
7546
      --  N_Entity, N_Has_Etype, N_Has_Chars
7547
 
7548
      N_Defining_Character_Literal,
7549
      N_Defining_Identifier,
7550
      N_Defining_Operator_Symbol,
7551
 
7552
      --  N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
7553
 
7554
      N_Expanded_Name,
7555
 
7556
      --  N_Direct_Name, N_Subexpr, N_Has_Etype,
7557
      --  N_Has_Chars, N_Has_Entity
7558
 
7559
      N_Identifier,
7560
      N_Operator_Symbol,
7561
 
7562
      --  N_Direct_Name, N_Subexpr, N_Has_Etype,
7563
      --  N_Has_Chars, N_Has_Entity
7564
 
7565
      N_Character_Literal,
7566
 
7567
      --  N_Binary_Op, N_Op, N_Subexpr,
7568
      --  N_Has_Etype, N_Has_Chars, N_Has_Entity
7569
 
7570
      N_Op_Add,
7571
      N_Op_Concat,
7572
      N_Op_Expon,
7573
      N_Op_Subtract,
7574
 
7575
      --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
7576
      --  N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
7577
 
7578
      N_Op_Divide,
7579
      N_Op_Mod,
7580
      N_Op_Multiply,
7581
      N_Op_Rem,
7582
 
7583
      --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7584
      --  N_Has_Entity, N_Has_Chars, N_Op_Boolean
7585
 
7586
      N_Op_And,
7587
 
7588
      --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7589
      --  N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7590
 
7591
      N_Op_Eq,
7592
      N_Op_Ge,
7593
      N_Op_Gt,
7594
      N_Op_Le,
7595
      N_Op_Lt,
7596
      N_Op_Ne,
7597
 
7598
      --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7599
      --  N_Has_Entity, N_Has_Chars, N_Op_Boolean
7600
 
7601
      N_Op_Or,
7602
      N_Op_Xor,
7603
 
7604
      --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7605
      --  N_Op_Shift, N_Has_Chars, N_Has_Entity
7606
 
7607
      N_Op_Rotate_Left,
7608
      N_Op_Rotate_Right,
7609
      N_Op_Shift_Left,
7610
      N_Op_Shift_Right,
7611
      N_Op_Shift_Right_Arithmetic,
7612
 
7613
      --  N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7614
      --  N_Has_Chars, N_Has_Entity
7615
 
7616
      N_Op_Abs,
7617
      N_Op_Minus,
7618
      N_Op_Not,
7619
      N_Op_Plus,
7620
 
7621
      --  N_Subexpr, N_Has_Etype, N_Has_Entity
7622
 
7623
      N_Attribute_Reference,
7624
 
7625
      --  N_Subexpr, N_Has_Etype, N_Membership_Test
7626
 
7627
      N_In,
7628
      N_Not_In,
7629
 
7630
      --  N_Subexpr, N_Has_Etype, N_Short_Circuit
7631
 
7632
      N_And_Then,
7633
      N_Or_Else,
7634
 
7635
      --  N_Subexpr, N_Has_Etype
7636
 
7637
      N_Conditional_Expression,
7638
      N_Explicit_Dereference,
7639
      N_Expression_With_Actions,
7640
      N_Function_Call,
7641
      N_Indexed_Component,
7642
      N_Integer_Literal,
7643
      N_Null,
7644
      N_Procedure_Call_Statement,
7645
      N_Qualified_Expression,
7646
      N_Quantified_Expression,
7647
 
7648
      --  N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7649
 
7650
      N_Raise_Constraint_Error,
7651
      N_Raise_Program_Error,
7652
      N_Raise_Storage_Error,
7653
 
7654
      --  N_Subexpr, N_Has_Etype
7655
 
7656
      N_Aggregate,
7657
      N_Allocator,
7658
      N_Case_Expression,
7659
      N_Extension_Aggregate,
7660
      N_Range,
7661
      N_Real_Literal,
7662
      N_Reference,
7663
      N_Selected_Component,
7664
      N_Slice,
7665
      N_String_Literal,
7666
      N_Subprogram_Info,
7667
      N_Type_Conversion,
7668
      N_Unchecked_Expression,
7669
      N_Unchecked_Type_Conversion,
7670
 
7671
      --  N_Has_Etype
7672
 
7673
      N_Subtype_Indication,
7674
 
7675
      --  N_Declaration
7676
 
7677
      N_Component_Declaration,
7678
      N_Entry_Declaration,
7679
      N_Expression_Function,
7680
      N_Formal_Object_Declaration,
7681
      N_Formal_Type_Declaration,
7682
      N_Full_Type_Declaration,
7683
      N_Incomplete_Type_Declaration,
7684
      N_Iterator_Specification,
7685
      N_Loop_Parameter_Specification,
7686
      N_Object_Declaration,
7687
      N_Protected_Type_Declaration,
7688
      N_Private_Extension_Declaration,
7689
      N_Private_Type_Declaration,
7690
      N_Subtype_Declaration,
7691
 
7692
      --  N_Subprogram_Specification, N_Declaration
7693
 
7694
      N_Function_Specification,
7695
      N_Procedure_Specification,
7696
 
7697
      --  N_Access_To_Subprogram_Definition
7698
 
7699
      N_Access_Function_Definition,
7700
      N_Access_Procedure_Definition,
7701
 
7702
      --  N_Later_Decl_Item
7703
 
7704
      N_Task_Type_Declaration,
7705
 
7706
      --  N_Body_Stub, N_Later_Decl_Item
7707
 
7708
      N_Package_Body_Stub,
7709
      N_Protected_Body_Stub,
7710
      N_Subprogram_Body_Stub,
7711
      N_Task_Body_Stub,
7712
 
7713
      --  N_Generic_Instantiation, N_Later_Decl_Item
7714
      --  N_Subprogram_Instantiation
7715
 
7716
      N_Function_Instantiation,
7717
      N_Procedure_Instantiation,
7718
 
7719
      --  N_Generic_Instantiation, N_Later_Decl_Item
7720
 
7721
      N_Package_Instantiation,
7722
 
7723
      --  N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7724
 
7725
      N_Package_Body,
7726
      N_Subprogram_Body,
7727
 
7728
      --  N_Later_Decl_Item, N_Proper_Body
7729
 
7730
      N_Protected_Body,
7731
      N_Task_Body,
7732
 
7733
      --  N_Later_Decl_Item
7734
 
7735
      N_Implicit_Label_Declaration,
7736
      N_Package_Declaration,
7737
      N_Single_Task_Declaration,
7738
      N_Subprogram_Declaration,
7739
      N_Use_Package_Clause,
7740
 
7741
      --  N_Generic_Declaration, N_Later_Decl_Item
7742
 
7743
      N_Generic_Package_Declaration,
7744
      N_Generic_Subprogram_Declaration,
7745
 
7746
      --  N_Array_Type_Definition
7747
 
7748
      N_Constrained_Array_Definition,
7749
      N_Unconstrained_Array_Definition,
7750
 
7751
      --  N_Renaming_Declaration
7752
 
7753
      N_Exception_Renaming_Declaration,
7754
      N_Object_Renaming_Declaration,
7755
      N_Package_Renaming_Declaration,
7756
      N_Subprogram_Renaming_Declaration,
7757
 
7758
      --  N_Generic_Renaming_Declaration, N_Renaming_Declaration
7759
 
7760
      N_Generic_Function_Renaming_Declaration,
7761
      N_Generic_Package_Renaming_Declaration,
7762
      N_Generic_Procedure_Renaming_Declaration,
7763
 
7764
      --  N_Statement_Other_Than_Procedure_Call
7765
 
7766
      N_Abort_Statement,
7767
      N_Accept_Statement,
7768
      N_Assignment_Statement,
7769
      N_Asynchronous_Select,
7770
      N_Block_Statement,
7771
      N_Case_Statement,
7772
      N_Code_Statement,
7773
      N_Conditional_Entry_Call,
7774
 
7775
      --  N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
7776
 
7777
      N_Delay_Relative_Statement,
7778
      N_Delay_Until_Statement,
7779
 
7780
      --  N_Statement_Other_Than_Procedure_Call
7781
 
7782
      N_Entry_Call_Statement,
7783
      N_Free_Statement,
7784
      N_Goto_Statement,
7785
      N_Loop_Statement,
7786
      N_Null_Statement,
7787
      N_Raise_Statement,
7788
      N_Requeue_Statement,
7789
      N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7790
      N_Extended_Return_Statement,
7791
      N_Selective_Accept,
7792
      N_Timed_Entry_Call,
7793
 
7794
      --  N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7795
 
7796
      N_Exit_Statement,
7797
      N_If_Statement,
7798
 
7799
      --  N_Has_Condition
7800
 
7801
      N_Accept_Alternative,
7802
      N_Delay_Alternative,
7803
      N_Elsif_Part,
7804
      N_Entry_Body_Formal_Part,
7805
      N_Iteration_Scheme,
7806
      N_Terminate_Alternative,
7807
 
7808
      --  N_Formal_Subprogram_Declaration
7809
 
7810
      N_Formal_Abstract_Subprogram_Declaration,
7811
      N_Formal_Concrete_Subprogram_Declaration,
7812
 
7813
      --  N_Push_xxx_Label, N_Push_Pop_xxx_Label
7814
 
7815
      N_Push_Constraint_Error_Label,
7816
      N_Push_Program_Error_Label,
7817
      N_Push_Storage_Error_Label,
7818
 
7819
      --  N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7820
 
7821
      N_Pop_Constraint_Error_Label,
7822
      N_Pop_Program_Error_Label,
7823
      N_Pop_Storage_Error_Label,
7824
 
7825
      --  SCIL nodes
7826
 
7827
      N_SCIL_Dispatch_Table_Tag_Init,
7828
      N_SCIL_Dispatching_Call,
7829
      N_SCIL_Membership_Test,
7830
 
7831
      --  Other nodes (not part of any subtype class)
7832
 
7833
      N_Abortable_Part,
7834
      N_Abstract_Subprogram_Declaration,
7835
      N_Access_Definition,
7836
      N_Access_To_Object_Definition,
7837
      N_Aspect_Specification,
7838
      N_Case_Expression_Alternative,
7839
      N_Case_Statement_Alternative,
7840
      N_Compilation_Unit,
7841
      N_Compilation_Unit_Aux,
7842
      N_Component_Association,
7843
      N_Component_Definition,
7844
      N_Component_List,
7845
      N_Contract,
7846
      N_Derived_Type_Definition,
7847
      N_Decimal_Fixed_Point_Definition,
7848
      N_Defining_Program_Unit_Name,
7849
      N_Delta_Constraint,
7850
      N_Designator,
7851
      N_Digits_Constraint,
7852
      N_Discriminant_Association,
7853
      N_Discriminant_Specification,
7854
      N_Enumeration_Type_Definition,
7855
      N_Entry_Body,
7856
      N_Entry_Call_Alternative,
7857
      N_Entry_Index_Specification,
7858
      N_Exception_Declaration,
7859
      N_Exception_Handler,
7860
      N_Floating_Point_Definition,
7861
      N_Formal_Decimal_Fixed_Point_Definition,
7862
      N_Formal_Derived_Type_Definition,
7863
      N_Formal_Discrete_Type_Definition,
7864
      N_Formal_Floating_Point_Definition,
7865
      N_Formal_Modular_Type_Definition,
7866
      N_Formal_Ordinary_Fixed_Point_Definition,
7867
      N_Formal_Package_Declaration,
7868
      N_Formal_Private_Type_Definition,
7869
      N_Formal_Incomplete_Type_Definition,
7870
      N_Formal_Signed_Integer_Type_Definition,
7871
      N_Freeze_Entity,
7872
      N_Generic_Association,
7873
      N_Handled_Sequence_Of_Statements,
7874
      N_Index_Or_Discriminant_Constraint,
7875
      N_Itype_Reference,
7876
      N_Label,
7877
      N_Modular_Type_Definition,
7878
      N_Number_Declaration,
7879
      N_Ordinary_Fixed_Point_Definition,
7880
      N_Others_Choice,
7881
      N_Package_Specification,
7882
      N_Parameter_Association,
7883
      N_Parameter_Specification,
7884
      N_Pragma,
7885
      N_Protected_Definition,
7886
      N_Range_Constraint,
7887
      N_Real_Range_Specification,
7888
      N_Record_Definition,
7889
      N_Signed_Integer_Type_Definition,
7890
      N_Single_Protected_Declaration,
7891
      N_Subunit,
7892
      N_Task_Definition,
7893
      N_Triggering_Alternative,
7894
      N_Use_Type_Clause,
7895
      N_Validate_Unchecked_Conversion,
7896
      N_Variant,
7897
      N_Variant_Part,
7898
      N_With_Clause,
7899
      N_Unused_At_End);
7900
 
7901
   for Node_Kind'Size use 8;
7902
   --  The data structures in Atree assume this!
7903
 
7904
   ----------------------------
7905
   -- Node Class Definitions --
7906
   ----------------------------
7907
 
7908
   subtype N_Access_To_Subprogram_Definition is Node_Kind range
7909
     N_Access_Function_Definition ..
7910
     N_Access_Procedure_Definition;
7911
 
7912
   subtype N_Array_Type_Definition is Node_Kind range
7913
     N_Constrained_Array_Definition ..
7914
     N_Unconstrained_Array_Definition;
7915
 
7916
   subtype N_Binary_Op is Node_Kind range
7917
     N_Op_Add ..
7918
     N_Op_Shift_Right_Arithmetic;
7919
 
7920
   subtype N_Body_Stub is Node_Kind range
7921
     N_Package_Body_Stub ..
7922
     N_Task_Body_Stub;
7923
 
7924
   subtype N_Declaration is Node_Kind range
7925
     N_Component_Declaration ..
7926
     N_Procedure_Specification;
7927
   --  Note: this includes all constructs normally thought of as declarations
7928
   --  except those which are separately grouped as later declarations.
7929
 
7930
   subtype N_Delay_Statement is Node_Kind range
7931
      N_Delay_Relative_Statement ..
7932
      N_Delay_Until_Statement;
7933
 
7934
   subtype N_Direct_Name is Node_Kind range
7935
     N_Identifier ..
7936
     N_Character_Literal;
7937
 
7938
   subtype N_Entity is Node_Kind range
7939
     N_Defining_Character_Literal ..
7940
     N_Defining_Operator_Symbol;
7941
 
7942
   subtype N_Formal_Subprogram_Declaration is Node_Kind range
7943
     N_Formal_Abstract_Subprogram_Declaration ..
7944
     N_Formal_Concrete_Subprogram_Declaration;
7945
 
7946
   subtype N_Generic_Declaration is Node_Kind range
7947
     N_Generic_Package_Declaration ..
7948
     N_Generic_Subprogram_Declaration;
7949
 
7950
   subtype N_Generic_Instantiation is Node_Kind range
7951
     N_Function_Instantiation ..
7952
     N_Package_Instantiation;
7953
 
7954
   subtype N_Generic_Renaming_Declaration is Node_Kind range
7955
     N_Generic_Function_Renaming_Declaration ..
7956
     N_Generic_Procedure_Renaming_Declaration;
7957
 
7958
   subtype N_Has_Chars is Node_Kind range
7959
     N_Attribute_Definition_Clause ..
7960
     N_Op_Plus;
7961
 
7962
   subtype N_Has_Entity is Node_Kind range
7963
     N_Expanded_Name ..
7964
     N_Attribute_Reference;
7965
   --  Nodes that have Entity fields
7966
   --  Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Aspect_Specification,
7967
   --  or N_Attribute_Definition_Clause.
7968
 
7969
   subtype N_Has_Etype is Node_Kind range
7970
     N_Error ..
7971
     N_Subtype_Indication;
7972
 
7973
   subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7974
      N_Op_Divide ..
7975
      N_Op_Rem;
7976
 
7977
   subtype N_Multiplying_Operator is Node_Kind range
7978
      N_Op_Divide ..
7979
      N_Op_Rem;
7980
 
7981
   subtype N_Later_Decl_Item is Node_Kind range
7982
     N_Task_Type_Declaration ..
7983
     N_Generic_Subprogram_Declaration;
7984
   --  Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
7985
   --  only those items which can appear as later declarative items. This also
7986
   --  includes N_Implicit_Label_Declaration which is not specifically in the
7987
   --  grammar but may appear as a valid later declarative items. It does NOT
7988
   --  include N_Pragma which can also appear among later declarative items.
7989
   --  It does however include N_Protected_Body, which is a bit peculiar, but
7990
   --  harmless since this cannot appear in Ada 83 mode anyway.
7991
 
7992
   subtype N_Membership_Test is Node_Kind range
7993
      N_In ..
7994
      N_Not_In;
7995
 
7996
   subtype N_Op is Node_Kind range
7997
     N_Op_Add ..
7998
     N_Op_Plus;
7999
 
8000
   subtype N_Op_Boolean is Node_Kind range
8001
     N_Op_And ..
8002
     N_Op_Xor;
8003
   --  Binary operators which take operands of a boolean type, and yield
8004
   --  a result of a boolean type.
8005
 
8006
   subtype N_Op_Compare is Node_Kind range
8007
     N_Op_Eq ..
8008
     N_Op_Ne;
8009
 
8010
   subtype N_Op_Shift is Node_Kind range
8011
     N_Op_Rotate_Left ..
8012
     N_Op_Shift_Right_Arithmetic;
8013
 
8014
   subtype N_Proper_Body is Node_Kind range
8015
     N_Package_Body ..
8016
     N_Task_Body;
8017
 
8018
   subtype N_Push_xxx_Label is Node_Kind range
8019
     N_Push_Constraint_Error_Label ..
8020
     N_Push_Storage_Error_Label;
8021
 
8022
   subtype N_Pop_xxx_Label is Node_Kind range
8023
     N_Pop_Constraint_Error_Label ..
8024
     N_Pop_Storage_Error_Label;
8025
 
8026
   subtype N_Push_Pop_xxx_Label is Node_Kind range
8027
     N_Push_Constraint_Error_Label ..
8028
     N_Pop_Storage_Error_Label;
8029
 
8030
   subtype N_Raise_xxx_Error is Node_Kind range
8031
     N_Raise_Constraint_Error ..
8032
     N_Raise_Storage_Error;
8033
 
8034
   subtype N_Renaming_Declaration is Node_Kind range
8035
     N_Exception_Renaming_Declaration ..
8036
     N_Generic_Procedure_Renaming_Declaration;
8037
 
8038
   subtype N_Representation_Clause is Node_Kind range
8039
     N_At_Clause ..
8040
     N_Attribute_Definition_Clause;
8041
 
8042
   subtype N_Short_Circuit is Node_Kind range
8043
     N_And_Then ..
8044
     N_Or_Else;
8045
 
8046
   subtype N_SCIL_Node is Node_Kind range
8047
     N_SCIL_Dispatch_Table_Tag_Init ..
8048
     N_SCIL_Membership_Test;
8049
 
8050
   subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
8051
     N_Abort_Statement ..
8052
     N_If_Statement;
8053
   --  Note that this includes all statement types except for the cases of the
8054
   --  N_Procedure_Call_Statement which is considered to be a subexpression
8055
   --  (since overloading is possible, so it needs to go through the normal
8056
   --  overloading resolution for expressions).
8057
 
8058
   subtype N_Subprogram_Instantiation is Node_Kind range
8059
     N_Function_Instantiation ..
8060
     N_Procedure_Instantiation;
8061
 
8062
   subtype N_Has_Condition is Node_Kind range
8063
     N_Exit_Statement ..
8064
     N_Terminate_Alternative;
8065
   --  Nodes with condition fields (does not include N_Raise_xxx_Error)
8066
 
8067
   subtype N_Subexpr is Node_Kind range
8068
     N_Expanded_Name ..
8069
     N_Unchecked_Type_Conversion;
8070
   --  Nodes with expression fields
8071
 
8072
   subtype N_Subprogram_Specification is Node_Kind range
8073
     N_Function_Specification ..
8074
     N_Procedure_Specification;
8075
 
8076
   subtype N_Unary_Op is Node_Kind range
8077
     N_Op_Abs ..
8078
     N_Op_Plus;
8079
 
8080
   subtype N_Unit_Body is Node_Kind range
8081
     N_Package_Body ..
8082
       N_Subprogram_Body;
8083
 
8084
   ---------------------------
8085
   -- Node Access Functions --
8086
   ---------------------------
8087
 
8088
   --  The following functions return the contents of the indicated field of
8089
   --  the node referenced by the argument, which is a Node_Id. They provide
8090
   --  logical access to fields in the node which could be accessed using the
8091
   --  Atree.Unchecked_Access package, but the idea is always to use these
8092
   --  higher level routines which preserve strong typing. In debug mode,
8093
   --  these routines check that they are being applied to an appropriate
8094
   --  node, as well as checking that the node is in range.
8095
 
8096
   function ABE_Is_Certain
8097
     (N : Node_Id) return Boolean;    -- Flag18
8098
 
8099
   function Abort_Present
8100
     (N : Node_Id) return Boolean;    -- Flag15
8101
 
8102
   function Abortable_Part
8103
     (N : Node_Id) return Node_Id;    -- Node2
8104
 
8105
   function Abstract_Present
8106
     (N : Node_Id) return Boolean;    -- Flag4
8107
 
8108
   function Accept_Handler_Records
8109
     (N : Node_Id) return List_Id;    -- List5
8110
 
8111
   function Accept_Statement
8112
     (N : Node_Id) return Node_Id;    -- Node2
8113
 
8114
   function Access_Definition
8115
     (N : Node_Id) return Node_Id;    -- Node3
8116
 
8117
   function Access_To_Subprogram_Definition
8118
     (N : Node_Id) return Node_Id;    -- Node3
8119
 
8120
   function Access_Types_To_Process
8121
     (N : Node_Id) return Elist_Id;   -- Elist2
8122
 
8123
   function Actions
8124
     (N : Node_Id) return List_Id;    -- List1
8125
 
8126
   function Activation_Chain_Entity
8127
     (N : Node_Id) return Node_Id;    -- Node3
8128
 
8129
   function Acts_As_Spec
8130
     (N : Node_Id) return Boolean;    -- Flag4
8131
 
8132
   function Actual_Designated_Subtype
8133
     (N : Node_Id) return Node_Id;    -- Node4
8134
 
8135
   function Address_Warning_Posted
8136
     (N : Node_Id) return Boolean;    -- Flag18
8137
 
8138
   function Aggregate_Bounds
8139
     (N : Node_Id) return Node_Id;    -- Node3
8140
 
8141
   function Aliased_Present
8142
     (N : Node_Id) return Boolean;    -- Flag4
8143
 
8144
   function All_Others
8145
     (N : Node_Id) return Boolean;    -- Flag11
8146
 
8147
   function All_Present
8148
     (N : Node_Id) return Boolean;    -- Flag15
8149
 
8150
   function Alternatives
8151
     (N : Node_Id) return List_Id;    -- List4
8152
 
8153
   function Ancestor_Part
8154
     (N : Node_Id) return Node_Id;    -- Node3
8155
 
8156
   function Atomic_Sync_Required
8157
     (N : Node_Id) return Boolean;    -- Flag14
8158
 
8159
   function Array_Aggregate
8160
     (N : Node_Id) return Node_Id;    -- Node3
8161
 
8162
   function Aspect_Rep_Item
8163
     (N : Node_Id) return Node_Id;    -- Node2
8164
 
8165
   function Assignment_OK
8166
     (N : Node_Id) return Boolean;    -- Flag15
8167
 
8168
   function Associated_Node
8169
     (N : Node_Id) return Node_Id;    -- Node4
8170
 
8171
   function At_End_Proc
8172
     (N : Node_Id) return Node_Id;    -- Node1
8173
 
8174
   function Attribute_Name
8175
     (N : Node_Id) return Name_Id;    -- Name2
8176
 
8177
   function Aux_Decls_Node
8178
     (N : Node_Id) return Node_Id;    -- Node5
8179
 
8180
   function Backwards_OK
8181
     (N : Node_Id) return Boolean;    -- Flag6
8182
 
8183
   function Bad_Is_Detected
8184
     (N : Node_Id) return Boolean;    -- Flag15
8185
 
8186
   function By_Ref
8187
     (N : Node_Id) return Boolean;    -- Flag5
8188
 
8189
   function Body_Required
8190
     (N : Node_Id) return Boolean;    -- Flag13
8191
 
8192
   function Body_To_Inline
8193
     (N : Node_Id) return Node_Id;    -- Node3
8194
 
8195
   function Box_Present
8196
     (N : Node_Id) return Boolean;    -- Flag15
8197
 
8198
   function Char_Literal_Value
8199
     (N : Node_Id) return Uint;       -- Uint2
8200
 
8201
   function Chars
8202
     (N : Node_Id) return Name_Id;    -- Name1
8203
 
8204
   function Check_Address_Alignment
8205
     (N : Node_Id) return Boolean;    -- Flag11
8206
 
8207
   function Choice_Parameter
8208
     (N : Node_Id) return Node_Id;    -- Node2
8209
 
8210
   function Choices
8211
     (N : Node_Id) return List_Id;    -- List1
8212
 
8213
   function Class_Present
8214
     (N : Node_Id) return Boolean;    -- Flag6
8215
 
8216
   function Comes_From_Extended_Return_Statement
8217
     (N : Node_Id) return Boolean;    -- Flag18
8218
 
8219
   function Compile_Time_Known_Aggregate
8220
     (N : Node_Id) return Boolean;    -- Flag18
8221
 
8222
   function Component_Associations
8223
     (N : Node_Id) return List_Id;    -- List2
8224
 
8225
   function Component_Clauses
8226
     (N : Node_Id) return List_Id;    -- List3
8227
 
8228
   function Component_Definition
8229
     (N : Node_Id) return Node_Id;    -- Node4
8230
 
8231
   function Component_Items
8232
     (N : Node_Id) return List_Id;    -- List3
8233
 
8234
   function Component_List
8235
     (N : Node_Id) return Node_Id;    -- Node1
8236
 
8237
   function Component_Name
8238
     (N : Node_Id) return Node_Id;    -- Node1
8239
 
8240
   function Componentwise_Assignment
8241
     (N : Node_Id) return Boolean;    -- Flag14
8242
 
8243
   function Condition
8244
     (N : Node_Id) return Node_Id;    -- Node1
8245
 
8246
   function Condition_Actions
8247
     (N : Node_Id) return List_Id;    -- List3
8248
 
8249
   function Config_Pragmas
8250
     (N : Node_Id) return List_Id;    -- List4
8251
 
8252
   function Constant_Present
8253
     (N : Node_Id) return Boolean;    -- Flag17
8254
 
8255
   function Constraint
8256
     (N : Node_Id) return Node_Id;    -- Node3
8257
 
8258
   function Constraints
8259
     (N : Node_Id) return List_Id;    -- List1
8260
 
8261
   function Context_Installed
8262
     (N : Node_Id) return Boolean;    -- Flag13
8263
 
8264
   function Context_Pending
8265
     (N : Node_Id) return Boolean;    -- Flag16
8266
 
8267
   function Context_Items
8268
     (N : Node_Id) return List_Id;    -- List1
8269
 
8270
   function Controlling_Argument
8271
     (N : Node_Id) return Node_Id;    -- Node1
8272
 
8273
   function Conversion_OK
8274
     (N : Node_Id) return Boolean;    -- Flag14
8275
 
8276
   function Corresponding_Aspect
8277
     (N : Node_Id) return Node_Id;    -- Node3
8278
 
8279
   function Corresponding_Body
8280
     (N : Node_Id) return Node_Id;    -- Node5
8281
 
8282
   function Corresponding_Formal_Spec
8283
     (N : Node_Id) return Node_Id;    -- Node3
8284
 
8285
   function Corresponding_Generic_Association
8286
     (N : Node_Id) return Node_Id;    -- Node5
8287
 
8288
   function Corresponding_Integer_Value
8289
     (N : Node_Id) return Uint;       -- Uint4
8290
 
8291
   function Corresponding_Spec
8292
     (N : Node_Id) return Node_Id;    -- Node5
8293
 
8294
   function Corresponding_Stub
8295
     (N : Node_Id) return Node_Id;    -- Node3
8296
 
8297
   function Dcheck_Function
8298
     (N : Node_Id) return Entity_Id;  -- Node5
8299
 
8300
   function Declarations
8301
     (N : Node_Id) return List_Id;    -- List2
8302
 
8303
   function Default_Expression
8304
     (N : Node_Id) return Node_Id;    -- Node5
8305
 
8306
   function Default_Storage_Pool
8307
     (N : Node_Id) return Node_Id;    -- Node3
8308
 
8309
   function Default_Name
8310
     (N : Node_Id) return Node_Id;    -- Node2
8311
 
8312
   function Defining_Identifier
8313
     (N : Node_Id) return Entity_Id;  -- Node1
8314
 
8315
   function Defining_Unit_Name
8316
     (N : Node_Id) return Node_Id;    -- Node1
8317
 
8318
   function Delay_Alternative
8319
     (N : Node_Id) return Node_Id;    -- Node4
8320
 
8321
   function Delay_Statement
8322
     (N : Node_Id) return Node_Id;    -- Node2
8323
 
8324
   function Delta_Expression
8325
     (N : Node_Id) return Node_Id;    -- Node3
8326
 
8327
   function Digits_Expression
8328
     (N : Node_Id) return Node_Id;    -- Node2
8329
 
8330
   function Discr_Check_Funcs_Built
8331
     (N : Node_Id) return Boolean;    -- Flag11
8332
 
8333
   function Discrete_Choices
8334
     (N : Node_Id) return List_Id;    -- List4
8335
 
8336
   function Discrete_Range
8337
     (N : Node_Id) return Node_Id;    -- Node4
8338
 
8339
   function Discrete_Subtype_Definition
8340
     (N : Node_Id) return Node_Id;    -- Node4
8341
 
8342
   function Discrete_Subtype_Definitions
8343
     (N : Node_Id) return List_Id;    -- List2
8344
 
8345
   function Discriminant_Specifications
8346
     (N : Node_Id) return List_Id;    -- List4
8347
 
8348
   function Discriminant_Type
8349
     (N : Node_Id) return Node_Id;    -- Node5
8350
 
8351
   function Do_Accessibility_Check
8352
     (N : Node_Id) return Boolean;    -- Flag13
8353
 
8354
   function Do_Discriminant_Check
8355
     (N : Node_Id) return Boolean;    -- Flag13
8356
 
8357
   function Do_Division_Check
8358
     (N : Node_Id) return Boolean;    -- Flag13
8359
 
8360
   function Do_Length_Check
8361
     (N : Node_Id) return Boolean;    -- Flag4
8362
 
8363
   function Do_Overflow_Check
8364
     (N : Node_Id) return Boolean;    -- Flag17
8365
 
8366
   function Do_Range_Check
8367
     (N : Node_Id) return Boolean;    -- Flag9
8368
 
8369
   function Do_Storage_Check
8370
     (N : Node_Id) return Boolean;    -- Flag17
8371
 
8372
   function Do_Tag_Check
8373
     (N : Node_Id) return Boolean;    -- Flag13
8374
 
8375
   function Elaborate_All_Desirable
8376
     (N : Node_Id) return Boolean;    -- Flag9
8377
 
8378
   function Elaborate_All_Present
8379
     (N : Node_Id) return Boolean;    -- Flag14
8380
 
8381
   function Elaborate_Desirable
8382
     (N : Node_Id) return Boolean;    -- Flag11
8383
 
8384
   function Elaborate_Present
8385
     (N : Node_Id) return Boolean;    -- Flag4
8386
 
8387
   function Elaboration_Boolean
8388
     (N : Node_Id) return Node_Id;    -- Node2
8389
 
8390
   function Else_Actions
8391
     (N : Node_Id) return List_Id;    -- List3
8392
 
8393
   function Else_Statements
8394
     (N : Node_Id) return List_Id;    -- List4
8395
 
8396
   function Elsif_Parts
8397
     (N : Node_Id) return List_Id;    -- List3
8398
 
8399
   function Enclosing_Variant
8400
     (N : Node_Id) return Node_Id;    -- Node2
8401
 
8402
   function End_Label
8403
     (N : Node_Id) return Node_Id;    -- Node4
8404
 
8405
   function End_Span
8406
     (N : Node_Id) return Uint;       -- Uint5
8407
 
8408
   function Entity
8409
     (N : Node_Id) return Node_Id;    -- Node4
8410
 
8411
   function Entity_Or_Associated_Node
8412
     (N : Node_Id) return Node_Id;    -- Node4
8413
 
8414
   function Entry_Body_Formal_Part
8415
     (N : Node_Id) return Node_Id;    -- Node5
8416
 
8417
   function Entry_Call_Alternative
8418
     (N : Node_Id) return Node_Id;    -- Node1
8419
 
8420
   function Entry_Call_Statement
8421
     (N : Node_Id) return Node_Id;    -- Node1
8422
 
8423
   function Entry_Direct_Name
8424
     (N : Node_Id) return Node_Id;    -- Node1
8425
 
8426
   function Entry_Index
8427
     (N : Node_Id) return Node_Id;    -- Node5
8428
 
8429
   function Entry_Index_Specification
8430
     (N : Node_Id) return Node_Id;    -- Node4
8431
 
8432
   function Etype
8433
     (N : Node_Id) return Node_Id;    -- Node5
8434
 
8435
   function Exception_Choices
8436
     (N : Node_Id) return List_Id;    -- List4
8437
 
8438
   function Exception_Handlers
8439
     (N : Node_Id) return List_Id;    -- List5
8440
 
8441
   function Exception_Junk
8442
     (N : Node_Id) return Boolean;    -- Flag8
8443
 
8444
   function Exception_Label
8445
     (N : Node_Id) return Node_Id;    -- Node5
8446
 
8447
   function Explicit_Actual_Parameter
8448
     (N : Node_Id) return Node_Id;    -- Node3
8449
 
8450
   function Expansion_Delayed
8451
     (N : Node_Id) return Boolean;    -- Flag11
8452
 
8453
   function Explicit_Generic_Actual_Parameter
8454
     (N : Node_Id) return Node_Id;    -- Node1
8455
 
8456
   function Expression
8457
     (N : Node_Id) return Node_Id;    -- Node3
8458
 
8459
   function Expressions
8460
     (N : Node_Id) return List_Id;    -- List1
8461
 
8462
   function First_Bit
8463
     (N : Node_Id) return Node_Id;    -- Node3
8464
 
8465
   function First_Inlined_Subprogram
8466
     (N : Node_Id) return Entity_Id;  -- Node3
8467
 
8468
   function First_Name
8469
     (N : Node_Id) return Boolean;    -- Flag5
8470
 
8471
   function First_Named_Actual
8472
     (N : Node_Id) return Node_Id;    -- Node4
8473
 
8474
   function First_Real_Statement
8475
     (N : Node_Id) return Node_Id;    -- Node2
8476
 
8477
   function First_Subtype_Link
8478
     (N : Node_Id) return Entity_Id;  -- Node5
8479
 
8480
   function Float_Truncate
8481
     (N : Node_Id) return Boolean;    -- Flag11
8482
 
8483
   function Formal_Type_Definition
8484
     (N : Node_Id) return Node_Id;    -- Node3
8485
 
8486
   function Forwards_OK
8487
     (N : Node_Id) return Boolean;    -- Flag5
8488
 
8489
   function From_Aspect_Specification
8490
     (N : Node_Id) return Boolean;    -- Flag13
8491
 
8492
   function From_At_End
8493
     (N : Node_Id) return Boolean;    -- Flag4
8494
 
8495
   function From_At_Mod
8496
     (N : Node_Id) return Boolean;    -- Flag4
8497
 
8498
   function From_Default
8499
     (N : Node_Id) return Boolean;    -- Flag6
8500
 
8501
   function Generic_Associations
8502
     (N : Node_Id) return List_Id;    -- List3
8503
 
8504
   function Generic_Formal_Declarations
8505
     (N : Node_Id) return List_Id;    -- List2
8506
 
8507
   function Generic_Parent
8508
     (N : Node_Id) return Node_Id;    -- Node5
8509
 
8510
   function Generic_Parent_Type
8511
     (N : Node_Id) return Node_Id;    -- Node4
8512
 
8513
   function Handled_Statement_Sequence
8514
     (N : Node_Id) return Node_Id;    -- Node4
8515
 
8516
   function Handler_List_Entry
8517
     (N : Node_Id) return Node_Id;    -- Node2
8518
 
8519
   function Has_Created_Identifier
8520
     (N : Node_Id) return Boolean;    -- Flag15
8521
 
8522
   function Has_Dynamic_Length_Check
8523
     (N : Node_Id) return Boolean;    -- Flag10
8524
 
8525
   function Has_Dynamic_Range_Check
8526
     (N : Node_Id) return Boolean;    -- Flag12
8527
 
8528
   function Has_Init_Expression
8529
     (N : Node_Id) return Boolean;    -- Flag14
8530
 
8531
   function Has_Local_Raise
8532
     (N : Node_Id) return Boolean;    -- Flag8
8533
 
8534
   function Has_No_Elaboration_Code
8535
     (N : Node_Id) return Boolean;    -- Flag17
8536
 
8537
   function Has_Pragma_CPU
8538
     (N : Node_Id) return Boolean;    -- Flag14
8539
 
8540
   function Has_Pragma_Dispatching_Domain
8541
     (N : Node_Id) return Boolean;    -- Flag15
8542
 
8543
   function Has_Pragma_Priority
8544
     (N : Node_Id) return Boolean;    -- Flag6
8545
 
8546
   function Has_Pragma_Suppress_All
8547
     (N : Node_Id) return Boolean;    -- Flag14
8548
 
8549
   function Has_Private_View
8550
     (N : Node_Id) return Boolean;    -- Flag11
8551
 
8552
   function Has_Relative_Deadline_Pragma
8553
     (N : Node_Id) return Boolean;    -- Flag9
8554
 
8555
   function Has_Self_Reference
8556
     (N : Node_Id) return Boolean;    -- Flag13
8557
 
8558
   function Has_Storage_Size_Pragma
8559
     (N : Node_Id) return Boolean;    -- Flag5
8560
 
8561
   function Has_Task_Info_Pragma
8562
     (N : Node_Id) return Boolean;    -- Flag7
8563
 
8564
   function Has_Task_Name_Pragma
8565
     (N : Node_Id) return Boolean;    -- Flag8
8566
 
8567
   function Has_Wide_Character
8568
     (N : Node_Id) return Boolean;    -- Flag11
8569
 
8570
   function Has_Wide_Wide_Character
8571
     (N : Node_Id) return Boolean;    -- Flag13
8572
 
8573
   function Header_Size_Added
8574
     (N : Node_Id) return Boolean;    -- Flag11
8575
 
8576
   function Hidden_By_Use_Clause
8577
     (N : Node_Id) return Elist_Id;   -- Elist4
8578
 
8579
   function High_Bound
8580
     (N : Node_Id) return Node_Id;    -- Node2
8581
 
8582
   function Identifier
8583
     (N : Node_Id) return Node_Id;    -- Node1
8584
 
8585
   function Interface_List
8586
     (N : Node_Id) return List_Id;    -- List2
8587
 
8588
   function Interface_Present
8589
     (N : Node_Id) return Boolean;    -- Flag16
8590
 
8591
   function Implicit_With
8592
     (N : Node_Id) return Boolean;    -- Flag16
8593
 
8594
   function Import_Interface_Present
8595
     (N : Node_Id) return Boolean;    -- Flag16
8596
 
8597
   function In_Present
8598
     (N : Node_Id) return Boolean;    -- Flag15
8599
 
8600
   function Includes_Infinities
8601
     (N : Node_Id) return Boolean;    -- Flag11
8602
 
8603
   function Inherited_Discriminant
8604
     (N : Node_Id) return Boolean;    -- Flag13
8605
 
8606
   function Instance_Spec
8607
     (N : Node_Id) return Node_Id;    -- Node5
8608
 
8609
   function Intval
8610
     (N : Node_Id) return Uint;       -- Uint3
8611
 
8612
   function Is_Accessibility_Actual
8613
     (N : Node_Id) return Boolean;    -- Flag13
8614
 
8615
   function Is_Asynchronous_Call_Block
8616
     (N : Node_Id) return Boolean;    -- Flag7
8617
 
8618
   function Is_Boolean_Aspect
8619
     (N : Node_Id) return Boolean;    -- Flag16
8620
 
8621
   function Is_Component_Left_Opnd
8622
     (N : Node_Id) return Boolean;    -- Flag13
8623
 
8624
   function Is_Component_Right_Opnd
8625
     (N : Node_Id) return Boolean;    -- Flag14
8626
 
8627
   function Is_Controlling_Actual
8628
     (N : Node_Id) return Boolean;    -- Flag16
8629
 
8630
   function Is_Delayed_Aspect
8631
     (N : Node_Id) return Boolean;    -- Flag14
8632
 
8633
   function Is_Dynamic_Coextension
8634
     (N : Node_Id) return Boolean;    -- Flag18
8635
 
8636
   function Is_Elsif
8637
     (N : Node_Id) return Boolean;    -- Flag13
8638
 
8639
   function Is_Entry_Barrier_Function
8640
     (N : Node_Id) return Boolean;    -- Flag8
8641
 
8642
   function Is_Expanded_Build_In_Place_Call
8643
     (N : Node_Id) return Boolean;    -- Flag11
8644
 
8645
   function Is_Folded_In_Parser
8646
     (N : Node_Id) return Boolean;    -- Flag4
8647
 
8648
   function Is_In_Discriminant_Check
8649
     (N : Node_Id) return Boolean;    -- Flag11
8650
 
8651
   function Is_Machine_Number
8652
     (N : Node_Id) return Boolean;    -- Flag11
8653
 
8654
   function Is_Null_Loop
8655
     (N : Node_Id) return Boolean;    -- Flag16
8656
 
8657
   function Is_Overloaded
8658
     (N : Node_Id) return Boolean;    -- Flag5
8659
 
8660
   function Is_Power_Of_2_For_Shift
8661
     (N : Node_Id) return Boolean;    -- Flag13
8662
 
8663
   function Is_Prefixed_Call
8664
     (N : Node_Id) return Boolean;    -- Flag17
8665
 
8666
   function Is_Protected_Subprogram_Body
8667
     (N : Node_Id) return Boolean;    -- Flag7
8668
 
8669
   function Is_Static_Coextension
8670
     (N : Node_Id) return Boolean;    -- Flag14
8671
 
8672
   function Is_Static_Expression
8673
     (N : Node_Id) return Boolean;    -- Flag6
8674
 
8675
   function Is_Subprogram_Descriptor
8676
     (N : Node_Id) return Boolean;    -- Flag16
8677
 
8678
   function Is_Task_Allocation_Block
8679
     (N : Node_Id) return Boolean;    -- Flag6
8680
 
8681
   function Is_Task_Master
8682
     (N : Node_Id) return Boolean;    -- Flag5
8683
 
8684
   function Iteration_Scheme
8685
     (N : Node_Id) return Node_Id;    -- Node2
8686
 
8687
   function Iterator_Specification
8688
     (N : Node_Id) return Node_Id;    -- Node2
8689
 
8690
   function Itype
8691
     (N : Node_Id) return Entity_Id;  -- Node1
8692
 
8693
   function Kill_Range_Check
8694
     (N : Node_Id) return Boolean;    -- Flag11
8695
 
8696
   function Label_Construct
8697
     (N : Node_Id) return Node_Id;    -- Node2
8698
 
8699
   function Left_Opnd
8700
     (N : Node_Id) return Node_Id;    -- Node2
8701
 
8702
   function Last_Bit
8703
     (N : Node_Id) return Node_Id;    -- Node4
8704
 
8705
   function Last_Name
8706
     (N : Node_Id) return Boolean;    -- Flag6
8707
 
8708
   function Library_Unit
8709
     (N : Node_Id) return Node_Id;    -- Node4
8710
 
8711
   function Limited_View_Installed
8712
     (N : Node_Id) return Boolean;    -- Flag18
8713
 
8714
   function Limited_Present
8715
     (N : Node_Id) return Boolean;    -- Flag17
8716
 
8717
   function Literals
8718
     (N : Node_Id) return List_Id;    -- List1
8719
 
8720
   function Local_Raise_Not_OK
8721
     (N : Node_Id) return Boolean;    -- Flag7
8722
 
8723
   function Local_Raise_Statements
8724
     (N : Node_Id) return Elist_Id;   -- Elist1
8725
 
8726
   function Loop_Actions
8727
     (N : Node_Id) return List_Id;    -- List2
8728
 
8729
   function Loop_Parameter_Specification
8730
     (N : Node_Id) return Node_Id;    -- Node4
8731
 
8732
   function Low_Bound
8733
     (N : Node_Id) return Node_Id;    -- Node1
8734
 
8735
   function Mod_Clause
8736
     (N : Node_Id) return Node_Id;    -- Node2
8737
 
8738
   function More_Ids
8739
     (N : Node_Id) return Boolean;    -- Flag5
8740
 
8741
   function Must_Be_Byte_Aligned
8742
     (N : Node_Id) return Boolean;    -- Flag14
8743
 
8744
   function Must_Not_Freeze
8745
     (N : Node_Id) return Boolean;    -- Flag8
8746
 
8747
   function Must_Not_Override
8748
     (N : Node_Id) return Boolean;    -- Flag15
8749
 
8750
   function Must_Override
8751
     (N : Node_Id) return Boolean;    -- Flag14
8752
 
8753
   function Name
8754
     (N : Node_Id) return Node_Id;    -- Node2
8755
 
8756
   function Names
8757
     (N : Node_Id) return List_Id;    -- List2
8758
 
8759
   function Next_Entity
8760
     (N : Node_Id) return Node_Id;    -- Node2
8761
 
8762
   function Next_Exit_Statement
8763
     (N : Node_Id) return Node_Id;    -- Node3
8764
 
8765
   function Next_Implicit_With
8766
     (N : Node_Id) return Node_Id;    -- Node3
8767
 
8768
   function Next_Named_Actual
8769
     (N : Node_Id) return Node_Id;    -- Node4
8770
 
8771
   function Next_Pragma
8772
     (N : Node_Id) return Node_Id;    -- Node1
8773
 
8774
   function Next_Rep_Item
8775
     (N : Node_Id) return Node_Id;    -- Node5
8776
 
8777
   function Next_Use_Clause
8778
     (N : Node_Id) return Node_Id;    -- Node3
8779
 
8780
   function No_Ctrl_Actions
8781
     (N : Node_Id) return Boolean;    -- Flag7
8782
 
8783
   function No_Elaboration_Check
8784
     (N : Node_Id) return Boolean;    -- Flag14
8785
 
8786
   function No_Entities_Ref_In_Spec
8787
     (N : Node_Id) return Boolean;    -- Flag8
8788
 
8789
   function No_Initialization
8790
     (N : Node_Id) return Boolean;    -- Flag13
8791
 
8792
   function No_Truncation
8793
     (N : Node_Id) return Boolean;    -- Flag17
8794
 
8795
   function Null_Present
8796
     (N : Node_Id) return Boolean;    -- Flag13
8797
 
8798
   function Null_Exclusion_Present
8799
     (N : Node_Id) return Boolean;    -- Flag11
8800
 
8801
   function Null_Exclusion_In_Return_Present
8802
     (N : Node_Id) return Boolean;    -- Flag14
8803
 
8804
   function Null_Record_Present
8805
     (N : Node_Id) return Boolean;    -- Flag17
8806
 
8807
   function Object_Definition
8808
     (N : Node_Id) return Node_Id;    -- Node4
8809
 
8810
   function Of_Present
8811
     (N : Node_Id) return Boolean;    -- Flag16
8812
 
8813
   function Original_Discriminant
8814
     (N : Node_Id) return Node_Id;    -- Node2
8815
 
8816
   function Original_Entity
8817
     (N : Node_Id) return Entity_Id;  -- Node2
8818
 
8819
   function Others_Discrete_Choices
8820
     (N : Node_Id) return List_Id;    -- List1
8821
 
8822
   function Out_Present
8823
     (N : Node_Id) return Boolean;    -- Flag17
8824
 
8825
   function Parameter_Associations
8826
     (N : Node_Id) return List_Id;    -- List3
8827
 
8828
   function Parameter_List_Truncated
8829
     (N : Node_Id) return Boolean;    -- Flag17
8830
 
8831
   function Parameter_Specifications
8832
     (N : Node_Id) return List_Id;    -- List3
8833
 
8834
   function Parameter_Type
8835
     (N : Node_Id) return Node_Id;    -- Node2
8836
 
8837
   function Parent_Spec
8838
     (N : Node_Id) return Node_Id;    -- Node4
8839
 
8840
   function Position
8841
     (N : Node_Id) return Node_Id;    -- Node2
8842
 
8843
   function Pragma_Argument_Associations
8844
     (N : Node_Id) return List_Id;    -- List2
8845
 
8846
   function Pragma_Identifier
8847
     (N : Node_Id) return Node_Id;    -- Node4
8848
 
8849
   function Pragmas_After
8850
     (N : Node_Id) return List_Id;    -- List5
8851
 
8852
   function Pragmas_Before
8853
     (N : Node_Id) return List_Id;    -- List4
8854
 
8855
   function Prefix
8856
     (N : Node_Id) return Node_Id;    -- Node3
8857
 
8858
   function Premature_Use
8859
     (N : Node_Id) return Node_Id;    -- Node5
8860
 
8861
   function Present_Expr
8862
     (N : Node_Id) return Uint;       -- Uint3
8863
 
8864
   function Prev_Ids
8865
     (N : Node_Id) return Boolean;    -- Flag6
8866
 
8867
   function Print_In_Hex
8868
     (N : Node_Id) return Boolean;    -- Flag13
8869
 
8870
   function Private_Declarations
8871
     (N : Node_Id) return List_Id;    -- List3
8872
 
8873
   function Private_Present
8874
     (N : Node_Id) return Boolean;    -- Flag15
8875
 
8876
   function Procedure_To_Call
8877
     (N : Node_Id) return Node_Id;    -- Node2
8878
 
8879
   function Proper_Body
8880
     (N : Node_Id) return Node_Id;    -- Node1
8881
 
8882
   function Protected_Definition
8883
     (N : Node_Id) return Node_Id;    -- Node3
8884
 
8885
   function Protected_Present
8886
     (N : Node_Id) return Boolean;    -- Flag6
8887
 
8888
   function Raises_Constraint_Error
8889
     (N : Node_Id) return Boolean;    -- Flag7
8890
 
8891
   function Range_Constraint
8892
     (N : Node_Id) return Node_Id;    -- Node4
8893
 
8894
   function Range_Expression
8895
     (N : Node_Id) return Node_Id;    -- Node4
8896
 
8897
   function Real_Range_Specification
8898
     (N : Node_Id) return Node_Id;    -- Node4
8899
 
8900
   function Realval
8901
     (N : Node_Id) return Ureal;      -- Ureal3
8902
 
8903
   function Reason
8904
     (N : Node_Id) return Uint;       -- Uint3
8905
 
8906
   function Record_Extension_Part
8907
     (N : Node_Id) return Node_Id;    -- Node3
8908
 
8909
   function Redundant_Use
8910
     (N : Node_Id) return Boolean;    -- Flag13
8911
 
8912
   function Renaming_Exception
8913
     (N : Node_Id) return Node_Id;    -- Node2
8914
 
8915
   function Result_Definition
8916
     (N : Node_Id) return Node_Id;    -- Node4
8917
 
8918
   function Return_Object_Declarations
8919
     (N : Node_Id) return List_Id;    -- List3
8920
 
8921
   function Return_Statement_Entity
8922
     (N : Node_Id) return Node_Id;    -- Node5
8923
 
8924
   function Reverse_Present
8925
     (N : Node_Id) return Boolean;    -- Flag15
8926
 
8927
   function Right_Opnd
8928
     (N : Node_Id) return Node_Id;    -- Node3
8929
 
8930
   function Rounded_Result
8931
     (N : Node_Id) return Boolean;    -- Flag18
8932
 
8933
   function SCIL_Controlling_Tag
8934
     (N : Node_Id) return Node_Id;    -- Node5
8935
 
8936
   function SCIL_Entity
8937
     (N : Node_Id) return Node_Id;    -- Node4
8938
 
8939
   function SCIL_Tag_Value
8940
     (N : Node_Id) return Node_Id;    -- Node5
8941
 
8942
   function SCIL_Target_Prim
8943
     (N : Node_Id) return Node_Id;    -- Node2
8944
 
8945
   function Scope
8946
     (N : Node_Id) return Node_Id;    -- Node3
8947
 
8948
   function Select_Alternatives
8949
     (N : Node_Id) return List_Id;    -- List1
8950
 
8951
   function Selector_Name
8952
     (N : Node_Id) return Node_Id;    -- Node2
8953
 
8954
   function Selector_Names
8955
     (N : Node_Id) return List_Id;    -- List1
8956
 
8957
   function Shift_Count_OK
8958
     (N : Node_Id) return Boolean;    -- Flag4
8959
 
8960
   function Source_Type
8961
     (N : Node_Id) return Entity_Id;  -- Node1
8962
 
8963
   function Spec_PPC_List
8964
     (N : Node_Id) return Node_Id;    -- Node1
8965
 
8966
   function Spec_TC_List
8967
     (N : Node_Id) return Node_Id;    -- Node2
8968
 
8969
   function Specification
8970
     (N : Node_Id) return Node_Id;    -- Node1
8971
 
8972
   function Split_PPC
8973
     (N : Node_Id) return Boolean;    -- Flag17
8974
 
8975
   function Statements
8976
     (N : Node_Id) return List_Id;    -- List3
8977
 
8978
   function Static_Processing_OK
8979
     (N : Node_Id) return Boolean;    -- Flag4
8980
 
8981
   function Storage_Pool
8982
     (N : Node_Id) return Node_Id;    -- Node1
8983
 
8984
   function Subpool_Handle_Name
8985
     (N : Node_Id) return Node_Id;    -- Node4
8986
 
8987
   function Strval
8988
     (N : Node_Id) return String_Id;  -- Str3
8989
 
8990
   function Subtype_Indication
8991
     (N : Node_Id) return Node_Id;    -- Node5
8992
 
8993
   function Subtype_Mark
8994
     (N : Node_Id) return Node_Id;    -- Node4
8995
 
8996
   function Subtype_Marks
8997
     (N : Node_Id) return List_Id;    -- List2
8998
 
8999
   function Suppress_Assignment_Checks
9000
     (N : Node_Id) return Boolean;    -- Flag18
9001
 
9002
   function Suppress_Loop_Warnings
9003
     (N : Node_Id) return Boolean;    -- Flag17
9004
 
9005
   function Synchronized_Present
9006
     (N : Node_Id) return Boolean;    -- Flag7
9007
 
9008
   function Tagged_Present
9009
     (N : Node_Id) return Boolean;    -- Flag15
9010
 
9011
   function Target_Type
9012
     (N : Node_Id) return Entity_Id;  -- Node2
9013
 
9014
   function Task_Definition
9015
     (N : Node_Id) return Node_Id;    -- Node3
9016
 
9017
   function Task_Present
9018
     (N : Node_Id) return Boolean;    -- Flag5
9019
 
9020
   function Then_Actions
9021
     (N : Node_Id) return List_Id;    -- List2
9022
 
9023
   function Then_Statements
9024
     (N : Node_Id) return List_Id;    -- List2
9025
 
9026
   function Treat_Fixed_As_Integer
9027
     (N : Node_Id) return Boolean;    -- Flag14
9028
 
9029
   function Triggering_Alternative
9030
     (N : Node_Id) return Node_Id;    -- Node1
9031
 
9032
   function Triggering_Statement
9033
     (N : Node_Id) return Node_Id;    -- Node1
9034
 
9035
   function TSS_Elist
9036
     (N : Node_Id) return Elist_Id;   -- Elist3
9037
 
9038
   function Type_Definition
9039
     (N : Node_Id) return Node_Id;    -- Node3
9040
 
9041
   function Unit
9042
     (N : Node_Id) return Node_Id;    -- Node2
9043
 
9044
   function Unknown_Discriminants_Present
9045
     (N : Node_Id) return Boolean;    -- Flag13
9046
 
9047
   function Unreferenced_In_Spec
9048
     (N : Node_Id) return Boolean;    -- Flag7
9049
 
9050
   function Variant_Part
9051
     (N : Node_Id) return Node_Id;    -- Node4
9052
 
9053
   function Variants
9054
     (N : Node_Id) return List_Id;    -- List1
9055
 
9056
   function Visible_Declarations
9057
     (N : Node_Id) return List_Id;    -- List2
9058
 
9059
   function Used_Operations
9060
     (N : Node_Id) return Elist_Id;   -- Elist5
9061
 
9062
   function Was_Originally_Stub
9063
     (N : Node_Id) return Boolean;    -- Flag13
9064
 
9065
   function Withed_Body
9066
     (N : Node_Id) return Node_Id;    -- Node1
9067
 
9068
   --  End functions (note used by xsinfo utility program to end processing)
9069
 
9070
   ----------------------------
9071
   -- Node Update Procedures --
9072
   ----------------------------
9073
 
9074
   --  These are the corresponding node update routines, which again provide
9075
   --  a high level logical access with type checking. In addition to setting
9076
   --  the indicated field of the node N to the given Val, in the case of
9077
   --  tree pointers (List1-4), the parent pointer of the Val node is set to
9078
   --  point back to node N. This automates the setting of the parent pointer.
9079
 
9080
   procedure Set_ABE_Is_Certain
9081
     (N : Node_Id; Val : Boolean := True);    -- Flag18
9082
 
9083
   procedure Set_Abort_Present
9084
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9085
 
9086
   procedure Set_Abortable_Part
9087
     (N : Node_Id; Val : Node_Id);            -- Node2
9088
 
9089
   procedure Set_Abstract_Present
9090
     (N : Node_Id; Val : Boolean := True);    -- Flag4
9091
 
9092
   procedure Set_Accept_Handler_Records
9093
     (N : Node_Id; Val : List_Id);            -- List5
9094
 
9095
   procedure Set_Accept_Statement
9096
     (N : Node_Id; Val : Node_Id);            -- Node2
9097
 
9098
   procedure Set_Access_Definition
9099
     (N : Node_Id; Val : Node_Id);            -- Node3
9100
 
9101
   procedure Set_Access_To_Subprogram_Definition
9102
     (N : Node_Id; Val : Node_Id);            -- Node3
9103
 
9104
   procedure Set_Access_Types_To_Process
9105
     (N : Node_Id; Val : Elist_Id);           -- Elist2
9106
 
9107
   procedure Set_Actions
9108
     (N : Node_Id; Val : List_Id);            -- List1
9109
 
9110
   procedure Set_Activation_Chain_Entity
9111
     (N : Node_Id; Val : Node_Id);            -- Node3
9112
 
9113
   procedure Set_Acts_As_Spec
9114
     (N : Node_Id; Val : Boolean := True);    -- Flag4
9115
 
9116
   procedure Set_Actual_Designated_Subtype
9117
     (N : Node_Id; Val : Node_Id);            -- Node4
9118
 
9119
   procedure Set_Address_Warning_Posted
9120
     (N : Node_Id; Val : Boolean := True);    -- Flag18
9121
 
9122
   procedure Set_Aggregate_Bounds
9123
     (N : Node_Id; Val : Node_Id);            -- Node3
9124
 
9125
   procedure Set_Aliased_Present
9126
     (N : Node_Id; Val : Boolean := True);    -- Flag4
9127
 
9128
   procedure Set_All_Others
9129
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9130
 
9131
   procedure Set_All_Present
9132
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9133
 
9134
   procedure Set_Alternatives
9135
     (N : Node_Id; Val : List_Id);            -- List4
9136
 
9137
   procedure Set_Ancestor_Part
9138
     (N : Node_Id; Val : Node_Id);            -- Node3
9139
 
9140
   procedure Set_Atomic_Sync_Required
9141
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9142
 
9143
   procedure Set_Array_Aggregate
9144
     (N : Node_Id; Val : Node_Id);            -- Node3
9145
 
9146
   procedure Set_Aspect_Rep_Item
9147
     (N : Node_Id; Val : Node_Id);            -- Node2
9148
 
9149
   procedure Set_Assignment_OK
9150
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9151
 
9152
   procedure Set_Associated_Node
9153
     (N : Node_Id; Val : Node_Id);            -- Node4
9154
 
9155
   procedure Set_Attribute_Name
9156
     (N : Node_Id; Val : Name_Id);            -- Name2
9157
 
9158
   procedure Set_At_End_Proc
9159
     (N : Node_Id; Val : Node_Id);            -- Node1
9160
 
9161
   procedure Set_Aux_Decls_Node
9162
     (N : Node_Id; Val : Node_Id);            -- Node5
9163
 
9164
   procedure Set_Backwards_OK
9165
     (N : Node_Id; Val : Boolean := True);    -- Flag6
9166
 
9167
   procedure Set_Bad_Is_Detected
9168
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9169
 
9170
   procedure Set_Body_Required
9171
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9172
 
9173
   procedure Set_Body_To_Inline
9174
     (N : Node_Id; Val : Node_Id);            -- Node3
9175
 
9176
   procedure Set_Box_Present
9177
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9178
 
9179
   procedure Set_By_Ref
9180
     (N : Node_Id; Val : Boolean := True);    -- Flag5
9181
 
9182
   procedure Set_Char_Literal_Value
9183
     (N : Node_Id; Val : Uint);               -- Uint2
9184
 
9185
   procedure Set_Chars
9186
     (N : Node_Id; Val : Name_Id);            -- Name1
9187
 
9188
   procedure Set_Check_Address_Alignment
9189
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9190
 
9191
   procedure Set_Choice_Parameter
9192
     (N : Node_Id; Val : Node_Id);            -- Node2
9193
 
9194
   procedure Set_Choices
9195
     (N : Node_Id; Val : List_Id);            -- List1
9196
 
9197
   procedure Set_Class_Present
9198
     (N : Node_Id; Val : Boolean := True);    -- Flag6
9199
 
9200
   procedure Set_Comes_From_Extended_Return_Statement
9201
     (N : Node_Id; Val : Boolean := True);    -- Flag18
9202
 
9203
   procedure Set_Compile_Time_Known_Aggregate
9204
     (N : Node_Id; Val : Boolean := True);    -- Flag18
9205
 
9206
   procedure Set_Component_Associations
9207
     (N : Node_Id; Val : List_Id);            -- List2
9208
 
9209
   procedure Set_Component_Clauses
9210
     (N : Node_Id; Val : List_Id);            -- List3
9211
 
9212
   procedure Set_Component_Definition
9213
     (N : Node_Id; Val : Node_Id);            -- Node4
9214
 
9215
   procedure Set_Component_Items
9216
     (N : Node_Id; Val : List_Id);            -- List3
9217
 
9218
   procedure Set_Component_List
9219
     (N : Node_Id; Val : Node_Id);            -- Node1
9220
 
9221
   procedure Set_Component_Name
9222
     (N : Node_Id; Val : Node_Id);            -- Node1
9223
 
9224
   procedure Set_Componentwise_Assignment
9225
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9226
 
9227
   procedure Set_Condition
9228
     (N : Node_Id; Val : Node_Id);            -- Node1
9229
 
9230
   procedure Set_Condition_Actions
9231
     (N : Node_Id; Val : List_Id);            -- List3
9232
 
9233
   procedure Set_Config_Pragmas
9234
     (N : Node_Id; Val : List_Id);            -- List4
9235
 
9236
   procedure Set_Constant_Present
9237
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9238
 
9239
   procedure Set_Constraint
9240
     (N : Node_Id; Val : Node_Id);            -- Node3
9241
 
9242
   procedure Set_Constraints
9243
     (N : Node_Id; Val : List_Id);            -- List1
9244
 
9245
   procedure Set_Context_Installed
9246
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9247
 
9248
   procedure Set_Context_Items
9249
     (N : Node_Id; Val : List_Id);            -- List1
9250
 
9251
   procedure Set_Context_Pending
9252
     (N : Node_Id; Val : Boolean := True);    -- Flag16
9253
 
9254
   procedure Set_Controlling_Argument
9255
     (N : Node_Id; Val : Node_Id);            -- Node1
9256
 
9257
   procedure Set_Conversion_OK
9258
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9259
 
9260
   procedure Set_Corresponding_Aspect
9261
     (N : Node_Id; Val : Node_Id);            -- Node3
9262
 
9263
   procedure Set_Corresponding_Body
9264
     (N : Node_Id; Val : Node_Id);            -- Node5
9265
 
9266
   procedure Set_Corresponding_Formal_Spec
9267
     (N : Node_Id; Val : Node_Id);            -- Node3
9268
 
9269
   procedure Set_Corresponding_Generic_Association
9270
     (N : Node_Id; Val : Node_Id);            -- Node5
9271
 
9272
   procedure Set_Corresponding_Integer_Value
9273
     (N : Node_Id; Val : Uint);               -- Uint4
9274
 
9275
   procedure Set_Corresponding_Spec
9276
     (N : Node_Id; Val : Node_Id);            -- Node5
9277
 
9278
   procedure Set_Corresponding_Stub
9279
     (N : Node_Id; Val : Node_Id);            -- Node3
9280
 
9281
   procedure Set_Dcheck_Function
9282
     (N : Node_Id; Val : Entity_Id);          -- Node5
9283
 
9284
   procedure Set_Declarations
9285
     (N : Node_Id; Val : List_Id);            -- List2
9286
 
9287
   procedure Set_Default_Expression
9288
     (N : Node_Id; Val : Node_Id);            -- Node5
9289
 
9290
   procedure Set_Default_Storage_Pool
9291
     (N : Node_Id; Val : Node_Id);            -- Node3
9292
 
9293
   procedure Set_Default_Name
9294
     (N : Node_Id; Val : Node_Id);            -- Node2
9295
 
9296
   procedure Set_Defining_Identifier
9297
     (N : Node_Id; Val : Entity_Id);          -- Node1
9298
 
9299
   procedure Set_Defining_Unit_Name
9300
     (N : Node_Id; Val : Node_Id);            -- Node1
9301
 
9302
   procedure Set_Delay_Alternative
9303
     (N : Node_Id; Val : Node_Id);            -- Node4
9304
 
9305
   procedure Set_Delay_Statement
9306
     (N : Node_Id; Val : Node_Id);            -- Node2
9307
 
9308
   procedure Set_Delta_Expression
9309
     (N : Node_Id; Val : Node_Id);            -- Node3
9310
 
9311
   procedure Set_Digits_Expression
9312
     (N : Node_Id; Val : Node_Id);            -- Node2
9313
 
9314
   procedure Set_Discr_Check_Funcs_Built
9315
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9316
 
9317
   procedure Set_Discrete_Choices
9318
     (N : Node_Id; Val : List_Id);            -- List4
9319
 
9320
   procedure Set_Discrete_Range
9321
     (N : Node_Id; Val : Node_Id);            -- Node4
9322
 
9323
   procedure Set_Discrete_Subtype_Definition
9324
     (N : Node_Id; Val : Node_Id);            -- Node4
9325
 
9326
   procedure Set_Discrete_Subtype_Definitions
9327
     (N : Node_Id; Val : List_Id);            -- List2
9328
 
9329
   procedure Set_Discriminant_Specifications
9330
     (N : Node_Id; Val : List_Id);            -- List4
9331
 
9332
   procedure Set_Discriminant_Type
9333
     (N : Node_Id; Val : Node_Id);            -- Node5
9334
 
9335
   procedure Set_Do_Accessibility_Check
9336
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9337
 
9338
   procedure Set_Do_Discriminant_Check
9339
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9340
 
9341
   procedure Set_Do_Division_Check
9342
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9343
 
9344
   procedure Set_Do_Length_Check
9345
     (N : Node_Id; Val : Boolean := True);    -- Flag4
9346
 
9347
   procedure Set_Do_Overflow_Check
9348
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9349
 
9350
   procedure Set_Do_Range_Check
9351
     (N : Node_Id; Val : Boolean := True);    -- Flag9
9352
 
9353
   procedure Set_Do_Storage_Check
9354
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9355
 
9356
   procedure Set_Do_Tag_Check
9357
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9358
 
9359
   procedure Set_Elaborate_All_Desirable
9360
     (N : Node_Id; Val : Boolean := True);    -- Flag9
9361
 
9362
   procedure Set_Elaborate_All_Present
9363
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9364
 
9365
   procedure Set_Elaborate_Desirable
9366
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9367
 
9368
   procedure Set_Elaborate_Present
9369
     (N : Node_Id; Val : Boolean := True);    -- Flag4
9370
 
9371
   procedure Set_Elaboration_Boolean
9372
     (N : Node_Id; Val : Node_Id);            -- Node2
9373
 
9374
   procedure Set_Else_Actions
9375
     (N : Node_Id; Val : List_Id);            -- List3
9376
 
9377
   procedure Set_Else_Statements
9378
     (N : Node_Id; Val : List_Id);            -- List4
9379
 
9380
   procedure Set_Elsif_Parts
9381
     (N : Node_Id; Val : List_Id);            -- List3
9382
 
9383
   procedure Set_Enclosing_Variant
9384
     (N : Node_Id; Val : Node_Id);            -- Node2
9385
 
9386
   procedure Set_End_Label
9387
     (N : Node_Id; Val : Node_Id);            -- Node4
9388
 
9389
   procedure Set_End_Span
9390
     (N : Node_Id; Val : Uint);               -- Uint5
9391
 
9392
   procedure Set_Entity
9393
     (N : Node_Id; Val : Node_Id);            -- Node4
9394
 
9395
   procedure Set_Entry_Body_Formal_Part
9396
     (N : Node_Id; Val : Node_Id);            -- Node5
9397
 
9398
   procedure Set_Entry_Call_Alternative
9399
     (N : Node_Id; Val : Node_Id);            -- Node1
9400
 
9401
   procedure Set_Entry_Call_Statement
9402
     (N : Node_Id; Val : Node_Id);            -- Node1
9403
 
9404
   procedure Set_Entry_Direct_Name
9405
     (N : Node_Id; Val : Node_Id);            -- Node1
9406
 
9407
   procedure Set_Entry_Index
9408
     (N : Node_Id; Val : Node_Id);            -- Node5
9409
 
9410
   procedure Set_Entry_Index_Specification
9411
     (N : Node_Id; Val : Node_Id);            -- Node4
9412
 
9413
   procedure Set_Etype
9414
     (N : Node_Id; Val : Node_Id);            -- Node5
9415
 
9416
   procedure Set_Exception_Choices
9417
     (N : Node_Id; Val : List_Id);            -- List4
9418
 
9419
   procedure Set_Exception_Handlers
9420
     (N : Node_Id; Val : List_Id);            -- List5
9421
 
9422
   procedure Set_Exception_Junk
9423
     (N : Node_Id; Val : Boolean := True);    -- Flag8
9424
 
9425
   procedure Set_Exception_Label
9426
     (N : Node_Id; Val : Node_Id);            -- Node5
9427
 
9428
   procedure Set_Expansion_Delayed
9429
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9430
 
9431
   procedure Set_Explicit_Actual_Parameter
9432
     (N : Node_Id; Val : Node_Id);            -- Node3
9433
 
9434
   procedure Set_Explicit_Generic_Actual_Parameter
9435
     (N : Node_Id; Val : Node_Id);            -- Node1
9436
 
9437
   procedure Set_Expression
9438
     (N : Node_Id; Val : Node_Id);            -- Node3
9439
 
9440
   procedure Set_Expressions
9441
     (N : Node_Id; Val : List_Id);            -- List1
9442
 
9443
   procedure Set_First_Bit
9444
     (N : Node_Id; Val : Node_Id);            -- Node3
9445
 
9446
   procedure Set_First_Inlined_Subprogram
9447
     (N : Node_Id; Val : Entity_Id);          -- Node3
9448
 
9449
   procedure Set_First_Name
9450
     (N : Node_Id; Val : Boolean := True);    -- Flag5
9451
 
9452
   procedure Set_First_Named_Actual
9453
     (N : Node_Id; Val : Node_Id);            -- Node4
9454
 
9455
   procedure Set_First_Real_Statement
9456
     (N : Node_Id; Val : Node_Id);            -- Node2
9457
 
9458
   procedure Set_First_Subtype_Link
9459
     (N : Node_Id; Val : Entity_Id);          -- Node5
9460
 
9461
   procedure Set_Float_Truncate
9462
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9463
 
9464
   procedure Set_Formal_Type_Definition
9465
     (N : Node_Id; Val : Node_Id);            -- Node3
9466
 
9467
   procedure Set_Forwards_OK
9468
     (N : Node_Id; Val : Boolean := True);    -- Flag5
9469
 
9470
   procedure Set_From_At_Mod
9471
     (N : Node_Id; Val : Boolean := True);    -- Flag4
9472
 
9473
   procedure Set_From_Aspect_Specification
9474
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9475
 
9476
   procedure Set_From_At_End
9477
     (N : Node_Id; Val : Boolean := True);    -- Flag4
9478
 
9479
   procedure Set_From_Default
9480
     (N : Node_Id; Val : Boolean := True);    -- Flag6
9481
 
9482
   procedure Set_Generic_Associations
9483
     (N : Node_Id; Val : List_Id);            -- List3
9484
 
9485
   procedure Set_Generic_Formal_Declarations
9486
     (N : Node_Id; Val : List_Id);            -- List2
9487
 
9488
   procedure Set_Generic_Parent
9489
     (N : Node_Id; Val : Node_Id);            -- Node5
9490
 
9491
   procedure Set_Generic_Parent_Type
9492
     (N : Node_Id; Val : Node_Id);            -- Node4
9493
 
9494
   procedure Set_Handled_Statement_Sequence
9495
     (N : Node_Id; Val : Node_Id);            -- Node4
9496
 
9497
   procedure Set_Handler_List_Entry
9498
     (N : Node_Id; Val : Node_Id);            -- Node2
9499
 
9500
   procedure Set_Has_Created_Identifier
9501
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9502
 
9503
   procedure Set_Has_Dynamic_Length_Check
9504
     (N : Node_Id; Val : Boolean := True);    -- Flag10
9505
 
9506
   procedure Set_Has_Dynamic_Range_Check
9507
     (N : Node_Id; Val : Boolean := True);    -- Flag12
9508
 
9509
   procedure Set_Has_Init_Expression
9510
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9511
 
9512
   procedure Set_Has_Local_Raise
9513
     (N : Node_Id; Val : Boolean := True);    -- Flag8
9514
 
9515
   procedure Set_Has_No_Elaboration_Code
9516
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9517
 
9518
   procedure Set_Has_Pragma_CPU
9519
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9520
 
9521
   procedure Set_Has_Pragma_Dispatching_Domain
9522
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9523
 
9524
   procedure Set_Has_Pragma_Priority
9525
     (N : Node_Id; Val : Boolean := True);    -- Flag6
9526
 
9527
   procedure Set_Has_Pragma_Suppress_All
9528
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9529
 
9530
   procedure Set_Has_Private_View
9531
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9532
 
9533
   procedure Set_Has_Relative_Deadline_Pragma
9534
     (N : Node_Id; Val : Boolean := True);    -- Flag9
9535
 
9536
   procedure Set_Has_Self_Reference
9537
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9538
 
9539
   procedure Set_Has_Storage_Size_Pragma
9540
     (N : Node_Id; Val : Boolean := True);    -- Flag5
9541
 
9542
   procedure Set_Has_Task_Info_Pragma
9543
     (N : Node_Id; Val : Boolean := True);    -- Flag7
9544
 
9545
   procedure Set_Has_Task_Name_Pragma
9546
     (N : Node_Id; Val : Boolean := True);    -- Flag8
9547
 
9548
   procedure Set_Has_Wide_Character
9549
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9550
 
9551
   procedure Set_Has_Wide_Wide_Character
9552
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9553
 
9554
   procedure Set_Header_Size_Added
9555
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9556
 
9557
   procedure Set_Hidden_By_Use_Clause
9558
     (N : Node_Id; Val : Elist_Id);           -- Elist4
9559
 
9560
   procedure Set_High_Bound
9561
     (N : Node_Id; Val : Node_Id);            -- Node2
9562
 
9563
   procedure Set_Identifier
9564
     (N : Node_Id; Val : Node_Id);            -- Node1
9565
 
9566
   procedure Set_Interface_List
9567
     (N : Node_Id; Val : List_Id);            -- List2
9568
 
9569
   procedure Set_Interface_Present
9570
     (N : Node_Id; Val : Boolean := True);    -- Flag16
9571
 
9572
   procedure Set_Implicit_With
9573
     (N : Node_Id; Val : Boolean := True);    -- Flag16
9574
 
9575
   procedure Set_Import_Interface_Present
9576
     (N : Node_Id; Val : Boolean := True);    -- Flag16
9577
 
9578
   procedure Set_In_Present
9579
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9580
 
9581
   procedure Set_Includes_Infinities
9582
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9583
 
9584
   procedure Set_Inherited_Discriminant
9585
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9586
 
9587
   procedure Set_Instance_Spec
9588
     (N : Node_Id; Val : Node_Id);            -- Node5
9589
 
9590
   procedure Set_Intval
9591
     (N : Node_Id; Val : Uint);               -- Uint3
9592
 
9593
   procedure Set_Is_Accessibility_Actual
9594
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9595
 
9596
   procedure Set_Is_Asynchronous_Call_Block
9597
     (N : Node_Id; Val : Boolean := True);    -- Flag7
9598
 
9599
   procedure Set_Is_Boolean_Aspect
9600
     (N : Node_Id; Val : Boolean := True);    -- Flag16
9601
 
9602
   procedure Set_Is_Component_Left_Opnd
9603
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9604
 
9605
   procedure Set_Is_Component_Right_Opnd
9606
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9607
 
9608
   procedure Set_Is_Controlling_Actual
9609
     (N : Node_Id; Val : Boolean := True);    -- Flag16
9610
 
9611
   procedure Set_Is_Delayed_Aspect
9612
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9613
 
9614
   procedure Set_Is_Dynamic_Coextension
9615
     (N : Node_Id; Val : Boolean := True);    -- Flag18
9616
 
9617
   procedure Set_Is_Elsif
9618
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9619
 
9620
   procedure Set_Is_Entry_Barrier_Function
9621
     (N : Node_Id; Val : Boolean := True);    -- Flag8
9622
 
9623
   procedure Set_Is_Expanded_Build_In_Place_Call
9624
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9625
 
9626
   procedure Set_Is_Folded_In_Parser
9627
     (N : Node_Id; Val : Boolean := True);    -- Flag4
9628
 
9629
   procedure Set_Is_In_Discriminant_Check
9630
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9631
 
9632
   procedure Set_Is_Machine_Number
9633
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9634
 
9635
   procedure Set_Is_Null_Loop
9636
     (N : Node_Id; Val : Boolean := True);    -- Flag16
9637
 
9638
   procedure Set_Is_Overloaded
9639
     (N : Node_Id; Val : Boolean := True);    -- Flag5
9640
 
9641
   procedure Set_Is_Power_Of_2_For_Shift
9642
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9643
 
9644
   procedure Set_Is_Prefixed_Call
9645
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9646
 
9647
   procedure Set_Is_Protected_Subprogram_Body
9648
     (N : Node_Id; Val : Boolean := True);    -- Flag7
9649
 
9650
   procedure Set_Is_Static_Coextension
9651
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9652
 
9653
   procedure Set_Is_Static_Expression
9654
     (N : Node_Id; Val : Boolean := True);    -- Flag6
9655
 
9656
   procedure Set_Is_Subprogram_Descriptor
9657
     (N : Node_Id; Val : Boolean := True);    -- Flag16
9658
 
9659
   procedure Set_Is_Task_Allocation_Block
9660
     (N : Node_Id; Val : Boolean := True);    -- Flag6
9661
 
9662
   procedure Set_Is_Task_Master
9663
     (N : Node_Id; Val : Boolean := True);    -- Flag5
9664
 
9665
   procedure Set_Iteration_Scheme
9666
     (N : Node_Id; Val : Node_Id);            -- Node2
9667
 
9668
   procedure Set_Iterator_Specification
9669
     (N : Node_Id; Val : Node_Id);            -- Node2
9670
 
9671
   procedure Set_Itype
9672
     (N : Node_Id; Val : Entity_Id);          -- Node1
9673
 
9674
   procedure Set_Kill_Range_Check
9675
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9676
 
9677
   procedure Set_Last_Bit
9678
     (N : Node_Id; Val : Node_Id);            -- Node4
9679
 
9680
   procedure Set_Last_Name
9681
     (N : Node_Id; Val : Boolean := True);    -- Flag6
9682
 
9683
   procedure Set_Library_Unit
9684
     (N : Node_Id; Val : Node_Id);            -- Node4
9685
 
9686
   procedure Set_Label_Construct
9687
     (N : Node_Id; Val : Node_Id);            -- Node2
9688
 
9689
   procedure Set_Left_Opnd
9690
     (N : Node_Id; Val : Node_Id);            -- Node2
9691
 
9692
   procedure Set_Limited_View_Installed
9693
     (N : Node_Id; Val : Boolean := True);    -- Flag18
9694
 
9695
   procedure Set_Limited_Present
9696
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9697
 
9698
   procedure Set_Literals
9699
     (N : Node_Id; Val : List_Id);            -- List1
9700
 
9701
   procedure Set_Local_Raise_Not_OK
9702
     (N : Node_Id; Val : Boolean := True);    -- Flag7
9703
 
9704
   procedure Set_Local_Raise_Statements
9705
     (N : Node_Id; Val : Elist_Id);           -- Elist1
9706
 
9707
   procedure Set_Loop_Actions
9708
     (N : Node_Id; Val : List_Id);            -- List2
9709
 
9710
   procedure Set_Loop_Parameter_Specification
9711
     (N : Node_Id; Val : Node_Id);            -- Node4
9712
 
9713
   procedure Set_Low_Bound
9714
     (N : Node_Id; Val : Node_Id);            -- Node1
9715
 
9716
   procedure Set_Mod_Clause
9717
     (N : Node_Id; Val : Node_Id);            -- Node2
9718
 
9719
   procedure Set_More_Ids
9720
     (N : Node_Id; Val : Boolean := True);    -- Flag5
9721
 
9722
   procedure Set_Must_Be_Byte_Aligned
9723
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9724
 
9725
   procedure Set_Must_Not_Freeze
9726
     (N : Node_Id; Val : Boolean := True);    -- Flag8
9727
 
9728
   procedure Set_Must_Not_Override
9729
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9730
 
9731
   procedure Set_Must_Override
9732
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9733
 
9734
   procedure Set_Name
9735
     (N : Node_Id; Val : Node_Id);            -- Node2
9736
 
9737
   procedure Set_Names
9738
     (N : Node_Id; Val : List_Id);            -- List2
9739
 
9740
   procedure Set_Next_Entity
9741
     (N : Node_Id; Val : Node_Id);            -- Node2
9742
 
9743
   procedure Set_Next_Exit_Statement
9744
     (N : Node_Id; Val : Node_Id);            -- Node3
9745
 
9746
   procedure Set_Next_Implicit_With
9747
     (N : Node_Id; Val : Node_Id);            -- Node3
9748
 
9749
   procedure Set_Next_Named_Actual
9750
     (N : Node_Id; Val : Node_Id);            -- Node4
9751
 
9752
   procedure Set_Next_Pragma
9753
     (N : Node_Id; Val : Node_Id);            -- Node1
9754
 
9755
   procedure Set_Next_Rep_Item
9756
     (N : Node_Id; Val : Node_Id);            -- Node5
9757
 
9758
   procedure Set_Next_Use_Clause
9759
     (N : Node_Id; Val : Node_Id);            -- Node3
9760
 
9761
   procedure Set_No_Ctrl_Actions
9762
     (N : Node_Id; Val : Boolean := True);    -- Flag7
9763
 
9764
   procedure Set_No_Elaboration_Check
9765
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9766
 
9767
   procedure Set_No_Entities_Ref_In_Spec
9768
     (N : Node_Id; Val : Boolean := True);    -- Flag8
9769
 
9770
   procedure Set_No_Initialization
9771
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9772
 
9773
   procedure Set_No_Truncation
9774
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9775
 
9776
   procedure Set_Null_Present
9777
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9778
 
9779
   procedure Set_Null_Exclusion_Present
9780
     (N : Node_Id; Val : Boolean := True);    -- Flag11
9781
 
9782
   procedure Set_Null_Exclusion_In_Return_Present
9783
     (N : Node_Id; Val : Boolean := True);    -- Flag14
9784
 
9785
   procedure Set_Null_Record_Present
9786
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9787
 
9788
   procedure Set_Object_Definition
9789
     (N : Node_Id; Val : Node_Id);            -- Node4
9790
 
9791
   procedure Set_Of_Present
9792
     (N : Node_Id; Val : Boolean := True);   -- Flag16
9793
 
9794
   procedure Set_Original_Discriminant
9795
     (N : Node_Id; Val : Node_Id);            -- Node2
9796
 
9797
   procedure Set_Original_Entity
9798
     (N : Node_Id; Val : Entity_Id);          -- Node2
9799
 
9800
   procedure Set_Others_Discrete_Choices
9801
     (N : Node_Id; Val : List_Id);            -- List1
9802
 
9803
   procedure Set_Out_Present
9804
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9805
 
9806
   procedure Set_Parameter_Associations
9807
     (N : Node_Id; Val : List_Id);            -- List3
9808
 
9809
   procedure Set_Parameter_List_Truncated
9810
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9811
 
9812
   procedure Set_Parameter_Specifications
9813
     (N : Node_Id; Val : List_Id);            -- List3
9814
 
9815
   procedure Set_Parameter_Type
9816
     (N : Node_Id; Val : Node_Id);            -- Node2
9817
 
9818
   procedure Set_Parent_Spec
9819
     (N : Node_Id; Val : Node_Id);            -- Node4
9820
 
9821
   procedure Set_Position
9822
     (N : Node_Id; Val : Node_Id);            -- Node2
9823
 
9824
   procedure Set_Pragma_Argument_Associations
9825
     (N : Node_Id; Val : List_Id);            -- List2
9826
 
9827
   procedure Set_Pragma_Identifier
9828
     (N : Node_Id; Val : Node_Id);            -- Node4
9829
 
9830
   procedure Set_Pragmas_After
9831
     (N : Node_Id; Val : List_Id);            -- List5
9832
 
9833
   procedure Set_Pragmas_Before
9834
     (N : Node_Id; Val : List_Id);            -- List4
9835
 
9836
   procedure Set_Prefix
9837
     (N : Node_Id; Val : Node_Id);            -- Node3
9838
 
9839
   procedure Set_Premature_Use
9840
     (N : Node_Id; Val : Node_Id);            -- Node5
9841
 
9842
   procedure Set_Present_Expr
9843
     (N : Node_Id; Val : Uint);               -- Uint3
9844
 
9845
   procedure Set_Prev_Ids
9846
     (N : Node_Id; Val : Boolean := True);    -- Flag6
9847
 
9848
   procedure Set_Print_In_Hex
9849
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9850
 
9851
   procedure Set_Private_Declarations
9852
     (N : Node_Id; Val : List_Id);            -- List3
9853
 
9854
   procedure Set_Private_Present
9855
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9856
 
9857
   procedure Set_Procedure_To_Call
9858
     (N : Node_Id; Val : Node_Id);            -- Node2
9859
 
9860
   procedure Set_Proper_Body
9861
     (N : Node_Id; Val : Node_Id);            -- Node1
9862
 
9863
   procedure Set_Protected_Definition
9864
     (N : Node_Id; Val : Node_Id);            -- Node3
9865
 
9866
   procedure Set_Protected_Present
9867
     (N : Node_Id; Val : Boolean := True);    -- Flag6
9868
 
9869
   procedure Set_Raises_Constraint_Error
9870
     (N : Node_Id; Val : Boolean := True);    -- Flag7
9871
 
9872
   procedure Set_Range_Constraint
9873
     (N : Node_Id; Val : Node_Id);            -- Node4
9874
 
9875
   procedure Set_Range_Expression
9876
     (N : Node_Id; Val : Node_Id);            -- Node4
9877
 
9878
   procedure Set_Real_Range_Specification
9879
     (N : Node_Id; Val : Node_Id);            -- Node4
9880
 
9881
   procedure Set_Realval
9882
     (N : Node_Id; Val : Ureal);              -- Ureal3
9883
 
9884
   procedure Set_Reason
9885
     (N : Node_Id; Val : Uint);               -- Uint3
9886
 
9887
   procedure Set_Record_Extension_Part
9888
     (N : Node_Id; Val : Node_Id);            -- Node3
9889
 
9890
   procedure Set_Redundant_Use
9891
     (N : Node_Id; Val : Boolean := True);    -- Flag13
9892
 
9893
   procedure Set_Renaming_Exception
9894
     (N : Node_Id; Val : Node_Id);            -- Node2
9895
 
9896
   procedure Set_Result_Definition
9897
     (N : Node_Id; Val : Node_Id);            -- Node4
9898
 
9899
   procedure Set_Return_Object_Declarations
9900
     (N : Node_Id; Val : List_Id);            -- List3
9901
 
9902
   procedure Set_Return_Statement_Entity
9903
     (N : Node_Id; Val : Node_Id);            -- Node5
9904
 
9905
   procedure Set_Reverse_Present
9906
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9907
 
9908
   procedure Set_Right_Opnd
9909
     (N : Node_Id; Val : Node_Id);            -- Node3
9910
 
9911
   procedure Set_Rounded_Result
9912
     (N : Node_Id; Val : Boolean := True);    -- Flag18
9913
 
9914
   procedure Set_SCIL_Controlling_Tag
9915
     (N : Node_Id; Val : Node_Id);            -- Node5
9916
 
9917
   procedure Set_SCIL_Entity
9918
     (N : Node_Id; Val : Node_Id);            -- Node4
9919
 
9920
   procedure Set_SCIL_Tag_Value
9921
     (N : Node_Id; Val : Node_Id);            -- Node5
9922
 
9923
   procedure Set_SCIL_Target_Prim
9924
     (N : Node_Id; Val : Node_Id);            -- Node2
9925
 
9926
   procedure Set_Scope
9927
     (N : Node_Id; Val : Node_Id);            -- Node3
9928
 
9929
   procedure Set_Select_Alternatives
9930
     (N : Node_Id; Val : List_Id);            -- List1
9931
 
9932
   procedure Set_Selector_Name
9933
     (N : Node_Id; Val : Node_Id);            -- Node2
9934
 
9935
   procedure Set_Selector_Names
9936
     (N : Node_Id; Val : List_Id);            -- List1
9937
 
9938
   procedure Set_Shift_Count_OK
9939
     (N : Node_Id; Val : Boolean := True);    -- Flag4
9940
 
9941
   procedure Set_Source_Type
9942
     (N : Node_Id; Val : Entity_Id);          -- Node1
9943
 
9944
   procedure Set_Spec_PPC_List
9945
     (N : Node_Id; Val : Node_Id);            -- Node1
9946
 
9947
   procedure Set_Spec_TC_List
9948
     (N : Node_Id; Val : Node_Id);            -- Node2
9949
 
9950
   procedure Set_Specification
9951
     (N : Node_Id; Val : Node_Id);            -- Node1
9952
 
9953
   procedure Set_Split_PPC
9954
     (N : Node_Id; Val : Boolean);            -- Flag17
9955
 
9956
   procedure Set_Statements
9957
     (N : Node_Id; Val : List_Id);            -- List3
9958
 
9959
   procedure Set_Static_Processing_OK
9960
     (N : Node_Id; Val : Boolean);            -- Flag4
9961
 
9962
   procedure Set_Storage_Pool
9963
     (N : Node_Id; Val : Node_Id);            -- Node1
9964
 
9965
   procedure Set_Subpool_Handle_Name
9966
     (N : Node_Id; Val : Node_Id);            -- Node4
9967
 
9968
   procedure Set_Strval
9969
     (N : Node_Id; Val : String_Id);          -- Str3
9970
 
9971
   procedure Set_Subtype_Indication
9972
     (N : Node_Id; Val : Node_Id);            -- Node5
9973
 
9974
   procedure Set_Subtype_Mark
9975
     (N : Node_Id; Val : Node_Id);            -- Node4
9976
 
9977
   procedure Set_Subtype_Marks
9978
     (N : Node_Id; Val : List_Id);            -- List2
9979
 
9980
   procedure Set_Suppress_Assignment_Checks
9981
     (N : Node_Id; Val : Boolean := True);    -- Flag18
9982
 
9983
   procedure Set_Suppress_Loop_Warnings
9984
     (N : Node_Id; Val : Boolean := True);    -- Flag17
9985
 
9986
   procedure Set_Synchronized_Present
9987
     (N : Node_Id; Val : Boolean := True);    -- Flag7
9988
 
9989
   procedure Set_Tagged_Present
9990
     (N : Node_Id; Val : Boolean := True);    -- Flag15
9991
 
9992
   procedure Set_Target_Type
9993
     (N : Node_Id; Val : Entity_Id);          -- Node2
9994
 
9995
   procedure Set_Task_Definition
9996
     (N : Node_Id; Val : Node_Id);            -- Node3
9997
 
9998
   procedure Set_Task_Present
9999
     (N : Node_Id; Val : Boolean := True);    -- Flag5
10000
 
10001
   procedure Set_Then_Actions
10002
     (N : Node_Id; Val : List_Id);            -- List2
10003
 
10004
   procedure Set_Then_Statements
10005
     (N : Node_Id; Val : List_Id);            -- List2
10006
 
10007
   procedure Set_Treat_Fixed_As_Integer
10008
     (N : Node_Id; Val : Boolean := True);    -- Flag14
10009
 
10010
   procedure Set_Triggering_Alternative
10011
     (N : Node_Id; Val : Node_Id);            -- Node1
10012
 
10013
   procedure Set_Triggering_Statement
10014
     (N : Node_Id; Val : Node_Id);            -- Node1
10015
 
10016
   procedure Set_TSS_Elist
10017
     (N : Node_Id; Val : Elist_Id);           -- Elist3
10018
 
10019
   procedure Set_Type_Definition
10020
     (N : Node_Id; Val : Node_Id);            -- Node3
10021
 
10022
   procedure Set_Unit
10023
     (N : Node_Id; Val : Node_Id);            -- Node2
10024
 
10025
   procedure Set_Unknown_Discriminants_Present
10026
     (N : Node_Id; Val : Boolean := True);    -- Flag13
10027
 
10028
   procedure Set_Unreferenced_In_Spec
10029
     (N : Node_Id; Val : Boolean := True);    -- Flag7
10030
 
10031
   procedure Set_Variant_Part
10032
     (N : Node_Id; Val : Node_Id);            -- Node4
10033
 
10034
   procedure Set_Variants
10035
     (N : Node_Id; Val : List_Id);            -- List1
10036
 
10037
   procedure Set_Visible_Declarations
10038
     (N : Node_Id; Val : List_Id);            -- List2
10039
 
10040
   procedure Set_Used_Operations
10041
     (N : Node_Id; Val : Elist_Id);           -- Elist5
10042
 
10043
   procedure Set_Was_Originally_Stub
10044
     (N : Node_Id; Val : Boolean := True);    -- Flag13
10045
 
10046
   procedure Set_Withed_Body
10047
     (N : Node_Id; Val : Node_Id);            -- Node1
10048
 
10049
   -------------------------
10050
   -- Iterator Procedures --
10051
   -------------------------
10052
 
10053
   --  The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
10054
 
10055
   procedure Next_Entity       (N : in out Node_Id);
10056
   procedure Next_Named_Actual (N : in out Node_Id);
10057
   procedure Next_Rep_Item     (N : in out Node_Id);
10058
   procedure Next_Use_Clause   (N : in out Node_Id);
10059
 
10060
   -------------------------------------------
10061
   -- Miscellaneous Tree Access Subprograms --
10062
   -------------------------------------------
10063
 
10064
   function End_Location (N : Node_Id) return Source_Ptr;
10065
   --  N is an N_If_Statement or N_Case_Statement node, and this function
10066
   --  returns the location of the IF token in the END IF sequence by
10067
   --  translating the value of the End_Span field.
10068
 
10069
   procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
10070
   --  N is an N_If_Statement or N_Case_Statement node. This procedure sets
10071
   --  the End_Span field to correspond to the given value S. In other words,
10072
   --  End_Span is set to the difference between S and Sloc (N), the starting
10073
   --  location.
10074
 
10075
   function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
10076
   --  Given an argument to a pragma Arg, this function returns the expression
10077
   --  for the argument. This is Arg itself, or, in the case where Arg is a
10078
   --  pragma argument association node, the expression from this node.
10079
 
10080
   --------------------------------
10081
   -- Node_Kind Membership Tests --
10082
   --------------------------------
10083
 
10084
   --  The following functions allow a convenient notation for testing whether
10085
   --  a Node_Kind value matches any one of a list of possible values. In each
10086
   --  case True is returned if the given T argument is equal to any of the V
10087
   --  arguments. Note that there is a similar set of functions defined in
10088
   --  Atree where the first argument is a Node_Id whose Nkind field is tested.
10089
 
10090
   function Nkind_In
10091
     (T  : Node_Kind;
10092
      V1 : Node_Kind;
10093
      V2 : Node_Kind) return Boolean;
10094
 
10095
   function Nkind_In
10096
     (T  : Node_Kind;
10097
      V1 : Node_Kind;
10098
      V2 : Node_Kind;
10099
      V3 : Node_Kind) return Boolean;
10100
 
10101
   function Nkind_In
10102
     (T  : Node_Kind;
10103
      V1 : Node_Kind;
10104
      V2 : Node_Kind;
10105
      V3 : Node_Kind;
10106
      V4 : Node_Kind) return Boolean;
10107
 
10108
   function Nkind_In
10109
     (T  : Node_Kind;
10110
      V1 : Node_Kind;
10111
      V2 : Node_Kind;
10112
      V3 : Node_Kind;
10113
      V4 : Node_Kind;
10114
      V5 : Node_Kind) return Boolean;
10115
 
10116
   function Nkind_In
10117
     (T  : Node_Kind;
10118
      V1 : Node_Kind;
10119
      V2 : Node_Kind;
10120
      V3 : Node_Kind;
10121
      V4 : Node_Kind;
10122
      V5 : Node_Kind;
10123
      V6 : Node_Kind) return Boolean;
10124
 
10125
   function Nkind_In
10126
     (T  : Node_Kind;
10127
      V1 : Node_Kind;
10128
      V2 : Node_Kind;
10129
      V3 : Node_Kind;
10130
      V4 : Node_Kind;
10131
      V5 : Node_Kind;
10132
      V6 : Node_Kind;
10133
      V7 : Node_Kind) return Boolean;
10134
 
10135
   function Nkind_In
10136
     (T  : Node_Kind;
10137
      V1 : Node_Kind;
10138
      V2 : Node_Kind;
10139
      V3 : Node_Kind;
10140
      V4 : Node_Kind;
10141
      V5 : Node_Kind;
10142
      V6 : Node_Kind;
10143
      V7 : Node_Kind;
10144
      V8 : Node_Kind) return Boolean;
10145
 
10146
   function Nkind_In
10147
     (T  : Node_Kind;
10148
      V1 : Node_Kind;
10149
      V2 : Node_Kind;
10150
      V3 : Node_Kind;
10151
      V4 : Node_Kind;
10152
      V5 : Node_Kind;
10153
      V6 : Node_Kind;
10154
      V7 : Node_Kind;
10155
      V8 : Node_Kind;
10156
      V9 : Node_Kind) return Boolean;
10157
 
10158
   pragma Inline (Nkind_In);
10159
   --  Inline all above functions
10160
 
10161
   -----------------------
10162
   -- Utility Functions --
10163
   -----------------------
10164
 
10165
   function Pragma_Name (N : Node_Id) return Name_Id;
10166
   pragma Inline (Pragma_Name);
10167
   --  Convenient function to obtain Chars field of Pragma_Identifier
10168
 
10169
   -----------------------------
10170
   -- Syntactic Parent Tables --
10171
   -----------------------------
10172
 
10173
   --  These tables show for each node, and for each of the five fields,
10174
   --  whether the corresponding field is syntactic (True) or semantic (False).
10175
   --  Unused entries are also set to False.
10176
 
10177
   subtype Field_Num is Natural range 1 .. 5;
10178
 
10179
   Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
10180
 
10181
   --  Following entries can be built automatically from the sinfo sources
10182
   --  using the makeisf utility (currently this program is in spitbol).
10183
 
10184
     N_Identifier =>
10185
       (1 => True,    --  Chars (Name1)
10186
        2 => False,   --  Original_Discriminant (Node2-Sem)
10187
        3 => False,   --  unused
10188
        4 => False,   --  Entity (Node4-Sem)
10189
        5 => False),  --  Etype (Node5-Sem)
10190
 
10191
     N_Integer_Literal =>
10192
       (1 => False,   --  unused
10193
        2 => False,   --  Original_Entity (Node2-Sem)
10194
        3 => True,    --  Intval (Uint3)
10195
        4 => False,   --  unused
10196
        5 => False),  --  Etype (Node5-Sem)
10197
 
10198
     N_Real_Literal =>
10199
       (1 => False,   --  unused
10200
        2 => False,   --  Original_Entity (Node2-Sem)
10201
        3 => True,    --  Realval (Ureal3)
10202
        4 => False,   --  Corresponding_Integer_Value (Uint4-Sem)
10203
        5 => False),  --  Etype (Node5-Sem)
10204
 
10205
     N_Character_Literal =>
10206
       (1 => True,    --  Chars (Name1)
10207
        2 => True,    --  Char_Literal_Value (Uint2)
10208
        3 => False,   --  unused
10209
        4 => False,   --  Entity (Node4-Sem)
10210
        5 => False),  --  Etype (Node5-Sem)
10211
 
10212
     N_String_Literal =>
10213
       (1 => False,   --  unused
10214
        2 => False,   --  unused
10215
        3 => True,    --  Strval (Str3)
10216
        4 => False,   --  unused
10217
        5 => False),  --  Etype (Node5-Sem)
10218
 
10219
     N_Pragma =>
10220
       (1 => False,   --  Next_Pragma (Node1-Sem)
10221
        2 => True,    --  Pragma_Argument_Associations (List2)
10222
        3 => False,   --  unused
10223
        4 => True,    --  Pragma_Identifier (Node4)
10224
        5 => False),  --  Next_Rep_Item (Node5-Sem)
10225
 
10226
     N_Pragma_Argument_Association =>
10227
       (1 => True,    --  Chars (Name1)
10228
        2 => False,   --  unused
10229
        3 => True,    --  Expression (Node3)
10230
        4 => False,   --  unused
10231
        5 => False),  --  unused
10232
 
10233
     N_Defining_Identifier =>
10234
       (1 => True,    --  Chars (Name1)
10235
        2 => False,   --  Next_Entity (Node2-Sem)
10236
        3 => False,   --  Scope (Node3-Sem)
10237
        4 => False,   --  unused
10238
        5 => False),  --  Etype (Node5-Sem)
10239
 
10240
     N_Full_Type_Declaration =>
10241
       (1 => True,    --  Defining_Identifier (Node1)
10242
        2 => False,   --  unused
10243
        3 => True,    --  Type_Definition (Node3)
10244
        4 => True,    --  Discriminant_Specifications (List4)
10245
        5 => False),  --  unused
10246
 
10247
     N_Subtype_Declaration =>
10248
       (1 => True,    --  Defining_Identifier (Node1)
10249
        2 => False,   --  unused
10250
        3 => False,   --  unused
10251
        4 => False,   --  Generic_Parent_Type (Node4-Sem)
10252
        5 => True),   --  Subtype_Indication (Node5)
10253
 
10254
     N_Subtype_Indication =>
10255
       (1 => False,   --  unused
10256
        2 => False,   --  unused
10257
        3 => True,    --  Constraint (Node3)
10258
        4 => True,    --  Subtype_Mark (Node4)
10259
        5 => False),  --  Etype (Node5-Sem)
10260
 
10261
     N_Object_Declaration =>
10262
       (1 => True,    --  Defining_Identifier (Node1)
10263
        2 => False,   --  Handler_List_Entry (Node2-Sem)
10264
        3 => True,    --  Expression (Node3)
10265
        4 => True,    --  Object_Definition (Node4)
10266
        5 => False),  --  Corresponding_Generic_Association (Node5-Sem)
10267
 
10268
     N_Number_Declaration =>
10269
       (1 => True,    --  Defining_Identifier (Node1)
10270
        2 => False,   --  unused
10271
        3 => True,    --  Expression (Node3)
10272
        4 => False,   --  unused
10273
        5 => False),  --  unused
10274
 
10275
     N_Derived_Type_Definition =>
10276
       (1 => False,   --  unused
10277
        2 => True,    --  Interface_List (List2)
10278
        3 => True,    --  Record_Extension_Part (Node3)
10279
        4 => False,   --  unused
10280
        5 => True),   --  Subtype_Indication (Node5)
10281
 
10282
     N_Range_Constraint =>
10283
       (1 => False,   --  unused
10284
        2 => False,   --  unused
10285
        3 => False,   --  unused
10286
        4 => True,    --  Range_Expression (Node4)
10287
        5 => False),  --  unused
10288
 
10289
     N_Range =>
10290
       (1 => True,    --  Low_Bound (Node1)
10291
        2 => True,    --  High_Bound (Node2)
10292
        3 => False,   --  unused
10293
        4 => False,   --  unused
10294
        5 => False),  --  Etype (Node5-Sem)
10295
 
10296
     N_Enumeration_Type_Definition =>
10297
       (1 => True,    --  Literals (List1)
10298
        2 => False,   --  unused
10299
        3 => False,   --  unused
10300
        4 => True,    --  End_Label (Node4)
10301
        5 => False),  --  unused
10302
 
10303
     N_Defining_Character_Literal =>
10304
       (1 => True,    --  Chars (Name1)
10305
        2 => False,   --  Next_Entity (Node2-Sem)
10306
        3 => False,   --  Scope (Node3-Sem)
10307
        4 => False,   --  unused
10308
        5 => False),  --  Etype (Node5-Sem)
10309
 
10310
     N_Signed_Integer_Type_Definition =>
10311
       (1 => True,    --  Low_Bound (Node1)
10312
        2 => True,    --  High_Bound (Node2)
10313
        3 => False,   --  unused
10314
        4 => False,   --  unused
10315
        5 => False),  --  unused
10316
 
10317
     N_Modular_Type_Definition =>
10318
       (1 => False,   --  unused
10319
        2 => False,   --  unused
10320
        3 => True,    --  Expression (Node3)
10321
        4 => False,   --  unused
10322
        5 => False),  --  unused
10323
 
10324
     N_Floating_Point_Definition =>
10325
       (1 => False,   --  unused
10326
        2 => True,    --  Digits_Expression (Node2)
10327
        3 => False,   --  unused
10328
        4 => True,    --  Real_Range_Specification (Node4)
10329
        5 => False),  --  unused
10330
 
10331
     N_Real_Range_Specification =>
10332
       (1 => True,    --  Low_Bound (Node1)
10333
        2 => True,    --  High_Bound (Node2)
10334
        3 => False,   --  unused
10335
        4 => False,   --  unused
10336
        5 => False),  --  unused
10337
 
10338
     N_Ordinary_Fixed_Point_Definition =>
10339
       (1 => False,   --  unused
10340
        2 => False,   --  unused
10341
        3 => True,    --  Delta_Expression (Node3)
10342
        4 => True,    --  Real_Range_Specification (Node4)
10343
        5 => False),  --  unused
10344
 
10345
     N_Decimal_Fixed_Point_Definition =>
10346
       (1 => False,   --  unused
10347
        2 => True,    --  Digits_Expression (Node2)
10348
        3 => True,    --  Delta_Expression (Node3)
10349
        4 => True,    --  Real_Range_Specification (Node4)
10350
        5 => False),  --  unused
10351
 
10352
     N_Digits_Constraint =>
10353
       (1 => False,   --  unused
10354
        2 => True,    --  Digits_Expression (Node2)
10355
        3 => False,   --  unused
10356
        4 => True,    --  Range_Constraint (Node4)
10357
        5 => False),  --  unused
10358
 
10359
     N_Unconstrained_Array_Definition =>
10360
       (1 => False,   --  unused
10361
        2 => True,    --  Subtype_Marks (List2)
10362
        3 => False,   --  unused
10363
        4 => True,    --  Component_Definition (Node4)
10364
        5 => False),  --  unused
10365
 
10366
     N_Constrained_Array_Definition =>
10367
       (1 => False,   --  unused
10368
        2 => True,    --  Discrete_Subtype_Definitions (List2)
10369
        3 => False,   --  unused
10370
        4 => True,    --  Component_Definition (Node4)
10371
        5 => False),  --  unused
10372
 
10373
     N_Component_Definition =>
10374
       (1 => False,   --  unused
10375
        2 => False,   --  unused
10376
        3 => True,    --  Access_Definition (Node3)
10377
        4 => False,   --  unused
10378
        5 => True),   --  Subtype_Indication (Node5)
10379
 
10380
     N_Discriminant_Specification =>
10381
       (1 => True,    --  Defining_Identifier (Node1)
10382
        2 => False,   --  unused
10383
        3 => True,    --  Expression (Node3)
10384
        4 => False,   --  unused
10385
        5 => True),   --  Discriminant_Type (Node5)
10386
 
10387
     N_Index_Or_Discriminant_Constraint =>
10388
       (1 => True,    --  Constraints (List1)
10389
        2 => False,   --  unused
10390
        3 => False,   --  unused
10391
        4 => False,   --  unused
10392
        5 => False),  --  unused
10393
 
10394
     N_Discriminant_Association =>
10395
       (1 => True,    --  Selector_Names (List1)
10396
        2 => False,   --  unused
10397
        3 => True,    --  Expression (Node3)
10398
        4 => False,   --  unused
10399
        5 => False),  --  unused
10400
 
10401
     N_Record_Definition =>
10402
       (1 => True,    --  Component_List (Node1)
10403
        2 => True,    --  Interface_List (List2)
10404
        3 => False,   --  unused
10405
        4 => True,    --  End_Label (Node4)
10406
        5 => False),  --  unused
10407
 
10408
     N_Component_List =>
10409
       (1 => False,   --  unused
10410
        2 => False,   --  unused
10411
        3 => True,    --  Component_Items (List3)
10412
        4 => True,    --  Variant_Part (Node4)
10413
        5 => False),  --  unused
10414
 
10415
     N_Component_Declaration =>
10416
       (1 => True,    --  Defining_Identifier (Node1)
10417
        2 => False,   --  unused
10418
        3 => True,    --  Expression (Node3)
10419
        4 => True,    --  Component_Definition (Node4)
10420
        5 => False),  --  unused
10421
 
10422
     N_Variant_Part =>
10423
       (1 => True,    --  Variants (List1)
10424
        2 => True,    --  Name (Node2)
10425
        3 => False,   --  unused
10426
        4 => False,   --  unused
10427
        5 => False),  --  unused
10428
 
10429
     N_Variant =>
10430
       (1 => True,    --  Component_List (Node1)
10431
        2 => False,   --  Enclosing_Variant (Node2-Sem)
10432
        3 => False,   --  Present_Expr (Uint3-Sem)
10433
        4 => True,    --  Discrete_Choices (List4)
10434
        5 => False),  --  Dcheck_Function (Node5-Sem)
10435
 
10436
     N_Others_Choice =>
10437
       (1 => False,   --  Others_Discrete_Choices (List1-Sem)
10438
        2 => False,   --  unused
10439
        3 => False,   --  unused
10440
        4 => False,   --  unused
10441
        5 => False),  --  unused
10442
 
10443
     N_Access_To_Object_Definition =>
10444
       (1 => False,   --  unused
10445
        2 => False,   --  unused
10446
        3 => False,   --  unused
10447
        4 => False,   --  unused
10448
        5 => True),   --  Subtype_Indication (Node5)
10449
 
10450
     N_Access_Function_Definition =>
10451
       (1 => False,   --  unused
10452
        2 => False,   --  unused
10453
        3 => True,    --  Parameter_Specifications (List3)
10454
        4 => True,    --  Result_Definition (Node4)
10455
        5 => False),  --  unused
10456
 
10457
     N_Access_Procedure_Definition =>
10458
       (1 => False,   --  unused
10459
        2 => False,   --  unused
10460
        3 => True,    --  Parameter_Specifications (List3)
10461
        4 => False,   --  unused
10462
        5 => False),  --  unused
10463
 
10464
     N_Access_Definition =>
10465
       (1 => False,   --  unused
10466
        2 => False,   --  unused
10467
        3 => True,    --  Access_To_Subprogram_Definition (Node3)
10468
        4 => True,    --  Subtype_Mark (Node4)
10469
        5 => False),  --  unused
10470
 
10471
     N_Incomplete_Type_Declaration =>
10472
       (1 => True,    --  Defining_Identifier (Node1)
10473
        2 => False,   --  unused
10474
        3 => False,   --  unused
10475
        4 => True,    --  Discriminant_Specifications (List4)
10476
        5 => False),  --  Premature_Use
10477
 
10478
     N_Explicit_Dereference =>
10479
       (1 => False,   --  unused
10480
        2 => False,   --  unused
10481
        3 => True,    --  Prefix (Node3)
10482
        4 => False,   --  Actual_Designated_Subtype (Node4-Sem)
10483
        5 => False),  --  Etype (Node5-Sem)
10484
 
10485
     N_Indexed_Component =>
10486
       (1 => True,    --  Expressions (List1)
10487
        2 => False,   --  unused
10488
        3 => True,    --  Prefix (Node3)
10489
        4 => False,   --  unused
10490
        5 => False),  --  Etype (Node5-Sem)
10491
 
10492
     N_Slice =>
10493
       (1 => False,   --  unused
10494
        2 => False,   --  unused
10495
        3 => True,    --  Prefix (Node3)
10496
        4 => True,    --  Discrete_Range (Node4)
10497
        5 => False),  --  Etype (Node5-Sem)
10498
 
10499
     N_Selected_Component =>
10500
       (1 => False,   --  unused
10501
        2 => True,    --  Selector_Name (Node2)
10502
        3 => True,    --  Prefix (Node3)
10503
        4 => False,   --  unused
10504
        5 => False),  --  Etype (Node5-Sem)
10505
 
10506
     N_Attribute_Reference =>
10507
       (1 => True,    --  Expressions (List1)
10508
        2 => True,    --  Attribute_Name (Name2)
10509
        3 => True,    --  Prefix (Node3)
10510
        4 => False,   --  Entity (Node4-Sem)
10511
        5 => False),  --  Etype (Node5-Sem)
10512
 
10513
     N_Aggregate =>
10514
       (1 => True,    --  Expressions (List1)
10515
        2 => True,    --  Component_Associations (List2)
10516
        3 => False,   --  Aggregate_Bounds (Node3-Sem)
10517
        4 => False,   --  unused
10518
        5 => False),  --  Etype (Node5-Sem)
10519
 
10520
     N_Component_Association =>
10521
       (1 => True,    --  Choices (List1)
10522
        2 => False,   --  Loop_Actions (List2-Sem)
10523
        3 => True,    --  Expression (Node3)
10524
        4 => False,   --  unused
10525
        5 => False),  --  unused
10526
 
10527
     N_Extension_Aggregate =>
10528
       (1 => True,    --  Expressions (List1)
10529
        2 => True,    --  Component_Associations (List2)
10530
        3 => True,    --  Ancestor_Part (Node3)
10531
        4 => False,   --  unused
10532
        5 => False),  --  Etype (Node5-Sem)
10533
 
10534
     N_Null =>
10535
       (1 => False,   --  unused
10536
        2 => False,   --  unused
10537
        3 => False,   --  unused
10538
        4 => False,   --  unused
10539
        5 => False),  --  Etype (Node5-Sem)
10540
 
10541
     N_And_Then =>
10542
       (1 => False,   --  Actions (List1-Sem)
10543
        2 => True,    --  Left_Opnd (Node2)
10544
        3 => True,    --  Right_Opnd (Node3)
10545
        4 => False,   --  unused
10546
        5 => False),  --  Etype (Node5-Sem)
10547
 
10548
     N_Or_Else =>
10549
       (1 => False,   --  Actions (List1-Sem)
10550
        2 => True,    --  Left_Opnd (Node2)
10551
        3 => True,    --  Right_Opnd (Node3)
10552
        4 => False,   --  unused
10553
        5 => False),  --  Etype (Node5-Sem)
10554
 
10555
     N_In =>
10556
       (1 => False,   --  unused
10557
        2 => True,    --  Left_Opnd (Node2)
10558
        3 => True,    --  Right_Opnd (Node3)
10559
        4 => True,    --  Alternatives (List4)
10560
        5 => False),  --  Etype (Node5-Sem)
10561
 
10562
     N_Not_In =>
10563
       (1 => False,   --  unused
10564
        2 => True,    --  Left_Opnd (Node2)
10565
        3 => True,    --  Right_Opnd (Node3)
10566
        4 => True,    --  Alternatives (List4)
10567
        5 => False),  --  Etype (Node5-Sem)
10568
 
10569
     N_Op_And =>
10570
       (1 => True,    --  Chars (Name1)
10571
        2 => True,    --  Left_Opnd (Node2)
10572
        3 => True,    --  Right_Opnd (Node3)
10573
        4 => False,   --  Entity (Node4-Sem)
10574
        5 => False),  --  Etype (Node5-Sem)
10575
 
10576
     N_Op_Or =>
10577
       (1 => True,    --  Chars (Name1)
10578
        2 => True,    --  Left_Opnd (Node2)
10579
        3 => True,    --  Right_Opnd (Node3)
10580
        4 => False,   --  Entity (Node4-Sem)
10581
        5 => False),  --  Etype (Node5-Sem)
10582
 
10583
     N_Op_Xor =>
10584
       (1 => True,    --  Chars (Name1)
10585
        2 => True,    --  Left_Opnd (Node2)
10586
        3 => True,    --  Right_Opnd (Node3)
10587
        4 => False,   --  Entity (Node4-Sem)
10588
        5 => False),  --  Etype (Node5-Sem)
10589
 
10590
     N_Op_Eq =>
10591
       (1 => True,    --  Chars (Name1)
10592
        2 => True,    --  Left_Opnd (Node2)
10593
        3 => True,    --  Right_Opnd (Node3)
10594
        4 => False,   --  Entity (Node4-Sem)
10595
        5 => False),  --  Etype (Node5-Sem)
10596
 
10597
     N_Op_Ne =>
10598
       (1 => True,    --  Chars (Name1)
10599
        2 => True,    --  Left_Opnd (Node2)
10600
        3 => True,    --  Right_Opnd (Node3)
10601
        4 => False,   --  Entity (Node4-Sem)
10602
        5 => False),  --  Etype (Node5-Sem)
10603
 
10604
     N_Op_Lt =>
10605
       (1 => True,    --  Chars (Name1)
10606
        2 => True,    --  Left_Opnd (Node2)
10607
        3 => True,    --  Right_Opnd (Node3)
10608
        4 => False,   --  Entity (Node4-Sem)
10609
        5 => False),  --  Etype (Node5-Sem)
10610
 
10611
     N_Op_Le =>
10612
       (1 => True,    --  Chars (Name1)
10613
        2 => True,    --  Left_Opnd (Node2)
10614
        3 => True,    --  Right_Opnd (Node3)
10615
        4 => False,   --  Entity (Node4-Sem)
10616
        5 => False),  --  Etype (Node5-Sem)
10617
 
10618
     N_Op_Gt =>
10619
       (1 => True,    --  Chars (Name1)
10620
        2 => True,    --  Left_Opnd (Node2)
10621
        3 => True,    --  Right_Opnd (Node3)
10622
        4 => False,   --  Entity (Node4-Sem)
10623
        5 => False),  --  Etype (Node5-Sem)
10624
 
10625
     N_Op_Ge =>
10626
       (1 => True,    --  Chars (Name1)
10627
        2 => True,    --  Left_Opnd (Node2)
10628
        3 => True,    --  Right_Opnd (Node3)
10629
        4 => False,   --  Entity (Node4-Sem)
10630
        5 => False),  --  Etype (Node5-Sem)
10631
 
10632
     N_Op_Add =>
10633
       (1 => True,    --  Chars (Name1)
10634
        2 => True,    --  Left_Opnd (Node2)
10635
        3 => True,    --  Right_Opnd (Node3)
10636
        4 => False,   --  Entity (Node4-Sem)
10637
        5 => False),  --  Etype (Node5-Sem)
10638
 
10639
     N_Op_Subtract =>
10640
       (1 => True,    --  Chars (Name1)
10641
        2 => True,    --  Left_Opnd (Node2)
10642
        3 => True,    --  Right_Opnd (Node3)
10643
        4 => False,   --  Entity (Node4-Sem)
10644
        5 => False),  --  Etype (Node5-Sem)
10645
 
10646
     N_Op_Concat =>
10647
       (1 => True,    --  Chars (Name1)
10648
        2 => True,    --  Left_Opnd (Node2)
10649
        3 => True,    --  Right_Opnd (Node3)
10650
        4 => False,   --  Entity (Node4-Sem)
10651
        5 => False),  --  Etype (Node5-Sem)
10652
 
10653
     N_Op_Multiply =>
10654
       (1 => True,    --  Chars (Name1)
10655
        2 => True,    --  Left_Opnd (Node2)
10656
        3 => True,    --  Right_Opnd (Node3)
10657
        4 => False,   --  Entity (Node4-Sem)
10658
        5 => False),  --  Etype (Node5-Sem)
10659
 
10660
     N_Op_Divide =>
10661
       (1 => True,    --  Chars (Name1)
10662
        2 => True,    --  Left_Opnd (Node2)
10663
        3 => True,    --  Right_Opnd (Node3)
10664
        4 => False,   --  Entity (Node4-Sem)
10665
        5 => False),  --  Etype (Node5-Sem)
10666
 
10667
     N_Op_Mod =>
10668
       (1 => True,    --  Chars (Name1)
10669
        2 => True,    --  Left_Opnd (Node2)
10670
        3 => True,    --  Right_Opnd (Node3)
10671
        4 => False,   --  Entity (Node4-Sem)
10672
        5 => False),  --  Etype (Node5-Sem)
10673
 
10674
     N_Op_Rem =>
10675
       (1 => True,    --  Chars (Name1)
10676
        2 => True,    --  Left_Opnd (Node2)
10677
        3 => True,    --  Right_Opnd (Node3)
10678
        4 => False,   --  Entity (Node4-Sem)
10679
        5 => False),  --  Etype (Node5-Sem)
10680
 
10681
     N_Op_Expon =>
10682
       (1 => True,    --  Chars (Name1)
10683
        2 => True,    --  Left_Opnd (Node2)
10684
        3 => True,    --  Right_Opnd (Node3)
10685
        4 => False,   --  Entity (Node4-Sem)
10686
        5 => False),  --  Etype (Node5-Sem)
10687
 
10688
     N_Op_Plus =>
10689
       (1 => True,    --  Chars (Name1)
10690
        2 => False,   --  unused
10691
        3 => True,    --  Right_Opnd (Node3)
10692
        4 => False,   --  Entity (Node4-Sem)
10693
        5 => False),  --  Etype (Node5-Sem)
10694
 
10695
     N_Op_Minus =>
10696
       (1 => True,    --  Chars (Name1)
10697
        2 => False,   --  unused
10698
        3 => True,    --  Right_Opnd (Node3)
10699
        4 => False,   --  Entity (Node4-Sem)
10700
        5 => False),  --  Etype (Node5-Sem)
10701
 
10702
     N_Op_Abs =>
10703
       (1 => True,    --  Chars (Name1)
10704
        2 => False,   --  unused
10705
        3 => True,    --  Right_Opnd (Node3)
10706
        4 => False,   --  Entity (Node4-Sem)
10707
        5 => False),  --  Etype (Node5-Sem)
10708
 
10709
     N_Op_Not =>
10710
       (1 => True,    --  Chars (Name1)
10711
        2 => False,   --  unused
10712
        3 => True,    --  Right_Opnd (Node3)
10713
        4 => False,   --  Entity (Node4-Sem)
10714
        5 => False),  --  Etype (Node5-Sem)
10715
 
10716
     N_Type_Conversion =>
10717
       (1 => False,   --  unused
10718
        2 => False,   --  unused
10719
        3 => True,    --  Expression (Node3)
10720
        4 => True,    --  Subtype_Mark (Node4)
10721
        5 => False),  --  Etype (Node5-Sem)
10722
 
10723
     N_Qualified_Expression =>
10724
       (1 => False,   --  unused
10725
        2 => False,   --  unused
10726
        3 => True,    --  Expression (Node3)
10727
        4 => True,    --  Subtype_Mark (Node4)
10728
        5 => False),  --  Etype (Node5-Sem)
10729
 
10730
     N_Quantified_Expression =>
10731
       (1 => True,    --  Condition (Node1)
10732
        2 => True,    --  Iterator_Specification
10733
        3 => False,   --  unused
10734
        4 => True,    --  Loop_Parameter_Specification (Node4)
10735
        5 => False),  --  Etype (Node5-Sem)
10736
 
10737
     N_Allocator =>
10738
       (1 => False,   --  Storage_Pool (Node1-Sem)
10739
        2 => False,   --  Procedure_To_Call (Node2-Sem)
10740
        3 => True,    --  Expression (Node3)
10741
        4 => True,    --  Subpool_Handle_Name (Node4)
10742
        5 => False),  --  Etype (Node5-Sem)
10743
 
10744
     N_Null_Statement =>
10745
       (1 => False,   --  unused
10746
        2 => False,   --  unused
10747
        3 => False,   --  unused
10748
        4 => False,   --  unused
10749
        5 => False),  --  unused
10750
 
10751
     N_Label =>
10752
       (1 => True,    --  Identifier (Node1)
10753
        2 => False,   --  unused
10754
        3 => False,   --  unused
10755
        4 => False,   --  unused
10756
        5 => False),  --  unused
10757
 
10758
     N_Assignment_Statement =>
10759
       (1 => False,   --  unused
10760
        2 => True,    --  Name (Node2)
10761
        3 => True,    --  Expression (Node3)
10762
        4 => False,   --  unused
10763
        5 => False),  --  unused
10764
 
10765
     N_If_Statement =>
10766
       (1 => True,    --  Condition (Node1)
10767
        2 => True,    --  Then_Statements (List2)
10768
        3 => True,    --  Elsif_Parts (List3)
10769
        4 => True,    --  Else_Statements (List4)
10770
        5 => True),   --  End_Span (Uint5)
10771
 
10772
     N_Elsif_Part =>
10773
       (1 => True,    --  Condition (Node1)
10774
        2 => True,    --  Then_Statements (List2)
10775
        3 => False,   --  Condition_Actions (List3-Sem)
10776
        4 => False,   --  unused
10777
        5 => False),  --  unused
10778
 
10779
     N_Case_Expression =>
10780
       (1 => False,   --  unused
10781
        2 => False,   --  unused
10782
        3 => True,    --  Expression (Node3)
10783
        4 => True,    --  Alternatives (List4)
10784
        5 => False),  --  unused
10785
 
10786
     N_Case_Expression_Alternative =>
10787
       (1 => False,   --  Actions (List1-Sem)
10788
        2 => False,   --  unused
10789
        3 => True,    --  Statements (List3)
10790
        4 => True,    --  Expression (Node4)
10791
        5 => False),  --  unused
10792
 
10793
     N_Case_Statement =>
10794
       (1 => False,   --  unused
10795
        2 => False,   --  unused
10796
        3 => True,    --  Expression (Node3)
10797
        4 => True,    --  Alternatives (List4)
10798
        5 => True),   --  End_Span (Uint5)
10799
 
10800
     N_Case_Statement_Alternative =>
10801
       (1 => False,   --  unused
10802
        2 => False,   --  unused
10803
        3 => True,    --  Statements (List3)
10804
        4 => True,    --  Discrete_Choices (List4)
10805
        5 => False),  --  unused
10806
 
10807
     N_Loop_Statement =>
10808
       (1 => True,    --  Identifier (Node1)
10809
        2 => True,    --  Iteration_Scheme (Node2)
10810
        3 => True,    --  Statements (List3)
10811
        4 => True,    --  End_Label (Node4)
10812
        5 => False),  --  unused
10813
 
10814
     N_Iteration_Scheme =>
10815
       (1 => True,    --  Condition (Node1)
10816
        2 => True,    --  Iterator_Specification (Node2)
10817
        3 => False,   --  Condition_Actions (List3-Sem)
10818
        4 => True,    --  Loop_Parameter_Specification (Node4)
10819
        5 => False),  --  unused
10820
 
10821
     N_Loop_Parameter_Specification =>
10822
       (1 => True,    --  Defining_Identifier (Node1)
10823
        2 => False,   --  unused
10824
        3 => False,   --  unused
10825
        4 => True,    --  Discrete_Subtype_Definition (Node4)
10826
        5 => False),  --  unused
10827
 
10828
     N_Iterator_Specification =>
10829
       (1 => True,    --  Defining_Identifier (Node1)
10830
        2 => True,    --  Name (Node2)
10831
        3 => False,   --  Unused
10832
        4 => False,   --  Unused
10833
        5 => True),   --  Subtype_Indication (Node5)
10834
 
10835
     N_Block_Statement =>
10836
       (1 => True,    --  Identifier (Node1)
10837
        2 => True,    --  Declarations (List2)
10838
        3 => False,   --  Activation_Chain_Entity (Node3-Sem)
10839
        4 => True,    --  Handled_Statement_Sequence (Node4)
10840
        5 => False),  --  unused
10841
 
10842
     N_Exit_Statement =>
10843
       (1 => True,    --  Condition (Node1)
10844
        2 => True,    --  Name (Node2)
10845
        3 => False,   --  unused
10846
        4 => False,   --  unused
10847
        5 => False),  --  unused
10848
 
10849
     N_Goto_Statement =>
10850
       (1 => False,   --  unused
10851
        2 => True,    --  Name (Node2)
10852
        3 => False,   --  unused
10853
        4 => False,   --  unused
10854
        5 => False),  --  unused
10855
 
10856
     N_Subprogram_Declaration =>
10857
       (1 => True,    --  Specification (Node1)
10858
        2 => False,   --  unused
10859
        3 => False,   --  Body_To_Inline (Node3-Sem)
10860
        4 => False,   --  Parent_Spec (Node4-Sem)
10861
        5 => False),  --  Corresponding_Body (Node5-Sem)
10862
 
10863
     N_Abstract_Subprogram_Declaration =>
10864
       (1 => True,    --  Specification (Node1)
10865
        2 => False,   --  unused
10866
        3 => False,   --  unused
10867
        4 => False,   --  unused
10868
        5 => False),  --  unused
10869
 
10870
     N_Function_Specification =>
10871
       (1 => True,    --  Defining_Unit_Name (Node1)
10872
        2 => False,   --  Elaboration_Boolean (Node2-Sem)
10873
        3 => True,    --  Parameter_Specifications (List3)
10874
        4 => True,    --  Result_Definition (Node4)
10875
        5 => False),  --  Generic_Parent (Node5-Sem)
10876
 
10877
     N_Procedure_Specification =>
10878
       (1 => True,    --  Defining_Unit_Name (Node1)
10879
        2 => False,   --  Elaboration_Boolean (Node2-Sem)
10880
        3 => True,    --  Parameter_Specifications (List3)
10881
        4 => False,   --  unused
10882
        5 => False),  --  Generic_Parent (Node5-Sem)
10883
 
10884
     N_Designator =>
10885
       (1 => True,    --  Identifier (Node1)
10886
        2 => True,    --  Name (Node2)
10887
        3 => False,   --  unused
10888
        4 => False,   --  unused
10889
        5 => False),  --  unused
10890
 
10891
     N_Defining_Program_Unit_Name =>
10892
       (1 => True,    --  Defining_Identifier (Node1)
10893
        2 => True,    --  Name (Node2)
10894
        3 => False,   --  unused
10895
        4 => False,   --  unused
10896
        5 => False),  --  unused
10897
 
10898
     N_Operator_Symbol =>
10899
       (1 => True,    --  Chars (Name1)
10900
        2 => False,   --  unused
10901
        3 => True,    --  Strval (Str3)
10902
        4 => False,   --  Entity (Node4-Sem)
10903
        5 => False),  --  Etype (Node5-Sem)
10904
 
10905
     N_Defining_Operator_Symbol =>
10906
       (1 => True,    --  Chars (Name1)
10907
        2 => False,   --  Next_Entity (Node2-Sem)
10908
        3 => False,   --  Scope (Node3-Sem)
10909
        4 => False,   --  unused
10910
        5 => False),  --  Etype (Node5-Sem)
10911
 
10912
     N_Parameter_Specification =>
10913
       (1 => True,    --  Defining_Identifier (Node1)
10914
        2 => True,    --  Parameter_Type (Node2)
10915
        3 => True,    --  Expression (Node3)
10916
        4 => False,   --  unused
10917
        5 => False),  --  Default_Expression (Node5-Sem)
10918
 
10919
     N_Subprogram_Body =>
10920
       (1 => True,    --  Specification (Node1)
10921
        2 => True,    --  Declarations (List2)
10922
        3 => False,   --  Activation_Chain_Entity (Node3-Sem)
10923
        4 => True,    --  Handled_Statement_Sequence (Node4)
10924
        5 => False),  --  Corresponding_Spec (Node5-Sem)
10925
 
10926
     N_Expression_Function =>
10927
       (1 => True,    --  Specification (Node1)
10928
        2 => False,   --  unused
10929
        3 => True,    --  Expression (Node3)
10930
        4 => False,   --  unused
10931
        5 => False),  --  unused
10932
 
10933
     N_Procedure_Call_Statement =>
10934
       (1 => False,   --  Controlling_Argument (Node1-Sem)
10935
        2 => True,    --  Name (Node2)
10936
        3 => True,    --  Parameter_Associations (List3)
10937
        4 => False,   --  First_Named_Actual (Node4-Sem)
10938
        5 => False),  --  Etype (Node5-Sem)
10939
 
10940
     N_Function_Call =>
10941
       (1 => False,   --  Controlling_Argument (Node1-Sem)
10942
        2 => True,    --  Name (Node2)
10943
        3 => True,    --  Parameter_Associations (List3)
10944
        4 => False,   --  First_Named_Actual (Node4-Sem)
10945
        5 => False),  --  Etype (Node5-Sem)
10946
 
10947
     N_Parameter_Association =>
10948
       (1 => False,   --  unused
10949
        2 => True,    --  Selector_Name (Node2)
10950
        3 => True,    --  Explicit_Actual_Parameter (Node3)
10951
        4 => False,   --  Next_Named_Actual (Node4-Sem)
10952
        5 => False),  --  unused
10953
 
10954
     N_Return_Statement =>
10955
       (1 => False,   --  Storage_Pool (Node1-Sem)
10956
        2 => False,   --  Procedure_To_Call (Node2-Sem)
10957
        3 => True,    --  Expression (Node3)
10958
        4 => False,   --  unused
10959
        5 => False),  --  Return_Statement_Entity (Node5-Sem)
10960
 
10961
     N_Extended_Return_Statement =>
10962
       (1 => False,   --  Storage_Pool (Node1-Sem)
10963
        2 => False,   --  Procedure_To_Call (Node2-Sem)
10964
        3 => True,    --  Return_Object_Declarations (List3)
10965
        4 => True,    --  Handled_Statement_Sequence (Node4)
10966
        5 => False),  --  Return_Statement_Entity (Node5-Sem)
10967
 
10968
     N_Package_Declaration =>
10969
       (1 => True,    --  Specification (Node1)
10970
        2 => False,   --  unused
10971
        3 => False,   --  Activation_Chain_Entity (Node3-Sem)
10972
        4 => False,   --  Parent_Spec (Node4-Sem)
10973
        5 => False),  --  Corresponding_Body (Node5-Sem)
10974
 
10975
     N_Package_Specification =>
10976
       (1 => True,    --  Defining_Unit_Name (Node1)
10977
        2 => True,    --  Visible_Declarations (List2)
10978
        3 => True,    --  Private_Declarations (List3)
10979
        4 => True,    --  End_Label (Node4)
10980
        5 => False),  --  Generic_Parent (Node5-Sem)
10981
 
10982
     N_Package_Body =>
10983
       (1 => True,    --  Defining_Unit_Name (Node1)
10984
        2 => True,    --  Declarations (List2)
10985
        3 => False,   --  unused
10986
        4 => True,    --  Handled_Statement_Sequence (Node4)
10987
        5 => False),  --  Corresponding_Spec (Node5-Sem)
10988
 
10989
     N_Private_Type_Declaration =>
10990
       (1 => True,    --  Defining_Identifier (Node1)
10991
        2 => False,   --  unused
10992
        3 => False,   --  unused
10993
        4 => True,    --  Discriminant_Specifications (List4)
10994
        5 => False),  --  unused
10995
 
10996
     N_Private_Extension_Declaration =>
10997
       (1 => True,    --  Defining_Identifier (Node1)
10998
        2 => True,    --  Interface_List (List2)
10999
        3 => False,   --  unused
11000
        4 => True,    --  Discriminant_Specifications (List4)
11001
        5 => True),   --  Subtype_Indication (Node5)
11002
 
11003
     N_Use_Package_Clause =>
11004
       (1 => False,   --  unused
11005
        2 => True,    --  Names (List2)
11006
        3 => False,   --  Next_Use_Clause (Node3-Sem)
11007
        4 => False,   --  Hidden_By_Use_Clause (Elist4-Sem)
11008
        5 => False),  --  unused
11009
 
11010
     N_Use_Type_Clause =>
11011
       (1 => False,   --  unused
11012
        2 => True,    --  Subtype_Marks (List2)
11013
        3 => False,   --  Next_Use_Clause (Node3-Sem)
11014
        4 => False,   --  Hidden_By_Use_Clause (Elist4-Sem)
11015
        5 => False),  --  unused
11016
 
11017
     N_Object_Renaming_Declaration =>
11018
       (1 => True,    --  Defining_Identifier (Node1)
11019
        2 => True,    --  Name (Node2)
11020
        3 => True,    --  Access_Definition (Node3)
11021
        4 => True,    --  Subtype_Mark (Node4)
11022
        5 => False),  --  Corresponding_Generic_Association (Node5-Sem)
11023
 
11024
     N_Exception_Renaming_Declaration =>
11025
       (1 => True,    --  Defining_Identifier (Node1)
11026
        2 => True,    --  Name (Node2)
11027
        3 => False,   --  unused
11028
        4 => False,   --  unused
11029
        5 => False),  --  unused
11030
 
11031
     N_Package_Renaming_Declaration =>
11032
       (1 => True,    --  Defining_Unit_Name (Node1)
11033
        2 => True,    --  Name (Node2)
11034
        3 => False,   --  unused
11035
        4 => False,   --  Parent_Spec (Node4-Sem)
11036
        5 => False),  --  unused
11037
 
11038
     N_Subprogram_Renaming_Declaration =>
11039
       (1 => True,    --  Specification (Node1)
11040
        2 => True,    --  Name (Node2)
11041
        3 => False,   --  Corresponding_Formal_Spec (Node3-Sem)
11042
        4 => False,   --  Parent_Spec (Node4-Sem)
11043
        5 => False),  --  Corresponding_Spec (Node5-Sem)
11044
 
11045
     N_Generic_Package_Renaming_Declaration =>
11046
       (1 => True,    --  Defining_Unit_Name (Node1)
11047
        2 => True,    --  Name (Node2)
11048
        3 => False,   --  unused
11049
        4 => False,   --  Parent_Spec (Node4-Sem)
11050
        5 => False),  --  unused
11051
 
11052
     N_Generic_Procedure_Renaming_Declaration =>
11053
       (1 => True,    --  Defining_Unit_Name (Node1)
11054
        2 => True,    --  Name (Node2)
11055
        3 => False,   --  unused
11056
        4 => False,   --  Parent_Spec (Node4-Sem)
11057
        5 => False),  --  unused
11058
 
11059
     N_Generic_Function_Renaming_Declaration =>
11060
       (1 => True,    --  Defining_Unit_Name (Node1)
11061
        2 => True,    --  Name (Node2)
11062
        3 => False,   --  unused
11063
        4 => False,   --  Parent_Spec (Node4-Sem)
11064
        5 => False),  --  unused
11065
 
11066
     N_Task_Type_Declaration =>
11067
       (1 => True,    --  Defining_Identifier (Node1)
11068
        2 => True,    --  Interface_List (List2)
11069
        3 => True,    --  Task_Definition (Node3)
11070
        4 => True,    --  Discriminant_Specifications (List4)
11071
        5 => False),  --  Corresponding_Body (Node5-Sem)
11072
 
11073
     N_Single_Task_Declaration =>
11074
       (1 => True,    --  Defining_Identifier (Node1)
11075
        2 => True,    --  Interface_List (List2)
11076
        3 => True,    --  Task_Definition (Node3)
11077
        4 => False,   --  unused
11078
        5 => False),  --  unused
11079
 
11080
     N_Task_Definition =>
11081
       (1 => False,   --  unused
11082
        2 => True,    --  Visible_Declarations (List2)
11083
        3 => True,    --  Private_Declarations (List3)
11084
        4 => True,    --  End_Label (Node4)
11085
        5 => False),  --  unused
11086
 
11087
     N_Task_Body =>
11088
       (1 => True,    --  Defining_Identifier (Node1)
11089
        2 => True,    --  Declarations (List2)
11090
        3 => False,   --  Activation_Chain_Entity (Node3-Sem)
11091
        4 => True,    --  Handled_Statement_Sequence (Node4)
11092
        5 => False),  --  Corresponding_Spec (Node5-Sem)
11093
 
11094
     N_Protected_Type_Declaration =>
11095
       (1 => True,    --  Defining_Identifier (Node1)
11096
        2 => True,    --  Interface_List (List2)
11097
        3 => True,    --  Protected_Definition (Node3)
11098
        4 => True,    --  Discriminant_Specifications (List4)
11099
        5 => False),  --  Corresponding_Body (Node5-Sem)
11100
 
11101
     N_Single_Protected_Declaration =>
11102
       (1 => True,    --  Defining_Identifier (Node1)
11103
        2 => True,    --  Interface_List (List2)
11104
        3 => True,    --  Protected_Definition (Node3)
11105
        4 => False,   --  unused
11106
        5 => False),  --  unused
11107
 
11108
     N_Protected_Definition =>
11109
       (1 => False,   --  unused
11110
        2 => True,    --  Visible_Declarations (List2)
11111
        3 => True,    --  Private_Declarations (List3)
11112
        4 => True,    --  End_Label (Node4)
11113
        5 => False),  --  unused
11114
 
11115
     N_Protected_Body =>
11116
       (1 => True,    --  Defining_Identifier (Node1)
11117
        2 => True,    --  Declarations (List2)
11118
        3 => False,   --  unused
11119
        4 => True,    --  End_Label (Node4)
11120
        5 => False),  --  Corresponding_Spec (Node5-Sem)
11121
 
11122
     N_Entry_Declaration =>
11123
       (1 => True,    --  Defining_Identifier (Node1)
11124
        2 => False,   --  unused
11125
        3 => True,    --  Parameter_Specifications (List3)
11126
        4 => True,    --  Discrete_Subtype_Definition (Node4)
11127
        5 => False),  --  Corresponding_Body (Node5-Sem)
11128
 
11129
     N_Accept_Statement =>
11130
       (1 => True,    --  Entry_Direct_Name (Node1)
11131
        2 => True,    --  Declarations (List2)
11132
        3 => True,    --  Parameter_Specifications (List3)
11133
        4 => True,    --  Handled_Statement_Sequence (Node4)
11134
        5 => True),   --  Entry_Index (Node5)
11135
 
11136
     N_Entry_Body =>
11137
       (1 => True,    --  Defining_Identifier (Node1)
11138
        2 => True,    --  Declarations (List2)
11139
        3 => False,   --  Activation_Chain_Entity (Node3-Sem)
11140
        4 => True,    --  Handled_Statement_Sequence (Node4)
11141
        5 => True),   --  Entry_Body_Formal_Part (Node5)
11142
 
11143
     N_Entry_Body_Formal_Part =>
11144
       (1 => True,    --  Condition (Node1)
11145
        2 => False,   --  unused
11146
        3 => True,    --  Parameter_Specifications (List3)
11147
        4 => True,    --  Entry_Index_Specification (Node4)
11148
        5 => False),  --  unused
11149
 
11150
     N_Entry_Index_Specification =>
11151
       (1 => True,    --  Defining_Identifier (Node1)
11152
        2 => False,   --  unused
11153
        3 => False,   --  unused
11154
        4 => True,    --  Discrete_Subtype_Definition (Node4)
11155
        5 => False),  --  unused
11156
 
11157
     N_Entry_Call_Statement =>
11158
       (1 => False,   --  unused
11159
        2 => True,    --  Name (Node2)
11160
        3 => True,    --  Parameter_Associations (List3)
11161
        4 => False,   --  First_Named_Actual (Node4-Sem)
11162
        5 => False),  --  unused
11163
 
11164
     N_Requeue_Statement =>
11165
       (1 => False,   --  unused
11166
        2 => True,    --  Name (Node2)
11167
        3 => False,   --  unused
11168
        4 => False,   --  unused
11169
        5 => False),  --  unused
11170
 
11171
     N_Delay_Until_Statement =>
11172
       (1 => False,   --  unused
11173
        2 => False,   --  unused
11174
        3 => True,    --  Expression (Node3)
11175
        4 => False,   --  unused
11176
        5 => False),  --  unused
11177
 
11178
     N_Delay_Relative_Statement =>
11179
       (1 => False,   --  unused
11180
        2 => False,   --  unused
11181
        3 => True,    --  Expression (Node3)
11182
        4 => False,   --  unused
11183
        5 => False),  --  unused
11184
 
11185
     N_Selective_Accept =>
11186
       (1 => True,    --  Select_Alternatives (List1)
11187
        2 => False,   --  unused
11188
        3 => False,   --  unused
11189
        4 => True,    --  Else_Statements (List4)
11190
        5 => False),  --  unused
11191
 
11192
     N_Accept_Alternative =>
11193
       (1 => True,    --  Condition (Node1)
11194
        2 => True,    --  Accept_Statement (Node2)
11195
        3 => True,    --  Statements (List3)
11196
        4 => True,    --  Pragmas_Before (List4)
11197
        5 => False),  --  Accept_Handler_Records (List5-Sem)
11198
 
11199
     N_Delay_Alternative =>
11200
       (1 => True,    --  Condition (Node1)
11201
        2 => True,    --  Delay_Statement (Node2)
11202
        3 => True,    --  Statements (List3)
11203
        4 => True,    --  Pragmas_Before (List4)
11204
        5 => False),  --  unused
11205
 
11206
     N_Terminate_Alternative =>
11207
       (1 => True,    --  Condition (Node1)
11208
        2 => False,   --  unused
11209
        3 => False,   --  unused
11210
        4 => True,    --  Pragmas_Before (List4)
11211
        5 => True),   --  Pragmas_After (List5)
11212
 
11213
     N_Timed_Entry_Call =>
11214
       (1 => True,    --  Entry_Call_Alternative (Node1)
11215
        2 => False,   --  unused
11216
        3 => False,   --  unused
11217
        4 => True,    --  Delay_Alternative (Node4)
11218
        5 => False),  --  unused
11219
 
11220
     N_Entry_Call_Alternative =>
11221
       (1 => True,    --  Entry_Call_Statement (Node1)
11222
        2 => False,   --  unused
11223
        3 => True,    --  Statements (List3)
11224
        4 => True,    --  Pragmas_Before (List4)
11225
        5 => False),  --  unused
11226
 
11227
     N_Conditional_Entry_Call =>
11228
       (1 => True,    --  Entry_Call_Alternative (Node1)
11229
        2 => False,   --  unused
11230
        3 => False,   --  unused
11231
        4 => True,    --  Else_Statements (List4)
11232
        5 => False),  --  unused
11233
 
11234
     N_Asynchronous_Select =>
11235
       (1 => True,    --  Triggering_Alternative (Node1)
11236
        2 => True,    --  Abortable_Part (Node2)
11237
        3 => False,   --  unused
11238
        4 => False,   --  unused
11239
        5 => False),  --  unused
11240
 
11241
     N_Triggering_Alternative =>
11242
       (1 => True,    --  Triggering_Statement (Node1)
11243
        2 => False,   --  unused
11244
        3 => True,    --  Statements (List3)
11245
        4 => True,    --  Pragmas_Before (List4)
11246
        5 => False),  --  unused
11247
 
11248
     N_Abortable_Part =>
11249
       (1 => False,   --  unused
11250
        2 => False,   --  unused
11251
        3 => True,    --  Statements (List3)
11252
        4 => False,   --  unused
11253
        5 => False),  --  unused
11254
 
11255
     N_Abort_Statement =>
11256
       (1 => False,   --  unused
11257
        2 => True,    --  Names (List2)
11258
        3 => False,   --  unused
11259
        4 => False,   --  unused
11260
        5 => False),  --  unused
11261
 
11262
     N_Compilation_Unit =>
11263
       (1 => True,    --  Context_Items (List1)
11264
        2 => True,    --  Unit (Node2)
11265
        3 => False,   --  First_Inlined_Subprogram (Node3-Sem)
11266
        4 => False,   --  Library_Unit (Node4-Sem)
11267
        5 => True),   --  Aux_Decls_Node (Node5)
11268
 
11269
     N_Compilation_Unit_Aux =>
11270
       (1 => True,    --  Actions (List1)
11271
        2 => True,    --  Declarations (List2)
11272
        3 => False,   --  Default_Storage_Pool (Node3)
11273
        4 => True,    --  Config_Pragmas (List4)
11274
        5 => True),   --  Pragmas_After (List5)
11275
 
11276
     N_With_Clause =>
11277
       (1 => False,   --  unused
11278
        2 => True,    --  Name (Node2)
11279
        3 => False,   --  unused
11280
        4 => False,   --  Library_Unit (Node4-Sem)
11281
        5 => False),  --  Corresponding_Spec (Node5-Sem)
11282
 
11283
     N_Subprogram_Body_Stub =>
11284
       (1 => True,    --  Specification (Node1)
11285
        2 => False,   --  unused
11286
        3 => False,   --  unused
11287
        4 => False,   --  Library_Unit (Node4-Sem)
11288
        5 => False),  --  Corresponding_Body (Node5-Sem)
11289
 
11290
     N_Package_Body_Stub =>
11291
       (1 => True,    --  Defining_Identifier (Node1)
11292
        2 => False,   --  unused
11293
        3 => False,   --  unused
11294
        4 => False,   --  Library_Unit (Node4-Sem)
11295
        5 => False),  --  Corresponding_Body (Node5-Sem)
11296
 
11297
     N_Task_Body_Stub =>
11298
       (1 => True,    --  Defining_Identifier (Node1)
11299
        2 => False,   --  unused
11300
        3 => False,   --  unused
11301
        4 => False,   --  Library_Unit (Node4-Sem)
11302
        5 => False),  --  Corresponding_Body (Node5-Sem)
11303
 
11304
     N_Protected_Body_Stub =>
11305
       (1 => True,    --  Defining_Identifier (Node1)
11306
        2 => False,   --  unused
11307
        3 => False,   --  unused
11308
        4 => False,   --  Library_Unit (Node4-Sem)
11309
        5 => False),  --  Corresponding_Body (Node5-Sem)
11310
 
11311
     N_Subunit =>
11312
       (1 => True,    --  Proper_Body (Node1)
11313
        2 => True,    --  Name (Node2)
11314
        3 => False,   --  Corresponding_Stub (Node3-Sem)
11315
        4 => False,   --  unused
11316
        5 => False),  --  unused
11317
 
11318
     N_Exception_Declaration =>
11319
       (1 => True,    --  Defining_Identifier (Node1)
11320
        2 => False,   --  unused
11321
        3 => False,   --  Expression (Node3-Sem)
11322
        4 => False,   --  unused
11323
        5 => False),  --  unused
11324
 
11325
     N_Handled_Sequence_Of_Statements =>
11326
       (1 => True,    --  At_End_Proc (Node1)
11327
        2 => False,   --  First_Real_Statement (Node2-Sem)
11328
        3 => True,    --  Statements (List3)
11329
        4 => True,    --  End_Label (Node4)
11330
        5 => True),   --  Exception_Handlers (List5)
11331
 
11332
     N_Exception_Handler =>
11333
       (1 => False,   --  Local_Raise_Statements (Elist1)
11334
        2 => True,    --  Choice_Parameter (Node2)
11335
        3 => True,    --  Statements (List3)
11336
        4 => True,    --  Exception_Choices (List4)
11337
        5 => False),  --  Exception_Label (Node5)
11338
 
11339
     N_Raise_Statement =>
11340
       (1 => False,   --  unused
11341
        2 => True,    --  Name (Node2)
11342
        3 => True,    --  Expression (Node3)
11343
        4 => False,   --  unused
11344
        5 => False),  --  unused
11345
 
11346
     N_Generic_Subprogram_Declaration =>
11347
       (1 => True,    --  Specification (Node1)
11348
        2 => True,    --  Generic_Formal_Declarations (List2)
11349
        3 => False,   --  unused
11350
        4 => False,   --  Parent_Spec (Node4-Sem)
11351
        5 => False),  --  Corresponding_Body (Node5-Sem)
11352
 
11353
     N_Generic_Package_Declaration =>
11354
       (1 => True,    --  Specification (Node1)
11355
        2 => True,    --  Generic_Formal_Declarations (List2)
11356
        3 => False,   --  Activation_Chain_Entity (Node3-Sem)
11357
        4 => False,   --  Parent_Spec (Node4-Sem)
11358
        5 => False),  --  Corresponding_Body (Node5-Sem)
11359
 
11360
     N_Package_Instantiation =>
11361
       (1 => True,    --  Defining_Unit_Name (Node1)
11362
        2 => True,    --  Name (Node2)
11363
        3 => True,    --  Generic_Associations (List3)
11364
        4 => False,   --  Parent_Spec (Node4-Sem)
11365
        5 => False),  --  Instance_Spec (Node5-Sem)
11366
 
11367
     N_Procedure_Instantiation =>
11368
       (1 => True,    --  Defining_Unit_Name (Node1)
11369
        2 => True,    --  Name (Node2)
11370
        3 => True,    --  Generic_Associations (List3)
11371
        4 => False,   --  Parent_Spec (Node4-Sem)
11372
        5 => False),  --  Instance_Spec (Node5-Sem)
11373
 
11374
     N_Function_Instantiation =>
11375
       (1 => True,    --  Defining_Unit_Name (Node1)
11376
        2 => True,    --  Name (Node2)
11377
        3 => True,    --  Generic_Associations (List3)
11378
        4 => False,   --  Parent_Spec (Node4-Sem)
11379
        5 => False),  --  Instance_Spec (Node5-Sem)
11380
 
11381
     N_Generic_Association =>
11382
       (1 => True,    --  Explicit_Generic_Actual_Parameter (Node1)
11383
        2 => True,    --  Selector_Name (Node2)
11384
        3 => False,   --  unused
11385
        4 => False,   --  unused
11386
        5 => False),  --  unused
11387
 
11388
     N_Formal_Object_Declaration =>
11389
       (1 => True,    --  Defining_Identifier (Node1)
11390
        2 => False,   --  unused
11391
        3 => True,    --  Access_Definition (Node3)
11392
        4 => True,    --  Subtype_Mark (Node4)
11393
        5 => True),   --  Default_Expression (Node5)
11394
 
11395
     N_Formal_Type_Declaration =>
11396
       (1 => True,    --  Defining_Identifier (Node1)
11397
        2 => False,   --  unused
11398
        3 => True,    --  Formal_Type_Definition (Node3)
11399
        4 => True,    --  Discriminant_Specifications (List4)
11400
        5 => False),  --  unused
11401
 
11402
     N_Formal_Private_Type_Definition =>
11403
       (1 => False,   --  unused
11404
        2 => False,   --  unused
11405
        3 => False,   --  unused
11406
        4 => False,   --  unused
11407
        5 => False),  --  unused
11408
 
11409
     N_Formal_Incomplete_Type_Definition =>
11410
       (1 => False,   --  unused
11411
        2 => False,   --  unused
11412
        3 => False,   --  unused
11413
        4 => False,   --  unused
11414
        5 => False),  --  unused
11415
 
11416
     N_Formal_Derived_Type_Definition =>
11417
       (1 => False,   --  unused
11418
        2 => True,    --  Interface_List (List2)
11419
        3 => False,   --  unused
11420
        4 => True,    --  Subtype_Mark (Node4)
11421
        5 => False),  --  unused
11422
 
11423
     N_Formal_Discrete_Type_Definition =>
11424
       (1 => False,   --  unused
11425
        2 => False,   --  unused
11426
        3 => False,   --  unused
11427
        4 => False,   --  unused
11428
        5 => False),  --  unused
11429
 
11430
     N_Formal_Signed_Integer_Type_Definition =>
11431
       (1 => False,   --  unused
11432
        2 => False,   --  unused
11433
        3 => False,   --  unused
11434
        4 => False,   --  unused
11435
        5 => False),  --  unused
11436
 
11437
     N_Formal_Modular_Type_Definition =>
11438
       (1 => False,   --  unused
11439
        2 => False,   --  unused
11440
        3 => False,   --  unused
11441
        4 => False,   --  unused
11442
        5 => False),  --  unused
11443
 
11444
     N_Formal_Floating_Point_Definition =>
11445
       (1 => False,   --  unused
11446
        2 => False,   --  unused
11447
        3 => False,   --  unused
11448
        4 => False,   --  unused
11449
        5 => False),  --  unused
11450
 
11451
     N_Formal_Ordinary_Fixed_Point_Definition =>
11452
       (1 => False,   --  unused
11453
        2 => False,   --  unused
11454
        3 => False,   --  unused
11455
        4 => False,   --  unused
11456
        5 => False),  --  unused
11457
 
11458
     N_Formal_Decimal_Fixed_Point_Definition =>
11459
       (1 => False,   --  unused
11460
        2 => False,   --  unused
11461
        3 => False,   --  unused
11462
        4 => False,   --  unused
11463
        5 => False),  --  unused
11464
 
11465
     N_Formal_Concrete_Subprogram_Declaration =>
11466
       (1 => True,    --  Specification (Node1)
11467
        2 => True,    --  Default_Name (Node2)
11468
        3 => False,   --  unused
11469
        4 => False,   --  unused
11470
        5 => False),  --  unused
11471
 
11472
     N_Formal_Abstract_Subprogram_Declaration =>
11473
       (1 => True,    --  Specification (Node1)
11474
        2 => True,    --  Default_Name (Node2)
11475
        3 => False,   --  unused
11476
        4 => False,   --  unused
11477
        5 => False),  --  unused
11478
 
11479
     N_Formal_Package_Declaration =>
11480
       (1 => True,    --  Defining_Identifier (Node1)
11481
        2 => True,    --  Name (Node2)
11482
        3 => True,    --  Generic_Associations (List3)
11483
        4 => False,   --  unused
11484
        5 => False),  --  Instance_Spec (Node5-Sem)
11485
 
11486
     N_Attribute_Definition_Clause =>
11487
       (1 => True,    --  Chars (Name1)
11488
        2 => True,    --  Name (Node2)
11489
        3 => True,    --  Expression (Node3)
11490
        4 => False,   --  unused
11491
        5 => False),  --  Next_Rep_Item (Node5-Sem)
11492
 
11493
     N_Aspect_Specification =>
11494
       (1 => True,    --  Identifier (Node1)
11495
        2 => False,   --  Aspect_Rep_Item (Node2-Sem)
11496
        3 => True,    --  Expression (Node3)
11497
        4 => False,   --  Entity (Node4-Sem)
11498
        5 => False),  --  Next_Rep_Item (Node5-Sem)
11499
 
11500
     N_Enumeration_Representation_Clause =>
11501
       (1 => True,    --  Identifier (Node1)
11502
        2 => False,   --  unused
11503
        3 => True,    --  Array_Aggregate (Node3)
11504
        4 => False,   --  unused
11505
        5 => False),  --  Next_Rep_Item (Node5-Sem)
11506
 
11507
     N_Record_Representation_Clause =>
11508
       (1 => True,    --  Identifier (Node1)
11509
        2 => True,    --  Mod_Clause (Node2)
11510
        3 => True,    --  Component_Clauses (List3)
11511
        4 => False,   --  unused
11512
        5 => False),  --  Next_Rep_Item (Node5-Sem)
11513
 
11514
     N_Component_Clause =>
11515
       (1 => True,    --  Component_Name (Node1)
11516
        2 => True,    --  Position (Node2)
11517
        3 => True,    --  First_Bit (Node3)
11518
        4 => True,    --  Last_Bit (Node4)
11519
        5 => False),  --  unused
11520
 
11521
     N_Code_Statement =>
11522
       (1 => False,   --  unused
11523
        2 => False,   --  unused
11524
        3 => True,    --  Expression (Node3)
11525
        4 => False,   --  unused
11526
        5 => False),  --  unused
11527
 
11528
     N_Op_Rotate_Left =>
11529
       (1 => True,    --  Chars (Name1)
11530
        2 => True,    --  Left_Opnd (Node2)
11531
        3 => True,    --  Right_Opnd (Node3)
11532
        4 => False,   --  Entity (Node4-Sem)
11533
        5 => False),  --  Etype (Node5-Sem)
11534
 
11535
     N_Op_Rotate_Right =>
11536
       (1 => True,    --  Chars (Name1)
11537
        2 => True,    --  Left_Opnd (Node2)
11538
        3 => True,    --  Right_Opnd (Node3)
11539
        4 => False,   --  Entity (Node4-Sem)
11540
        5 => False),  --  Etype (Node5-Sem)
11541
 
11542
     N_Op_Shift_Left =>
11543
       (1 => True,    --  Chars (Name1)
11544
        2 => True,    --  Left_Opnd (Node2)
11545
        3 => True,    --  Right_Opnd (Node3)
11546
        4 => False,   --  Entity (Node4-Sem)
11547
        5 => False),  --  Etype (Node5-Sem)
11548
 
11549
     N_Op_Shift_Right_Arithmetic =>
11550
       (1 => True,    --  Chars (Name1)
11551
        2 => True,    --  Left_Opnd (Node2)
11552
        3 => True,    --  Right_Opnd (Node3)
11553
        4 => False,   --  Entity (Node4-Sem)
11554
        5 => False),  --  Etype (Node5-Sem)
11555
 
11556
     N_Op_Shift_Right =>
11557
       (1 => True,    --  Chars (Name1)
11558
        2 => True,    --  Left_Opnd (Node2)
11559
        3 => True,    --  Right_Opnd (Node3)
11560
        4 => False,   --  Entity (Node4-Sem)
11561
        5 => False),  --  Etype (Node5-Sem)
11562
 
11563
     N_Delta_Constraint =>
11564
       (1 => False,   --  unused
11565
        2 => False,   --  unused
11566
        3 => True,    --  Delta_Expression (Node3)
11567
        4 => True,    --  Range_Constraint (Node4)
11568
        5 => False),  --  unused
11569
 
11570
     N_At_Clause =>
11571
       (1 => True,    --  Identifier (Node1)
11572
        2 => False,   --  unused
11573
        3 => True,    --  Expression (Node3)
11574
        4 => False,   --  unused
11575
        5 => False),  --  unused
11576
 
11577
     N_Mod_Clause =>
11578
       (1 => False,   --  unused
11579
        2 => False,   --  unused
11580
        3 => True,    --  Expression (Node3)
11581
        4 => True,    --  Pragmas_Before (List4)
11582
        5 => False),  --  unused
11583
 
11584
     N_Conditional_Expression =>
11585
       (1 => True,    --  Expressions (List1)
11586
        2 => False,   --  Then_Actions (List2-Sem)
11587
        3 => False,   --  Else_Actions (List3-Sem)
11588
        4 => False,   --  unused
11589
        5 => False),  --  Etype (Node5-Sem)
11590
 
11591
     N_Contract =>
11592
       (1 => False,   --  Spec_PPC_List (Node1)
11593
        2 => False,   --  Spec_TC_List (Node2)
11594
        3 => False,   --  unused
11595
        4 => False,   --  unused
11596
        5 => False),  --  unused
11597
 
11598
     N_Expanded_Name =>
11599
       (1 => True,    --  Chars (Name1)
11600
        2 => True,    --  Selector_Name (Node2)
11601
        3 => True,    --  Prefix (Node3)
11602
        4 => False,   --  Entity (Node4-Sem)
11603
        5 => False),  --  Etype (Node5-Sem)
11604
 
11605
     N_Expression_With_Actions =>
11606
       (1 => True,    --  Actions (List1)
11607
        2 => False,   --  unused
11608
        3 => True,    --  Expression (Node3)
11609
        4 => False,   --  unused
11610
        5 => False),  --  unused
11611
 
11612
     N_Free_Statement =>
11613
       (1 => False,   --  Storage_Pool (Node1-Sem)
11614
        2 => False,   --  Procedure_To_Call (Node2-Sem)
11615
        3 => True,    --  Expression (Node3)
11616
        4 => False,   --  Actual_Designated_Subtype (Node4-Sem)
11617
        5 => False),  --  unused
11618
 
11619
     N_Freeze_Entity =>
11620
       (1 => True,    --  Actions (List1)
11621
        2 => False,   --  Access_Types_To_Process (Elist2-Sem)
11622
        3 => False,   --  TSS_Elist (Elist3-Sem)
11623
        4 => False,   --  Entity (Node4-Sem)
11624
        5 => False),  --  First_Subtype_Link (Node5-Sem)
11625
 
11626
     N_Implicit_Label_Declaration =>
11627
       (1 => True,    --  Defining_Identifier (Node1)
11628
        2 => False,   --  Label_Construct (Node2-Sem)
11629
        3 => False,   --  unused
11630
        4 => False,   --  unused
11631
        5 => False),  --  unused
11632
 
11633
     N_Itype_Reference =>
11634
       (1 => False,   --  Itype (Node1-Sem)
11635
        2 => False,   --  unused
11636
        3 => False,   --  unused
11637
        4 => False,   --  unused
11638
        5 => False),  --  unused
11639
 
11640
     N_Raise_Constraint_Error =>
11641
       (1 => True,    --  Condition (Node1)
11642
        2 => False,   --  unused
11643
        3 => True,    --  Reason (Uint3)
11644
        4 => False,   --  unused
11645
        5 => False),  --  Etype (Node5-Sem)
11646
 
11647
     N_Raise_Program_Error =>
11648
       (1 => True,    --  Condition (Node1)
11649
        2 => False,   --  unused
11650
        3 => True,    --  Reason (Uint3)
11651
        4 => False,   --  unused
11652
        5 => False),  --  Etype (Node5-Sem)
11653
 
11654
     N_Raise_Storage_Error =>
11655
       (1 => True,    --  Condition (Node1)
11656
        2 => False,   --  unused
11657
        3 => True,    --  Reason (Uint3)
11658
        4 => False,   --  unused
11659
        5 => False),  --  Etype (Node5-Sem)
11660
 
11661
     N_Push_Constraint_Error_Label =>
11662
       (1 => False,   --  unused
11663
        2 => False,   --  unused
11664
        3 => False,   --  unused
11665
        4 => False,   --  unused
11666
        5 => False),  --  unused
11667
 
11668
     N_Push_Program_Error_Label =>
11669
       (1 => False,   --  Exception_Label
11670
        2 => False,   --  unused
11671
        3 => False,   --  unused
11672
        4 => False,   --  unused
11673
        5 => False),  --  Exception_Label
11674
 
11675
     N_Push_Storage_Error_Label =>
11676
       (1 => False,   --  Exception_Label
11677
        2 => False,   --  unused
11678
        3 => False,   --  unused
11679
        4 => False,   --  unused
11680
        5 => False),  --  Exception_Label
11681
 
11682
     N_Pop_Constraint_Error_Label =>
11683
       (1 => False,   --  unused
11684
        2 => False,   --  unused
11685
        3 => False,   --  unused
11686
        4 => False,   --  unused
11687
        5 => False),  --  unused
11688
 
11689
     N_Pop_Program_Error_Label =>
11690
       (1 => False,   --  unused
11691
        2 => False,   --  unused
11692
        3 => False,   --  unused
11693
        4 => False,   --  unused
11694
        5 => False),  --  unused
11695
 
11696
     N_Pop_Storage_Error_Label =>
11697
       (1 => False,   --  unused
11698
        2 => False,   --  unused
11699
        3 => False,   --  unused
11700
        4 => False,   --  unused
11701
        5 => False),  --  unused
11702
 
11703
     N_Reference =>
11704
       (1 => False,   --  unused
11705
        2 => False,   --  unused
11706
        3 => True,    --  Prefix (Node3)
11707
        4 => False,   --  unused
11708
        5 => False),  --  Etype (Node5-Sem)
11709
 
11710
     N_Subprogram_Info =>
11711
       (1 => True,    --  Identifier (Node1)
11712
        2 => False,   --  unused
11713
        3 => False,   --  unused
11714
        4 => False,   --  unused
11715
        5 => False),  --  Etype (Node5-Sem)
11716
 
11717
     N_Unchecked_Expression =>
11718
       (1 => False,   --  unused
11719
        2 => False,   --  unused
11720
        3 => True,    --  Expression (Node3)
11721
        4 => False,   --  unused
11722
        5 => False),  --  Etype (Node5-Sem)
11723
 
11724
     N_Unchecked_Type_Conversion =>
11725
       (1 => False,   --  unused
11726
        2 => False,   --  unused
11727
        3 => True,    --  Expression (Node3)
11728
        4 => True,    --  Subtype_Mark (Node4)
11729
        5 => False),  --  Etype (Node5-Sem)
11730
 
11731
     N_Validate_Unchecked_Conversion =>
11732
       (1 => False,   --  Source_Type (Node1-Sem)
11733
        2 => False,   --  Target_Type (Node2-Sem)
11734
        3 => False,   --  unused
11735
        4 => False,   --  unused
11736
        5 => False),  --  unused
11737
 
11738
   --  Entries for SCIL nodes
11739
 
11740
     N_SCIL_Dispatch_Table_Tag_Init =>
11741
       (1 => False,   --  unused
11742
        2 => False,   --  unused
11743
        3 => False,   --  unused
11744
        4 => False,   --  SCIL_Entity (Node4-Sem)
11745
        5 => False),  --  unused
11746
 
11747
     N_SCIL_Dispatching_Call =>
11748
       (1 => False,   --  unused
11749
        2 => False,   --  SCIL_Target_Prim (Node2-Sem)
11750
        3 => False,   --  unused
11751
        4 => False,   --  SCIL_Entity (Node4-Sem)
11752
        5 => False),  --  SCIL_Controlling_Tag (Node5-Sem)
11753
 
11754
     N_SCIL_Membership_Test =>
11755
       (1 => False,   --  unused
11756
        2 => False,   --  unused
11757
        3 => False,   --  unused
11758
        4 => False,   --  SCIL_Entity (Node4-Sem)
11759
        5 => False),  --  SCIL_Tag_Value (Node5-Sem)
11760
 
11761
   --  Entries for Empty, Error and Unused. Even thought these have a Chars
11762
   --  field for debugging purposes, they are not really syntactic fields, so
11763
   --  we mark all fields as unused.
11764
 
11765
     N_Empty =>
11766
       (1 => False,   --  unused
11767
        2 => False,   --  unused
11768
        3 => False,   --  unused
11769
        4 => False,   --  unused
11770
        5 => False),  --  unused
11771
 
11772
     N_Error =>
11773
       (1 => False,   --  unused
11774
        2 => False,   --  unused
11775
        3 => False,   --  unused
11776
        4 => False,   --  unused
11777
        5 => False),  --  unused
11778
 
11779
     N_Unused_At_Start =>
11780
       (1 => False,   --  unused
11781
        2 => False,   --  unused
11782
        3 => False,   --  unused
11783
        4 => False,   --  unused
11784
        5 => False),  --  unused
11785
 
11786
     N_Unused_At_End =>
11787
       (1 => False,   --  unused
11788
        2 => False,   --  unused
11789
        3 => False,   --  unused
11790
        4 => False,   --  unused
11791
        5 => False)); --  unused
11792
 
11793
   --------------------
11794
   -- Inline Pragmas --
11795
   --------------------
11796
 
11797
   pragma Inline (ABE_Is_Certain);
11798
   pragma Inline (Abort_Present);
11799
   pragma Inline (Abortable_Part);
11800
   pragma Inline (Abstract_Present);
11801
   pragma Inline (Accept_Handler_Records);
11802
   pragma Inline (Accept_Statement);
11803
   pragma Inline (Access_Definition);
11804
   pragma Inline (Access_To_Subprogram_Definition);
11805
   pragma Inline (Access_Types_To_Process);
11806
   pragma Inline (Actions);
11807
   pragma Inline (Activation_Chain_Entity);
11808
   pragma Inline (Acts_As_Spec);
11809
   pragma Inline (Actual_Designated_Subtype);
11810
   pragma Inline (Address_Warning_Posted);
11811
   pragma Inline (Aggregate_Bounds);
11812
   pragma Inline (Aliased_Present);
11813
   pragma Inline (All_Others);
11814
   pragma Inline (All_Present);
11815
   pragma Inline (Alternatives);
11816
   pragma Inline (Ancestor_Part);
11817
   pragma Inline (Atomic_Sync_Required);
11818
   pragma Inline (Array_Aggregate);
11819
   pragma Inline (Aspect_Rep_Item);
11820
   pragma Inline (Assignment_OK);
11821
   pragma Inline (Associated_Node);
11822
   pragma Inline (At_End_Proc);
11823
   pragma Inline (Attribute_Name);
11824
   pragma Inline (Aux_Decls_Node);
11825
   pragma Inline (Backwards_OK);
11826
   pragma Inline (Bad_Is_Detected);
11827
   pragma Inline (Body_To_Inline);
11828
   pragma Inline (Body_Required);
11829
   pragma Inline (By_Ref);
11830
   pragma Inline (Box_Present);
11831
   pragma Inline (Char_Literal_Value);
11832
   pragma Inline (Chars);
11833
   pragma Inline (Check_Address_Alignment);
11834
   pragma Inline (Choice_Parameter);
11835
   pragma Inline (Choices);
11836
   pragma Inline (Class_Present);
11837
   pragma Inline (Comes_From_Extended_Return_Statement);
11838
   pragma Inline (Compile_Time_Known_Aggregate);
11839
   pragma Inline (Component_Associations);
11840
   pragma Inline (Component_Clauses);
11841
   pragma Inline (Component_Definition);
11842
   pragma Inline (Component_Items);
11843
   pragma Inline (Component_List);
11844
   pragma Inline (Component_Name);
11845
   pragma Inline (Componentwise_Assignment);
11846
   pragma Inline (Condition);
11847
   pragma Inline (Condition_Actions);
11848
   pragma Inline (Config_Pragmas);
11849
   pragma Inline (Constant_Present);
11850
   pragma Inline (Constraint);
11851
   pragma Inline (Constraints);
11852
   pragma Inline (Context_Installed);
11853
   pragma Inline (Context_Items);
11854
   pragma Inline (Context_Pending);
11855
   pragma Inline (Controlling_Argument);
11856
   pragma Inline (Conversion_OK);
11857
   pragma Inline (Corresponding_Aspect);
11858
   pragma Inline (Corresponding_Body);
11859
   pragma Inline (Corresponding_Formal_Spec);
11860
   pragma Inline (Corresponding_Generic_Association);
11861
   pragma Inline (Corresponding_Integer_Value);
11862
   pragma Inline (Corresponding_Spec);
11863
   pragma Inline (Corresponding_Stub);
11864
   pragma Inline (Dcheck_Function);
11865
   pragma Inline (Declarations);
11866
   pragma Inline (Default_Expression);
11867
   pragma Inline (Default_Storage_Pool);
11868
   pragma Inline (Default_Name);
11869
   pragma Inline (Defining_Identifier);
11870
   pragma Inline (Defining_Unit_Name);
11871
   pragma Inline (Delay_Alternative);
11872
   pragma Inline (Delay_Statement);
11873
   pragma Inline (Delta_Expression);
11874
   pragma Inline (Digits_Expression);
11875
   pragma Inline (Discr_Check_Funcs_Built);
11876
   pragma Inline (Discrete_Choices);
11877
   pragma Inline (Discrete_Range);
11878
   pragma Inline (Discrete_Subtype_Definition);
11879
   pragma Inline (Discrete_Subtype_Definitions);
11880
   pragma Inline (Discriminant_Specifications);
11881
   pragma Inline (Discriminant_Type);
11882
   pragma Inline (Do_Accessibility_Check);
11883
   pragma Inline (Do_Discriminant_Check);
11884
   pragma Inline (Do_Length_Check);
11885
   pragma Inline (Do_Division_Check);
11886
   pragma Inline (Do_Overflow_Check);
11887
   pragma Inline (Do_Range_Check);
11888
   pragma Inline (Do_Storage_Check);
11889
   pragma Inline (Do_Tag_Check);
11890
   pragma Inline (Elaborate_Present);
11891
   pragma Inline (Elaborate_All_Desirable);
11892
   pragma Inline (Elaborate_All_Present);
11893
   pragma Inline (Elaborate_Desirable);
11894
   pragma Inline (Elaboration_Boolean);
11895
   pragma Inline (Else_Actions);
11896
   pragma Inline (Else_Statements);
11897
   pragma Inline (Elsif_Parts);
11898
   pragma Inline (Enclosing_Variant);
11899
   pragma Inline (End_Label);
11900
   pragma Inline (End_Span);
11901
   pragma Inline (Entity);
11902
   pragma Inline (Entity_Or_Associated_Node);
11903
   pragma Inline (Entry_Body_Formal_Part);
11904
   pragma Inline (Entry_Call_Alternative);
11905
   pragma Inline (Entry_Call_Statement);
11906
   pragma Inline (Entry_Direct_Name);
11907
   pragma Inline (Entry_Index);
11908
   pragma Inline (Entry_Index_Specification);
11909
   pragma Inline (Etype);
11910
   pragma Inline (Exception_Choices);
11911
   pragma Inline (Exception_Handlers);
11912
   pragma Inline (Exception_Junk);
11913
   pragma Inline (Exception_Label);
11914
   pragma Inline (Expansion_Delayed);
11915
   pragma Inline (Explicit_Actual_Parameter);
11916
   pragma Inline (Explicit_Generic_Actual_Parameter);
11917
   pragma Inline (Expression);
11918
   pragma Inline (Expressions);
11919
   pragma Inline (First_Bit);
11920
   pragma Inline (First_Inlined_Subprogram);
11921
   pragma Inline (First_Name);
11922
   pragma Inline (First_Named_Actual);
11923
   pragma Inline (First_Real_Statement);
11924
   pragma Inline (First_Subtype_Link);
11925
   pragma Inline (Float_Truncate);
11926
   pragma Inline (Formal_Type_Definition);
11927
   pragma Inline (Forwards_OK);
11928
   pragma Inline (From_Aspect_Specification);
11929
   pragma Inline (From_At_End);
11930
   pragma Inline (From_At_Mod);
11931
   pragma Inline (From_Default);
11932
   pragma Inline (Generic_Associations);
11933
   pragma Inline (Generic_Formal_Declarations);
11934
   pragma Inline (Generic_Parent);
11935
   pragma Inline (Generic_Parent_Type);
11936
   pragma Inline (Handled_Statement_Sequence);
11937
   pragma Inline (Handler_List_Entry);
11938
   pragma Inline (Has_Created_Identifier);
11939
   pragma Inline (Has_Dynamic_Length_Check);
11940
   pragma Inline (Has_Dynamic_Range_Check);
11941
   pragma Inline (Has_Init_Expression);
11942
   pragma Inline (Has_Local_Raise);
11943
   pragma Inline (Has_Self_Reference);
11944
   pragma Inline (Has_No_Elaboration_Code);
11945
   pragma Inline (Has_Pragma_CPU);
11946
   pragma Inline (Has_Pragma_Dispatching_Domain);
11947
   pragma Inline (Has_Pragma_Priority);
11948
   pragma Inline (Has_Pragma_Suppress_All);
11949
   pragma Inline (Has_Private_View);
11950
   pragma Inline (Has_Relative_Deadline_Pragma);
11951
   pragma Inline (Has_Storage_Size_Pragma);
11952
   pragma Inline (Has_Task_Info_Pragma);
11953
   pragma Inline (Has_Task_Name_Pragma);
11954
   pragma Inline (Has_Wide_Character);
11955
   pragma Inline (Has_Wide_Wide_Character);
11956
   pragma Inline (Header_Size_Added);
11957
   pragma Inline (Hidden_By_Use_Clause);
11958
   pragma Inline (High_Bound);
11959
   pragma Inline (Identifier);
11960
   pragma Inline (Implicit_With);
11961
   pragma Inline (Interface_List);
11962
   pragma Inline (Interface_Present);
11963
   pragma Inline (Includes_Infinities);
11964
   pragma Inline (Import_Interface_Present);
11965
   pragma Inline (In_Present);
11966
   pragma Inline (Inherited_Discriminant);
11967
   pragma Inline (Instance_Spec);
11968
   pragma Inline (Intval);
11969
   pragma Inline (Iterator_Specification);
11970
   pragma Inline (Is_Accessibility_Actual);
11971
   pragma Inline (Is_Asynchronous_Call_Block);
11972
   pragma Inline (Is_Boolean_Aspect);
11973
   pragma Inline (Is_Component_Left_Opnd);
11974
   pragma Inline (Is_Component_Right_Opnd);
11975
   pragma Inline (Is_Controlling_Actual);
11976
   pragma Inline (Is_Delayed_Aspect);
11977
   pragma Inline (Is_Dynamic_Coextension);
11978
   pragma Inline (Is_Elsif);
11979
   pragma Inline (Is_Entry_Barrier_Function);
11980
   pragma Inline (Is_Expanded_Build_In_Place_Call);
11981
   pragma Inline (Is_Folded_In_Parser);
11982
   pragma Inline (Is_In_Discriminant_Check);
11983
   pragma Inline (Is_Machine_Number);
11984
   pragma Inline (Is_Null_Loop);
11985
   pragma Inline (Is_Overloaded);
11986
   pragma Inline (Is_Power_Of_2_For_Shift);
11987
   pragma Inline (Is_Prefixed_Call);
11988
   pragma Inline (Is_Protected_Subprogram_Body);
11989
   pragma Inline (Is_Static_Coextension);
11990
   pragma Inline (Is_Static_Expression);
11991
   pragma Inline (Is_Subprogram_Descriptor);
11992
   pragma Inline (Is_Task_Allocation_Block);
11993
   pragma Inline (Is_Task_Master);
11994
   pragma Inline (Iteration_Scheme);
11995
   pragma Inline (Itype);
11996
   pragma Inline (Kill_Range_Check);
11997
   pragma Inline (Last_Bit);
11998
   pragma Inline (Last_Name);
11999
   pragma Inline (Library_Unit);
12000
   pragma Inline (Label_Construct);
12001
   pragma Inline (Left_Opnd);
12002
   pragma Inline (Limited_View_Installed);
12003
   pragma Inline (Limited_Present);
12004
   pragma Inline (Literals);
12005
   pragma Inline (Local_Raise_Not_OK);
12006
   pragma Inline (Local_Raise_Statements);
12007
   pragma Inline (Loop_Actions);
12008
   pragma Inline (Loop_Parameter_Specification);
12009
   pragma Inline (Low_Bound);
12010
   pragma Inline (Mod_Clause);
12011
   pragma Inline (More_Ids);
12012
   pragma Inline (Must_Be_Byte_Aligned);
12013
   pragma Inline (Must_Not_Freeze);
12014
   pragma Inline (Must_Not_Override);
12015
   pragma Inline (Must_Override);
12016
   pragma Inline (Name);
12017
   pragma Inline (Names);
12018
   pragma Inline (Next_Entity);
12019
   pragma Inline (Next_Exit_Statement);
12020
   pragma Inline (Next_Implicit_With);
12021
   pragma Inline (Next_Named_Actual);
12022
   pragma Inline (Next_Pragma);
12023
   pragma Inline (Next_Rep_Item);
12024
   pragma Inline (Next_Use_Clause);
12025
   pragma Inline (No_Ctrl_Actions);
12026
   pragma Inline (No_Elaboration_Check);
12027
   pragma Inline (No_Entities_Ref_In_Spec);
12028
   pragma Inline (No_Initialization);
12029
   pragma Inline (No_Truncation);
12030
   pragma Inline (Null_Present);
12031
   pragma Inline (Null_Exclusion_Present);
12032
   pragma Inline (Null_Exclusion_In_Return_Present);
12033
   pragma Inline (Null_Record_Present);
12034
   pragma Inline (Object_Definition);
12035
   pragma Inline (Of_Present);
12036
   pragma Inline (Original_Discriminant);
12037
   pragma Inline (Original_Entity);
12038
   pragma Inline (Others_Discrete_Choices);
12039
   pragma Inline (Out_Present);
12040
   pragma Inline (Parameter_Associations);
12041
   pragma Inline (Parameter_Specifications);
12042
   pragma Inline (Parameter_List_Truncated);
12043
   pragma Inline (Parameter_Type);
12044
   pragma Inline (Parent_Spec);
12045
   pragma Inline (Position);
12046
   pragma Inline (Pragma_Argument_Associations);
12047
   pragma Inline (Pragma_Identifier);
12048
   pragma Inline (Pragmas_After);
12049
   pragma Inline (Pragmas_Before);
12050
   pragma Inline (Prefix);
12051
   pragma Inline (Premature_Use);
12052
   pragma Inline (Present_Expr);
12053
   pragma Inline (Prev_Ids);
12054
   pragma Inline (Print_In_Hex);
12055
   pragma Inline (Private_Declarations);
12056
   pragma Inline (Private_Present);
12057
   pragma Inline (Procedure_To_Call);
12058
   pragma Inline (Proper_Body);
12059
   pragma Inline (Protected_Definition);
12060
   pragma Inline (Protected_Present);
12061
   pragma Inline (Raises_Constraint_Error);
12062
   pragma Inline (Range_Constraint);
12063
   pragma Inline (Range_Expression);
12064
   pragma Inline (Real_Range_Specification);
12065
   pragma Inline (Realval);
12066
   pragma Inline (Reason);
12067
   pragma Inline (Record_Extension_Part);
12068
   pragma Inline (Redundant_Use);
12069
   pragma Inline (Renaming_Exception);
12070
   pragma Inline (Result_Definition);
12071
   pragma Inline (Return_Object_Declarations);
12072
   pragma Inline (Return_Statement_Entity);
12073
   pragma Inline (Reverse_Present);
12074
   pragma Inline (Right_Opnd);
12075
   pragma Inline (Rounded_Result);
12076
   pragma Inline (SCIL_Controlling_Tag);
12077
   pragma Inline (SCIL_Entity);
12078
   pragma Inline (SCIL_Tag_Value);
12079
   pragma Inline (SCIL_Target_Prim);
12080
   pragma Inline (Scope);
12081
   pragma Inline (Select_Alternatives);
12082
   pragma Inline (Selector_Name);
12083
   pragma Inline (Selector_Names);
12084
   pragma Inline (Shift_Count_OK);
12085
   pragma Inline (Source_Type);
12086
   pragma Inline (Spec_PPC_List);
12087
   pragma Inline (Spec_TC_List);
12088
   pragma Inline (Specification);
12089
   pragma Inline (Split_PPC);
12090
   pragma Inline (Statements);
12091
   pragma Inline (Static_Processing_OK);
12092
   pragma Inline (Storage_Pool);
12093
   pragma Inline (Subpool_Handle_Name);
12094
   pragma Inline (Strval);
12095
   pragma Inline (Subtype_Indication);
12096
   pragma Inline (Subtype_Mark);
12097
   pragma Inline (Subtype_Marks);
12098
   pragma Inline (Suppress_Assignment_Checks);
12099
   pragma Inline (Suppress_Loop_Warnings);
12100
   pragma Inline (Synchronized_Present);
12101
   pragma Inline (Tagged_Present);
12102
   pragma Inline (Target_Type);
12103
   pragma Inline (Task_Definition);
12104
   pragma Inline (Task_Present);
12105
   pragma Inline (Then_Actions);
12106
   pragma Inline (Then_Statements);
12107
   pragma Inline (Triggering_Alternative);
12108
   pragma Inline (Triggering_Statement);
12109
   pragma Inline (Treat_Fixed_As_Integer);
12110
   pragma Inline (TSS_Elist);
12111
   pragma Inline (Type_Definition);
12112
   pragma Inline (Unit);
12113
   pragma Inline (Unknown_Discriminants_Present);
12114
   pragma Inline (Unreferenced_In_Spec);
12115
   pragma Inline (Variant_Part);
12116
   pragma Inline (Variants);
12117
   pragma Inline (Visible_Declarations);
12118
   pragma Inline (Used_Operations);
12119
   pragma Inline (Was_Originally_Stub);
12120
   pragma Inline (Withed_Body);
12121
 
12122
   pragma Inline (Set_ABE_Is_Certain);
12123
   pragma Inline (Set_Abort_Present);
12124
   pragma Inline (Set_Abortable_Part);
12125
   pragma Inline (Set_Abstract_Present);
12126
   pragma Inline (Set_Accept_Handler_Records);
12127
   pragma Inline (Set_Accept_Statement);
12128
   pragma Inline (Set_Access_Definition);
12129
   pragma Inline (Set_Access_To_Subprogram_Definition);
12130
   pragma Inline (Set_Access_Types_To_Process);
12131
   pragma Inline (Set_Actions);
12132
   pragma Inline (Set_Activation_Chain_Entity);
12133
   pragma Inline (Set_Acts_As_Spec);
12134
   pragma Inline (Set_Actual_Designated_Subtype);
12135
   pragma Inline (Set_Address_Warning_Posted);
12136
   pragma Inline (Set_Aggregate_Bounds);
12137
   pragma Inline (Set_Aliased_Present);
12138
   pragma Inline (Set_All_Others);
12139
   pragma Inline (Set_All_Present);
12140
   pragma Inline (Set_Alternatives);
12141
   pragma Inline (Set_Ancestor_Part);
12142
   pragma Inline (Set_Atomic_Sync_Required);
12143
   pragma Inline (Set_Array_Aggregate);
12144
   pragma Inline (Set_Aspect_Rep_Item);
12145
   pragma Inline (Set_Assignment_OK);
12146
   pragma Inline (Set_Associated_Node);
12147
   pragma Inline (Set_At_End_Proc);
12148
   pragma Inline (Set_Attribute_Name);
12149
   pragma Inline (Set_Aux_Decls_Node);
12150
   pragma Inline (Set_Backwards_OK);
12151
   pragma Inline (Set_Bad_Is_Detected);
12152
   pragma Inline (Set_Body_To_Inline);
12153
   pragma Inline (Set_Body_Required);
12154
   pragma Inline (Set_By_Ref);
12155
   pragma Inline (Set_Box_Present);
12156
   pragma Inline (Set_Char_Literal_Value);
12157
   pragma Inline (Set_Chars);
12158
   pragma Inline (Set_Check_Address_Alignment);
12159
   pragma Inline (Set_Choice_Parameter);
12160
   pragma Inline (Set_Choices);
12161
   pragma Inline (Set_Class_Present);
12162
   pragma Inline (Set_Comes_From_Extended_Return_Statement);
12163
   pragma Inline (Set_Compile_Time_Known_Aggregate);
12164
   pragma Inline (Set_Component_Associations);
12165
   pragma Inline (Set_Component_Clauses);
12166
   pragma Inline (Set_Component_Definition);
12167
   pragma Inline (Set_Component_Items);
12168
   pragma Inline (Set_Component_List);
12169
   pragma Inline (Set_Component_Name);
12170
   pragma Inline (Set_Componentwise_Assignment);
12171
   pragma Inline (Set_Condition);
12172
   pragma Inline (Set_Condition_Actions);
12173
   pragma Inline (Set_Config_Pragmas);
12174
   pragma Inline (Set_Constant_Present);
12175
   pragma Inline (Set_Constraint);
12176
   pragma Inline (Set_Constraints);
12177
   pragma Inline (Set_Context_Installed);
12178
   pragma Inline (Set_Context_Items);
12179
   pragma Inline (Set_Context_Pending);
12180
   pragma Inline (Set_Controlling_Argument);
12181
   pragma Inline (Set_Conversion_OK);
12182
   pragma Inline (Set_Corresponding_Aspect);
12183
   pragma Inline (Set_Corresponding_Body);
12184
   pragma Inline (Set_Corresponding_Formal_Spec);
12185
   pragma Inline (Set_Corresponding_Generic_Association);
12186
   pragma Inline (Set_Corresponding_Integer_Value);
12187
   pragma Inline (Set_Corresponding_Spec);
12188
   pragma Inline (Set_Corresponding_Stub);
12189
   pragma Inline (Set_Dcheck_Function);
12190
   pragma Inline (Set_Declarations);
12191
   pragma Inline (Set_Default_Expression);
12192
   pragma Inline (Set_Default_Storage_Pool);
12193
   pragma Inline (Set_Default_Name);
12194
   pragma Inline (Set_Defining_Identifier);
12195
   pragma Inline (Set_Defining_Unit_Name);
12196
   pragma Inline (Set_Delay_Alternative);
12197
   pragma Inline (Set_Delay_Statement);
12198
   pragma Inline (Set_Delta_Expression);
12199
   pragma Inline (Set_Digits_Expression);
12200
   pragma Inline (Set_Discr_Check_Funcs_Built);
12201
   pragma Inline (Set_Discrete_Choices);
12202
   pragma Inline (Set_Discrete_Range);
12203
   pragma Inline (Set_Discrete_Subtype_Definition);
12204
   pragma Inline (Set_Discrete_Subtype_Definitions);
12205
   pragma Inline (Set_Discriminant_Specifications);
12206
   pragma Inline (Set_Discriminant_Type);
12207
   pragma Inline (Set_Do_Accessibility_Check);
12208
   pragma Inline (Set_Do_Discriminant_Check);
12209
   pragma Inline (Set_Do_Length_Check);
12210
   pragma Inline (Set_Do_Division_Check);
12211
   pragma Inline (Set_Do_Overflow_Check);
12212
   pragma Inline (Set_Do_Range_Check);
12213
   pragma Inline (Set_Do_Storage_Check);
12214
   pragma Inline (Set_Do_Tag_Check);
12215
   pragma Inline (Set_Elaborate_Present);
12216
   pragma Inline (Set_Elaborate_All_Desirable);
12217
   pragma Inline (Set_Elaborate_All_Present);
12218
   pragma Inline (Set_Elaborate_Desirable);
12219
   pragma Inline (Set_Elaboration_Boolean);
12220
   pragma Inline (Set_Else_Actions);
12221
   pragma Inline (Set_Else_Statements);
12222
   pragma Inline (Set_Elsif_Parts);
12223
   pragma Inline (Set_Enclosing_Variant);
12224
   pragma Inline (Set_End_Label);
12225
   pragma Inline (Set_End_Span);
12226
   pragma Inline (Set_Entity);
12227
   pragma Inline (Set_Entry_Body_Formal_Part);
12228
   pragma Inline (Set_Entry_Call_Alternative);
12229
   pragma Inline (Set_Entry_Call_Statement);
12230
   pragma Inline (Set_Entry_Direct_Name);
12231
   pragma Inline (Set_Entry_Index);
12232
   pragma Inline (Set_Entry_Index_Specification);
12233
   pragma Inline (Set_Etype);
12234
   pragma Inline (Set_Exception_Choices);
12235
   pragma Inline (Set_Exception_Handlers);
12236
   pragma Inline (Set_Exception_Junk);
12237
   pragma Inline (Set_Exception_Label);
12238
   pragma Inline (Set_Expansion_Delayed);
12239
   pragma Inline (Set_Explicit_Actual_Parameter);
12240
   pragma Inline (Set_Explicit_Generic_Actual_Parameter);
12241
   pragma Inline (Set_Expression);
12242
   pragma Inline (Set_Expressions);
12243
   pragma Inline (Set_First_Bit);
12244
   pragma Inline (Set_First_Inlined_Subprogram);
12245
   pragma Inline (Set_First_Name);
12246
   pragma Inline (Set_First_Named_Actual);
12247
   pragma Inline (Set_First_Real_Statement);
12248
   pragma Inline (Set_First_Subtype_Link);
12249
   pragma Inline (Set_Float_Truncate);
12250
   pragma Inline (Set_Formal_Type_Definition);
12251
   pragma Inline (Set_Forwards_OK);
12252
   pragma Inline (Set_From_Aspect_Specification);
12253
   pragma Inline (Set_From_At_End);
12254
   pragma Inline (Set_From_At_Mod);
12255
   pragma Inline (Set_From_Default);
12256
   pragma Inline (Set_Generic_Associations);
12257
   pragma Inline (Set_Generic_Formal_Declarations);
12258
   pragma Inline (Set_Generic_Parent);
12259
   pragma Inline (Set_Generic_Parent_Type);
12260
   pragma Inline (Set_Handled_Statement_Sequence);
12261
   pragma Inline (Set_Handler_List_Entry);
12262
   pragma Inline (Set_Has_Created_Identifier);
12263
   pragma Inline (Set_Has_Dynamic_Length_Check);
12264
   pragma Inline (Set_Has_Init_Expression);
12265
   pragma Inline (Set_Has_Local_Raise);
12266
   pragma Inline (Set_Has_Dynamic_Range_Check);
12267
   pragma Inline (Set_Has_No_Elaboration_Code);
12268
   pragma Inline (Set_Has_Pragma_CPU);
12269
   pragma Inline (Set_Has_Pragma_Dispatching_Domain);
12270
   pragma Inline (Set_Has_Pragma_Priority);
12271
   pragma Inline (Set_Has_Pragma_Suppress_All);
12272
   pragma Inline (Set_Has_Private_View);
12273
   pragma Inline (Set_Has_Relative_Deadline_Pragma);
12274
   pragma Inline (Set_Has_Storage_Size_Pragma);
12275
   pragma Inline (Set_Has_Task_Info_Pragma);
12276
   pragma Inline (Set_Has_Task_Name_Pragma);
12277
   pragma Inline (Set_Has_Wide_Character);
12278
   pragma Inline (Set_Has_Wide_Wide_Character);
12279
   pragma Inline (Set_Header_Size_Added);
12280
   pragma Inline (Set_Hidden_By_Use_Clause);
12281
   pragma Inline (Set_High_Bound);
12282
   pragma Inline (Set_Identifier);
12283
   pragma Inline (Set_Implicit_With);
12284
   pragma Inline (Set_Includes_Infinities);
12285
   pragma Inline (Set_Interface_List);
12286
   pragma Inline (Set_Interface_Present);
12287
   pragma Inline (Set_Import_Interface_Present);
12288
   pragma Inline (Set_In_Present);
12289
   pragma Inline (Set_Inherited_Discriminant);
12290
   pragma Inline (Set_Instance_Spec);
12291
   pragma Inline (Set_Intval);
12292
   pragma Inline (Set_Iterator_Specification);
12293
   pragma Inline (Set_Is_Accessibility_Actual);
12294
   pragma Inline (Set_Is_Asynchronous_Call_Block);
12295
   pragma Inline (Set_Is_Boolean_Aspect);
12296
   pragma Inline (Set_Is_Component_Left_Opnd);
12297
   pragma Inline (Set_Is_Component_Right_Opnd);
12298
   pragma Inline (Set_Is_Controlling_Actual);
12299
   pragma Inline (Set_Is_Delayed_Aspect);
12300
   pragma Inline (Set_Is_Dynamic_Coextension);
12301
   pragma Inline (Set_Is_Elsif);
12302
   pragma Inline (Set_Is_Entry_Barrier_Function);
12303
   pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
12304
   pragma Inline (Set_Is_Folded_In_Parser);
12305
   pragma Inline (Set_Is_In_Discriminant_Check);
12306
   pragma Inline (Set_Is_Machine_Number);
12307
   pragma Inline (Set_Is_Null_Loop);
12308
   pragma Inline (Set_Is_Overloaded);
12309
   pragma Inline (Set_Is_Power_Of_2_For_Shift);
12310
   pragma Inline (Set_Is_Prefixed_Call);
12311
   pragma Inline (Set_Is_Protected_Subprogram_Body);
12312
   pragma Inline (Set_Has_Self_Reference);
12313
   pragma Inline (Set_Is_Static_Coextension);
12314
   pragma Inline (Set_Is_Static_Expression);
12315
   pragma Inline (Set_Is_Subprogram_Descriptor);
12316
   pragma Inline (Set_Is_Task_Allocation_Block);
12317
   pragma Inline (Set_Is_Task_Master);
12318
   pragma Inline (Set_Iteration_Scheme);
12319
   pragma Inline (Set_Itype);
12320
   pragma Inline (Set_Kill_Range_Check);
12321
   pragma Inline (Set_Last_Bit);
12322
   pragma Inline (Set_Last_Name);
12323
   pragma Inline (Set_Library_Unit);
12324
   pragma Inline (Set_Label_Construct);
12325
   pragma Inline (Set_Left_Opnd);
12326
   pragma Inline (Set_Limited_View_Installed);
12327
   pragma Inline (Set_Limited_Present);
12328
   pragma Inline (Set_Literals);
12329
   pragma Inline (Set_Local_Raise_Not_OK);
12330
   pragma Inline (Set_Local_Raise_Statements);
12331
   pragma Inline (Set_Loop_Actions);
12332
   pragma Inline (Set_Loop_Parameter_Specification);
12333
   pragma Inline (Set_Low_Bound);
12334
   pragma Inline (Set_Mod_Clause);
12335
   pragma Inline (Set_More_Ids);
12336
   pragma Inline (Set_Must_Be_Byte_Aligned);
12337
   pragma Inline (Set_Must_Not_Freeze);
12338
   pragma Inline (Set_Must_Not_Override);
12339
   pragma Inline (Set_Must_Override);
12340
   pragma Inline (Set_Name);
12341
   pragma Inline (Set_Names);
12342
   pragma Inline (Set_Next_Entity);
12343
   pragma Inline (Set_Next_Exit_Statement);
12344
   pragma Inline (Set_Next_Implicit_With);
12345
   pragma Inline (Set_Next_Named_Actual);
12346
   pragma Inline (Set_Next_Pragma);
12347
   pragma Inline (Set_Next_Rep_Item);
12348
   pragma Inline (Set_Next_Use_Clause);
12349
   pragma Inline (Set_No_Ctrl_Actions);
12350
   pragma Inline (Set_No_Elaboration_Check);
12351
   pragma Inline (Set_No_Entities_Ref_In_Spec);
12352
   pragma Inline (Set_No_Initialization);
12353
   pragma Inline (Set_No_Truncation);
12354
   pragma Inline (Set_Null_Present);
12355
   pragma Inline (Set_Null_Exclusion_Present);
12356
   pragma Inline (Set_Null_Exclusion_In_Return_Present);
12357
   pragma Inline (Set_Null_Record_Present);
12358
   pragma Inline (Set_Object_Definition);
12359
   pragma Inline (Set_Of_Present);
12360
   pragma Inline (Set_Original_Discriminant);
12361
   pragma Inline (Set_Original_Entity);
12362
   pragma Inline (Set_Others_Discrete_Choices);
12363
   pragma Inline (Set_Out_Present);
12364
   pragma Inline (Set_Parameter_Associations);
12365
   pragma Inline (Set_Parameter_Specifications);
12366
   pragma Inline (Set_Parameter_List_Truncated);
12367
   pragma Inline (Set_Parameter_Type);
12368
   pragma Inline (Set_Parent_Spec);
12369
   pragma Inline (Set_Position);
12370
   pragma Inline (Set_Pragma_Argument_Associations);
12371
   pragma Inline (Set_Pragma_Identifier);
12372
   pragma Inline (Set_Pragmas_After);
12373
   pragma Inline (Set_Pragmas_Before);
12374
   pragma Inline (Set_Prefix);
12375
   pragma Inline (Set_Premature_Use);
12376
   pragma Inline (Set_Present_Expr);
12377
   pragma Inline (Set_Prev_Ids);
12378
   pragma Inline (Set_Print_In_Hex);
12379
   pragma Inline (Set_Private_Declarations);
12380
   pragma Inline (Set_Private_Present);
12381
   pragma Inline (Set_Procedure_To_Call);
12382
   pragma Inline (Set_Proper_Body);
12383
   pragma Inline (Set_Protected_Definition);
12384
   pragma Inline (Set_Protected_Present);
12385
   pragma Inline (Set_Raises_Constraint_Error);
12386
   pragma Inline (Set_Range_Constraint);
12387
   pragma Inline (Set_Range_Expression);
12388
   pragma Inline (Set_Real_Range_Specification);
12389
   pragma Inline (Set_Realval);
12390
   pragma Inline (Set_Reason);
12391
   pragma Inline (Set_Record_Extension_Part);
12392
   pragma Inline (Set_Redundant_Use);
12393
   pragma Inline (Set_Renaming_Exception);
12394
   pragma Inline (Set_Result_Definition);
12395
   pragma Inline (Set_Return_Object_Declarations);
12396
   pragma Inline (Set_Reverse_Present);
12397
   pragma Inline (Set_Right_Opnd);
12398
   pragma Inline (Set_Rounded_Result);
12399
   pragma Inline (Set_SCIL_Controlling_Tag);
12400
   pragma Inline (Set_SCIL_Entity);
12401
   pragma Inline (Set_SCIL_Tag_Value);
12402
   pragma Inline (Set_SCIL_Target_Prim);
12403
   pragma Inline (Set_Scope);
12404
   pragma Inline (Set_Select_Alternatives);
12405
   pragma Inline (Set_Selector_Name);
12406
   pragma Inline (Set_Selector_Names);
12407
   pragma Inline (Set_Shift_Count_OK);
12408
   pragma Inline (Set_Source_Type);
12409
   pragma Inline (Set_Spec_PPC_List);
12410
   pragma Inline (Set_Spec_TC_List);
12411
   pragma Inline (Set_Specification);
12412
   pragma Inline (Set_Split_PPC);
12413
   pragma Inline (Set_Statements);
12414
   pragma Inline (Set_Static_Processing_OK);
12415
   pragma Inline (Set_Storage_Pool);
12416
   pragma Inline (Set_Subpool_Handle_Name);
12417
   pragma Inline (Set_Strval);
12418
   pragma Inline (Set_Subtype_Indication);
12419
   pragma Inline (Set_Subtype_Mark);
12420
   pragma Inline (Set_Subtype_Marks);
12421
   pragma Inline (Set_Suppress_Assignment_Checks);
12422
   pragma Inline (Set_Suppress_Loop_Warnings);
12423
   pragma Inline (Set_Synchronized_Present);
12424
   pragma Inline (Set_Tagged_Present);
12425
   pragma Inline (Set_Target_Type);
12426
   pragma Inline (Set_Task_Definition);
12427
   pragma Inline (Set_Task_Present);
12428
   pragma Inline (Set_Then_Actions);
12429
   pragma Inline (Set_Then_Statements);
12430
   pragma Inline (Set_Triggering_Alternative);
12431
   pragma Inline (Set_Triggering_Statement);
12432
   pragma Inline (Set_Treat_Fixed_As_Integer);
12433
   pragma Inline (Set_TSS_Elist);
12434
   pragma Inline (Set_Type_Definition);
12435
   pragma Inline (Set_Unit);
12436
   pragma Inline (Set_Unknown_Discriminants_Present);
12437
   pragma Inline (Set_Unreferenced_In_Spec);
12438
   pragma Inline (Set_Variant_Part);
12439
   pragma Inline (Set_Variants);
12440
   pragma Inline (Set_Visible_Declarations);
12441
   pragma Inline (Set_Used_Operations);
12442
   pragma Inline (Set_Was_Originally_Stub);
12443
   pragma Inline (Set_Withed_Body);
12444
 
12445
   --------------
12446
   -- Synonyms --
12447
   --------------
12448
 
12449
   --  These synonyms are to aid in transition, they should eventually be
12450
   --  removed when all remaining references to the obsolete name are gone.
12451
 
12452
   N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
12453
   --  Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
12454
   --  should refer to N_Simple_Return_Statement.
12455
 
12456
   N_Parameterized_Expression : constant Node_Kind := N_Expression_Function;
12457
   --  Old name for expression functions (used during Ada 2012 transition)
12458
 
12459
end Sinfo;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.