OSDN Git Service

2005-11-14 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / sinfo.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                                S I N F O                                 --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
10 --                                                                          --
11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
12 -- terms of the  GNU General Public License as published  by the Free Soft- --
13 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
17 -- for  more details.  You should have  received  a copy of the GNU General --
18 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
19 -- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
20 -- Boston, MA 02110-1301, USA.                                              --
21 --                                                                          --
22 -- As a special exception,  if other files  instantiate  generics from this --
23 -- unit, or you link  this unit with other files  to produce an executable, --
24 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
25 -- covered  by the  GNU  General  Public  License.  This exception does not --
26 -- however invalidate  any other reasons why  the executable file  might be --
27 -- covered by the  GNU Public License.                                      --
28 --                                                                          --
29 -- GNAT was originally developed  by the GNAT team at  New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
31 --                                                                          --
32 ------------------------------------------------------------------------------
33
34 --  This package defines the structure of the abstract syntax tree. The Tree
35 --  package provides a basic tree structure. Sinfo describes how this
36 --  structure is used to represent the syntax of an Ada program.
37
38 --  Note: the grammar used here is taken from Version 5.95 of the RM, dated
39 --  November 1994. The grammar in the RM is followed very closely in the tree
40 --  design, and is repeated as part of this source file.
41
42 --  The tree contains not only the full syntactic representation of the
43 --  program, but also the results of semantic analysis. In particular, the
44 --  nodes for defining identifiers, defining character literals and defining
45 --  operator symbols, collectively referred to as entities, represent what
46 --  would normally be regarded as the symbol table information. In addition
47 --  a number of the tree nodes contain semantic information.
48
49 --  WARNING: There is a C version of this package. Any changes to this
50 --  source file must be properly reflected in this C header file sinfo.h
51 --  which is created automatically from sinfo.ads using xsinfo.adb.
52
53 with Types;  use Types;
54 with Uintp;  use Uintp;
55 with Urealp; use Urealp;
56
57 package Sinfo is
58
59    ---------------------------------
60    -- Making Changes to This File --
61    ---------------------------------
62
63    --  If changes are made to this file, a number of related steps must be
64    --  carried out to ensure consistency. First, if a field access function
65    --  is added, it appears in seven places:
66
67    --    The documentation associated with the node
68    --    The spec of the access function in sinfo.ads
69    --    The body of the access function in sinfo.adb
70    --    The pragma Inline at the end of sinfo.ads for the access function
71    --    The spec of the set procedure in sinfo.ads
72    --    The body of the set procedure in sinfo.adb
73    --    The pragma Inline at the end of sinfo.ads for the set procedure
74
75    --  The field chosen must be consistent in all places, and, for a node
76    --  that is a subexpression, must not overlap any of the standard
77    --  expression fields.
78
79    --  In addition, if any of the standard expression fields is changed, then
80    --  the utiliy program which creates the Treeprs spec (in file treeprs.ads)
81    --  must be updated appropriately, since it special cases expression fields.
82
83    --  If a new tree node is added, then the following changes are made
84
85    --    Add it to the documentation in the appropriate place
86    --    Add its fields to this documentation section
87    --    Define it in the appropriate classification in Node_Kind
88    --    In the body (sinfo), add entries to the access functions for all
89    --     its fields (except standard expression fields) to include the new
90    --     node in the checks.
91    --    Add an appropriate section to the case statement in sprint.adb
92    --    Add an appropriate section to the case statement in sem.adb
93    --    Add an appropriate section to the case statement in exp_util.adb
94    --     (Insert_Actions procedure)
95    --    For a subexpression, add an appropriate section to the case
96    --     statement in sem_eval.adb
97    --    For a subexpression, add an appropriate section to the case
98    --     statement in sem_res.adb
99
100    --  Finally, four utility programs must be run:
101
102    --    Run CSinfo to check that you have made the changes consistently.
103    --     It checks most of the rules given above, with clear error messages.
104    --     This utility reads sinfo.ads and sinfo.adb and generates a report
105    --     to standard output.
106
107    --    Run XSinfo to create a-sinfo.h, the corresponding C header. This
108    --     utility reads sinfo.ads and generates a-sinfo.h. Note that it
109    --     does not need to read sinfo.adb, since the contents of the body
110    --     are algorithmically determinable from the spec.
111
112    --    Run XTreeprs to create treeprs.ads, an updated version of
113    --     the module that is used to drive the tree print routine. This
114    --     utility reads (but does not modify) treeprs.adt, the template
115    --     that provides the basic structure of the file, and then fills
116    --     in the data from the comments in sinfo.ads.
117
118    --    Run XNmake to create nmake.ads and nmake.adb, the package body
119    --     and spec of the Nmake package which contains functions for
120    --     constructing nodes.
121
122    --  Note: sometime we could write a utility that actually generated the
123    --  body of sinfo from the spec instead of simply checking it, since, as
124    --  noted above, the contents of the body can be determined from the spec.
125
126    --------------------------------
127    -- Implicit Nodes in the Tree --
128    --------------------------------
129
130    --  Generally the structure of the tree very closely follows the grammar
131    --  as defined in the RM. However, certain nodes are omitted to save
132    --  space and simplify semantic processing. Two general classes of such
133    --  omitted nodes are as follows:
134
135    --   If the only possibilities for a non-terminal are one or more other
136    --   non terminals (i.e. the rule is a "skinny" rule), then usually the
137    --   corresponding node is omitted from the tree, and the target construct
138    --   appears directly. For example, a real type definition is either a
139    --   floating point definition or a fixed point definition. No explicit
140    --   node appears for real type definition. Instead either the floating
141    --   point definition or fixed point definition appears directly.
142
143    --   If a non-terminal corresponds to a list of some other non-terminal
144    --   (possibly with separating punctuation), then usually it is omitted
145    --   from the tree, and a list of components appears instead. For
146    --   example, sequence of statements does not appear explicitly in the
147    --   tree. Instead a list of statements appears directly.
148
149    --  Some additional cases of omitted nodes occur and are documented
150    --  individually. In particular, many nodes are omitted in the tree
151    --  generated for an expression.
152
153    -------------------------------------------
154    -- Handling of Defining Identifier Lists --
155    -------------------------------------------
156
157    --  In several declarative forms in the syntax, lists of defining
158    --  identifiers appear (object declarations, component declarations,
159    --  number declarations etc.)
160
161    --  The semantics of such statements are equivalent to a series of
162    --  identical declarations of single defining identifiers (except that
163    --  conformance checks require the same grouping of identifiers in the
164    --  parameter case).
165
166    --  To simplify semantic processing, the parser breaks down such multiple
167    --  declaration cases into sequences of single declarations, duplicating
168    --  type and initialization information as required. The flags More_Ids
169    --  and Prev_Ids are used to record the original form of the source in
170    --  the case where the original source used a list of names, More_Ids
171    --  being set on all but the last name and Prev_Ids being set on all
172    --  but the first name. These flags are used to reconstruct the original
173    --  source (e.g. in the Sprint package), and also are included in the
174    --  conformance checks, but otherwise have no semantic significance.
175
176    --  Note: the reason that we use More_Ids and Prev_Ids rather than
177    --  First_Name and Last_Name flags is so that the flags are off in the
178    --  normal one identifier case, which minimizes tree print output.
179
180    -----------------------
181    -- Use of Node Lists --
182    -----------------------
183
184    --  With a few exceptions, if a construction of the form {non-terminal}
185    --  appears in the tree, lists are used in the corresponding tree node
186    --  (see package Nlists for handling of node lists). In this case a field
187    --  of the parent node points to a list of nodes for the non-terminal. The
188    --  field name for such fields has a plural name which always ends in "s".
189    --  For example, a case statement has a field Alternatives pointing to a
190    --  list of case statement alternative nodes.
191
192    --  Only fields pointing to lists have names ending in "s", so generally
193    --  the structure is strongly typed, fields not ending in s point to
194    --  single nodes, and fields ending in s point to lists.
195
196    --  The following example shows how a traversal of a list is written. We
197    --  suppose here that Stmt points to a N_Case_Statement node which has
198    --  a list field called Alternatives:
199
200    --   Alt := First (Alternatives (Stmt));
201    --   while Present (Alt) loop
202    --      ..
203    --      -- processing for case statement alternative Alt
204    --      ..
205    --      Alt := Next (Alt);
206    --   end loop;
207
208    --  The Present function tests for Empty, which in this case signals the
209    --  end of the list. First returns Empty immediately if the list is empty.
210    --  Present is defined in Atree, First and Next are defined in Nlists.
211
212    --  The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
213    --  contexts, which is handled as described in the previous section, and
214    --  with {,library_unit_NAME} in the N_With_Clause mode, which is handled
215    --  using the First_Name and Last_Name flags, as further detailed in the
216    --  description of the N_With_Clause node.
217
218    -------------
219    -- Pragmas --
220    -------------
221
222    --  Pragmas can appear in many different context, but are not included
223    --  in the grammar. Still they must appear in the tree, so they can be
224    --  properly processed.
225
226    --  Two approaches are used. In some cases, an extra field is defined
227    --  in an appropriate node that contains a list of pragmas appearing
228    --  in the expected context. For example pragmas can appear before an
229    --  Accept_Alternative in a Selective_Accept_Statement, and these pragmas
230    --  appear in the Pragmas_Before field of the N_Accept_Alternative node.
231
232    --  The other approach is to simply allow pragmas to appear in syntactic
233    --  lists where the grammar (of course) does not include the possibility.
234    --  For example, the Variants field of an N_Variant_Part node points to
235    --  a list that can contain both N_Pragma and N_Variant nodes.
236
237    --  To make processing easier in the latter case, the Nlists package
238    --  provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
239    --  Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be
240    --  handled ignoring all pragmas.
241
242    --  In the case of the variants list, we can either write:
243
244    --      Variant := First (Variants (N));
245    --      while Present (Variant) loop
246    --         ...
247    --         Variant := Next (Variant);
248    --      end loop;
249
250    --  or
251
252    --      Variant := First_Non_Pragma (Variants (N));
253    --      while Present (Variant) loop
254    --         ...
255    --         Variant := Next_Non_Pragma (Variant);
256    --      end loop;
257
258    --  In the first form of the loop, Variant can either be an N_Pragma or
259    --  an N_Variant node. In the second form, Variant can only be N_Variant
260    --  since all pragmas are skipped.
261
262    ---------------------
263    -- Optional Fields --
264    ---------------------
265
266    --  Fields which correspond to a section of the syntax enclosed in square
267    --  brackets are generally omitted (and the corresponding field set to
268    --  Empty for a node, or No_List for a list). The documentation of such
269    --  fields notes these cases. One exception to this rule occurs in the
270    --  case of possibly empty statement sequences (such as the sequence of
271    --  statements in an entry call alternative). Such cases appear in the
272    --  syntax rules as [SEQUENCE_OF_STATEMENTS] and the fields corresponding
273    --  to such optional statement sequences always contain an empty list (not
274    --  No_List) if no statements are present.
275
276    --  Note: the utility program that constructs the body and spec of the
277    --  Nmake package relies on the format of the comments to determine if
278    --  a field should have a default value in the corresponding make routine.
279    --  The rule is that if the first line of the description of the field
280    --  contains the string "(set to xxx if", then a default value of xxx is
281    --  provided for this field in the corresponding Make_yyy routine.
282
283    -----------------------------------
284    -- Note on Body/Spec Terminology --
285    -----------------------------------
286
287    --  In informal discussions about Ada, it is customary to refer to package
288    --  and subprogram specs and bodies. However, this is not technically
289    --  correct, what is normally referred to as a spec or specification is in
290    --  fact a package declaration or subprogram declaration. We are careful
291    --  in GNAT to use the correct terminology and in particular, the full
292    --  word specification is never used as an incorrect substitute for
293    --  declaration. The structure and terminology used in the tree also
294    --  reflects the grammar and thus uses declaration and specification in
295    --  the technically correct manner.
296
297    --  However, there are contexts in which the informal terminology is
298    --  useful. We have the word "body" to refer to the Interp_Etype declared by
299    --  the declaration of a unit body, and in some contexts we need a
300    --  similar term to refer to the entity declared by the package or
301    --  subprogram declaration, and simply using declaration can be confusing
302    --  since the body also has a declaration.
303
304    --  An example of such a context is the link between the package body
305    --  and its declaration. With_Declaration is confusing, since
306    --  the package body itself is a declaration.
307
308    --  To deal with this problem, we reserve the informal term Spec, i.e.
309    --  the popular abbreviation used in this context, to refer to the entity
310    --  declared by the package or subprogram declaration. So in the above
311    --  example case, the field in the body is called With_Spec.
312
313    --  Another important context for the use of the word Spec is in error
314    --  messages, where a hyper-correct use of declaration would be confusing
315    --  to a typical Ada programmer, and even for an expert programmer can
316    --  cause confusion since the body has a declaration as well.
317
318    --  So, to summarize:
319
320    --     Declaration    always refers to the syntactic entity that is called
321    --                    a declaration. In particular, subprogram declaration
322    --                    and package declaration are used to describe the
323    --                    syntactic entity that includes the semicolon.
324
325    --     Specification  always refers to the syntactic entity that is called
326    --                    a specification. In particular, the terms procedure
327    --                    specification, function specification, package
328    --                    specification, subprogram specification always refer
329    --                    to the syntactic entity that has no semicolon.
330
331    --     Spec           is an informal term, used to refer to the entity
332    --                    that is declared by a task declaration, protected
333    --                    declaration, generic declaration, subprogram
334    --                    declaration or package declaration.
335
336    --  This convention is followed throughout the GNAT documentation
337    --  both internal and external, and in all error message text.
338
339    ------------------------
340    -- Internal Use Nodes --
341    ------------------------
342
343    --  These are Node_Kind settings used in the internal implementation
344    --  which are not logically part of the specification.
345
346    --  N_Unused_At_Start
347    --  Completely unused entry at the start of the enumeration type. This
348    --  is inserted so that no legitimate value is zero, which helps to get
349    --  better debugging behavior, since zero is a likely uninitialized value).
350
351    --  N_Unused_At_End
352    --  Completely unused entry at the end of the enumeration type. This is
353    --  handy so that arrays with Node_Kind as the index type have an extra
354    --  entry at the end (see for example the use of the Pchar_Pos_Array in
355    --  Treepr, where the extra entry provides the limit value when dealing
356    --  with the last used entry in the array).
357
358    -----------------------------------------
359    -- Note on the settings of Sloc fields --
360    -----------------------------------------
361
362    --  The Sloc field of nodes that come from the source is set by the
363    --  parser. For internal nodes, and nodes generated during expansion
364    --  the Sloc is usually set in the call to the constructor for the node.
365    --  In general the Sloc value chosen for an internal node is the Sloc of
366    --  the source node whose processing is responsible for the expansion. For
367    --  example, the Sloc of an inherited primitive operation is the Sloc of
368    --  the corresponding derived type declaration.
369
370    --  For the nodes of a generic instantiation, the Sloc value is encoded
371    --  to represent both the original Sloc in the generic unit, and the Sloc
372    --  of the instantiation itself. See Sinput.ads for details.
373
374    --  Subprogram instances create two callable entities: one is the visible
375    --  subprogram instance, and the other is an anonymous subprogram nested
376    --  within a wrapper package that contains the renamings for the actuals.
377    --  Both of these entities have the Sloc of the defining entity in the
378    --  instantiation node. This simplifies some ASIS queries.
379
380    -----------------------
381    -- Field Definitions --
382    -----------------------
383
384    --  In the following node definitions, all fields, both syntactic and
385    --  semantic, are documented. The one exception is in the case of entities
386    --  (defining indentifiers, character literals and operator symbols),
387    --  where the usage of the fields depends on the entity kind. Entity
388    --  fields are fully documented in the separate package Einfo.
389
390    --  In the node definitions, three common sets of fields are abbreviated
391    --  to save both space in the documentation, and also space in the string
392    --  (defined in Tree_Print_Strings) used to print trees. The following
393    --  abbreviations are used:
394
395    --  Note: the utility program that creates the Treeprs spec (in the file
396    --  xtreeprs.adb) knows about the special fields here, so it must be
397    --  modified if any change is made to these fields.
398
399    --    "plus fields for binary operator"
400    --       Chars                    (Name1)      Name_Id for the operator
401    --       Left_Opnd                (Node2)      left operand expression
402    --       Right_Opnd               (Node3)      right operand expression
403    --       Entity                   (Node4-Sem)  defining entity for operator
404    --       Associated_Node          (Node4-Sem)  for generic processing
405    --       Do_Overflow_Check        (Flag17-Sem) set if overflow check needed
406    --       Has_Private_View         (Flag11-Sem) set in generic units.
407
408    --    "plus fields for unary operator"
409    --       Chars                    (Name1)      Name_Id for the operator
410    --       Right_Opnd               (Node3)      right operand expression
411    --       Entity                   (Node4-Sem)  defining entity for operator
412    --       Associated_Node          (Node4-Sem)  for generic processing
413    --       Do_Overflow_Check        (Flag17-Sem) set if overflow check needed
414    --       Has_Private_View         (Flag11-Sem) set in generic units.
415
416    --    "plus fields for expression"
417    --       Paren_Count                           number of parentheses levels
418    --       Etype                    (Node5-Sem)  type of the expression
419    --       Is_Overloaded            (Flag5-Sem)  >1 type interpretation exists
420    --       Is_Static_Expression     (Flag6-Sem)  set for static expression
421    --       Raises_Constraint_Error  (Flag7-Sem)  evaluation raises CE
422    --       Must_Not_Freeze          (Flag8-Sem)  set if must not freeze
423    --       Do_Range_Check           (Flag9-Sem)  set if a range check needed
424    --       Assignment_OK            (Flag15-Sem) set if modification is OK
425    --       Is_Controlling_Actual    (Flag16-Sem) set for controlling argument
426
427    --  Note: see under (EXPRESSION) for further details on the use of
428    --  the Paren_Count field to record the number of parentheses levels.
429
430    --  Node_Kind is the type used in the Nkind field to indicate the node
431    --  kind. The actual definition of this type is given later (the reason
432    --  for this is that we want the descriptions ordered by logical chapter
433    --  in the RM, but the type definition is reordered to facilitate the
434    --  definition of some subtype ranges. The individual descriptions of
435    --  the nodes show how the various fields are used in each node kind,
436    --  as well as providing logical names for the fields. Functions and
437    --  procedures are provided for accessing and setting these fields
438    --  using these logical names.
439
440    -----------------------
441    -- Gigi Restrictions --
442    -----------------------
443
444    --  The tree passed to Gigi is more restricted than the general tree form.
445    --  For example, as a result of expansion, most of the tasking nodes can
446    --  never appear. For each node to which either a complete or partial
447    --  restriction applies, a note entitled "Gigi restriction" appears which
448    --  documents the restriction.
449
450    --  Note that most of these restrictions apply only to trees generated when
451    --  code is being generated, since they involved expander actions that
452    --  destroy the tree.
453
454    ------------------------
455    -- Common Flag Fields --
456    ------------------------
457
458    --  The following flag fields appear in all nodes
459
460    --  Analyzed (Flag1)
461    --    This flag is used to indicate that a node (and all its children
462    --    have been analyzed. It is used to avoid reanalysis of a node that
463    --    has already been analyzed, both for efficiency and functional
464    --    correctness reasons.
465
466    --  Comes_From_Source (Flag2)
467    --    This flag is on for any nodes built by the scanner or parser from
468    --    the source program, and off for any nodes built by the analyzer or
469    --    expander. It indicates that a node comes from the original source.
470    --    This flag is defined in Atree.
471
472    --  Error_Posted (Flag3)
473    --    This flag is used to avoid multiple error messages being posted
474    --    on or referring to the same node. This flag is set if an error
475    --    message refers to a node or is posted on its source location,
476    --    and has the effect of inhibiting further messages involving
477    --    this same node.
478
479    --  Has_Dynamic_Length_Check (Flag10-Sem)
480    --    This flag is present on all nodes. It is set to indicate that one
481    --    of the routines in unit Checks has generated a length check action
482    --    which has been inserted at the flagged node. This is used to avoid
483    --    the generation of duplicate checks.
484
485    --  Has_Dynamic_Range_Check (Flag12-Sem)
486    --    This flag is present on all nodes. It is set to indicate that one
487    --    of the routines in unit Checks has generated a range check action
488    --    which has been inserted at the flagged node. This is used to avoid
489    --    the generation of duplicate checks.
490
491    ------------------------------------
492    -- Description of Semantic Fields --
493    ------------------------------------
494
495    --  The meaning of the syntactic fields is generally clear from their
496    --  names without any further description, since the names are chosen
497    --  to correspond very closely to the syntax in the reference manual.
498    --  This section describes the usage of the semantic fields, which are
499    --  used to contain additional information determined during semantic
500    --  analysis.
501
502    --  ABE_Is_Certain (Flag18-Sem)
503    --    This flag is set in an instantiation node or a call node is
504    --    determined to be sure to raise an ABE. This is used to trigger
505    --    special handling of such cases, particularly in the instantiation
506    --    case where we avoid instantiating the body if this flag is set.
507    --    This flag is also present in an N_Formal_Package_Declaration_Node
508    --    since formal package declarations are treated like instantiations,
509    --    but it is always set to False in this context.
510
511    --  Accept_Handler_Records (List5-Sem)
512    --    This field is present only in an N_Accept_Alternative node. It is
513    --    used to temporarily hold the exception handler records from an
514    --    accept statement in a selective accept. These exception handlers
515    --    will eventually be placed in the Handler_Records list of the
516    --    procedure built for this accept (see Expand_N_Selective_Accept
517    --    procedure in Exp_Ch9 for further details).
518
519    --  Access_Types_To_Process (Elist2-Sem)
520    --    Present in N_Freeze_Entity nodes for Incomplete or private types.
521    --    Contains the list of access types which may require specific
522    --    treatment when the nature of the type completion is completely
523    --    known. An example of such treatement is the generation of the
524    --    associated_final_chain.
525
526    --  Actions (List1-Sem)
527    --    This field contains a sequence of actions that are associated
528    --    with the node holding the field. See the individual node types
529    --    for details of how this field is used, as well as the description
530    --    of the specific use for a particular node type.
531
532    --  Activation_Chain_Entity (Node3-Sem)
533    --    This is used in tree nodes representing task activators (blocks,
534    --    subprogram bodies, package declarations, and task bodies). It is
535    --    initially Empty, and then gets set to point to the entity for the
536    --    declared Activation_Chain variable when the first task is declared.
537    --    When tasks are declared in the corresponding declarative region
538    --    this entity is located by name (its name is always _Chain) and
539    --    the declared tasks are added to the chain.
540
541    --  Acts_As_Spec (Flag4-Sem)
542    --    A flag set in the N_Subprogram_Body node for a subprogram body
543    --    which is acting as its own spec. This flag also appears in the
544    --    compilation unit node at the library level for such a subprogram
545    --    (see further description in spec of Lib package).
546
547    --  Actual_Designated_Subtype (Node2-Sem)
548    --    Present in N_Free_Statement and N_Explicit_Dereference nodes. If
549    --    GIGI needs to known the dynamic constrained subtype of the designated
550    --    object, this attribute is set to that type. This is done for
551    --    N_Free_Statements for access-to-classwide types and access to
552    --    unconstrained packed array types, and for N_Explicit_Dereference
553    --    when the designated type is an unconstrained packed array and the
554    --    dereference is the prefix of a 'Size attribute reference.
555
556    --  Aggregate_Bounds (Node3-Sem)
557    --    Present in array N_Aggregate nodes. If the aggregate contains
558    --    component associations this field points to an N_Range node whose
559    --    bounds give the lowest and highest discrete choice values. If the
560    --    named aggregate contains a dynamic or null choice this field is
561    --    empty. If the aggregate contains positional elements this field
562    --    points to an N_Integer_Literal node giving the number of positional
563    --    elements. Note that if the aggregate contains positional elements
564    --    and an other choice the N_Integer_Literal only accounts for the
565    --    number of positional elements.
566
567    --  All_Others (Flag11-Sem)
568    --    Present in an N_Others_Choice node. This flag is set in the case
569    --    of an others exception where all exceptions are to be caught, even
570    --    those that are not normally handled (in particular the tasking abort
571    --    signal). This is used for translation of the at end handler into
572    --    a normal exception handler.
573
574    --  Assignment_OK (Flag15-Sem)
575    --    This flag is set in a subexpression node for an object, indicating
576    --    that the associated object can be modified, even if this would not
577    --    normally be permissible (either by direct assignment, or by being
578    --    passed as an out or in-out parameter). This is used by the expander
579    --    for a number of purposes, including initialzation of constants and
580    --    limited type objects (such as tasks), setting discriminant fields,
581    --    setting tag values, etc. N_Object_Declaration nodes also have this
582    --    flag defined. Here it is used to indicate that an initialization
583    --    expression is valid, even where it would normally not be allowed
584    --    (e.g. where the type involved is limited).
585
586    --  Associated_Node (Node4-Sem)
587    --    Present in nodes that can denote an entity: identifiers, character
588    --    literals, operator symbols, expanded names, operator nodes, and
589    --    attribute reference nodes (all these nodes have an Entity field).
590    --    This field is also present in N_Aggregate, N_Selected_Component,
591    --    and N_Extension_Aggregate nodes. This field is used in generic
592    --    processing to create links between the generic template and the
593    --    generic copy. See Sem_Ch12.Get_Associated_Node for full details.
594    --    Note that this field overlaps Entity, which is fine, since, as
595    --    explained in Sem_Ch12, the normal function of Entity is not
596    --    required at the point where the Associated_Node is set. Note
597    --    also, that in generic templates, this means that the Entity field
598    --    does not necessarily point to an Entity. Since the back end is
599    --    expected to ignore generic templates, this is harmless.
600
601    --  At_End_Proc (Node1)
602    --    This field is present in an N_Handled_Sequence_Of_Statements node.
603    --    It contains an identifier reference for the cleanup procedure to
604    --    be called. See description of this node for further details.
605
606    --  Backwards_OK (Flag6-Sem)
607    --    A flag present in the N_Assignment_Statement node. It is used only
608    --    if the type being assigned is an array type, and is set if analysis
609    --    determines that it is definitely safe to do the copy backwards, i.e.
610    --    starting at the highest addressed element. Note that if neither of
611    --    the flags Forwards_OK or Backwards_OK is set, it means that the
612    --    front end could not determine that either direction is definitely
613    --    safe, and a runtime check is required.
614
615    --  Body_To_Inline (Node3-Sem)
616    --    present in subprogram declarations. Denotes analyzed but unexpanded
617    --    body of subprogram, to be used when inlining calls. Present when the
618    --    subprogram has an Inline pragma and inlining is enabled. If the
619    --    declaration is completed by a renaming_as_body, and the renamed en-
620    --    tity is a subprogram, the Body_To_Inline is the name of that entity,
621    --    which is used directly in later calls to the original subprogram.
622
623    --  Body_Required (Flag13-Sem)
624    --    A flag that appears in the N_Compilation_Unit node indicating that
625    --    the corresponding unit requires a body. For the package case, this
626    --    indicates that a completion is required. In Ada 95, if the flag
627    --    is not set for the package case, then a body may not be present.
628    --    In Ada 83, if the flag is not set for the package case, then a
629    --    body is optional. For a subprogram declaration, the flag is set
630    --    except in the case where a pragma Import or Interface applies,
631    --    in which case no body is permitted (in Ada 83 or Ada 95).
632
633    --  By_Ref (Flag5-Sem)
634    --    A flag present in the N_Return_Statement_Node. It is set when the
635    --    returned expression is already allocated on the secondary stack
636    --    and thus the result is passed by reference rather than copied
637    --    another time.
638
639    --  Check_Address_Alignment (Flag11-Sem)
640    --    A flag present in N_Attribute_Definition clause for a 'Address
641    --    attribute definition. This flag is set if a dynamic check should
642    --    be generated at the freeze point for the entity to which this
643    --    address clause applies. The reason that we need this flag is that
644    --    we want to check for range checks being suppressed at the point
645    --    where the attribute definition clause is given, rather than
646    --    testing this at the freeze point.
647
648    --  Compile_Time_Known_Aggregate (Flag18-Sem)
649    --    Present in N_Aggregate nodes. Set for aggregates which can be
650    --    fully evaluated at compile time without raising constraint error.
651    --    Such aggregates can be passed as is to Gigi without any expansion.
652    --    See Sem_Aggr for the specific conditions under which an aggregate
653    --    has this flag set. See also the flag Static_Processing_OK.
654
655    --  Condition_Actions (List3-Sem)
656    --    This field appears in else-if nodes and in the iteration scheme
657    --    node for while loops. This field is only used during semantic
658    --    processing to temporarily hold actions inserted into the tree.
659    --    In the tree passed to gigi, the condition actions field is always
660    --    set to No_List. For details on how this field is used, see the
661    --    routine Insert_Actions in package Exp_Util, and also the expansion
662    --    routines for the relevant nodes.
663
664    --  Controlling_Argument (Node1-Sem)
665    --    This field is set in procedure and function call nodes if the call
666    --    is a dispatching call (it is Empty for a non-dispatching call).
667    --    It indicates the source of the controlling tag for the call. For
668    --    Procedure calls, the Controlling_Argument is one of the actuals.
669    --    For a function that has a dispatching result, it is an entity in
670    --    the context of the call that can provide a tag, or else it is the
671    --    tag of the root type of the class. It can also specify a tag
672    --    directly rather than being a tagged object. The latter is needed
673    --    by the implementations of AI-239 and AI-260.
674
675    --  Conversion_OK (Flag14-Sem)
676    --    A flag set on type conversion nodes to indicate that the conversion
677    --    is to be considered as being valid, even though it is the case that
678    --    the conversion is not valid Ada. This is used for the Enum_Rep,
679    --    Fixed_Value and Integer_Value attributes, for internal conversions
680    --    done for fixed-point operations, and for certain conversions for
681    --    calls to initialization procedures. If Conversion_OK is set, then
682    --    Etype must be set (the analyzer assumes that Etype has been set).
683    --    For the case of fixed-point operands, it also indicates that the
684    --    conversion is to be a direct conversion of the underlying integer
685    --    result, with no regard to the small operand.
686
687    --  Corresponding_Body (Node5-Sem)
688    --    This field is set in subprogram declarations, package declarations,
689    --    entry declarations of protected types, and in generic units. It
690    --    points to the defining entity for the corresponding body (NOT the
691    --    node for the body itself).
692
693    --  Corresponding_Formal_Spec (Node3-Sem)
694    --  This field is set in subprogram renaming declarations, where it points
695    --  to the defining entity for a formal subprogram in the case where the
696    --  renaming corresponds to a generic formal subprogram association in an
697    --  instantiation. The field is Empty if the renaming does not correspond
698    --  to such a formal association.
699
700    --  Corresponding_Generic_Association (Node5-Sem)
701    --    This field is defined for object declarations and object renaming
702    --    declarations. It is set for the declarations within an instance that
703    --    map generic formals to their actuals.  If set, the field points to
704    --    a generic_association which is the original parent of the expression
705    --    or name appearing in the declaration. This simplifies ASIS queries.
706
707    --  Corresponding_Integer_Value (Uint4-Sem)
708    --    This field is set in real literals of fixed-point types (it is not
709    --    used for floating-point types). It contains the integer value used
710    --    to represent the fixed-point value. It is also set on the universal
711    --    real literals used to represent bounds of fixed-point base types
712    --    and their first named subtypes.
713
714    --  Corresponding_Spec (Node5-Sem)
715    --    This field is set in subprogram, package, task, and protected body
716    --    nodes, where it points to the defining entity in the corresponding
717    --    spec. The attribute is also set in N_With_Clause nodes, where
718    --    it points to the defining entity for the with'ed spec, and in
719    --    a subprogram renaming declaration when it is a Renaming_As_Body.
720    --    The field is Empty if there is no corresponding spec, as in the
721    --    case of a subprogram body that serves as its own spec.
722
723    --  Corresponding_Stub (Node3-Sem)
724    --    This field is present in an N_Subunit node. It holds the node in
725    --    the parent unit that is the stub declaration for the subunit. it is
726    --    set when analysis of the stub forces loading of the proper body. If
727    --    expansion of the proper body creates new declarative nodes, they are
728    --    inserted at the point of the corresponding_stub.
729
730    --  Dcheck_Function (Node5-Sem)
731    --    This field is present in an N_Variant node, It references the entity
732    --    for the discriminant checking function for the variant.
733
734    --  Debug_Statement (Node3)
735    --    This field is present in an N_Pragma node. It is used only for
736    --    a Debug pragma or pragma Assert with a second parameter. The
737    --    parameter is of the form of an expression, as required by the
738    --    pragma syntax, but is actually a procedure call. To simplify
739    --    semantic processing, the parser creates a copy of the argument
740    --    rearranged into a procedure call statement and places it in the
741    --    Debug_Statement field. Note that this field is considered a
742    --    syntactic field, since it is created by the parser.
743
744    --  Default_Expression (Node5-Sem)
745    --    This field is Empty if there is no default expression. If there
746    --    is a simple default expression (one with no side effects), then
747    --    this field simply contains a copy of the Expression field (both
748    --    point to the tree for the default expression). Default_Expression
749    --    is used for conformance checking.
750
751    --  Delay_Finalize_Attach (Flag14-Sem)
752    --    This flag is present in an N_Object_Declaration node. If it is set,
753    --    then in the case of a controlled type being declared and initialized,
754    --    the normal code for attaching the result to the appropriate local
755    --    finalization list is suppressed. This is used for functions that
756    --    return controlled types without using the secondary stack, where
757    --    it is the caller who must do the attachment.
758
759    --  Discr_Check_Funcs_Built (Flag11-Sem)
760    --    This flag is present in N_Full_Type_Declaration nodes. It is set when
761    --    discriminant checking functions are constructed. The purpose is to
762    --    avoid attempting to set these functions more than once.
763
764    --  Do_Accessibility_Check (Flag13-Sem)
765    --    This flag is set on N_Parameter_Specification nodes to indicate
766    --    that an accessibility check is required for the parameter. It is
767    --    not yet decided who takes care of this check (TBD ???).
768
769    --  Do_Discriminant_Check (Flag13-Sem)
770    --    This flag is set on N_Selected_Component nodes to indicate that a
771    --    discriminant check is required using the discriminant check routine
772    --    associated with the selector. The actual check is generated by the
773    --    expander when processing selected components.
774
775    --  Do_Division_Check (Flag13-Sem)
776    --    This flag is set on a division operator (/ mod rem) to indicate
777    --    that a zero divide check is required. The actual check is dealt
778    --    with by the backend (all the front end does is to set the flag).
779
780    --  Do_Length_Check (Flag4-Sem)
781    --    This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
782    --    N_Op_Xor, or N_Type_Conversion node to indicate that a length check
783    --    is required. It is not determined who deals with this flag (???).
784
785    --  Do_Overflow_Check (Flag17-Sem)
786    --    This flag is set on an operator where an overflow check is required
787    --    on the operation. The actual check is dealt with by the backend
788    --    (all the front end does is to set the flag). The other cases where
789    --    this flag is used is on a Type_Conversion node and for attribute
790    --    reference nodes. For a type conversion, it means that the conversion
791    --    is from one base type to another, and the value may not fit in the
792    --    target base type. See also the description of Do_Range_Check for
793    --    this case. The only attribute references which use this flag are
794    --    Pred and Succ, where it means that the result should be checked
795    --    for going outside the base range.
796
797    --  Do_Range_Check (Flag9-Sem)
798    --    This flag is set on an expression which appears in a context where
799    --    a range check is required. The target type is clear from the
800    --    context. The contexts in which this flag can appear are limited to
801    --    the following.
802
803    --      Right side of an assignment. In this case the target type is
804    --      taken from the left side of the assignment, which is referenced
805    --      by the Name of the N_Assignment_Statement node.
806
807    --      Subscript expressions in an indexed component. In this case the
808    --      target type is determined from the type of the array, which is
809    --      referenced by the Prefix of the N_Indexed_Component node.
810
811    --      Argument expression for a parameter, appearing either directly
812    --      in the Parameter_Associations list of a call or as the Expression
813    --      of an N_Parameter_Association node that appears in this list. In
814    --      either case, the check is against the type of the formal. Note
815    --      that the flag is relevant only in IN and IN OUT parameters, and
816    --      will be ignored for OUT parameters, where no check is required
817    --      in the call, and if a check is required on the return, it is
818    --      generated explicitly with a type conversion.
819
820    --      Initialization expression for the initial value in an object
821    --      declaration. In this case the Do_Range_Check flag is set on
822    --      the initialization expression, and the check is against the
823    --      range of the type of the object being declared.
824
825    --      The expression of a type conversion. In this case the range check
826    --      is against the target type of the conversion. See also the use of
827    --      Do_Overflow_Check on a type conversion. The distinction is that
828    --      the overflow check protects against a value that is outside the
829    --      range of the target base type, whereas a range check checks that
830    --      the resulting value (which is a value of the base type of the
831    --      target type), satisfies the range constraint of the target type.
832
833    --    Note: when a range check is required in contexts other than those
834    --    listed above (e.g. in a return statement), an additional type
835    --    conversion node is introduced to represent the required check.
836
837    --  Do_Storage_Check (Flag17-Sem)
838    --    This flag is set in an N_Allocator node to indicate that a storage
839    --    check is required for the allocation, or in an N_Subprogram_Body
840    --    node to indicate that a stack check is required in the subprogram
841    --    prolog. The N_Allocator case is handled by the routine that expands
842    --    the call to the runtime routine. The N_Subprogram_Body case is
843    --    handled by the backend, and all the semantics does is set the flag.
844
845    --  Do_Tag_Check (Flag13-Sem)
846    --    This flag is set on an N_Assignment_Statement, N_Function_Call,
847    --    N_Procedure_Call_Statement, N_Type_Conversion or N_Return_Statememt
848    --    node to indicate that the tag check can be suppressed. It is not
849    --    yet decided how this flag is used (TBD ???).
850
851    --  Elaborate_Present (Flag4-Sem)
852    --    This flag is set in the N_With_Clause node to indicate that pragma
853    --    Elaborate pragma appears for the with'ed units.
854
855    --  Elaborate_All_Desirable (Flag9-Sem)
856    --    This flag is set in the N_With_Clause mode to indicate that the static
857    --    elaboration processing has determined that an Elaborate_All pragma is
858    --    desirable for correct elaboration for this unit.
859
860    --  Elaborate_All_Present (Flag14-Sem)
861    --    This flag is set in the N_With_Clause node to indicate that a
862    --    pragma Elaborate_All pragma appears for the with'ed units.
863
864    --  Elaborate_Desirable (Flag11-Sem)
865    --    This flag is set in the N_With_Clause mode to indicate that the static
866    --    elaboration processing has determined that an Elaborate pragma is
867    --    desirable for correct elaboration for this unit.
868
869    --  Elaboration_Boolean (Node2-Sem)
870    --    This field is present in function and procedure specification
871    --    nodes. If set, it points to the entity for a Boolean flag that
872    --    must be tested for certain calls to check for access before
873    --    elaboration. See body of Sem_Elab for further details. This
874    --    field is Empty if no elaboration boolean is required.
875
876    --  Else_Actions (List3-Sem)
877    --    This field is present in conditional expression nodes. During code
878    --    expansion we use the Insert_Actions procedure (in Exp_Util) to insert
879    --    actions at an appropriate place in the tree to get elaborated at the
880    --    right time. For conditional expressions, we have to be sure that the
881    --    actions for the Else branch are only elaborated if the condition is
882    --    False. The Else_Actions field is used as a temporary parking place
883    --    for these actions. The final tree is always rewritten to eliminate
884    --    the need for this field, so in the tree passed to Gigi, this field
885    --    is always set to No_List.
886
887    --  Enclosing_Variant (Node2-Sem)
888    --    This field is present in the N_Variant node and identifies the
889    --    Node_Id corresponding to the immediately enclosing variant when
890    --    the variant is nested, and N_Empty otherwise. Set during semantic
891    --    processing of the variant part of a record type.
892
893    --  Entity (Node4-Sem)
894    --    Appears in all direct names (identifier, character literal,
895    --    operator symbol), as well as expanded names, and attributes that
896    --    denote entities, such as 'Class. Points to the entity for the
897    --    corresponding defining occurrence. Set after name resolution.
898    --    In the case of identifiers in a WITH list, the corresponding
899    --    defining occurrence is in a separately compiled file, and this
900    --    pointer must be set using the library Load procedure. Note that
901    --    during name resolution, the value in Entity may be temporarily
902    --    incorrect (e.g. during overload resolution, Entity is initially
903    --    set to the first possible correct interpretation, and then later
904    --    modified if necessary to contain the correct value after resolution).
905    --    Note that this field overlaps Associated_Node, which is used during
906    --    generic processing (see Sem_Ch12 for details). Note also that in
907    --    generic templates, this means that the Entity field does not always
908    --    point to an Entity. Since the back end is expected to ignore
909    --    generic templates, this is harmless.
910
911    --  Entity_Or_Associated_Node (Node4-Sem)
912    --    A synonym for both Entity and Associated_Node. Used by convention
913    --    in the code when referencing this field in cases where it is not
914    --    known whether the field contains an Entity or an Associated_Node.
915
916    --  Etype (Node5-Sem)
917    --    Appears in all expression nodes, all direct names, and all
918    --    entities. Points to the entity for the related type. Set after
919    --    type resolution. Normally this is the actual subtype of the
920    --    expression. However, in certain contexts such as the right side
921    --    of an assignment, subscripts, arguments to calls, returned value
922    --    in a function, initial value etc. it is the desired target type.
923    --    In the event that this is different from the actual type, the
924    --    Do_Range_Check flag will be set if a range check is required.
925    --    Note: if the Is_Overloaded flag is set, then Etype points to
926    --    an essentially arbitrary choice from the possible set of types.
927
928    --  Exception_Junk (Flag7-Sem)
929    --    This flag is set in a various nodes appearing in a statement
930    --    sequence to indicate that the corresponding node is an artifact
931    --    of the generated code for exception handling, and should be
932    --    ignored when analyzing the control flow of the relevant sequence
933    --    of statements (e.g. to check that it does not end with a bad
934    --    return statement).
935
936    --  Expansion_Delayed (Flag11-Sem)
937    --    Set on aggregates and extension aggregates that need a top-down
938    --    rather than bottom up expansion. Typically aggregate expansion
939    --    happens bottom up. For nested aggregates the expansion is delayed
940    --    until the enclosing aggregate itself is expanded, e.g. in the context
941    --    of a declaration. To delay it we set this flag. This is done to
942    --    avoid creating a temporary for each level of a nested aggregates,
943    --    and also to prevent the premature generation of constraint checks.
944    --    This is also a requirement if we want to generate the proper
945    --    attachment to the internal finalization lists (for record with
946    --    controlled components). Top down expansion of aggregates is also
947    --    used for in-place array aggregate assignment or initialization.
948    --    When the full context is known, the target of the assignment or
949    --    initialization is used to generate the left-hand side of individual
950    --    assignment to each sub-component.
951
952    --  First_Inlined_Subprogram (Node3-Sem)
953    --    Present in the N_Compilation_Unit node for the main program. Points
954    --    to a chain of entities for subprograms that are to be inlined. The
955    --    Next_Inlined_Subprogram field of these entities is used as a link
956    --    pointer with Empty marking the end of the list. This field is Empty
957    --    if there are no inlined subprograms or inlining is not active.
958
959    --  First_Named_Actual (Node4-Sem)
960    --    Present in procedure call statement and function call nodes, and
961    --    also in Intrinsic nodes. Set during semantic analysis to point to
962    --    the first named parameter where parameters are ordered by declaration
963    --    order (as opposed to the actual order in the call which may be
964    --    different due to named associations). Note: this field points to the
965    --    explicit actual parameter itself, not the N_Parameter_Association
966    --    node (its parent).
967
968    --  First_Real_Statement (Node2-Sem)
969    --    Present in N_Handled_Sequence_Of_Statements node. Normally set to
970    --    Empty. Used only when declarations are moved into the statement
971    --    part of a construct as a result of wrapping an AT END handler that
972    --    is required to cover the declarations. In this case, this field is
973    --    used to remember the location in the statements list of the first
974    --    real statement, i.e. the statement that used to be first in the
975    --    statement list before the declarations were prepended.
976
977    --  First_Subtype_Link (Node5-Sem)
978    --    Present in N_Freeze_Entity node for an anonymous base type that
979    --    is implicitly created by the declaration of a first subtype. It
980    --    points to the entity for the first subtype.
981
982    --  Float_Truncate (Flag11-Sem)
983    --    A flag present in type conversion nodes. This is used for float
984    --    to integer conversions where truncation is required rather than
985    --    rounding. Note that Gigi does not handle type conversions from real
986    --    to integer with rounding (see Expand_N_Type_Conversion).
987
988    --  Forwards_OK (Flag5-Sem)
989    --    A flag present in the N_Assignment_Statement node. It is used only
990    --    if the type being assigned is an array type, and is set if analysis
991    --    determines that it is definitely safe to do the copy forwards, i.e.
992    --    starting at the lowest addressed element. Note that if neither of
993    --    the flags Forwards_OK or Backwards_OK is set, it means that the
994    --    front end could not determine that either direction is definitely
995    --    safe, and a runtime check is required.
996
997    --  From_At_Mod (Flag4-Sem)
998    --    This flag is set on the attribute definition clause node that is
999    --    generated by a transformation of an at mod phrase in a record
1000    --    representation clause. This is used to give slightly different
1001    --    (Ada 83 compatible) semantics to such a clause, namely it is
1002    --    used to specify a minimum acceptable alignment for the base type
1003    --    and all subtypes. In Ada 95 terms, the actual alignment of the
1004    --    base type and all subtypes must be a multiple of the given value,
1005    --    and the representation clause is considered to be type specific
1006    --    instead of subtype specific.
1007
1008    --  From_Default (Flag6-Sem)
1009    --    This flag is set on the subprogram renaming declaration created in
1010    --    an instance for a formal subprogram, when the formal is declared
1011    --    with a box, and there is no explicit actual. If the flag is present,
1012    --    the declaration is treated as an implicit reference to the formal in
1013    --    the ali file.
1014
1015    --  Generic_Parent (Node5-Sem)
1016    --    Generic_parent is defined on declaration nodes that are instances.
1017    --    The value of Generic_Parent is the generic entity from which the
1018    --    instance is obtained. Generic_Parent is also defined for the renaming
1019    --    declarations and object declarations created for the actuals in an
1020    --    instantiation. The generic parent of such a declaration is the
1021    --    corresponding generic association in the Instantiation node.
1022
1023    --  Generic_Parent_Type (Node4-Sem)
1024    --    Generic_Parent_Type is defined on Subtype_Declaration nodes for
1025    --    the actuals of formal private and derived types. Within the instance,
1026    --    the operations on the actual are those inherited from the parent.
1027    --    For a formal private type, the parent type is the generic type
1028    --    itself. The Generic_Parent_Type is also used in an instance to
1029    --    determine whether a private operation overrides an inherited one.
1030
1031    --  Handler_List_Entry (Node2-Sem)
1032    --    This field is present in N_Object_Declaration nodes. It is set only
1033    --    for the Handler_Record entry generated for an exception in zero cost
1034    --    exception handling mode. It references the corresponding item in the
1035    --    handler list, and is used to delete this entry if the corresponding
1036    --    handler is deleted during optimization. For further details on why
1037    --    this is required, see Exp_Ch11.Remove_Handler_Entries.
1038
1039    --  Has_No_Elaboration_Code (Flag17-Sem)
1040    --    A flag that appears in the N_Compilation_Unit node to indicate
1041    --    whether or not elaboration code is present for this unit. It is
1042    --    initially set true for subprogram specs and bodies and for all
1043    --    generic units and false for non-generic package specs and bodies.
1044    --    Gigi may set the flag in the non-generic package case if it
1045    --    determines that no elaboration code is generated. Note that this
1046    --    flag is not related to the Is_Preelaborated status, there can be
1047    --    preelaborated packages that generate elaboration code, and non-
1048    --    preelaborated packages which do not generate elaboration code.
1049
1050    --  Has_Priority_Pragma (Flag6-Sem)
1051    --    A flag present in N_Subprogram_Body, N_Task_Definition and
1052    --    N_Protected_Definition nodes to flag the presence of either
1053    --    a Priority or Interrupt_Priority pragma in the declaration
1054    --    sequence (public or private in the task and protected cases)
1055
1056    --  Has_Private_View (Flag11-Sem)
1057    --    A flag present in generic nodes that have an entity, to indicate
1058    --    that the node has a private type. Used to exchange private
1059    --    and full declarations if the visibility at instantiation is
1060    --    different from the visibility at generic definition.
1061
1062    --  Has_Storage_Size_Pragma (Flag5-Sem)
1063    --    A flag present in an N_Task_Definition node to flag the presence
1064    --    of a Storage_Size pragma
1065
1066    --  Has_Task_Info_Pragma (Flag7-Sem)
1067    --    A flag present in an N_Task_Definition node to flag the presence
1068    --    of a Task_Info pragma. Used to detect duplicate pragmas.
1069
1070    --  Has_Task_Name_Pragma (Flag8-Sem)
1071    --    A flag present in N_Task_Definition nodes to flag the presence
1072    --    of a Task_Name pragma in the declaration sequence for the task.
1073
1074    --  Has_Wide_Character (Flag11-Sem)
1075    --    Present in string literals, set if any wide character (i.e. a
1076    --    character code outside the Character range) appears in the string.
1077
1078    --  Hidden_By_Use_Clause (Elist4-Sem)
1079    --     An entity list present in use clauses that appear within
1080    --     instantiations. For the resolution of local entities, entities
1081    --     introduced by these use clauses have priority over global ones,
1082    --     and outer entities must be explicitly hidden/restored on exit.
1083
1084    --  Implicit_With (Flag16-Sem)
1085    --    This flag is set in the N_With_Clause node that is implicitly
1086    --    generated for runtime units that are loaded by the expander, and
1087    --    also for package System, if it is loaded implicitly by a use of
1088    --    the 'Address or 'Tag attribute
1089
1090    --  Includes_Infinities (Flag11-Sem)
1091    --    This flag is present in N_Range nodes. It is set for the range
1092    --    of unconstrained float types defined in Standard, which include
1093    --    not only the given range of values, but also legtitimately can
1094    --    include infinite values. This flag is false for any float type
1095    --    for which an explicit range is given by the programmer, even if
1096    --    that range is identical to the range for float.
1097
1098    --  Instance_Spec (Node5-Sem)
1099    --    This field is present in generic instantiation nodes, and also in
1100    --    formal package declaration nodes (formal package declarations are
1101    --    treated in a manner very similar to package instantiations). It
1102    --    points to the node for the spec of the instance, inserted as part
1103    --    of the semantic processing for instantiations in Sem_Ch12.
1104
1105    --  Is_Asynchronous_Call_Block (Flag7-Sem)
1106    --    A flag set in a Block_Statement node to indicate that it is the
1107    --    expansion of an asynchronous entry call. Such a block needs a
1108    --    cleanup handler to assure that the call is cancelled.
1109
1110    --  Is_Component_Left_Opnd  (Flag13-Sem)
1111    --  Is_Component_Right_Opnd (Flag14-Sem)
1112    --    Present in concatenation nodes, to indicate that the corresponding
1113    --    operand is of the component type of the result. Used in resolving
1114    --    concatenation nodes in instances.
1115
1116    --  Is_Controlling_Actual (Flag16-Sem)
1117    --    This flag is set on in an expression that is a controlling argument
1118    --    in a dispatching call. It is off in all other cases. See Sem_Disp
1119    --    for details of its use.
1120
1121    --  Is_In_Discriminant_Check (Flag11-Sem)
1122    --    This flag is present in a selected component, and is used to
1123    --    indicate that the reference occurs within a discriminant check.
1124    --    The significance is that optimizations based on assuming that
1125    --    the discriminant check has a correct value cannot be performed
1126    --    in this case (or the disriminant check may be optimized away!)
1127
1128    --  Is_Machine_Number (Flag11-Sem)
1129    --    This flag is set in an N_Real_Literal node to indicate that the
1130    --    value is a machine number. This avoids some unnecessary cases
1131    --    of converting real literals to machine numbers.
1132
1133    --  Is_Null_Loop (Flag16-Sem)
1134    --    This flag is set in an N_Loop_Statement node if the corresponding
1135    --    loop can be determined to be null at compile time. This is used to
1136    --    suppress any warnings that would otherwise be issued inside the
1137    --    loop since they are probably not useful.
1138
1139    --  Is_Overloaded (Flag5-Sem)
1140    --    A flag present in all expression nodes. Used temporarily during
1141    --    overloading determination. The setting of this flag is not
1142    --    relevant once overloading analysis is complete.
1143
1144    --  Is_Power_Of_2_For_Shift (Flag13-Sem)
1145    --    A flag present only in N_Op_Expon nodes. It is set when the
1146    --    exponentiation is of the forma 2 ** N, where the type of N is
1147    --    an unsigned integral subtype whose size does not exceed the size
1148    --    of Standard_Integer (i.e. a type that can be safely converted to
1149    --    Natural), and the exponentiation appears as the right operand of
1150    --    an integer multiplication or an integer division where the dividend
1151    --    is unsigned. It is also required that overflow checking is off for
1152    --    both the exponentiation and the multiply/divide node. If this set
1153    --    of conditions holds, and the flag is set, then the division or
1154    --    multiplication can be (and is) converted to a shift.
1155
1156    --  Is_Overloaded (Flag5-Sem)
1157    --    A flag present in all expression nodes. Used temporarily during
1158    --    overloading determination. The setting of this flag is not
1159    --    relevant once overloading analysis is complete.
1160
1161    --  Is_Protected_Subprogram_Body (Flag7-Sem)
1162    --    A flag set in a Subprogram_Body block to indicate that it is the
1163    --    implemenation of a protected subprogram. Such a body needs a
1164    --    cleanup handler to make sure that the associated protected object
1165    --    is unlocked when the subprogram completes.
1166
1167    --  Is_Static_Expression (Flag6-Sem)
1168    --    Indicates that an expression is a static expression (RM 4.9). See
1169    --    spec of package Sem_Eval for full details on the use of this flag.
1170
1171    --  Is_Subprogram_Descriptor (Flag16-Sem)
1172    --    Present in N_Object_Declaration, and set only for the object
1173    --    declaration generated for a subprogram descriptor in fast exception
1174    --    mode. See Exp_Ch11 for details of use.
1175
1176    --  Is_Task_Allocation_Block (Flag6-Sem)
1177    --    A flag set in a Block_Statement node to indicate that it is the
1178    --    expansion of a task allocator, or the allocator of an object
1179    --    containing tasks. Such a block requires a cleanup handler to call
1180    --    Expunge_Unactivted_Tasks to complete any tasks that have been
1181    --    allocated but not activated when the allocator completes abnormally.
1182
1183    --  Is_Task_Master (Flag5-Sem)
1184    --    A flag set in a Subprogram_Body, Block_Statement or Task_Body node
1185    --    to indicate that the construct is a task master (i.e. has declared
1186    --    tasks or declares an access to a task type).
1187
1188    --  Itype (Node1-Sem)
1189    --    Used in N_Itype_Reference node to reference an itype for which it
1190    --    is important to ensure that it is defined. See description of this
1191    --    node for further details.
1192
1193    --  Kill_Range_Check (Flag11-Sem)
1194    --    Used in an N_Unchecked_Type_Conversion node to indicate that the
1195    --    result should not be subjected to range checks. This is used for
1196    --    the implementation of Normalize_Scalars.
1197
1198    --  Label_Construct (Node2-Sem)
1199    --    Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1200    --    N_Block_Statement or N_Loop_Statement node to which the label
1201    --    declaration applies. This is not currently used in the compiler
1202    --    itself, but it is useful in the implementation of ASIS queries.
1203
1204    --  Library_Unit (Node4-Sem)
1205    --    In a stub node, the Library_Unit field points to the compilation unit
1206    --    node of the corresponding subunit.
1207    --
1208    --    In a with clause node, the Library_Unit field points to the spec
1209    --    of the with'ed unit.
1210    --
1211    --    In a compilation unit node, the use of this field depends on
1212    --    the unit type:
1213    --
1214    --     For a subprogram body, the Library_Unit field points to the
1215    --     compilation unit node of the corresponding spec, unless
1216    --     Acts_As_Spec is set, in which case it points to itself.
1217    --
1218    --     For a package body, the Library_Unit field points to the
1219    --     compilation unit node of the corresponding spec.
1220    --
1221    --     For a subprogram spec to which pragma Inline applies, the
1222    --     Library_Unit field points to the compilation unit node of
1223    --     the corresponding body, if inlining is active.
1224    --
1225    --     For a generic declaration, the Library_Unit field points
1226    --     to the compilation unit node of the corresponding generic body.
1227    --
1228    --     For a subunit, the Library_Unit field points to the compilation
1229    --     unit node of the parent body.
1230    --
1231    --    Note that this field is not used to hold the parent pointer for a
1232    --    child unit (which might in any case need to use it for some other
1233    --    purpose as described above). Instead for a child unit, implicit
1234    --    with's are generated for all parents.
1235
1236    --  Loop_Actions (List2-Sem)
1237    --    A list present in Component_Association nodes in array aggregates.
1238    --    Used to collect actions that must be executed within the loop because
1239    --    they may need to be evaluated anew each time through.
1240
1241    --  Limited_View_Installed (Flag18-Sem)
1242    --    Present in With_Clauses and in package specifications. If set on a
1243    --    with_clause, it indicates that this clause has created the current
1244    --    limited view of the designated package. On a package specification,
1245    --    it indicates that the limited view has already been created because
1246    --    the package is mentioned in a limited_with_clause in the closure of
1247    --    the unit being compiled.
1248
1249    --  Must_Be_Byte_Aligned (Flag14-Sem)
1250    --    This flag is present in N_Attribute_Reference nodes. It can be set
1251    --    only for the Address and Unrestricted_Access attributes. If set it
1252    --    means that the object for which the address/access is given must be
1253    --    on a byte (more accurately a storage unit) boundary. If necessary,
1254    --    a copy of the object is to be made before taking the address (this
1255    --    copy is in the current scope on the stack frame). This is used for
1256    --    certain cases of code generated by the expander that passes
1257    --    parameters by address.
1258    --
1259    --    The reason the copy is not made by the front end is that the back
1260    --    end has more information about type layout and may be able to (but
1261    --    is not guaranteed to) prevent making unnecessary copies.
1262
1263    --  Must_Not_Freeze (Flag8-Sem)
1264    --    A flag present in all expression nodes. Normally expressions cause
1265    --    freezing as described in the RM. If this flag is set, then this
1266    --    is inhibited. This is used by the analyzer and expander to label
1267    --    nodes that are created by semantic analysis or expansion and which
1268    --    must not cause freezing even though they normally would. This flag
1269    --    is also present in an N_Subtype_Indication node, since we also use
1270    --    these in calls to Freeze_Expression.
1271
1272    --  Next_Entity (Node2-Sem)
1273    --    Present in defining identifiers, defining character literals and
1274    --    defining operator symbols (i.e. in all entities). The entities of
1275    --    a scope are chained, and this field is used as the forward pointer
1276    --    for this list. See Einfo for further details.
1277
1278    --  Next_Named_Actual (Node4-Sem)
1279    --    Present in parameter association node. Set during semantic
1280    --    analysis to point to the next named parameter, where parameters
1281    --    are ordered by declaration order (as opposed to the actual order
1282    --    in the call, which may be different due to named associations).
1283    --    Not that this field points to the explicit actual parameter itself,
1284    --    not to the N_Parameter_Association node (its parent).
1285
1286    --  Next_Rep_Item (Node4-Sem)
1287    --    Present in pragma nodes and attribute definition nodes. Used to
1288    --    link representation items that apply to an entity. See description
1289    --    of First_Rep_Item field in Einfo for full details.
1290
1291    --  Next_Use_Clause (Node3-Sem)
1292    --    While use clauses are active during semantic processing, they
1293    --    are chained from the scope stack entry, using Next_Use_Clause
1294    --    as a link pointer, with Empty marking the end of the list. The
1295    --    head pointer is in the scope stack entry (First_Use_Clause). At
1296    --    the end of semantic processing (i.e. when Gigi sees the tree,
1297    --    the contents of this field is undefined and should not be read).
1298
1299    --  No_Ctrl_Actions (Flag7-Sem)
1300    --    Present in N_Assignment_Statement to indicate that no finalize nor
1301    --    nor adjust should take place on this assignment eventhough the rhs
1302    --    is controlled. This is used in init procs and aggregate expansions
1303    --    where the generated assignments are more initialisations than real
1304    --    assignments.
1305
1306    --  No_Elaboration_Check (Flag14-Sem)
1307    --    Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1308    --    that no elaboration check is needed on the call, because it appears
1309    --    in the context of a local Suppress pragma. This is used on calls
1310    --    within task bodies, where the actual elaboration checks are applied
1311    --    after analysis, when the local scope stack is not present.
1312
1313    --  No_Entities_Ref_In_Spec (Flag8-Sem)
1314    --    Present in N_With_Clause nodes. Set if the with clause is on the
1315    --    package or subprogram spec where the main unit is the corresponding
1316    --    body, and no entities of the with'ed unit are referenced by the spec
1317    --    (an entity may still be referenced in the body, so this flag is used
1318    --    to generate the proper message (see Sem_Util.Check_Unused_Withs for
1319    --    full details)
1320
1321    --  No_Initialization (Flag13-Sem)
1322    --    Present in N_Object_Declaration & N_Allocator to indicate
1323    --    that the object must not be initialized (by Initialize or a
1324    --    call to an init proc). This is needed for controlled aggregates.
1325    --    When the Object declaration has an expression, this flag means
1326    --    that this expression should not be taken into account (needed
1327    --    for in place initialization with aggregates)
1328
1329    --  No_Truncation (Flag17-Sem)
1330    --    Present in N_Unchecked_Type_Conversion node. This flag has an effect
1331    --    only if the RM_Size of the source is greater than the RM_Size of the
1332    --    target for scalar operands. Normally in such a case we truncate some
1333    --    higher order bits of the source, and then sign/zero extend the result
1334    --    to form the output value. But if this flag is set, then we do not do
1335    --    any truncation, so for example, if an 8 bit input is converted to a
1336    --    5 bit result which is in fact stored in 8 bits, then the high order
1337    --    three bits of the target result will be copied from the source. This
1338    --    is used for properly setting out of range values for use by pragmas
1339    --    Initialize_Scalars and Normalize_Scalars.
1340
1341    --  Original_Discriminant (Node2-Sem)
1342    --    Present in identifiers. Used in references to discriminants that
1343    --    appear in generic units. Because the names of the discriminants
1344    --    may be different in an instance, we use this field to recover the
1345    --    position of the discriminant in the original type, and replace it
1346    --    with the discriminant at the same position in the instantiated type.
1347
1348    --  Original_Entity (Node2-Sem)
1349    --    Present in numeric literals. Used to denote the named number that
1350    --    has been constant-folded into the given literal. If literal is from
1351    --    source, or the result of some other constant-folding operation, then
1352    --    Original_Entity is empty. This field is needed to handle properly
1353    --    named numbers in generic units, where the Associated_Node field
1354    --    interferes with the Entity field, making it impossible to preserve
1355    --    the original entity at the point of instantiation (ASIS problem).
1356
1357    --  Others_Discrete_Choices (List1-Sem)
1358    --    When a case statement or variant is analyzed, the semantic checks
1359    --    determine the actual list of choices that correspond to an others
1360    --    choice. This list is materialized for later use by the expander
1361    --    and the Others_Discrete_Choices field of an N_Others_Choice node
1362    --    points to this materialized list of choices, which is in standard
1363    --    format for a list of discrete choices, except that of course it
1364    --    cannot contain an N_Others_Choice entry.
1365
1366    --  Parameter_List_Truncated (Flag17-Sem)
1367    --    Present in N_Function_Call and N_Procedure_Call_Statement nodes.
1368    --    Set (for OpenVMS ports of GNAT only) if the parameter list is
1369    --    truncated as a result of a First_Optional_Parameter specification
1370    --    in an Import_Function, Import_Procedure, or Import_Valued_Procedure
1371    --    pragma. The truncation is done by the expander by removing trailing
1372    --    parameters from the argument list, in accordance with the set of
1373    --    rules allowing such parameter removal. In particular, parameters
1374    --    can be removed working from the end of the parameter list backwards
1375    --    up to and including the entry designated by First_Optional_Parameter
1376    --    in the Import pragma. Parameters can be removed if they are implicit
1377    --    and the default value is a known-at-compile-time value, including
1378    --    the use of the Null_Parameter attribute, or if explicit parameter
1379    --    values are present that match the corresponding defaults.
1380
1381    --  Parent_Spec (Node4-Sem)
1382    --    For a library unit that is a child unit spec (package or subprogram
1383    --    declaration, generic declaration or instantiation, or library level
1384    --    rename, this field points to the compilation unit node for the parent
1385    --    package specification. This field is Empty for library bodies (the
1386    --    parent spec in this case can be found from the corresponding spec).
1387
1388    --  Present_Expr (Uint3-Sem)
1389    --    Present in an N_Variant node. This has a meaningful value only after
1390    --    Gigi has back annotated the tree with representation information.
1391    --    At this point, it contains a reference to a gcc expression that
1392    --    depends on the values of one or more discriminants. Give a set of
1393    --    discriminant values, this expression evaluates to False (zero) if
1394    --    variant is not present, and True (non-zero) if it is present. See
1395    --    unit Repinfo for further details on gigi back annotation. This
1396    --    field is used during ASIS processing (data decomposition annex)
1397    --    to determine if a field is present or not.
1398
1399    --  Print_In_Hex (Flag13-Sem)
1400    --    Set on an N_Integer_Literal node to indicate that the value should
1401    --    be printed in hexadecimal in the sprint listing. Has no effect on
1402    --    legality or semantics of program, only on the displayed output.
1403    --    This is used to clarify output from the packed array cases.
1404
1405    --  Procedure_To_Call (Node4-Sem)
1406    --    Present in N_Allocator, N_Free_Statement, and N_Return_Statement
1407    --    nodes. References the entity for the declaration of the procedure
1408    --    to be called to accomplish the required operation (i.e. for the
1409    --    Allocate procedure in the case of N_Allocator and N_Return_Statement
1410    --    (for allocating the return value), and for the Deallocate procedure
1411    --    in the case of N_Free_Statement.
1412
1413    --  Raises_Constraint_Error (Flag7-Sem)
1414    --    Set on an expression whose evaluation will definitely fail a
1415    --    constraint error check. In the case of static expressions, this
1416    --    flag must be set accurately (and if it is set, the expression is
1417    --    typically illegal unless it appears as a non-elaborated branch of
1418    --    a short-circuit form). For a non-static expression, this flag may
1419    --    be set whenever an expression (e.g. an aggregate) is known to raise
1420    --    constraint error. If set, the expression definitely will raise CE
1421    --    if elaborated at runtime. If not set, the expression may or may
1422    --    not raise CE. In other words, on static expressions, the flag is
1423    --    set accurately, on non-static expressions it is set conservatively.
1424
1425    --  Redundant_Use (Flag13-Sem)
1426    --    A flag present in nodes that can appear as an operand in a use
1427    --    clause or use type clause (identifiers, expanded names, attribute
1428    --    references). Set to indicate that a use is redundant (and therefore
1429    --    need not be undone on scope exit).
1430
1431    --  Return_Type (Node2-Sem)
1432    --    Present in N_Return_Statement node. For a procedure, this is set
1433    --    to Standard_Void_Type. For a function it references the entity
1434    --    for the returned type.
1435
1436    --  Rounded_Result (Flag18-Sem)
1437    --    Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1438    --    Used in the fixed-point cases to indicate that the result must be
1439    --    rounded as a result of the use of the 'Round attribute. Also used
1440    --    for integer N_Op_Divide nodes to indicate that the result should
1441    --    be rounded to the nearest integer (breaking ties away from zero),
1442    --    rather than truncated towards zero as usual. These rounded integer
1443    --    operations are the result of expansion of rounded fixed-point
1444    --    divide, conversion and multiplication operations.
1445
1446    --  Scope (Node3-Sem)
1447    --    Present in defining identifiers, defining character literals and
1448    --    defining operator symbols (i.e. in all entities). The entities of
1449    --    a scope all use this field to reference the corresponding scope
1450    --    entity. See Einfo for further details.
1451
1452    --  Shift_Count_OK (Flag4-Sem)
1453    --    A flag present in shift nodes to indicate that the shift count is
1454    --    known to be in range, i.e. is in the range from zero to word length
1455    --    minus one. If this flag is not set, then the shift count may be
1456    --    outside this range, i.e. larger than the word length, and the code
1457    --    must ensure that such shift counts give the appropriate result.
1458
1459    --  Source_Type (Node1-Sem)
1460    --    Used in an N_Validate_Unchecked_Conversion node to point to the
1461    --    source type entity for the unchecked conversion instantiation
1462    --    which gigi must do size validation for.
1463
1464    --  Static_Processing_OK (Flag4-Sem)
1465    --    Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1466    --    flag is set, the full value of the aggregate can be determined at
1467    --    compile time and the aggregate can be passed as is to the back-end.
1468    --    In this event it is irrelevant whether this flag is set or not.
1469    --    However, if the Compile_Time_Known_Aggregate flag is not set but
1470    --    Static_Processing_OK is set, the aggregate can (but need not) be
1471    --    converted into a compile time known aggregate by the expander.
1472    --    See Sem_Aggr for the specific conditions under which an aggregate
1473    --    has its Static_Processing_OK flag set.
1474
1475    --  Storage_Pool (Node1-Sem)
1476    --    Present in N_Allocator, N_Free_Statement and N_Return_Statement
1477    --    nodes. References the entity for the storage pool to be used for
1478    --    the allocate or free call or for the allocation of the returned
1479    --    value from a function. Empty indicates that the global default
1480    --    default pool is to be used. Note that in the case of a return
1481    --    statement, this field is set only if the function returns a
1482    --    value of a type whose size is not known at compile time on the
1483    --    secondary stack. It is never set on targets for which the target
1484    --    parameter Targparm.Functions_Return_By_DSP_On_Target is True.
1485
1486    --  Target_Type (Node2-Sem)
1487    --    Used in an N_Validate_Unchecked_Conversion node to point to the
1488    --    target type entity for the unchecked conversion instantiation
1489    --    which gigi must do size validation for.
1490
1491    --  Then_Actions (List3-Sem)
1492    --    This field is present in conditional expression nodes. During code
1493    --    expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1494    --    actions at an appropriate place in the tree to get elaborated at the
1495    --    right time. For conditional expressions, we have to be sure that the
1496    --    actions for the Then branch are only elaborated if the condition is
1497    --    True. The Then_Actions field is used as a temporary parking place
1498    --    for these actions. The final tree is always rewritten to eliminate
1499    --    the need for this field, so in the tree passed to Gigi, this field
1500    --    is always set to No_List.
1501
1502    --  Treat_Fixed_As_Integer (Flag14-Sem)
1503    --    This flag appears in operator nodes for divide, multiply, mod and
1504    --    rem on fixed-point operands. It indicates that the operands are
1505    --    to be treated as integer values, ignoring small values. This flag
1506    --    is only set as a result of expansion of fixed-point operations.
1507    --    Typically a fixed-point multplication in the source generates
1508    --    subsidiary multiplication and division operations that work with
1509    --    the underlying integer values and have this flag set. Note that
1510    --    this flag is not needed on other arithmetic operations (add, neg,
1511    --    subtract etc) since in these cases it is always the case that fixed
1512    --    is treated as integer. The Etype field MUST be set if this flag
1513    --    is set. The analyzer knows to leave such nodes alone, and whoever
1514    --    makes them must set the correct Etype value.
1515
1516    --  TSS_Elist (Elist3-Sem)
1517    --    Present in N_Freeze_Entity nodes. Holds an element list containing
1518    --    entries for each TSS (type support subprogram) associated with the
1519    --    frozen type. The elements of the list are the entities for the
1520    --    subprograms (see package Exp_TSS for further details). Set to
1521    --    No_Elist if there are no type support subprograms for the type
1522    --    or if the freeze node is not for a type.
1523
1524    --  Unreferenced_In_Spec (Flag7-Sem)
1525    --    Present in N_With_Clause nodes. Set if the with clause is on the
1526    --    package or subprogram spec where the main unit is the corresponding
1527    --    body, and is not referenced by the spec (it may still be referenced
1528    --    by the body, so this flag is used to generate the proper message
1529    --    (see Sem_Util.Check_Unused_Withs for details)
1530
1531    --  Was_Originally_Stub (Flag13-Sem)
1532    --    This flag is set in the node for a proper body that replaces a
1533    --    stub. During the analysis procedure, stubs in some situations
1534    --    get rewritten by the corresponding bodies, and we set this flag
1535    --    to remember that this happened. Note that it is not good enough
1536    --    to rely on the use of Original_Node here because of the case of
1537    --    nested instantiations where the substituted node can be copied.
1538
1539    --  Zero_Cost_Handling (Flag5-Sem)
1540    --    This flag is set in all handled sequence of statement and exception
1541    --    handler nodes if eceptions are to be handled using the zero-cost
1542    --    mechanism (see Ada.Exceptions and System.Exceptions in files
1543    --    a-except.ads/adb and s-except.ads for full details). What gigi
1544    --    needs to do for such a handler is simply to put the code in the
1545    --    handler somewhere. The front end has generated all necessary labels.
1546
1547    --------------------------------------------------
1548    -- Note on Use of End_Label and End_Span Fields --
1549    --------------------------------------------------
1550
1551    --  Several constructs have end lines:
1552
1553    --    Loop Statement             end loop [loop_IDENTIFIER];
1554    --    Package Specification      end [[PARENT_UNIT_NAME .] IDENTIFIER]
1555    --    Task Definition            end [task_IDENTIFIER]
1556    --    Protected Definition       end [protected_IDENTIFIER]
1557    --    Protected Body             end [protected_IDENTIFIER]
1558
1559    --    Block Statement            end [block_IDENTIFIER];
1560    --    Subprogram Body            end [DESIGNATOR];
1561    --    Package Body               end [[PARENT_UNIT_NAME .] IDENTIFIER];
1562    --    Task Body                  end [task_IDENTIFIER];
1563    --    Accept Statement           end [entry_IDENTIFIER]];
1564    --    Entry Body                 end [entry_IDENTIFIER];
1565
1566    --    If Statement               end if;
1567    --    Case Statement             end case;
1568
1569    --    Record Definition          end record;
1570    --    Enumeration Definition     );
1571
1572    --  The End_Label and End_Span fields are used to mark the locations
1573    --  of these lines, and also keep track of the label in the case where
1574    --  a label is present.
1575
1576    --  For the first group above, the End_Label field of the corresponding
1577    --  node is used to point to the label identifier. In the case where
1578    --  there is no label in the source, the parser supplies a dummy
1579    --  identifier (with Comes_From_Source set to False), and the Sloc
1580    --  of this dummy identifier marks the location of the token following
1581    --  the END token.
1582
1583    --  For the second group, the use of End_Label is similar, but the
1584    --  End_Label is found in the N_Handled_Sequence_Of_Statements node.
1585    --  This is done simply because in some cases there is no room in
1586    --  the parent node.
1587
1588    --  For the third group, there is never any label, and instead of
1589    --  using End_Label, we use the End_Span field which gives the
1590    --  location of the token following END, relative to the starting
1591    --  Sloc of the construct, i.e. add Sloc (Node) + End_Span (Node)
1592    --  to get the Sloc of the IF or CASE following the End_Label.
1593
1594    --  The record definition case is handled specially, we treat it
1595    --  as though it required an optional label which is never present,
1596    --  and so the parser always builds a dummy identifier with Comes
1597    --  From Source set False. The reason we do this, rather than using
1598    --  End_Span in this case, is that we want to generate a cross-ref
1599    --  entry for the end of a record, since it represents a scope for
1600    --  name declaration purposes.
1601
1602    --  The enumeration definition case is handled in an exactly similar
1603    --  manner, building a dummy identifier to get a cross-reference.
1604
1605    --  Note: the reason we store the difference as a Uint, instead of
1606    --  storing the Source_Ptr value directly, is that Source_Ptr values
1607    --  cannot be distinguished from other types of values, and we count
1608    --  on all general use fields being self describing. To make things
1609    --  easier for clients, note that we provide function End_Location,
1610    --  and procedure Set_End_Location to allow access to the logical
1611    --  value (which is the Source_Ptr value for the end token).
1612
1613    ---------------------
1614    -- Syntactic Nodes --
1615    ---------------------
1616
1617       ---------------------
1618       -- 2.3  Identifier --
1619       ---------------------
1620
1621       --  IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1622       --  LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1623
1624       --  An IDENTIFIER shall not be a reserved word
1625
1626       --  In the Ada grammar identifiers are the bottom level tokens which
1627       --  have very few semantics. Actual program identifiers are direct
1628       --  names. If we were being 100% honest with the grammar, then we would
1629       --  have a node called N_Direct_Name which would point to an identifier.
1630       --  However, that's too many extra nodes, so we just use the N_Identifier
1631       --  node directly as a direct name, and it contains the expression fields
1632       --  and Entity field that correspond to its use as a direct name. In
1633       --  those few cases where identifiers appear in contexts where they are
1634       --  not direct names (pragmas, pragma argument associations, attribute
1635       --  references and attribute definition clauses), the Chars field of the
1636       --  node contains the Name_Id for the identifier name.
1637
1638       --  Note: in GNAT, a reserved word can be treated as an identifier
1639       --  in two cases. First, an incorrect use of a reserved word as an
1640       --  identifier is diagnosed and then treated as a normal identifier.
1641       --  Second, an attribute designator of the form of a reserved word
1642       --  (access, delta, digits, range) is treated as an identifier.
1643
1644       --  Note: The set of letters that is permitted in an identifier depends
1645       --  on the character set in use. See package Csets for full details.
1646
1647       --  N_Identifier
1648       --  Sloc points to identifier
1649       --  Chars (Name1) contains the Name_Id for the identifier
1650       --  Entity (Node4-Sem)
1651       --  Associated_Node (Node4-Sem)
1652       --  Original_Discriminant (Node2-Sem)
1653       --  Redundant_Use (Flag13-Sem)
1654       --  Has_Private_View (Flag11-Sem) (set in generic units)
1655       --  plus fields for expression
1656
1657       --------------------------
1658       -- 2.4  Numeric Literal --
1659       --------------------------
1660
1661       --  NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1662
1663       ----------------------------
1664       -- 2.4.1  Decimal Literal --
1665       ----------------------------
1666
1667       --  DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1668
1669       --  NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1670
1671       --  EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1672
1673       --  Decimal literals appear in the tree as either integer literal nodes
1674       --  or real literal nodes, depending on whether a period is present.
1675
1676       --  Note: literal nodes appear as a result of direct use of literals
1677       --  in the source program, and also as the result of evaluating
1678       --  expressions at compile time. In the latter case, it is possible
1679       --  to construct real literals that have no syntactic representation
1680       --  using the standard literal format. Such literals are listed by
1681       --  Sprint using the notation [numerator / denominator].
1682
1683       --  Note: the value of an integer literal node created by the front end
1684       --  is never outside the range of values of the base type. However, it
1685       --  can be the case that the value is outside the range of the
1686       --  particular subtype. This happens in the case of integer overflows
1687       --  with checks suppressed.
1688
1689       --  N_Integer_Literal
1690       --  Sloc points to literal
1691       --  Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1692       --  has been constant-folded into its literal value.
1693       --  Intval (Uint3) contains integer value of literal
1694       --  plus fields for expression
1695       --  Print_In_Hex (Flag13-Sem)
1696
1697       --  N_Real_Literal
1698       --  Sloc points to literal
1699       --  Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1700       --  has been constant-folded into its literal value.
1701       --  Realval (Ureal3) contains real value of literal
1702       --  Corresponding_Integer_Value (Uint4-Sem)
1703       --  Is_Machine_Number (Flag11-Sem)
1704       --  plus fields for expression
1705
1706       --------------------------
1707       -- 2.4.2  Based Literal --
1708       --------------------------
1709
1710       --  BASED_LITERAL ::=
1711       --   BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1712
1713       --  BASE ::= NUMERAL
1714
1715       --  BASED_NUMERAL ::=
1716       --    EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1717
1718       --  EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1719
1720       --  Based literals appear in the tree as either integer literal nodes
1721       --  or real literal nodes, depending on whether a period is present.
1722
1723       ----------------------------
1724       -- 2.5  Character Literal --
1725       ----------------------------
1726
1727       --  CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1728
1729       --  N_Character_Literal
1730       --  Sloc points to literal
1731       --  Chars (Name1) contains the Name_Id for the identifier
1732       --  Char_Literal_Value (Uint2) contains the literal value
1733       --  Entity (Node4-Sem)
1734       --  Associated_Node (Node4-Sem)
1735       --  Has_Private_View (Flag11-Sem) set in generic units.
1736       --  plus fields for expression
1737
1738       --  Note: the Entity field will be missing (and set to Empty) for
1739       --  character literals whose type is Standard.Wide_Character or
1740       --  Standard.Character or a type derived from one of these two.
1741       --  In this case the character literal stands for its own coding.
1742       --  The reason we take this irregular short cut is to avoid the
1743       --  need to build lots of junk defining character literal nodes.
1744
1745       -------------------------
1746       -- 2.6  String Literal --
1747       -------------------------
1748
1749       --  STRING LITERAL ::= "{STRING_ELEMENT}"
1750
1751       --  A STRING_ELEMENT is either a pair of quotation marks ("), or a
1752       --  single GRAPHIC_CHARACTER other than a quotation mark.
1753
1754       --  N_String_Literal
1755       --  Sloc points to literal
1756       --  Strval (Str3) contains Id of string value
1757       --  Has_Wide_Character (Flag11-Sem)
1758       --  plus fields for expression
1759
1760       ------------------
1761       -- 2.7  Comment --
1762       ------------------
1763
1764       --  A COMMENT starts with two adjacent hyphens and extends up to the
1765       --  end of the line. A COMMENT may appear on any line of a program.
1766
1767       --  Comments are skipped by the scanner and do not appear in the tree.
1768       --  It is possible to reconstruct the position of comments with respect
1769       --  to the elements of the tree by using the source position (Sloc)
1770       --  pointers that appear in every tree node.
1771
1772       -----------------
1773       -- 2.8  Pragma --
1774       -----------------
1775
1776       --  PRAGMA ::= pragma IDENTIFIER
1777       --    [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
1778
1779       --  Note that a pragma may appear in the tree anywhere a declaration
1780       --  or a statement may appear, as well as in some other situations
1781       --  which are explicitly documented.
1782
1783       --  N_Pragma
1784       --  Sloc points to PRAGMA
1785       --  Chars (Name1) identifier name from pragma identifier
1786       --  Pragma_Argument_Associations (List2) (set to No_List if none)
1787       --  Debug_Statement (Node3) (set to Empty if not Debug, Assert)
1788       --  Next_Rep_Item (Node4-Sem)
1789
1790       --  Note: we should have a section on what pragmas are passed on to
1791       --  the back end to be processed. This section should note that pragma
1792       --  Psect_Object is always converted to Common_Object, but there are
1793       --  undoubtedly many other similar notes required ???
1794
1795       --------------------------------------
1796       -- 2.8  Pragma Argument Association --
1797       --------------------------------------
1798
1799       --  PRAGMA_ARGUMENT_ASSOCIATION ::=
1800       --    [pragma_argument_IDENTIFIER =>] NAME
1801       --  | [pragma_argument_IDENTIFIER =>] EXPRESSION
1802
1803       --  N_Pragma_Argument_Association
1804       --  Sloc points to first token in association
1805       --  Chars (Name1) (set to No_Name if no pragma argument identifier)
1806       --  Expression (Node3)
1807
1808       ------------------------
1809       -- 2.9  Reserved Word --
1810       ------------------------
1811
1812       --  Reserved words are parsed by the scanner, and returned as the
1813       --  corresponding token types (e.g. PACKAGE is returned as Tok_Package)
1814
1815       ----------------------------
1816       -- 3.1  Basic Declaration --
1817       ----------------------------
1818
1819       --  BASIC_DECLARATION ::=
1820       --    TYPE_DECLARATION          | SUBTYPE_DECLARATION
1821       --  | OBJECT_DECLARATION        | NUMBER_DECLARATION
1822       --  | SUBPROGRAM_DECLARATION    | ABSTRACT_SUBPROGRAM_DECLARATION
1823       --  | PACKAGE_DECLARATION       | RENAMING_DECLARATION
1824       --  | EXCEPTION_DECLARATION     | GENERIC_DECLARATION
1825       --  | GENERIC_INSTANTIATION
1826
1827       --  Basic declaration also includes IMPLICIT_LABEL_DECLARATION
1828       --  see further description in section on semantic nodes.
1829
1830       --  Also, in the tree that is constructed, a pragma may appear
1831       --  anywhere that a declaration may appear.
1832
1833       ------------------------------
1834       -- 3.1  Defining Identifier --
1835       ------------------------------
1836
1837       --  DEFINING_IDENTIFIER ::= IDENTIFIER
1838
1839       --  A defining identifier is an entity, which has additional fields
1840       --  depending on the setting of the Ekind field. These additional
1841       --  fields are defined (and access subprograms declared) in package
1842       --  Einfo.
1843
1844       --  Note: N_Defining_Identifier is an extended node whose fields are
1845       --  deliberate layed out to match the layout of fields in an ordinary
1846       --  N_Identifier node allowing for easy alteration of an identifier
1847       --  node into a defining identifier node. For details, see procedure
1848       --  Sinfo.CN.Change_Identifier_To_Defining_Identifier.
1849
1850       --  N_Defining_Identifier
1851       --  Sloc points to identifier
1852       --  Chars (Name1) contains the Name_Id for the identifier
1853       --  Next_Entity (Node2-Sem)
1854       --  Scope (Node3-Sem)
1855       --  Etype (Node5-Sem)
1856
1857       -----------------------------
1858       -- 3.2.1  Type Declaration --
1859       -----------------------------
1860
1861       --  TYPE_DECLARATION ::=
1862       --    FULL_TYPE_DECLARATION
1863       --  | INCOMPLETE_TYPE_DECLARATION
1864       --  | PRIVATE_TYPE_DECLARATION
1865       --  | PRIVATE_EXTENSION_DECLARATION
1866
1867       ----------------------------------
1868       -- 3.2.1  Full Type Declaration --
1869       ----------------------------------
1870
1871       --  FULL_TYPE_DECLARATION ::=
1872       --    type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
1873       --      is TYPE_DEFINITION;
1874       --  | TASK_TYPE_DECLARATION
1875       --  | PROTECTED_TYPE_DECLARATION
1876
1877       --  The full type declaration node is used only for the first case. The
1878       --  second case (concurrent type declaration), is represented directly
1879       --  by a task type declaration or a protected type declaration.
1880
1881       --  N_Full_Type_Declaration
1882       --  Sloc points to TYPE
1883       --  Defining_Identifier (Node1)
1884       --  Discriminant_Specifications (List4) (set to No_List if none)
1885       --  Type_Definition (Node3)
1886       --  Discr_Check_Funcs_Built (Flag11-Sem)
1887
1888       ----------------------------
1889       -- 3.2.1  Type Definition --
1890       ----------------------------
1891
1892       --  TYPE_DEFINITION ::=
1893       --    ENUMERATION_TYPE_DEFINITION  | INTEGER_TYPE_DEFINITION
1894       --  | REAL_TYPE_DEFINITION         | ARRAY_TYPE_DEFINITION
1895       --  | RECORD_TYPE_DEFINITION       | ACCESS_TYPE_DEFINITION
1896       --  | DERIVED_TYPE_DEFINITION      | INTERFACE_TYPE_DEFINITION
1897
1898       --------------------------------
1899       -- 3.2.2  Subtype Declaration --
1900       --------------------------------
1901
1902       --  SUBTYPE_DECLARATION ::=
1903       --    subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
1904
1905       --  The subtype indication field is set to Empty for subtypes
1906       --  declared in package Standard (Positive, Natural).
1907
1908       --  N_Subtype_Declaration
1909       --  Sloc points to SUBTYPE
1910       --  Defining_Identifier (Node1)
1911       --  Null_Exclusion_Present (Flag11)
1912       --  Subtype_Indication (Node5)
1913       --  Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
1914       --  Exception_Junk (Flag7-Sem)
1915
1916       -------------------------------
1917       -- 3.2.2  Subtype Indication --
1918       -------------------------------
1919
1920       --  SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
1921
1922       --  Note: if no constraint is present, the subtype indication appears
1923       --  directly in the tree as a subtype mark. The N_Subtype_Indication
1924       --  node is used only if a constraint is present.
1925
1926       --  Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
1927       --  with the null-exclusion part (see AI-231), we had to introduce a new
1928       --  attribute in all the parents of subtype_indication nodes to indicate
1929       --  if the null-exclusion is present.
1930
1931       --  Note: the reason that this node has expression fields is that a
1932       --  subtype indication can appear as an operand of a membership test.
1933
1934       --  N_Subtype_Indication
1935       --  Sloc points to first token of subtype mark
1936       --  Subtype_Mark (Node4)
1937       --  Constraint (Node3)
1938       --  Etype (Node5-Sem)
1939       --  Must_Not_Freeze (Flag8-Sem)
1940
1941       --  Note: Etype is a copy of the Etype field of the Subtype_Mark. The
1942       --  reason for this redundancy is so that in a list of array index types,
1943       --  the Etype can be uniformly accessed to determine the subscript type.
1944       --  This means that no Itype is constructed for the actual subtype that
1945       --  is created by the subtype indication. If such an Itype is required,
1946       --  it is constructed in the context in which the indication appears.
1947
1948       -------------------------
1949       -- 3.2.2  Subtype Mark --
1950       -------------------------
1951
1952       --  SUBTYPE_MARK ::= subtype_NAME
1953
1954       -----------------------
1955       -- 3.2.2  Constraint --
1956       -----------------------
1957
1958       --  CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
1959
1960       ------------------------------
1961       -- 3.2.2  Scalar Constraint --
1962       ------------------------------
1963
1964       --  SCALAR_CONSTRAINT ::=
1965       --    RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
1966
1967       ---------------------------------
1968       -- 3.2.2  Composite Constraint --
1969       ---------------------------------
1970
1971       --  COMPOSITE_CONSTRAINT ::=
1972       --    INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
1973
1974       -------------------------------
1975       -- 3.3.1  Object Declaration --
1976       -------------------------------
1977
1978       --  OBJECT_DECLARATION ::=
1979       --    DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1980       --      [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION];
1981       --  | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1982       --      ACCESS_DEFINITION [:= EXPRESSION];
1983       --  | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
1984       --      ARRAY_TYPE_DEFINITION [:= EXPRESSION];
1985       --  | SINGLE_TASK_DECLARATION
1986       --  | SINGLE_PROTECTED_DECLARATION
1987
1988       --  Note: aliased is not permitted in Ada 83 mode
1989
1990       --  The N_Object_Declaration node is only for the first two cases.
1991       --  Single task declaration is handled by P_Task (9.1)
1992       --  Single protected declaration is handled by P_protected (9.5)
1993
1994       --  Although the syntax allows multiple identifiers in the list, the
1995       --  semantics is as though successive declarations were given with
1996       --  identical type definition and expression components. To simplify
1997       --  semantic processing, the parser represents a multiple declaration
1998       --  case as a sequence of single declarations, using the More_Ids and
1999       --  Prev_Ids flags to preserve the original source form as described
2000       --  in the section on "Handling of Defining Identifier Lists".
2001
2002       --  Note: if a range check is required for the initialization
2003       --  expression then the Do_Range_Check flag is set in the Expression,
2004       --  with the check being done against the type given by the object
2005       --  definition, which is also the Etype of the defining identifier.
2006
2007       --  Note: the contents of the Expression field must be ignored (i.e.
2008       --  treated as though it were Empty) if No_Initialization is set True.
2009
2010       --  Note: the back end places some restrictions on the form of the
2011       --  Expression field. If the object being declared is Atomic, then
2012       --  the Expression may not have the form of an aggregate (since this
2013       --  might cause the back end to generate separate assignments). It
2014       --  also cannot be a reference to an object marked as a true constant
2015       --  (Is_True_Constant flag set), where the object is itself initalized
2016       --  with an aggregate. If necessary the front end must generate an
2017       --  extra temporary (with Is_True_Constant set False), and initialize
2018       --  this temporary as required (the temporary itself is not atomic).
2019
2020       --  Note: there is not node kind for object definition. Instead, the
2021       --  corresponding field holds a subtype indication, an array type
2022       --  definition, or (Ada 2005, AI-406) an access definition.
2023
2024       --  N_Object_Declaration
2025       --  Sloc points to first identifier
2026       --  Defining_Identifier (Node1)
2027       --  Aliased_Present (Flag4) set if ALIASED appears
2028       --  Constant_Present (Flag17) set if CONSTANT appears
2029       --  Null_Exclusion_Present (Flag11)
2030       --  Object_Definition (Node4) subtype indic./array type def./ access def.
2031       --  Expression (Node3) (set to Empty if not present)
2032       --  Handler_List_Entry (Node2-Sem)
2033       --  Corresponding_Generic_Association (Node5-Sem)
2034       --  More_Ids (Flag5) (set to False if no more identifiers in list)
2035       --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2036       --  No_Initialization (Flag13-Sem)
2037       --  Assignment_OK (Flag15-Sem)
2038       --  Exception_Junk (Flag7-Sem)
2039       --  Delay_Finalize_Attach (Flag14-Sem)
2040       --  Is_Subprogram_Descriptor (Flag16-Sem)
2041
2042       -------------------------------------
2043       -- 3.3.1  Defining Identifier List --
2044       -------------------------------------
2045
2046       --  DEFINING_IDENTIFIER_LIST ::=
2047       --    DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2048
2049       -------------------------------
2050       -- 3.3.2  Number Declaration --
2051       -------------------------------
2052
2053       --  NUMBER_DECLARATION ::=
2054       --    DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2055
2056       --  Although the syntax allows multiple identifiers in the list, the
2057       --  semantics is as though successive declarations were given with
2058       --  identical expressions. To simplify semantic processing, the parser
2059       --  represents a multiple declaration case as a sequence of single
2060       --  declarations, using the More_Ids and Prev_Ids flags to preserve
2061       --  the original source form as described in the section on "Handling
2062       --  of Defining Identifier Lists".
2063
2064       --  N_Number_Declaration
2065       --  Sloc points to first identifier
2066       --  Defining_Identifier (Node1)
2067       --  Expression (Node3)
2068       --  More_Ids (Flag5) (set to False if no more identifiers in list)
2069       --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2070
2071       ----------------------------------
2072       -- 3.4  Derived Type Definition --
2073       ----------------------------------
2074
2075       --  DERIVED_TYPE_DEFINITION ::=
2076       --    [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2077       --    [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2078
2079    --  Note: ABSTRACT, LIMITED and record extension part are not permitted
2080    --  in Ada 83 mode
2081
2082       --  Note: a record extension part is required if ABSTRACT is present
2083
2084       --  N_Derived_Type_Definition
2085       --  Sloc points to NEW
2086       --  Abstract_Present (Flag4)
2087       --  Null_Exclusion_Present (Flag11) (set to False if not present)
2088       --  Subtype_Indication (Node5)
2089       --  Record_Extension_Part (Node3) (set to Empty if not present)
2090       --  Limited_Present (Flag17)
2091       --  Task_Present (Flag5) set in task interfaces
2092       --  Protected_Present (Flag6) set in protected interfaces
2093       --  Synchronized_Present (Flag7) set in interfaces
2094       --  Interface_List (List2) (set to No_List if none)
2095       --  Interface_Present (Flag16) set in abstract interfaces
2096
2097    --  Note: Task_Present, Protected_Present, Synchronized_Present,
2098    --        Interface_List, and Interface_Present are used for abstract
2099    --        interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2100
2101       ---------------------------
2102       -- 3.5  Range Constraint --
2103       ---------------------------
2104
2105       --  RANGE_CONSTRAINT ::= range RANGE
2106
2107       --  N_Range_Constraint
2108       --  Sloc points to RANGE
2109       --  Range_Expression (Node4)
2110
2111       ----------------
2112       -- 3.5  Range --
2113       ----------------
2114
2115       --  RANGE ::=
2116       --    RANGE_ATTRIBUTE_REFERENCE
2117       --  | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2118
2119       --  Note: the case of a range given as a range attribute reference
2120       --  appears directly in the tree as an attribute reference.
2121
2122       --  Note: the field name for a reference to a range is Range_Expression
2123       --  rather than Range, because range is a reserved keyword in Ada!
2124
2125       --  Note: the reason that this node has expression fields is that a
2126       --  range can appear as an operand of a membership test. The Etype
2127       --  field is the type of the range (we do NOT construct an implicit
2128       --  subtype to represent the range exactly).
2129
2130       --  N_Range
2131       --  Sloc points to ..
2132       --  Low_Bound (Node1)
2133       --  High_Bound (Node2)
2134       --  Includes_Infinities (Flag11)
2135       --  plus fields for expression
2136
2137       --  Note: if the range appears in a context, such as a subtype
2138       --  declaration, where range checks are required on one or both of
2139       --  the expression fields, then type conversion nodes are inserted
2140       --  to represent the required checks.
2141
2142       ----------------------------------------
2143       -- 3.5.1  Enumeration Type Definition --
2144       ----------------------------------------
2145
2146       --  ENUMERATION_TYPE_DEFINITION ::=
2147       --    (ENUMERATION_LITERAL_SPECIFICATION
2148       --      {, ENUMERATION_LITERAL_SPECIFICATION})
2149
2150       --  Note: the Literals field in the node described below is null for
2151       --  the case of the standard types CHARACTER and WIDE_CHARACTER, for
2152       --  which special processing handles these types as special cases.
2153
2154       --  N_Enumeration_Type_Definition
2155       --  Sloc points to left parenthesis
2156       --  Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2157       --  End_Label (Node4) (set to Empty if internally generated record)
2158
2159       ----------------------------------------------
2160       -- 3.5.1  Enumeration Literal Specification --
2161       ----------------------------------------------
2162
2163       --  ENUMERATION_LITERAL_SPECIFICATION ::=
2164       --    DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2165
2166       ---------------------------------------
2167       -- 3.5.1  Defining Character Literal --
2168       ---------------------------------------
2169
2170       --  DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2171
2172       --  A defining character literal is an entity, which has additional
2173       --  fields depending on the setting of the Ekind field. These
2174       --  additional fields are defined (and access subprograms declared)
2175       --  in package Einfo.
2176
2177       --  Note: N_Defining_Character_Literal is an extended node whose fields
2178       --  are deliberate layed out to match the layout of fields in an ordinary
2179       --  N_Character_Literal node allowing for easy alteration of a character
2180       --  literal node into a defining character literal node. For details, see
2181       --  Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2182
2183       --  N_Defining_Character_Literal
2184       --  Sloc points to literal
2185       --  Chars (Name1) contains the Name_Id for the identifier
2186       --  Next_Entity (Node2-Sem)
2187       --  Scope (Node3-Sem)
2188       --  Etype (Node5-Sem)
2189
2190       ------------------------------------
2191       -- 3.5.4  Integer Type Definition --
2192       ------------------------------------
2193
2194       --  Note: there is an error in this rule in the latest version of the
2195       --  grammar, so we have retained the old rule pending clarification.
2196
2197       --  INTEGER_TYPE_DEFINITION ::=
2198       --    SIGNED_INTEGER_TYPE_DEFINITION
2199       --  | MODULAR_TYPE_DEFINITION
2200
2201       -------------------------------------------
2202       -- 3.5.4  Signed Integer Type Definition --
2203       -------------------------------------------
2204
2205       --  SIGNED_INTEGER_TYPE_DEFINITION ::=
2206       --    range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2207
2208       --  Note: the Low_Bound and High_Bound fields are set to Empty
2209       --  for integer types defined in package Standard.
2210
2211       --  N_Signed_Integer_Type_Definition
2212       --  Sloc points to RANGE
2213       --  Low_Bound (Node1)
2214       --  High_Bound (Node2)
2215
2216       ------------------------------------
2217       -- 3.5.4  Modular Type Definition --
2218       ------------------------------------
2219
2220       --  MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2221
2222       --  N_Modular_Type_Definition
2223       --  Sloc points to MOD
2224       --  Expression (Node3)
2225
2226       ---------------------------------
2227       -- 3.5.6  Real Type Definition --
2228       ---------------------------------
2229
2230       --  REAL_TYPE_DEFINITION ::=
2231       --    FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2232
2233       --------------------------------------
2234       -- 3.5.7  Floating Point Definition --
2235       --------------------------------------
2236
2237       --  FLOATING_POINT_DEFINITION ::=
2238       --    digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2239
2240       --  Note: The Digits_Expression and Real_Range_Specifications fields
2241       --  are set to Empty for floating-point types declared in Standard.
2242
2243       --  N_Floating_Point_Definition
2244       --  Sloc points to DIGITS
2245       --  Digits_Expression (Node2)
2246       --  Real_Range_Specification (Node4) (set to Empty if not present)
2247
2248       -------------------------------------
2249       -- 3.5.7  Real Range Specification --
2250       -------------------------------------
2251
2252       --  REAL_RANGE_SPECIFICATION ::=
2253       --    range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2254
2255       --  N_Real_Range_Specification
2256       --  Sloc points to RANGE
2257       --  Low_Bound (Node1)
2258       --  High_Bound (Node2)
2259
2260       -----------------------------------
2261       -- 3.5.9  Fixed Point Definition --
2262       -----------------------------------
2263
2264       --  FIXED_POINT_DEFINITION ::=
2265       --    ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2266
2267       --------------------------------------------
2268       -- 3.5.9  Ordinary Fixed Point Definition --
2269       --------------------------------------------
2270
2271       --  ORDINARY_FIXED_POINT_DEFINITION ::=
2272       --    delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2273
2274       --  Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2275
2276       --  N_Ordinary_Fixed_Point_Definition
2277       --  Sloc points to DELTA
2278       --  Delta_Expression (Node3)
2279       --  Real_Range_Specification (Node4)
2280
2281       -------------------------------------------
2282       -- 3.5.9  Decimal Fixed Point Definition --
2283       -------------------------------------------
2284
2285       --  DECIMAL_FIXED_POINT_DEFINITION ::=
2286       --    delta static_EXPRESSION
2287       --      digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2288
2289       --  Note: decimal types are not permitted in Ada 83 mode
2290
2291       --  N_Decimal_Fixed_Point_Definition
2292       --  Sloc points to DELTA
2293       --  Delta_Expression (Node3)
2294       --  Digits_Expression (Node2)
2295       --  Real_Range_Specification (Node4) (set to Empty if not present)
2296
2297       ------------------------------
2298       -- 3.5.9  Digits Constraint --
2299       ------------------------------
2300
2301       --  DIGITS_CONSTRAINT ::=
2302       --    digits static_EXPRESSION [RANGE_CONSTRAINT]
2303
2304       --  Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2305       --  Note: in Ada 95, reduced accuracy subtypes are obsolescent
2306
2307       --  N_Digits_Constraint
2308       --  Sloc points to DIGITS
2309       --  Digits_Expression (Node2)
2310       --  Range_Constraint (Node4) (set to Empty if not present)
2311
2312       --------------------------------
2313       -- 3.6  Array Type Definition --
2314       --------------------------------
2315
2316       --  ARRAY_TYPE_DEFINITION ::=
2317       --    UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2318
2319       -----------------------------------------
2320       -- 3.6  Unconstrained Array Definition --
2321       -----------------------------------------
2322
2323       --  UNCONSTRAINED_ARRAY_DEFINITION ::=
2324       --    array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2325       --      COMPONENT_DEFINITION
2326
2327       --  Note: dimensionality of array is indicated by number of entries in
2328       --  the Subtype_Marks list, which has one entry for each dimension.
2329
2330       --  N_Unconstrained_Array_Definition
2331       --  Sloc points to ARRAY
2332       --  Subtype_Marks (List2)
2333       --  Component_Definition (Node4)
2334
2335       -----------------------------------
2336       -- 3.6  Index Subtype Definition --
2337       -----------------------------------
2338
2339       --  INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2340
2341       --  There is no explicit node in the tree for an index subtype
2342       --  definition since the N_Unconstrained_Array_Definition node
2343       --  incorporates the type marks which appear in this context.
2344
2345       ---------------------------------------
2346       -- 3.6  Constrained Array Definition --
2347       ---------------------------------------
2348
2349       --  CONSTRAINED_ARRAY_DEFINITION ::=
2350       --    array (DISCRETE_SUBTYPE_DEFINITION
2351       --      {, DISCRETE_SUBTYPE_DEFINITION})
2352       --        of COMPONENT_DEFINITION
2353
2354       --  Note: dimensionality of array is indicated by number of entries
2355       --  in the Discrete_Subtype_Definitions list, which has one entry
2356       --  for each dimension.
2357
2358       --  N_Constrained_Array_Definition
2359       --  Sloc points to ARRAY
2360       --  Discrete_Subtype_Definitions (List2)
2361       --  Component_Definition (Node4)
2362
2363       --------------------------------------
2364       -- 3.6  Discrete Subtype Definition --
2365       --------------------------------------
2366
2367       --  DISCRETE_SUBTYPE_DEFINITION ::=
2368       --    discrete_SUBTYPE_INDICATION | RANGE
2369
2370       -------------------------------
2371       -- 3.6  Component Definition --
2372       -------------------------------
2373
2374       --  COMPONENT_DEFINITION ::=
2375       --    [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2376
2377       --  Note: although the syntax does not permit a component definition to
2378       --  be an anonymous array (and the parser will diagnose such an attempt
2379       --  with an appropriate message), it is possible for anonymous arrays
2380       --  to appear as component definitions. The semantics and back end handle
2381       --  this case properly, and the expander in fact generates such cases.
2382       --  Access_Definition is an optional field that gives support to
2383       --  Ada 2005 (AI-230). The parser generates nodes that have either the
2384       --  Subtype_Indication field or else the Access_Definition field.
2385
2386       --  N_Component_Definition
2387       --  Sloc points to ALIASED, ACCESS or to first token of subtype mark
2388       --  Aliased_Present (Flag4)
2389       --  Null_Exclusion_Present (Flag11)
2390       --  Subtype_Indication (Node5) (set to Empty if not present)
2391       --  Access_Definition (Node3) (set to Empty if not present)
2392
2393       -----------------------------
2394       -- 3.6.1  Index Constraint --
2395       -----------------------------
2396
2397       --  INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2398
2399       --  It is not in general possible to distinguish between discriminant
2400       --  constraints and index constraints at parse time, since a simple
2401       --  name could be either the subtype mark of a discrete range, or an
2402       --  expression in a discriminant association with no name. Either
2403       --  entry appears simply as the name, and the semantic parse must
2404       --  distinguish between the two cases. Thus we use a common tree
2405       --  node format for both of these constraint types.
2406
2407       --  See Discriminant_Constraint for format of node
2408
2409       ---------------------------
2410       -- 3.6.1  Discrete Range --
2411       ---------------------------
2412
2413       --  DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2414
2415       ----------------------------
2416       -- 3.7  Discriminant Part --
2417       ----------------------------
2418
2419       --  DISCRIMINANT_PART ::=
2420       --    UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2421
2422       ------------------------------------
2423       -- 3.7  Unknown Discriminant Part --
2424       ------------------------------------
2425
2426       --  UNKNOWN_DISCRIMINANT_PART ::= (<>)
2427
2428       --  Note: unknown discriminant parts are not permitted in Ada 83 mode
2429
2430       --  There is no explicit node in the tree for an unknown discriminant
2431       --  part. Instead the Unknown_Discriminants_Present flag is set in the
2432       --  parent node.
2433
2434       ----------------------------------
2435       -- 3.7  Known Discriminant Part --
2436       ----------------------------------
2437
2438       --  KNOWN_DISCRIMINANT_PART ::=
2439       --    (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2440
2441       -------------------------------------
2442       -- 3.7  Discriminant Specification --
2443       -------------------------------------
2444
2445       --  DISCRIMINANT_SPECIFICATION ::=
2446       --    DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2447       --      [:= DEFAULT_EXPRESSION]
2448       --  | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2449       --      [:= DEFAULT_EXPRESSION]
2450
2451       --  Although the syntax allows multiple identifiers in the list, the
2452       --  semantics is as though successive specifications were given with
2453       --  identical type definition and expression components. To simplify
2454       --  semantic processing, the parser represents a multiple declaration
2455       --  case as a sequence of single specifications, using the More_Ids and
2456       --  Prev_Ids flags to preserve the original source form as described
2457       --  in the section on "Handling of Defining Identifier Lists".
2458
2459       --  N_Discriminant_Specification
2460       --  Sloc points to first identifier
2461       --  Defining_Identifier (Node1)
2462       --  Null_Exclusion_Present (Flag11)
2463       --  Discriminant_Type (Node5) subtype mark or access parameter definition
2464       --  Expression (Node3) (set to Empty if no default expression)
2465       --  More_Ids (Flag5) (set to False if no more identifiers in list)
2466       --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2467
2468       -----------------------------
2469       -- 3.7  Default Expression --
2470       -----------------------------
2471
2472       --  DEFAULT_EXPRESSION ::= EXPRESSION
2473
2474       ------------------------------------
2475       -- 3.7.1  Discriminant Constraint --
2476       ------------------------------------
2477
2478       --  DISCRIMINANT_CONSTRAINT ::=
2479       --    (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2480
2481       --  It is not in general possible to distinguish between discriminant
2482       --  constraints and index constraints at parse time, since a simple
2483       --  name could be either the subtype mark of a discrete range, or an
2484       --  expression in a discriminant association with no name. Either
2485       --  entry appears simply as the name, and the semantic parse must
2486       --  distinguish between the two cases. Thus we use a common tree
2487       --  node format for both of these constraint types.
2488
2489       --  N_Index_Or_Discriminant_Constraint
2490       --  Sloc points to left paren
2491       --  Constraints (List1) points to list of discrete ranges or
2492       --    discriminant associations
2493
2494       -------------------------------------
2495       -- 3.7.1  Discriminant Association --
2496       -------------------------------------
2497
2498       --  DISCRIMINANT_ASSOCIATION ::=
2499       --    [discriminant_SELECTOR_NAME
2500       --      {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2501
2502       --  Note: a discriminant association that has no selector name list
2503       --  appears directly as an expression in the tree.
2504
2505       --  N_Discriminant_Association
2506       --  Sloc points to first token of discriminant association
2507       --  Selector_Names (List1) (always non-empty, since if no selector
2508       --   names are present, this node is not used, see comment above)
2509       --  Expression (Node3)
2510
2511       ---------------------------------
2512       -- 3.8  Record Type Definition --
2513       ---------------------------------
2514
2515       --  RECORD_TYPE_DEFINITION ::=
2516       --    [[abstract] tagged] [limited] RECORD_DEFINITION
2517
2518       --  Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2519
2520       --  There is no explicit node in the tree for a record type definition.
2521       --  Instead the flags for Tagged_Present and Limited_Present appear in
2522       --  the N_Record_Definition node for a record definition appearing in
2523       --  the context of a record type definition.
2524
2525       ----------------------------
2526       -- 3.8  Record Definition --
2527       ----------------------------
2528
2529       --  RECORD_DEFINITION ::=
2530       --    record
2531       --      COMPONENT_LIST
2532       --    end record
2533       --  | null record
2534
2535       --  Note: the Abstract_Present, Tagged_Present and Limited_Present
2536       --  flags appear only for a record definition appearing in a record
2537       --  type definition.
2538
2539       --  Note: the NULL RECORD case is not permitted in Ada 83
2540
2541       --  N_Record_Definition
2542       --  Sloc points to RECORD or NULL
2543       --  End_Label (Node4) (set to Empty if internally generated record)
2544       --  Abstract_Present (Flag4)
2545       --  Tagged_Present (Flag15)
2546       --  Limited_Present (Flag17)
2547       --  Component_List (Node1) empty in null record case
2548       --  Null_Present (Flag13) set in null record case
2549       --  Task_Present (Flag5) set in task interfaces
2550       --  Protected_Present (Flag6) set in protected interfaces
2551       --  Synchronized_Present (Flag7) set in interfaces
2552       --  Interface_Present (Flag16) set in abstract interfaces
2553       --  Interface_List (List2) (set to No_List if none)
2554
2555       --  Note: Task_Present, Protected_Present, Synchronized _Present,
2556       --        Interface_List and Interface_Present are used for abstract
2557       --        interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2558
2559       -------------------------
2560       -- 3.8  Component List --
2561       -------------------------
2562
2563       --  COMPONENT_LIST ::=
2564       --    COMPONENT_ITEM {COMPONENT_ITEM}
2565       --  | {COMPONENT_ITEM} VARIANT_PART
2566       --  | null;
2567
2568       --  N_Component_List
2569       --  Sloc points to first token of component list
2570       --  Component_Items (List3)
2571       --  Variant_Part (Node4) (set to Empty if no variant part)
2572       --  Null_Present (Flag13)
2573
2574       -------------------------
2575       -- 3.8  Component Item --
2576       -------------------------
2577
2578       --  COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2579
2580       --  Note: A component item can also be a pragma, and in the tree
2581       --  that is obtained after semantic processing, a component item
2582       --  can be an N_Null node resulting from a non-recognized pragma.
2583
2584       --------------------------------
2585       -- 3.8  Component Declaration --
2586       --------------------------------
2587
2588       --  COMPONENT_DECLARATION ::=
2589       --    DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2590       --      [:= DEFAULT_EXPRESSION]
2591
2592       --  Note: although the syntax does not permit a component definition to
2593       --  be an anonymous array (and the parser will diagnose such an attempt
2594       --  with an appropriate message), it is possible for anonymous arrays
2595       --  to appear as component definitions. The semantics and back end handle
2596       --  this case properly, and the expander in fact generates such cases.
2597
2598       --  Although the syntax allows multiple identifiers in the list, the
2599       --  semantics is as though successive declarations were given with the
2600       --  same component definition and expression components. To simplify
2601       --  semantic processing, the parser represents a multiple declaration
2602       --  case as a sequence of single declarations, using the More_Ids and
2603       --  Prev_Ids flags to preserve the original source form as described
2604       --  in the section on "Handling of Defining Identifier Lists".
2605
2606       --  N_Component_Declaration
2607       --  Sloc points to first identifier
2608       --  Defining_Identifier (Node1)
2609       --  Component_Definition (Node4)
2610       --  Expression (Node3) (set to Empty if no default expression)
2611       --  More_Ids (Flag5) (set to False if no more identifiers in list)
2612       --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2613
2614       -------------------------
2615       -- 3.8.1  Variant Part --
2616       -------------------------
2617
2618       --  VARIANT_PART ::=
2619       --    case discriminant_DIRECT_NAME is
2620       --      VARIANT
2621       --      {VARIANT}
2622       --    end case;
2623
2624       --  Note: the variants list can contain pragmas as well as variants.
2625       --  In a properly formed program there is at least one variant.
2626
2627       --  N_Variant_Part
2628       --  Sloc points to CASE
2629       --  Name (Node2)
2630       --  Variants (List1)
2631
2632       --------------------
2633       -- 3.8.1  Variant --
2634       --------------------
2635
2636       --  VARIANT ::=
2637       --    when DISCRETE_CHOICE_LIST =>
2638       --      COMPONENT_LIST
2639
2640       --  N_Variant
2641       --  Sloc points to WHEN
2642       --  Discrete_Choices (List4)
2643       --  Component_List (Node1)
2644       --  Enclosing_Variant (Node2-Sem)
2645       --  Present_Expr (Uint3-Sem)
2646       --  Dcheck_Function (Node5-Sem)
2647
2648       ---------------------------------
2649       -- 3.8.1  Discrete Choice List --
2650       ---------------------------------
2651
2652       --  DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2653
2654       ----------------------------
2655       -- 3.8.1  Discrete Choice --
2656       ----------------------------
2657
2658       --  DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2659
2660       --  Note: in Ada 83 mode, the expression must be a simple expression
2661
2662       --  The only choice that appears explicitly is the OTHERS choice, as
2663       --  defined here. Other cases of discrete choice (expression and
2664       --  discrete range) appear directly. This production is also used
2665       --  for the OTHERS possibility of an exception choice.
2666
2667       --  Note: in accordance with the syntax, the parser does not check that
2668       --  OTHERS appears at the end on its own in a choice list context. This
2669       --  is a semantic check.
2670
2671       --  N_Others_Choice
2672       --  Sloc points to OTHERS
2673       --  Others_Discrete_Choices (List1-Sem)
2674       --  All_Others (Flag11-Sem)
2675
2676       ----------------------------------
2677       -- 3.9.1  Record Extension Part --
2678       ----------------------------------
2679
2680       --  RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2681
2682       --  Note: record extension parts are not permitted in Ada 83 mode
2683
2684       --------------------------------------
2685       -- 3.9.4  Interface Type Definition --
2686       --------------------------------------
2687
2688       --  INTERFACE_TYPE_DEFINITION ::=
2689       --    [limited | task | protected | synchronized]
2690       --    interface [interface_list]
2691
2692       --  Note: Interfaces are implemented with N_Record_Definition and
2693       --        N_Derived_Type_Definition nodes because most of the support
2694       --        for the analysis of abstract types has been reused to
2695       --        analyze abstract interfaces.
2696
2697       ----------------------------------
2698       -- 3.10  Access Type Definition --
2699       ----------------------------------
2700
2701       --  ACCESS_TYPE_DEFINITION ::=
2702       --    ACCESS_TO_OBJECT_DEFINITION
2703       --  | ACCESS_TO_SUBPROGRAM_DEFINITION
2704
2705       --------------------------
2706       -- 3.10  Null Exclusion --
2707       --------------------------
2708
2709       --  NULL_EXCLUSION ::= not null
2710
2711       ---------------------------------------
2712       -- 3.10  Access To Object Definition --
2713       ---------------------------------------
2714
2715       --  ACCESS_TO_OBJECT_DEFINITION ::=
2716       --    [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
2717       --    SUBTYPE_INDICATION
2718
2719       --  N_Access_To_Object_Definition
2720       --  Sloc points to ACCESS
2721       --  All_Present (Flag15)
2722       --  Null_Exclusion_Present (Flag11)
2723       --  Subtype_Indication (Node5)
2724       --  Constant_Present (Flag17)
2725
2726       -----------------------------------
2727       -- 3.10  General Access Modifier --
2728       -----------------------------------
2729
2730       --  GENERAL_ACCESS_MODIFIER ::= all | constant
2731
2732       --  Note: general access modifiers are not permitted in Ada 83 mode
2733
2734       --  There is no explicit node in the tree for general access modifier.
2735       --  Instead the All_Present or Constant_Present flags are set in the
2736       --  parent node.
2737
2738       -------------------------------------------
2739       -- 3.10  Access To Subprogram Definition --
2740       -------------------------------------------
2741
2742       --  ACCESS_TO_SUBPROGRAM_DEFINITION
2743       --    [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
2744       --  | [NULL_EXCLUSION] access [protected] function
2745       --    PARAMETER_AND_RESULT_PROFILE
2746
2747       --  Note: access to subprograms are not permitted in Ada 83 mode
2748
2749       --  N_Access_Function_Definition
2750       --  Sloc points to ACCESS
2751       --  Null_Exclusion_Present (Flag11)
2752       --  Protected_Present (Flag6)
2753       --  Parameter_Specifications (List3) (set to No_List if no formal part)
2754       --  Result_Definition (Node4) result subtype (subtype mark or access def)
2755
2756       --  N_Access_Procedure_Definition
2757       --  Sloc points to ACCESS
2758       --  Null_Exclusion_Present (Flag11)
2759       --  Protected_Present (Flag6)
2760       --  Parameter_Specifications (List3) (set to No_List if no formal part)
2761
2762       -----------------------------
2763       -- 3.10  Access Definition --
2764       -----------------------------
2765
2766       --  ACCESS_DEFINITION ::=
2767       --    [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
2768       --  | ACCESS_TO_SUBPROGRAM_DEFINITION
2769
2770       --  Note: access to subprograms are an Ada 2005 (AI-254) extension
2771
2772       --  N_Access_Definition
2773       --  Sloc points to ACCESS
2774       --  Null_Exclusion_Present (Flag11)
2775       --  All_Present (Flag15)
2776       --  Constant_Present (Flag17)
2777       --  Subtype_Mark (Node4)
2778       --  Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
2779
2780       -----------------------------------------
2781       -- 3.10.1  Incomplete Type Declaration --
2782       -----------------------------------------
2783
2784       --  INCOMPLETE_TYPE_DECLARATION ::=
2785       --    type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
2786
2787       --  N_Incomplete_Type_Declaration
2788       --  Sloc points to TYPE
2789       --  Defining_Identifier (Node1)
2790       --  Discriminant_Specifications (List4) (set to No_List if no
2791       --   discriminant part, or if the discriminant part is an
2792       --   unknown discriminant part)
2793       --  Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
2794       --  Tagged_Present (Flag15)
2795
2796       ----------------------------
2797       -- 3.11  Declarative Part --
2798       ----------------------------
2799
2800       --  DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
2801
2802       --  Note: although the parser enforces the syntactic requirement that
2803       --  a declarative part can contain only declarations, the semantic
2804       --  processing may add statements to the list of actions in a
2805       --  declarative part, so the code generator should be prepared
2806       --  to accept a statement in this position.
2807
2808       ----------------------------
2809       -- 3.11  Declarative Item --
2810       ----------------------------
2811
2812       --  DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
2813
2814       ----------------------------------
2815       -- 3.11  Basic Declarative Item --
2816       ----------------------------------
2817
2818       --  BASIC_DECLARATIVE_ITEM ::=
2819       --    BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
2820
2821       ----------------
2822       -- 3.11  Body --
2823       ----------------
2824
2825       --  BODY ::= PROPER_BODY | BODY_STUB
2826
2827       -----------------------
2828       -- 3.11  Proper Body --
2829       -----------------------
2830
2831       --  PROPER_BODY ::=
2832       --    SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
2833
2834       ---------------
2835       -- 4.1  Name --
2836       ---------------
2837
2838       --  NAME ::=
2839       --    DIRECT_NAME        | EXPLICIT_DEREFERENCE
2840       --  | INDEXED_COMPONENT  | SLICE
2841       --  | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
2842       --  | TYPE_CONVERSION    | FUNCTION_CALL
2843       --  | CHARACTER_LITERAL
2844
2845       ----------------------
2846       -- 4.1  Direct Name --
2847       ----------------------
2848
2849       --  DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
2850
2851       -----------------
2852       -- 4.1  Prefix --
2853       -----------------
2854
2855       --  PREFIX ::= NAME | IMPLICIT_DEREFERENCE
2856
2857       -------------------------------
2858       -- 4.1  Explicit Dereference --
2859       -------------------------------
2860
2861       --  EXPLICIT_DEREFERENCE ::= NAME . all
2862
2863       --  N_Explicit_Dereference
2864       --  Sloc points to ALL
2865       --  Prefix (Node3)
2866       --  Actual_Designated_Subtype (Node2-Sem)
2867       --  plus fields for expression
2868
2869       -------------------------------
2870       -- 4.1  Implicit Dereference --
2871       -------------------------------
2872
2873       --  IMPLICIT_DEREFERENCE ::= NAME
2874
2875       ------------------------------
2876       -- 4.1.1  Indexed Component --
2877       ------------------------------
2878
2879       --  INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
2880
2881       --  Note: the parser may generate this node in some situations where it
2882       --  should be a function call. The semantic  pass must correct this
2883       --  misidentification (which is inevitable at the parser level).
2884
2885       --  N_Indexed_Component
2886       --  Sloc contains a copy of the Sloc value of the Prefix
2887       --  Prefix (Node3)
2888       --  Expressions (List1)
2889       --  plus fields for expression
2890
2891       --  Note: if any of the subscripts requires a range check, then the
2892       --  Do_Range_Check flag is set on the corresponding expression, with
2893       --  the index type being determined from the type of the Prefix, which
2894       --  references the array being indexed.
2895
2896       --  Note: in a fully analyzed and expanded indexed component node, and
2897       --  hence in any such node that gigi sees, if the prefix is an access
2898       --  type, then an explicit dereference operation has been inserted.
2899
2900       ------------------
2901       -- 4.1.2  Slice --
2902       ------------------
2903
2904       --  SLICE ::= PREFIX (DISCRETE_RANGE)
2905
2906       --  Note: an implicit subtype is created to describe the resulting
2907       --  type, so that the bounds of this type are the bounds of the slice.
2908
2909       --  N_Slice
2910       --  Sloc points to first token of prefix
2911       --  Prefix (Node3)
2912       --  Discrete_Range (Node4)
2913       --  plus fields for expression
2914
2915       -------------------------------
2916       -- 4.1.3  Selected Component --
2917       -------------------------------
2918
2919       --  SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
2920
2921       --  Note: selected components that are semantically expanded names get
2922       --  changed during semantic processing into the separate N_Expanded_Name
2923       --  node. See description of this node in the section on semantic nodes.
2924
2925       --  N_Selected_Component
2926       --  Sloc points to period
2927       --  Prefix (Node3)
2928       --  Selector_Name (Node2)
2929       --  Associated_Node (Node4-Sem)
2930       --  Do_Discriminant_Check (Flag13-Sem)
2931       --  Is_In_Discriminant_Check (Flag11-Sem)
2932       --  plus fields for expression
2933
2934       --------------------------
2935       -- 4.1.3  Selector Name --
2936       --------------------------
2937
2938       --  SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
2939
2940       --------------------------------
2941       -- 4.1.4  Attribute Reference --
2942       --------------------------------
2943
2944       --  ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
2945
2946       --  Note: the syntax is quite ambiguous at this point. Consider:
2947
2948       --    A'Length (X)  X is part of the attribute designator
2949       --    A'Pos (X)     X is an explicit actual parameter of function A'Pos
2950       --    A'Class (X)   X is the expression of a type conversion
2951
2952       --  It would be possible for the parser to distinguish these cases
2953       --  by looking at the attribute identifier. However, that would mean
2954       --  more work in introducing new implementation defined attributes,
2955       --  and also it would mean that special processing for attributes
2956       --  would be scattered around, instead of being centralized in the
2957       --  semantic routine that handles an N_Attribute_Reference node.
2958       --  Consequently, the parser in all the above cases stores the
2959       --  expression (X in these examples) as a single element list in
2960       --  in the Expressions field of the N_Attribute_Reference node.
2961
2962       --  Similarly, for attributes like Max which take two arguments,
2963       --  we store the two arguments as a two element list in the
2964       --  Expressions field. Of course it is clear at parse time that
2965       --  this case is really a function call with an attribute as the
2966       --  prefix, but it turns out to be convenient to handle the two
2967       --  argument case in a similar manner to the one argument case,
2968       --  and indeed in general the parser will accept any number of
2969       --  expressions in this position and store them as a list in the
2970       --  attribute reference node. This allows for future addition of
2971       --  attributes that take more than two arguments.
2972
2973       --  Note: named associates are not permitted in function calls where
2974       --  the function is an attribute (see RM 6.4(3)) so it is legitimate
2975       --  to skip the normal subprogram argument processing.
2976
2977       --  Note: for the attributes whose designators are technically keywords,
2978       --  i.e. digits, access, delta, range, the Attribute_Name field contains
2979       --  the corresponding name, even though no identifier is involved.
2980
2981       --  Note: the generated code may contain stream attributes applied to
2982       --  limited types for which no stream routines exist officially. In such
2983       --  case, the result is to use the stream attribute for the underlying
2984       --  full type, or in the case of a protected type, the components
2985       --  (including any disriminants) are merely streamed in order.
2986
2987       --  See Exp_Attr for a complete description of which attributes are
2988       --  passed onto Gigi, and which are handled entirely by the front end.
2989
2990       --  Gigi restriction: For the Pos attribute, the prefix cannot be
2991       --  a non-standard enumeration type or a nonzero/zero semantics
2992       --  boolean type, so the value is simply the stored representation.
2993
2994       --  Note: In generated code, the Address and Unrestricted_Access
2995       --  attributes can be applied to any expression, and the meaning is
2996       --  to create an object containing the value (the object is in the
2997       --  current stack frame), and pass the address of this value. If the
2998       --  Must_Be_Byte_Aligned flag is set, then the object whose address
2999       --  is taken must be on a byte (storage unit) boundary, and if it is
3000       --  not (or may not be), then the generated code must create a copy
3001       --  that is byte aligned, and pass the address of this copy.
3002
3003       --  N_Attribute_Reference
3004       --  Sloc points to apostrophe
3005       --  Prefix (Node3)
3006       --  Attribute_Name (Name2) identifier name from attribute designator
3007       --  Expressions (List1) (set to No_List if no associated expressions)
3008       --  Entity (Node4-Sem) used if the attribute yields a type
3009       --  Associated_Node (Node4-Sem)
3010       --  Do_Overflow_Check (Flag17-Sem)
3011       --  Redundant_Use (Flag13-Sem)
3012       --  Must_Be_Byte_Aligned (Flag14)
3013       --  plus fields for expression
3014
3015       ---------------------------------
3016       -- 4.1.4  Attribute Designator --
3017       ---------------------------------
3018
3019       --  ATTRIBUTE_DESIGNATOR ::=
3020       --    IDENTIFIER [(static_EXPRESSION)]
3021       --  | access | delta | digits
3022
3023       --  There is no explicit node in the tree for an attribute designator.
3024       --  Instead the Attribute_Name and Expressions fields of the parent
3025       --  node (N_Attribute_Reference node) hold the information.
3026
3027       --  Note: if ACCESS, DELTA or DIGITS appears in an attribute
3028       --  designator, then they are treated as identifiers internally
3029       --  rather than the keywords of the same name.
3030
3031       --------------------------------------
3032       -- 4.1.4  Range Attribute Reference --
3033       --------------------------------------
3034
3035       --  RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3036
3037       --  A range attribute reference is represented in the tree using the
3038       --  normal N_Attribute_Reference node.
3039
3040       ---------------------------------------
3041       -- 4.1.4  Range Attribute Designator --
3042       ---------------------------------------
3043
3044       --  RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3045
3046       --  A range attribute designator is represented in the tree using the
3047       --  normal N_Attribute_Reference node.
3048
3049       --------------------
3050       -- 4.3  Aggregate --
3051       --------------------
3052
3053       --  AGGREGATE ::=
3054       --    RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3055
3056       -----------------------------
3057       -- 4.3.1  Record Aggregate --
3058       -----------------------------
3059
3060       --  RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3061
3062       --  N_Aggregate
3063       --  Sloc points to left parenthesis
3064       --  Expressions (List1) (set to No_List if none or null record case)
3065       --  Component_Associations (List2) (set to No_List if none)
3066       --  Null_Record_Present (Flag17)
3067       --  Aggregate_Bounds (Node3-Sem)
3068       --  Associated_Node (Node4-Sem)
3069       --  Static_Processing_OK (Flag4-Sem)
3070       --  Compile_Time_Known_Aggregate (Flag18-Sem)
3071       --  Expansion_Delayed (Flag11-Sem)
3072       --  plus fields for expression
3073
3074       --  Note: this structure is used for both record and array aggregates
3075       --  since the two cases are not separable by the parser. The parser
3076       --  makes no attempt to enforce consistency here, so it is up to the
3077       --  semantic phase to make sure that the aggregate is consistent (i.e.
3078       --  that it is not a "half-and-half" case that mixes record and array
3079       --  syntax. In particular, for a record aggregate, the expressions
3080       --  field will be set if there are positional associations.
3081
3082       --  Note: gigi/gcc can handle array aggregates correctly providing that
3083       --  they are entirely positional, and the array subtype involved has a
3084       --  known at compile time length and is not bit packed, or a convention
3085       --  Fortran array with more than one dimension. If these conditions
3086       --  are not met, then the front end must translate the aggregate into
3087       --  an appropriate set  of assignments into a temporary.
3088
3089       --  Note: for the record aggregate case, gigi/gcc can handle all cases
3090       --  of record aggregates, including those for packed, and rep-claused
3091       --  records, and also variant records, providing that there are no
3092       --  variable length fields whose size is not known at runtime, and
3093       --  providing that the aggregate is presented in fully named form.
3094
3095       ----------------------------------------------
3096       -- 4.3.1  Record Component Association List --
3097       ----------------------------------------------
3098
3099       --  RECORD_COMPONENT_ASSOCIATION_LIST ::=
3100       --     RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3101       --   | null record
3102
3103       --  There is no explicit node in the tree for a record component
3104       --  association list. Instead the Null_Record_Present flag is set in
3105       --  the parent node for the NULL RECORD case.
3106
3107       ------------------------------------------------------
3108       -- 4.3.1  Record Component Association (also 4.3.3) --
3109       ------------------------------------------------------
3110
3111       --  RECORD_COMPONENT_ASSOCIATION ::=
3112       --    [COMPONENT_CHOICE_LIST =>] EXPRESSION
3113
3114       --  N_Component_Association
3115       --  Sloc points to first selector name
3116       --  Choices (List1)
3117       --  Loop_Actions (List2-Sem)
3118       --  Expression (Node3)
3119       --  Box_Present (Flag15)
3120
3121       --  Note: this structure is used for both record component associations
3122       --  and array component associations, since the two cases aren't always
3123       --  separable by the parser. The choices list may represent either a
3124       --  list of selector names in the record aggregate case, or a list of
3125       --  discrete choices in the array aggregate case or an N_Others_Choice
3126       --  node (which appears as a singleton list). Box_Present gives support
3127       --  to Ada 2005 (AI-287).
3128
3129       -----------------------------------
3130       -- 4.3.1  Commponent Choice List --
3131       -----------------------------------
3132
3133       --  COMPONENT_CHOICE_LIST ::=
3134       --    component_SELECTOR_NAME {| component_SELECTOR_NAME}
3135       --  | others
3136
3137       --  The entries of a component choice list appear in the Choices list
3138       --  of the associated N_Component_Association, as either selector
3139       --  names, or as an N_Others_Choice node.
3140
3141       --------------------------------
3142       -- 4.3.2  Extension Aggregate --
3143       --------------------------------
3144
3145       --  EXTENSION_AGGREGATE ::=
3146       --    (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3147
3148       --  Note: extension aggregates are not permitted in Ada 83 mode
3149
3150       --  N_Extension_Aggregate
3151       --  Sloc points to left parenthesis
3152       --  Ancestor_Part (Node3)
3153       --  Associated_Node (Node4-Sem)
3154       --  Expressions (List1) (set to No_List if none or null record case)
3155       --  Component_Associations (List2) (set to No_List if none)
3156       --  Null_Record_Present (Flag17)
3157       --  Expansion_Delayed (Flag11-Sem)
3158       --  plus fields for expression
3159
3160       --------------------------
3161       -- 4.3.2  Ancestor Part --
3162       --------------------------
3163
3164       --  ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3165
3166       ----------------------------
3167       -- 4.3.3  Array Aggregate --
3168       ----------------------------
3169
3170       --  ARRAY_AGGREGATE ::=
3171       --    POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3172
3173       ---------------------------------------
3174       -- 4.3.3  Positional Array Aggregate --
3175       ---------------------------------------
3176
3177       --  POSITIONAL_ARRAY_AGGREGATE ::=
3178       --    (EXPRESSION, EXPRESSION {, EXPRESSION})
3179       --  | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3180
3181       --  See Record_Aggregate (4.3.1) for node structure
3182
3183       ----------------------------------
3184       -- 4.3.3  Named Array Aggregate --
3185       ----------------------------------
3186
3187       --  NAMED_ARRAY_AGGREGATE ::=
3188       --  | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3189
3190       --  See Record_Aggregate (4.3.1) for node structure
3191
3192       ----------------------------------------
3193       -- 4.3.3  Array Component Association --
3194       ----------------------------------------
3195
3196       --  ARRAY_COMPONENT_ASSOCIATION ::=
3197       --    DISCRETE_CHOICE_LIST => EXPRESSION
3198
3199       --  See Record_Component_Association (4.3.1) for node structure
3200
3201       --------------------------------------------------
3202       -- 4.4  Expression/Relation/Term/Factor/Primary --
3203       --------------------------------------------------
3204
3205       --  EXPRESSION ::=
3206       --    RELATION {and RELATION} | RELATION {and then RELATION}
3207       --  | RELATION {or RELATION}  | RELATION {or else RELATION}
3208       --  | RELATION {xor RELATION}
3209
3210       --  RELATION ::=
3211       --    SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3212       --  | SIMPLE_EXPRESSION [not] in RANGE
3213       --  | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3214
3215       --  SIMPLE_EXPRESSION ::=
3216       --    [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3217
3218       --  TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3219
3220       --  FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3221
3222       --  No nodes are generated for any of these constructs. Instead, the
3223       --  node for the operator appears directly. When we refer to an
3224       --  expression in this description, we mean any of the possible
3225       --  consistuent components of an expression (e.g. identifier is
3226       --  an example of an expression).
3227
3228       ------------------
3229       -- 4.4  Primary --
3230       ------------------
3231
3232       --  PRIMARY ::=
3233       --    NUMERIC_LITERAL  | null
3234       --  | STRING_LITERAL   | AGGREGATE
3235       --  | NAME             | QUALIFIED_EXPRESSION
3236       --  | ALLOCATOR        | (EXPRESSION)
3237
3238       --  Usually there is no explicit node in the tree for primary. Instead
3239       --  the constituent (e.g. AGGREGATE) appears directly. There are two
3240       --  exceptions. First, there is an explicit node for a null primary.
3241
3242       --  N_Null
3243       --  Sloc points to NULL
3244       --  plus fields for expression
3245
3246       --  Second, the case of (EXPRESSION) is handled specially. Ada requires
3247       --  that the parser keep track of which subexpressions are enclosed
3248       --  in parentheses, and how many levels of parentheses are used. This
3249       --  information is required for optimization purposes, and also for
3250       --  some semantic checks (e.g. (((1))) in a procedure spec does not
3251       --  conform with ((((1)))) in the body).
3252
3253       --  The parentheses are recorded by keeping a Paren_Count field in every
3254       --  subexpression node (it is actually present in all nodes, but only
3255       --  used in subexpression nodes). This count records the number of
3256       --  levels of parentheses. If the number of levels in the source exceeds
3257       --  the maximum accomodated by this count, then the count is simply left
3258       --  at the maximum value. This means that there are some pathalogical
3259       --  cases of failure to detect conformance failures (e.g. an expression
3260       --  with 500 levels of parens will conform with one with 501 levels),
3261       --  but we do not need to lose sleep over this.
3262
3263       --  Historical note: in versions of GNAT prior to 1.75, there was a node
3264       --  type N_Parenthesized_Expression used to accurately record unlimited
3265       --  numbers of levels of parentheses. However, it turned out to be a
3266       --  real nuisance to have to take into account the possible presence of
3267       --  this node during semantic analysis, since basically parentheses have
3268       --  zero relevance to semantic analysis.
3269
3270       --  Note: the level of parentheses always present in things like
3271       --  aggregates does not count, only the parentheses in the primary
3272       --  (EXPRESSION) affect the setting of the Paren_Count field.
3273
3274       --  2nd Note: the contents of the Expression field must be ignored (i.e.
3275       --  treated as though it were Empty) if No_Initialization is set True.
3276
3277       --------------------------------------
3278       -- 4.5  Short Circuit Control Forms --
3279       --------------------------------------
3280
3281       --  EXPRESSION ::=
3282       --    RELATION {and then RELATION} | RELATION {or else RELATION}
3283
3284       --  Gigi restriction: For both these control forms, the operand and
3285       --  result types are always Standard.Boolean. The expander inserts the
3286       --  required conversion operations where needed to ensure this is the
3287       --  case.
3288
3289       --  N_And_Then
3290       --  Sloc points to AND of AND THEN
3291       --  Left_Opnd (Node2)
3292       --  Right_Opnd (Node3)
3293       --  Actions (List1-Sem)
3294       --  plus fields for expression
3295
3296       --  N_Or_Else
3297       --  Sloc points to OR of OR ELSE
3298       --  Left_Opnd (Node2)
3299       --  Right_Opnd (Node3)
3300       --  Actions (List1-Sem)
3301       --  plus fields for expression
3302
3303       --  Note: The Actions field is used to hold actions associated with
3304       --  the right hand operand. These have to be treated specially since
3305       --  they are not unconditionally executed. See Insert_Actions for a
3306       --  more detailed description of how these actions are handled.
3307
3308       ---------------------------
3309       -- 4.5  Membership Tests --
3310       ---------------------------
3311
3312       --  RELATION ::=
3313       --    SIMPLE_EXPRESSION [not] in RANGE
3314       --  | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK
3315
3316       --  Note: although the grammar above allows only a range or a
3317       --  subtype mark, the parser in fact will accept any simple
3318       --  expression in place of a subtype mark. This means that the
3319       --  semantic analyzer must be prepared to deal with, and diagnose
3320       --  a simple expression other than a name for the right operand.
3321       --  This simplifies error recovery in the parser.
3322
3323       --  N_In
3324       --  Sloc points to IN
3325       --  Left_Opnd (Node2)
3326       --  Right_Opnd (Node3)
3327       --  plus fields for expression
3328
3329       --  N_Not_In
3330       --  Sloc points to NOT of NOT IN
3331       --  Left_Opnd (Node2)
3332       --  Right_Opnd (Node3)
3333       --  plus fields for expression
3334
3335       --------------------
3336       -- 4.5  Operators --
3337       --------------------
3338
3339       --  LOGICAL_OPERATOR             ::=  and | or  | xor
3340
3341       --  RELATIONAL_OPERATOR          ::=  =   | /=  | <   | <= | > | >=
3342
3343       --  BINARY_ADDING_OPERATOR       ::=  +   |  -  | &
3344
3345       --  UNARY_ADDING_OPERATOR        ::=  +   |  -
3346
3347       --  MULTIPLYING_OPERATOR         ::=  *   |  /  | mod | rem
3348
3349       --  HIGHEST_PRECEDENCE_OPERATOR  ::=  **  | abs | not
3350
3351       --  Sprint syntax if Treat_Fixed_As_Integer is set:
3352
3353       --     x #* y
3354       --     x #/ y
3355       --     x #mod y
3356       --     x #rem y
3357
3358       --  Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3359       --  will only be given nodes with the Treat_Fixed_As_Integer flag set.
3360       --  All handling of smalls for multiplication and division is handled
3361       --  by the front end (mod and rem result only from expansion). Gigi
3362       --  thus never needs to worry about small values (for other operators
3363       --  operating on fixed-point, e.g. addition, the small value does not
3364       --  have any semantic effect anyway, these are always integer operations.
3365
3366       --  Gigi restriction: For all operators taking Boolean operands, the
3367       --  type is always Standard.Boolean. The expander inserts the required
3368       --  conversion operations where needed to ensure this is the case.
3369
3370       --  N_Op_And
3371       --  Sloc points to AND
3372       --  Do_Length_Check (Flag4-Sem)
3373       --  plus fields for binary operator
3374       --  plus fields for expression
3375
3376       --  N_Op_Or
3377       --  Sloc points to OR
3378       --  Do_Length_Check (Flag4-Sem)
3379       --  plus fields for binary operator
3380       --  plus fields for expression
3381
3382       --  N_Op_Xor
3383       --  Sloc points to XOR
3384       --  Do_Length_Check (Flag4-Sem)
3385       --  plus fields for binary operator
3386       --  plus fields for expression
3387
3388       --  N_Op_Eq
3389       --  Sloc points to =
3390       --  plus fields for binary operator
3391       --  plus fields for expression
3392
3393       --  N_Op_Ne
3394       --  Sloc points to /=
3395       --  plus fields for binary operator
3396       --  plus fields for expression
3397
3398       --  N_Op_Lt
3399       --  Sloc points to <
3400       --  plus fields for binary operator
3401       --  plus fields for expression
3402
3403       --  N_Op_Le
3404       --  Sloc points to <=
3405       --  plus fields for binary operator
3406       --  plus fields for expression
3407
3408       --  N_Op_Gt
3409       --  Sloc points to >
3410       --  plus fields for binary operator
3411       --  plus fields for expression
3412
3413       --  N_Op_Ge
3414       --  Sloc points to >=
3415       --  plus fields for binary operator
3416       --  plus fields for expression
3417
3418       --  N_Op_Add
3419       --  Sloc points to + (binary)
3420       --  plus fields for binary operator
3421       --  plus fields for expression
3422
3423       --  N_Op_Subtract
3424       --  Sloc points to - (binary)
3425       --  plus fields for binary operator
3426       --  plus fields for expression
3427
3428       --  N_Op_Concat
3429       --  Sloc points to &
3430       --  Is_Component_Left_Opnd (Flag13-Sem)
3431       --  Is_Component_Right_Opnd (Flag14-Sem)
3432       --  plus fields for binary operator
3433       --  plus fields for expression
3434
3435       --  N_Op_Multiply
3436       --  Sloc points to *
3437       --  Treat_Fixed_As_Integer (Flag14-Sem)
3438       --  Rounded_Result (Flag18-Sem)
3439       --  plus fields for binary operator
3440       --  plus fields for expression
3441
3442       --  N_Op_Divide
3443       --  Sloc points to /
3444       --  Treat_Fixed_As_Integer (Flag14-Sem)
3445       --  Do_Division_Check (Flag13-Sem)
3446       --  Rounded_Result (Flag18-Sem)
3447       --  plus fields for binary operator
3448       --  plus fields for expression
3449
3450       --  N_Op_Mod
3451       --  Sloc points to MOD
3452       --  Treat_Fixed_As_Integer (Flag14-Sem)
3453       --  Do_Division_Check (Flag13-Sem)
3454       --  plus fields for binary operator
3455       --  plus fields for expression
3456
3457       --  N_Op_Rem
3458       --  Sloc points to REM
3459       --  Treat_Fixed_As_Integer (Flag14-Sem)
3460       --  Do_Division_Check (Flag13-Sem)
3461       --  plus fields for binary operator
3462       --  plus fields for expression
3463
3464       --  N_Op_Expon
3465       --  Is_Power_Of_2_For_Shift (Flag13-Sem)
3466       --  Sloc points to **
3467       --  plus fields for binary operator
3468       --  plus fields for expression
3469
3470       --  N_Op_Plus
3471       --  Sloc points to + (unary)
3472       --  plus fields for unary operator
3473       --  plus fields for expression
3474
3475       --  N_Op_Minus
3476       --  Sloc points to - (unary)
3477       --  plus fields for unary operator
3478       --  plus fields for expression
3479
3480       --  N_Op_Abs
3481       --  Sloc points to ABS
3482       --  plus fields for unary operator
3483       --  plus fields for expression
3484
3485       --  N_Op_Not
3486       --  Sloc points to NOT
3487       --  plus fields for unary operator
3488       --  plus fields for expression
3489
3490       --  See also shift operators in section B.2
3491
3492       --  Note on fixed-point operations passed to Gigi: For adding operators,
3493       --  the semantics is to treat these simply as integer operations, with
3494       --  the small values being ignored (the bounds are already stored in
3495       --  units of small, so that constraint checking works as usual). For the
3496       --  case of multiply/divide/rem/mod operations, Gigi will only see fixed
3497       --  point operands if the Treat_Fixed_As_Integer flag is set and will
3498       --  thus treat these nodes in identical manner, ignoring small values.
3499
3500       --------------------------
3501       -- 4.6  Type Conversion --
3502       --------------------------
3503
3504       --  TYPE_CONVERSION ::=
3505       --    SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3506
3507       --  In the (NAME) case, the name is stored as the expression
3508
3509       --  Note: the parser never generates a type conversion node, since it
3510       --  looks like an indexed component which is generated by preference.
3511       --  The semantic pass must correct this misidentification.
3512
3513       --  Gigi handles conversions that involve no change in the root type,
3514       --  and also all conversions from integer to floating-point types.
3515       --  Conversions from floating-point to integer are only handled in
3516       --  the case where Float_Truncate flag set. Other conversions from
3517       --  floating-point to integer (involving rounding) and all conversions
3518       --  involving fixed-point types are handled by the expander.
3519
3520       --  Sprint syntax if Float_Truncate set: X^(Y)
3521       --  Sprint syntax if Conversion_OK set X?(Y)
3522       --  Sprint syntax if both flags set X?^(Y)
3523
3524       --  Note: If either the operand or result type is fixed-point, Gigi will
3525       --  only see a type conversion node with Conversion_OK set. The front end
3526       --  takes care of all handling of small's for fixed-point conversions.
3527
3528       --  N_Type_Conversion
3529       --  Sloc points to first token of subtype mark
3530       --  Subtype_Mark (Node4)
3531       --  Expression (Node3)
3532       --  Do_Tag_Check (Flag13-Sem)
3533       --  Do_Length_Check (Flag4-Sem)
3534       --  Do_Overflow_Check (Flag17-Sem)
3535       --  Float_Truncate (Flag11-Sem)
3536       --  Rounded_Result (Flag18-Sem)
3537       --  Conversion_OK (Flag14-Sem)
3538       --  plus fields for expression
3539
3540       --  Note: if a range check is required, then the Do_Range_Check flag
3541       --  is set in the Expression with the check being done against the
3542       --  target type range (after the base type conversion, if any).
3543
3544       -------------------------------
3545       -- 4.7  Qualified Expression --
3546       -------------------------------
3547
3548       --  QUALIFIED_EXPRESSION ::=
3549       --    SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3550
3551       --  Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3552       --  the expression, so the Expression field of this node always points
3553       --  to a parenthesized expression in this case (i.e. Paren_Count will
3554       --  always be non-zero for the referenced expression if it is not an
3555       --  aggregate).
3556
3557       --  N_Qualified_Expression
3558       --  Sloc points to apostrophe
3559       --  Subtype_Mark (Node4)
3560       --  Expression (Node3) expression or aggregate
3561       --  plus fields for expression
3562
3563       --------------------
3564       -- 4.8  Allocator --
3565       --------------------
3566
3567       --  ALLOCATOR ::=
3568       --    new [NULL_EXCLUSION] SUBTYPE_INDICATION | new QUALIFIED_EXPRESSION
3569
3570       --  Sprint syntax (when storage pool present)
3571       --    new xxx (storage_pool = pool)
3572
3573       --  N_Allocator
3574       --  Sloc points to NEW
3575       --  Expression (Node3) subtype indication or qualified expression
3576       --  Null_Exclusion_Present (Flag11)
3577       --  Storage_Pool (Node1-Sem)
3578       --  Procedure_To_Call (Node4-Sem)
3579       --  No_Initialization (Flag13-Sem)
3580       --  Do_Storage_Check (Flag17-Sem)
3581       --  plus fields for expression
3582
3583       ---------------------------------
3584       -- 5.1  Sequence Of Statements --
3585       ---------------------------------
3586
3587       --  SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3588
3589       --  Note: Although the parser will not accept a declaration as a
3590       --  statement, the semantic analyzer may insert declarations (e.g.
3591       --  declarations of implicit types needed for execution of other
3592       --  statements) into a sequence of statements, so the code genmerator
3593       --  should be prepared to accept a declaration where a statement is
3594       --  expected. Note also that pragmas can appear as statements.
3595
3596       --------------------
3597       -- 5.1  Statement --
3598       --------------------
3599
3600       --  STATEMENT ::=
3601       --    {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3602
3603       --  There is no explicit node in the tree for a statement. Instead, the
3604       --  individual statement appears directly. Labels are treated  as a
3605       --  kind of statement, i.e. they are linked into a statement list at
3606       --  the point they appear, so the labeled statement appears following
3607       --  the label or labels in the statement list.
3608
3609       ---------------------------
3610       -- 5.1  Simple Statement --
3611       ---------------------------
3612
3613       --  SIMPLE_STATEMENT ::=      NULL_STATEMENT
3614       --  | ASSIGNMENT_STATEMENT  | EXIT_STATEMENT
3615       --  | GOTO_STATEMENT        | PROCEDURE_CALL_STATEMENT
3616       --  | RETURN_STATEMENT      | ENTRY_CALL_STATEMENT
3617       --  | REQUEUE_STATEMENT     | DELAY_STATEMENT
3618       --  | ABORT_STATEMENT       | RAISE_STATEMENT
3619       --  | CODE_STATEMENT
3620
3621       -----------------------------
3622       -- 5.1  Compound Statement --
3623       -----------------------------
3624
3625       --  COMPOUND_STATEMENT ::=
3626       --    IF_STATEMENT         | CASE_STATEMENT
3627       --  | LOOP_STATEMENT       | BLOCK_STATEMENT
3628       --  | ACCEPT_STATEMENT     | SELECT_STATEMENT
3629
3630       -------------------------
3631       -- 5.1  Null Statement --
3632       -------------------------
3633
3634       --  NULL_STATEMENT ::= null;
3635
3636       --  N_Null_Statement
3637       --  Sloc points to NULL
3638
3639       ----------------
3640       -- 5.1  Label --
3641       ----------------
3642
3643       --  LABEL ::= <<label_STATEMENT_IDENTIFIER>>
3644
3645       --  Note that the occurrence of a label is not a defining identifier,
3646       --  but rather a referencing occurrence. The defining occurrence is
3647       --  in the implicit label declaration which occurs in the innermost
3648       --  enclosing block.
3649
3650       --  N_Label
3651       --  Sloc points to <<
3652       --  Identifier (Node1) direct name of statement identifier
3653       --  Exception_Junk (Flag7-Sem)
3654
3655       -------------------------------
3656       -- 5.1  Statement Identifier --
3657       -------------------------------
3658
3659       --  STATEMENT_INDENTIFIER ::= DIRECT_NAME
3660
3661       --  The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
3662       --  (not an OPERATOR_SYMBOL)
3663
3664       -------------------------------
3665       -- 5.2  Assignment Statement --
3666       -------------------------------
3667
3668       --  ASSIGNMENT_STATEMENT ::=
3669       --    variable_NAME := EXPRESSION;
3670
3671       --  N_Assignment_Statement
3672       --  Sloc points to :=
3673       --  Name (Node2)
3674       --  Expression (Node3)
3675       --  Do_Tag_Check (Flag13-Sem)
3676       --  Do_Length_Check (Flag4-Sem)
3677       --  Forwards_OK (Flag5-Sem)
3678       --  Backwards_OK (Flag6-Sem)
3679       --  No_Ctrl_Actions (Flag7-Sem)
3680
3681       --  Note: if a range check is required, then the Do_Range_Check flag
3682       --  is set in the Expression (right hand side), with the check being
3683       --  done against the type of the Name (left hand side).
3684
3685       --  Note: the back end places some restrictions on the form of the
3686       --  Expression field. If the object being assigned to is Atomic, then
3687       --  the Expression may not have the form of an aggregate (since this
3688       --  might cause the back end to generate separate assignments). It
3689       --  also cannot be a reference to an object marked as a true constant
3690       --  (Is_True_Constant flag set), where the object is itself initalized
3691       --  with an aggregate. If necessary the front end must generate an
3692       --  extra temporary (with Is_True_Constant set False), and initialize
3693       --  this temporary as required (the temporary itself is not atomic).
3694
3695       -----------------------
3696       -- 5.3  If Statement --
3697       -----------------------
3698
3699       --  IF_STATEMENT ::=
3700       --    if CONDITION then
3701       --      SEQUENCE_OF_STATEMENTS
3702       --    {elsif CONDITION then
3703       --      SEQUENCE_OF_STATEMENTS}
3704       --    [else
3705       --      SEQUENCE_OF_STATEMENTS]
3706       --    end if;
3707
3708       --  Gigi restriction: This expander ensures that the type of the
3709       --  Condition fields is always Standard.Boolean, even if the type
3710       --  in the source is some non-standard boolean type.
3711
3712       --  N_If_Statement
3713       --  Sloc points to IF
3714       --  Condition (Node1)
3715       --  Then_Statements (List2)
3716       --  Elsif_Parts (List3) (set to No_List if none present)
3717       --  Else_Statements (List4) (set to No_List if no else part present)
3718       --  End_Span (Uint5) (set to No_Uint if expander generated)
3719
3720       --  N_Elsif_Part
3721       --  Sloc points to ELSIF
3722       --  Condition (Node1)
3723       --  Then_Statements (List2)
3724       --  Condition_Actions (List3-Sem)
3725
3726       --------------------
3727       -- 5.3  Condition --
3728       --------------------
3729
3730       --  CONDITION ::= boolean_EXPRESSION
3731
3732       -------------------------
3733       -- 5.4  Case Statement --
3734       -------------------------
3735
3736       --  CASE_STATEMENT ::=
3737       --    case EXPRESSION is
3738       --      CASE_STATEMENT_ALTERNATIVE
3739       --      {CASE_STATEMENT_ALTERNATIVE}
3740       --    end case;
3741
3742       --  Note: the Alternatives can contain pragmas. These only occur at
3743       --  the start of the list, since any pragmas occurring after the first
3744       --  alternative are absorbed into the corresponding statement sequence.
3745
3746       --  N_Case_Statement
3747       --  Sloc points to CASE
3748       --  Expression (Node3)
3749       --  Alternatives (List4)
3750       --  End_Span (Uint5) (set to No_Uint if expander generated)
3751
3752       -------------------------------------
3753       -- 5.4  Case Statement Alternative --
3754       -------------------------------------
3755
3756       --  CASE_STATEMENT_ALTERNATIVE ::=
3757       --    when DISCRETE_CHOICE_LIST =>
3758       --      SEQUENCE_OF_STATEMENTS
3759
3760       --  N_Case_Statement_Alternative
3761       --  Sloc points to WHEN
3762       --  Discrete_Choices (List4)
3763       --  Statements (List3)
3764
3765       -------------------------
3766       -- 5.5  Loop Statement --
3767       -------------------------
3768
3769       --  LOOP_STATEMENT ::=
3770       --    [loop_STATEMENT_IDENTIFIER :]
3771       --      [ITERATION_SCHEME] loop
3772       --        SEQUENCE_OF_STATEMENTS
3773       --      end loop [loop_IDENTIFIER];
3774
3775       --  Note: The occurrence of a loop label is not a defining identifier
3776       --  but rather a referencing occurrence. The defining occurrence is in
3777       --  the implicit label declaration which occurs in the innermost
3778       --  enclosing block.
3779
3780       --  Note: there is always a loop statement identifier present in
3781       --  the tree, even if none was given in the source. In the case where
3782       --  no loop identifier is given in the source, the parser creates
3783       --  a name of the form _Loop_n, where n is a decimal integer (the
3784       --  two underlines ensure that the loop names created in this manner
3785       --  do not conflict with any user defined identifiers), and the flag
3786       --  Has_Created_Identifier is set to True. The only exception to the
3787       --  rule that all loop statement nodes have identifiers occurs for
3788       --  loops constructed by the expander, and the semantic analyzer will
3789       --  create and supply dummy loop identifiers in these cases.
3790
3791       --  N_Loop_Statement
3792       --  Sloc points to LOOP
3793       --  Identifier (Node1) loop identifier (set to Empty if no identifier)
3794       --  Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
3795       --  Statements (List3)
3796       --  End_Label (Node4)
3797       --  Has_Created_Identifier (Flag15)
3798       --  Is_Null_Loop (Flag16)
3799
3800       --------------------------
3801       -- 5.5 Iteration Scheme --
3802       --------------------------
3803
3804       --  ITERATION_SCHEME ::=
3805       --    while CONDITION | for LOOP_PARAMETER_SPECIFICATION
3806
3807       --  Gigi restriction: This expander ensures that the type of the
3808       --  Condition field is always Standard.Boolean, even if the type
3809       --  in the source is some non-standard boolean type.
3810
3811       --  N_Iteration_Scheme
3812       --  Sloc points to WHILE or FOR
3813       --  Condition (Node1) (set to Empty if FOR case)
3814       --  Condition_Actions (List3-Sem)
3815       --  Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
3816
3817       ---------------------------------------
3818       -- 5.5  Loop parameter specification --
3819       ---------------------------------------
3820
3821       --  LOOP_PARAMETER_SPECIFICATION ::=
3822       --    DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
3823
3824       --  N_Loop_Parameter_Specification
3825       --  Sloc points to first identifier
3826       --  Defining_Identifier (Node1)
3827       --  Reverse_Present (Flag15)
3828       --  Discrete_Subtype_Definition (Node4)
3829
3830       --------------------------
3831       -- 5.6  Block Statement --
3832       --------------------------
3833
3834       --  BLOCK_STATEMENT ::=
3835       --    [block_STATEMENT_IDENTIFIER:]
3836       --      [declare
3837       --        DECLARATIVE_PART]
3838       --      begin
3839       --        HANDLED_SEQUENCE_OF_STATEMENTS
3840       --      end [block_IDENTIFIER];
3841
3842       --  Note that the occurrence of a block identifier is not a defining
3843       --  identifier, but rather a referencing occurrence. The defining
3844       --  occurrence is in the implicit label declaration which occurs in
3845       --  the innermost enclosing block.
3846
3847       --  Note: there is always a block statement identifier present in
3848       --  the tree, even if none was given in the source. In the case where
3849       --  no block identifier is given in the source, the parser creates
3850       --  a name of the form _Block_n, where n is a decimal integer (the
3851       --  two underlines ensure that the block names created in this manner
3852       --  do not conflict with any user defined identifiers), and the flag
3853       --  Has_Created_Identifier is set to True. The only exception to the
3854       --  rule that all loop statement nodes have identifiers occurs for
3855       --  blocks constructed by the expander, and the semantic analyzer
3856       --  creates and supplies dummy names for the blocks).
3857
3858       --  N_Block_Statement
3859       --  Sloc points to DECLARE or BEGIN
3860       --  Identifier (Node1) block direct name (set to Empty if not present)
3861       --  Declarations (List2) (set to No_List if no DECLARE part)
3862       --  Handled_Statement_Sequence (Node4)
3863       --  Is_Task_Master (Flag5-Sem)
3864       --  Activation_Chain_Entity (Node3-Sem)
3865       --  Has_Created_Identifier (Flag15)
3866       --  Is_Task_Allocation_Block (Flag6)
3867       --  Is_Asynchronous_Call_Block (Flag7)
3868
3869       -------------------------
3870       -- 5.7  Exit Statement --
3871       -------------------------
3872
3873       --  EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
3874
3875       --  Gigi restriction: This expander ensures that the type of the
3876       --  Condition field is always Standard.Boolean, even if the type
3877       --  in the source is some non-standard boolean type.
3878
3879       --  N_Exit_Statement
3880       --  Sloc points to EXIT
3881       --  Name (Node2) (set to Empty if no loop name present)
3882       --  Condition (Node1) (set to Empty if no when part present)
3883
3884       -------------------------
3885       -- 5.9  Goto Statement --
3886       -------------------------
3887
3888       --  GOTO_STATEMENT ::= goto label_NAME;
3889
3890       --  N_Goto_Statement
3891       --  Sloc points to GOTO
3892       --  Name (Node2)
3893       --  Exception_Junk (Flag7-Sem)
3894
3895       ---------------------------------
3896       -- 6.1  Subprogram Declaration --
3897       ---------------------------------
3898
3899       --  SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
3900
3901       --  N_Subprogram_Declaration
3902       --  Sloc points to FUNCTION or PROCEDURE
3903       --  Specification (Node1)
3904       --  Body_To_Inline (Node3-Sem)
3905       --  Corresponding_Body (Node5-Sem)
3906       --  Parent_Spec (Node4-Sem)
3907
3908       ------------------------------------------
3909       -- 6.1  Abstract Subprogram Declaration --
3910       ------------------------------------------
3911
3912       --  ABSTRACT_SUBPROGRAM_DECLARATION ::=
3913       --    SUBPROGRAM_SPECIFICATION is abstract;
3914
3915       --  N_Abstract_Subprogram_Declaration
3916       --  Sloc points to ABSTRACT
3917       --  Specification (Node1)
3918
3919       -----------------------------------
3920       -- 6.1  Subprogram Specification --
3921       -----------------------------------
3922
3923       --  SUBPROGRAM_SPECIFICATION ::=
3924       --    [[not] overriding]
3925       --    procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
3926       --  | [[not] overriding]
3927       --    function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
3928
3929       --  Note: there are no separate nodes for the profiles, instead the
3930       --  information appears directly in the following nodes.
3931
3932       --  N_Function_Specification
3933       --  Sloc points to FUNCTION
3934       --  Defining_Unit_Name (Node1) (the designator)
3935       --  Elaboration_Boolean (Node2-Sem)
3936       --  Parameter_Specifications (List3) (set to No_List if no formal part)
3937       --  Null_Exclusion_Present (Flag11)
3938       --  Result_Definition (Node4) for result subtype
3939       --  Generic_Parent (Node5-Sem)
3940       --  Must_Override (Flag14) set if overriding indicator present
3941       --  Must_Not_Override (Flag15) set if not_overriding indicator present
3942
3943       --  N_Procedure_Specification
3944       --  Sloc points to PROCEDURE
3945       --  Defining_Unit_Name (Node1)
3946       --  Elaboration_Boolean (Node2-Sem)
3947       --  Parameter_Specifications (List3) (set to No_List if no formal part)
3948       --  Generic_Parent (Node5-Sem)
3949       --  Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
3950       --  Must_Override (Flag14) set if overriding indicator present
3951       --  Must_Not_Override (Flag15) set if not_overriding indicator present
3952
3953       --  Note: overriding indicator is an Ada 2005 feature
3954
3955       ---------------------
3956       -- 6.1  Designator --
3957       ---------------------
3958
3959       --  DESIGNATOR ::=
3960       --    [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
3961
3962       --  Designators that are simply identifiers or operator symbols appear
3963       --  directly in the tree in this form. The following node is used only
3964       --  in the case where the designator has a parent unit name component.
3965
3966       --  N_Designator
3967       --  Sloc points to period
3968       --  Name (Node2) holds the parent unit name. Note that this is always
3969       --   non-Empty, since this node is only used for the case where a
3970       --   parent library unit package name is present.
3971       --  Identifier (Node1)
3972
3973       --  Note that the identifier can also be an operator symbol here
3974
3975       ------------------------------
3976       -- 6.1  Defining Designator --
3977       ------------------------------
3978
3979       --  DEFINING_DESIGNATOR ::=
3980       --    DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
3981
3982       -------------------------------------
3983       -- 6.1  Defining Program Unit Name --
3984       -------------------------------------
3985
3986       --  DEFINING_PROGRAM_UNIT_NAME ::=
3987       --    [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
3988
3989       --  The parent unit name is present only in the case of a child unit
3990       --  name (permissible only for Ada 95 for a library level unit, i.e.
3991       --  a unit at scope level one). If no such name is present, the defining
3992       --  program unit name is represented simply as the defining identifier.
3993       --  In the child unit case, the following node is used to represent the
3994       --  child unit name.
3995
3996       --  N_Defining_Program_Unit_Name
3997       --  Sloc points to period
3998       --  Name (Node2) holds the parent unit name. Note that this is always
3999       --   non-Empty, since this node is only used for the case where a
4000       --   parent unit name is present.
4001       --  Defining_Identifier (Node1)
4002
4003       --------------------------
4004       -- 6.1  Operator Symbol --
4005       --------------------------
4006
4007       --  OPERATOR_SYMBOL ::= STRING_LITERAL
4008
4009       --  Note: the fields of the N_Operator_Symbol node are laid out to
4010       --  match the corresponding fields of an N_Character_Literal node. This
4011       --  allows easy conversion of the operator symbol node into a character
4012       --  literal node in the case where a string constant of the form of an
4013       --  operator symbol is scanned out as such, but turns out semantically
4014       --  to be a string literal that is not an operator. For details see
4015       --  Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4016
4017       --  N_Operator_Symbol
4018       --  Sloc points to literal
4019       --  Chars (Name1) contains the Name_Id for the operator symbol
4020       --  Strval (Str3) Id of string value. This is used if the operator
4021       --   symbol turns out to be a normal string after all.
4022       --  Entity (Node4-Sem)
4023       --  Associated_Node (Node4-Sem)
4024       --  Has_Private_View (Flag11-Sem) set in generic units.
4025       --  Etype (Node5-Sem)
4026
4027       --  Note: the Strval field may be set to No_String for generated
4028       --  operator symbols that are known not to be string literals
4029       --  semantically.
4030
4031       -----------------------------------
4032       -- 6.1  Defining Operator Symbol --
4033       -----------------------------------
4034
4035       --  DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4036
4037       --  A defining operator symbol is an entity, which has additional
4038       --  fields depending on the setting of the Ekind field. These
4039       --  additional fields are defined (and access subprograms declared)
4040       --  in package Einfo.
4041
4042       --  Note: N_Defining_Operator_Symbol is an extended node whose fields
4043       --  are deliberately layed out to match the layout of fields in an
4044       --  ordinary N_Operator_Symbol node allowing for easy alteration of
4045       --  an operator symbol node into a defining operator symbol node.
4046       --  See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4047       --  for further details.
4048
4049       --  N_Defining_Operator_Symbol
4050       --  Sloc points to literal
4051       --  Chars (Name1) contains the Name_Id for the operator symbol
4052       --  Next_Entity (Node2-Sem)
4053       --  Scope (Node3-Sem)
4054       --  Etype (Node5-Sem)
4055
4056       ----------------------------
4057       -- 6.1  Parameter Profile --
4058       ----------------------------
4059
4060       --  PARAMETER_PROFILE ::= [FORMAL_PART]
4061
4062       ---------------------------------------
4063       -- 6.1  Parameter and Result Profile --
4064       ---------------------------------------
4065
4066       --  PARAMETER_AND_RESULT_PROFILE ::=
4067       --    [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4068       --  | [FORMAL_PART] return ACCESS_DEFINITION
4069
4070       --  There is no explicit node in the tree for a parameter and result
4071       --  profile. Instead the information appears directly in the parent.
4072
4073       ----------------------
4074       -- 6.1  Formal part --
4075       ----------------------
4076
4077       --  FORMAL_PART ::=
4078       --    (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4079
4080       ----------------------------------
4081       -- 6.1  Parameter specification --
4082       ----------------------------------
4083
4084       --  PARAMETER_SPECIFICATION ::=
4085       --    DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4086       --      [:= DEFAULT_EXPRESSION]
4087       --  | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4088       --      [:= DEFAULT_EXPRESSION]
4089
4090       --  Although the syntax allows multiple identifiers in the list, the
4091       --  semantics is as though successive specifications were given with
4092       --  identical type definition and expression components. To simplify
4093       --  semantic processing, the parser represents a multiple declaration
4094       --  case as a sequence of single Specifications, using the More_Ids and
4095       --  Prev_Ids flags to preserve the original source form as described
4096       --  in the section on "Handling of Defining Identifier Lists".
4097
4098       --  N_Parameter_Specification
4099       --  Sloc points to first identifier
4100       --  Defining_Identifier (Node1)
4101       --  In_Present (Flag15)
4102       --  Out_Present (Flag17)
4103       --  Null_Exclusion_Present (Flag11)
4104       --  Parameter_Type (Node2) subtype mark or access definition
4105       --  Expression (Node3) (set to Empty if no default expression present)
4106       --  Do_Accessibility_Check (Flag13-Sem)
4107       --  More_Ids (Flag5) (set to False if no more identifiers in list)
4108       --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4109       --  Default_Expression (Node5-Sem)
4110
4111       ---------------
4112       -- 6.1  Mode --
4113       ---------------
4114
4115       --  MODE ::= [in] | in out | out
4116
4117       --  There is no explicit node in the tree for the Mode. Instead the
4118       --  In_Present and Out_Present flags are set in the parent node to
4119       --  record the presence of keywords specifying the mode.
4120
4121       --------------------------
4122       -- 6.3  Subprogram Body --
4123       --------------------------
4124
4125       --  SUBPROGRAM_BODY ::=
4126       --    SUBPROGRAM_SPECIFICATION is
4127       --      DECLARATIVE_PART
4128       --    begin
4129       --      HANDLED_SEQUENCE_OF_STATEMENTS
4130       --    end [DESIGNATOR];
4131
4132       --  N_Subprogram_Body
4133       --  Sloc points to FUNCTION or PROCEDURE
4134       --  Specification (Node1)
4135       --  Declarations (List2)
4136       --  Handled_Statement_Sequence (Node4)
4137       --  Activation_Chain_Entity (Node3-Sem)
4138       --  Corresponding_Spec (Node5-Sem)
4139       --  Acts_As_Spec (Flag4-Sem)
4140       --  Bad_Is_Detected (Flag15) used only by parser
4141       --  Do_Storage_Check (Flag17-Sem)
4142       --  Has_Priority_Pragma (Flag6-Sem)
4143       --  Is_Protected_Subprogram_Body (Flag7-Sem)
4144       --  Is_Task_Master (Flag5-Sem)
4145       --  Was_Originally_Stub (Flag13-Sem)
4146
4147       -----------------------------------
4148       -- 6.4  Procedure Call Statement --
4149       -----------------------------------
4150
4151       --  PROCEDURE_CALL_STATEMENT ::=
4152       --    procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4153
4154       --  Note: the reason that a procedure call has expression fields is
4155       --  that it semantically resembles an expression, e.g. overloading is
4156       --  allowed and a type is concocted for semantic processing purposes.
4157       --  Certain of these fields, such as Parens are not relevant, but it
4158       --  is easier to just supply all of them together!
4159
4160       --  N_Procedure_Call_Statement
4161       --  Sloc points to first token of name or prefix
4162       --  Name (Node2) stores name or prefix
4163       --  Parameter_Associations (List3) (set to No_List if no
4164       --   actual parameter part)
4165       --  First_Named_Actual (Node4-Sem)
4166       --  Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4167       --  Do_Tag_Check (Flag13-Sem)
4168       --  No_Elaboration_Check (Flag14-Sem)
4169       --  Parameter_List_Truncated (Flag17-Sem)
4170       --  ABE_Is_Certain (Flag18-Sem)
4171       --  plus fields for expression
4172
4173       --  If any IN parameter requires a range check, then the corresponding
4174       --  argument expression has the Do_Range_Check flag set, and the range
4175       --  check is done against the formal type. Note that this argument
4176       --  expression may appear directly in the Parameter_Associations list,
4177       --  or may be a descendent of an N_Parameter_Association node that
4178       --  appears in this list.
4179
4180       ------------------------
4181       -- 6.4  Function Call --
4182       ------------------------
4183
4184       --  FUNCTION_CALL ::=
4185       --    function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4186
4187       --  Note: the parser may generate an indexed component node or simply
4188       --  a name node instead of a function call node. The semantic pass must
4189       --  correct this misidentification.
4190
4191       --  N_Function_Call
4192       --  Sloc points to first token of name or prefix
4193       --  Name (Node2) stores name or prefix
4194       --  Parameter_Associations (List3) (set to No_List if no
4195       --   actual parameter part)
4196       --  First_Named_Actual (Node4-Sem)
4197       --  Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4198       --  Do_Tag_Check (Flag13-Sem)
4199       --  No_Elaboration_Check (Flag14-Sem)
4200       --  Parameter_List_Truncated (Flag17-Sem)
4201       --  ABE_Is_Certain (Flag18-Sem)
4202       --  plus fields for expression
4203
4204       --------------------------------
4205       -- 6.4  Actual Parameter Part --
4206       --------------------------------
4207
4208       --  ACTUAL_PARAMETER_PART ::=
4209       --    (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4210
4211       --------------------------------
4212       -- 6.4  Parameter Association --
4213       --------------------------------
4214
4215       --  PARAMETER_ASSOCIATION ::=
4216       --    [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4217
4218       --  Note: the N_Parameter_Association node is built only if a formal
4219       --  parameter selector name is present, otherwise the parameter
4220       --  association appears in the tree simply as the node for the
4221       --  explicit actual parameter.
4222
4223       --  N_Parameter_Association
4224       --  Sloc points to formal parameter
4225       --  Selector_Name (Node2) (always non-Empty, since this node is
4226       --   only used if a formal parameter selector name is present)
4227       --  Explicit_Actual_Parameter (Node3)
4228       --  Next_Named_Actual (Node4-Sem)
4229
4230       ---------------------------
4231       -- 6.4  Actual Parameter --
4232       ---------------------------
4233
4234       --  EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4235
4236       ---------------------------
4237       -- 6.5  Return Statement --
4238       ---------------------------
4239
4240       --  RETURN_STATEMENT ::= return [EXPRESSION];
4241
4242       --  N_Return_Statement
4243       --  Sloc points to RETURN
4244       --  Expression (Node3) (set to Empty if no expression present)
4245       --  Storage_Pool (Node1-Sem)
4246       --  Procedure_To_Call (Node4-Sem)
4247       --  Do_Tag_Check (Flag13-Sem)
4248       --  Return_Type (Node2-Sem)
4249       --  By_Ref (Flag5-Sem)
4250
4251       --  Note: if a range check is required, then Do_Range_Check is set
4252       --  on the Expression. The range check is against Return_Type.
4253
4254       ------------------------------
4255       -- 7.1  Package Declaration --
4256       ------------------------------
4257
4258       --  PACKAGE_DECLARATION ::= PACKAGE_SPECIFICATION;
4259
4260       --  Note: the activation chain entity for a package spec is used for
4261       --  all tasks declared in the package spec, or in the package body.
4262
4263       --  N_Package_Declaration
4264       --  Sloc points to PACKAGE
4265       --  Specification (Node1)
4266       --  Corresponding_Body (Node5-Sem)
4267       --  Parent_Spec (Node4-Sem)
4268       --  Activation_Chain_Entity (Node3-Sem)
4269
4270       --------------------------------
4271       -- 7.1  Package Specification --
4272       --------------------------------
4273
4274       --  PACKAGE_SPECIFICATION ::=
4275       --    package DEFINING_PROGRAM_UNIT_NAME is
4276       --      {BASIC_DECLARATIVE_ITEM}
4277       --    [private
4278       --      {BASIC_DECLARATIVE_ITEM}]
4279       --    end [[PARENT_UNIT_NAME .] IDENTIFIER]
4280
4281       --  N_Package_Specification
4282       --  Sloc points to PACKAGE
4283       --  Defining_Unit_Name (Node1)
4284       --  Visible_Declarations (List2)
4285       --  Private_Declarations (List3) (set to No_List if no private
4286       --   part present)
4287       --  End_Label (Node4)
4288       --  Generic_Parent (Node5-Sem)
4289       --  Limited_View_Installed (Flag18-Sem)
4290
4291       -----------------------
4292       -- 7.1  Package Body --
4293       -----------------------
4294
4295       --  PACKAGE_BODY ::=
4296       --    package body DEFINING_PROGRAM_UNIT_NAME is
4297       --      DECLARATIVE_PART
4298       --    [begin
4299       --      HANDLED_SEQUENCE_OF_STATEMENTS]
4300       --    end [[PARENT_UNIT_NAME .] IDENTIFIER];
4301
4302       --  N_Package_Body
4303       --  Sloc points to PACKAGE
4304       --  Defining_Unit_Name (Node1)
4305       --  Declarations (List2)
4306       --  Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4307       --  Corresponding_Spec (Node5-Sem)
4308       --  Was_Originally_Stub (Flag13-Sem)
4309
4310       --  Note: if a source level package does not contain a handled sequence
4311       --  of statements, then the parser supplies a dummy one with a null
4312       --  sequence of statements. Comes_From_Source will be False in this
4313       --  constructed sequence. The reason we need this is for the End_Label
4314       --  field in the HSS.
4315
4316       -----------------------------------
4317       -- 7.4  Private Type Declaration --
4318       -----------------------------------
4319
4320       --  PRIVATE_TYPE_DECLARATION ::=
4321       --    type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4322       --      is [[abstract] tagged] [limited] private;
4323
4324       --  Note: TAGGED is not permitted in Ada 83 mode
4325
4326       --  N_Private_Type_Declaration
4327       --  Sloc points to TYPE
4328       --  Defining_Identifier (Node1)
4329       --  Discriminant_Specifications (List4) (set to No_List if no
4330       --   discriminant part)
4331       --  Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4332       --  Abstract_Present (Flag4)
4333       --  Tagged_Present (Flag15)
4334       --  Limited_Present (Flag17)
4335
4336       ----------------------------------------
4337       -- 7.4  Private Extension Declaration --
4338       ----------------------------------------
4339
4340       --  PRIVATE_EXTENSION_DECLARATION ::=
4341       --    type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4342       --      [abstract] [limited] new ancestor_SUBTYPE_INDICATION
4343       --      [and INTERFACE_LIST] with private;
4344
4345    --  Note: LIMITED, and private extension declarations are not allowed
4346    --        in Ada 83 mode.
4347
4348       --  N_Private_Extension_Declaration
4349       --  Sloc points to TYPE
4350       --  Defining_Identifier (Node1)
4351       --  Discriminant_Specifications (List4) (set to No_List if no
4352       --   discriminant part)
4353       --  Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4354       --  Abstract_Present (Flag4)
4355       --  Limited_Present (Flag17)
4356       --  Subtype_Indication (Node5)
4357       --  Interface_List (List2) (set to No_List if none)
4358
4359       ---------------------
4360       -- 8.4  Use Clause --
4361       ---------------------
4362
4363       --  USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4364
4365       -----------------------------
4366       -- 8.4  Use Package Clause --
4367       -----------------------------
4368
4369       --  USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4370
4371       --  N_Use_Package_Clause
4372       --  Sloc points to USE
4373       --  Names (List2)
4374       --  Next_Use_Clause (Node3-Sem)
4375       --  Hidden_By_Use_Clause (Elist4-Sem)
4376
4377       --------------------------
4378       -- 8.4  Use Type Clause --
4379       --------------------------
4380
4381       --  USE_TYPE_CLAUSE ::= use type SUBTYPE_MARK {, SUBTYPE_MARK};
4382
4383       --  Note: use type clause is not permitted in Ada 83 mode
4384
4385       --  N_Use_Type_Clause
4386       --  Sloc points to USE
4387       --  Subtype_Marks (List2)
4388       --  Next_Use_Clause (Node3-Sem)
4389       --  Hidden_By_Use_Clause (Elist4-Sem)
4390
4391       -------------------------------
4392       -- 8.5  Renaming Declaration --
4393       -------------------------------
4394
4395       --  RENAMING_DECLARATION ::=
4396       --    OBJECT_RENAMING_DECLARATION
4397       --  | EXCEPTION_RENAMING_DECLARATION
4398       --  | PACKAGE_RENAMING_DECLARATION
4399       --  | SUBPROGRAM_RENAMING_DECLARATION
4400       --  | GENERIC_RENAMING_DECLARATION
4401
4402       --------------------------------------
4403       -- 8.5  Object Renaming Declaration --
4404       --------------------------------------
4405
4406       --  OBJECT_RENAMING_DECLARATION ::=
4407       --    DEFINING_IDENTIFIER : SUBTYPE_MARK renames object_NAME;
4408       --  | DEFINING_IDENTIFIER : ACCESS_DEFINITION renames object_NAME;
4409
4410       --  Note: Access_Definition is an optional field that gives support to
4411       --  Ada 2005 (AI-230). The parser generates nodes that have either the
4412       --  Subtype_Indication field or else the Access_Definition field.
4413
4414       --  N_Object_Renaming_Declaration
4415       --  Sloc points to first identifier
4416       --  Defining_Identifier (Node1)
4417       --  Subtype_Mark (Node4) (set to Empty if not present)
4418       --  Access_Definition (Node3) (set to Empty if not present)
4419       --  Name (Node2)
4420       --  Corresponding_Generic_Association (Node5-Sem)
4421
4422       -----------------------------------------
4423       -- 8.5  Exception Renaming Declaration --
4424       -----------------------------------------
4425
4426       --  EXCEPTION_RENAMING_DECLARATION ::=
4427       --    DEFINING_IDENTIFIER : exception renames exception_NAME;
4428
4429       --  N_Exception_Renaming_Declaration
4430       --  Sloc points to first identifier
4431       --  Defining_Identifier (Node1)
4432       --  Name (Node2)
4433
4434       ---------------------------------------
4435       -- 8.5  Package Renaming Declaration --
4436       ---------------------------------------
4437
4438       --  PACKAGE_RENAMING_DECLARATION ::=
4439       --    package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4440
4441       --  N_Package_Renaming_Declaration
4442       --  Sloc points to PACKAGE
4443       --  Defining_Unit_Name (Node1)
4444       --  Name (Node2)
4445       --  Parent_Spec (Node4-Sem)
4446
4447       ------------------------------------------
4448       -- 8.5  Subprogram Renaming Declaration --
4449       ------------------------------------------
4450
4451       --  SUBPROGRAM_RENAMING_DECLARATION ::=
4452       --    SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4453
4454       --  N_Subprogram_Renaming_Declaration
4455       --  Sloc points to RENAMES
4456       --  Specification (Node1)
4457       --  Name (Node2)
4458       --  Parent_Spec (Node4-Sem)
4459       --  Corresponding_Spec (Node5-Sem)
4460       --  Corresponding_Formal_Spec (Node3-Sem)
4461       --  From_Default (Flag6-Sem)
4462
4463       -----------------------------------------
4464       -- 8.5.5  Generic Renaming Declaration --
4465       -----------------------------------------
4466
4467       --  GENERIC_RENAMING_DECLARATION ::=
4468       --    generic package DEFINING_PROGRAM_UNIT_NAME
4469       --      renames generic_package_NAME
4470       --  | generic procedure DEFINING_PROGRAM_UNIT_NAME
4471       --      renames generic_procedure_NAME
4472       --  | generic function DEFINING_PROGRAM_UNIT_NAME
4473       --      renames generic_function_NAME
4474
4475       --  N_Generic_Package_Renaming_Declaration
4476       --  Sloc points to GENERIC
4477       --  Defining_Unit_Name (Node1)
4478       --  Name (Node2)
4479       --  Parent_Spec (Node4-Sem)
4480
4481       --  N_Generic_Procedure_Renaming_Declaration
4482       --  Sloc points to GENERIC
4483       --  Defining_Unit_Name (Node1)
4484       --  Name (Node2)
4485       --  Parent_Spec (Node4-Sem)
4486
4487       --  N_Generic_Function_Renaming_Declaration
4488       --  Sloc points to GENERIC
4489       --  Defining_Unit_Name (Node1)
4490       --  Name (Node2)
4491       --  Parent_Spec (Node4-Sem)
4492
4493       --------------------------------
4494       -- 9.1  Task Type Declaration --
4495       --------------------------------
4496
4497       --  TASK_TYPE_DECLARATION ::=
4498       --    task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4499       --      [is [new INTERFACE_LIST with] TASK_DEFINITITION];
4500
4501       --  N_Task_Type_Declaration
4502       --  Sloc points to TASK
4503       --  Defining_Identifier (Node1)
4504       --  Discriminant_Specifications (List4) (set to No_List if no
4505       --   discriminant part)
4506       --  Interface_List (List2) (set to No_List if none)
4507       --  Task_Definition (Node3) (set to Empty if not present)
4508       --  Corresponding_Body (Node5-Sem)
4509
4510       ----------------------------------
4511       -- 9.1  Single Task Declaration --
4512       ----------------------------------
4513
4514       --  SINGLE_TASK_DECLARATION ::=
4515       --    task DEFINING_IDENTIFIER
4516       --      [is [new INTERFACE_LIST with] TASK_DEFINITITION];
4517
4518       --  N_Single_Task_Declaration
4519       --  Sloc points to TASK
4520       --  Defining_Identifier (Node1)
4521       --  Interface_List (List2) (set to No_List if none)
4522       --  Task_Definition (Node3) (set to Empty if not present)
4523
4524       --------------------------
4525       -- 9.1  Task Definition --
4526       --------------------------
4527
4528       --  TASK_DEFINITION ::=
4529       --      {TASK_ITEM}
4530       --    [private
4531       --      {TASK_ITEM}]
4532       --    end [task_IDENTIFIER]
4533
4534       --  Note: as a result of semantic analysis, the list of task items can
4535       --  include implicit type declarations resulting from entry families.
4536
4537       --  N_Task_Definition
4538       --  Sloc points to first token of task definition
4539       --  Visible_Declarations (List2)
4540       --  Private_Declarations (List3) (set to No_List if no private part)
4541       --  End_Label (Node4)
4542       --  Has_Priority_Pragma (Flag6-Sem)
4543       --  Has_Storage_Size_Pragma (Flag5-Sem)
4544       --  Has_Task_Info_Pragma (Flag7-Sem)
4545       --  Has_Task_Name_Pragma (Flag8-Sem)
4546
4547       --------------------
4548       -- 9.1  Task Item --
4549       --------------------
4550
4551       --  TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
4552
4553       --------------------
4554       -- 9.1  Task Body --
4555       --------------------
4556
4557       --  TASK_BODY ::=
4558       --    task body task_DEFINING_IDENTIFIER is
4559       --      DECLARATIVE_PART
4560       --    begin
4561       --      HANDLED_SEQUENCE_OF_STATEMENTS
4562       --    end [task_IDENTIFIER];
4563
4564       --  Gigi restriction: This node never appears
4565
4566       --  N_Task_Body
4567       --  Sloc points to TASK
4568       --  Defining_Identifier (Node1)
4569       --  Declarations (List2)
4570       --  Handled_Statement_Sequence (Node4)
4571       --  Is_Task_Master (Flag5-Sem)
4572       --  Activation_Chain_Entity (Node3-Sem)
4573       --  Corresponding_Spec (Node5-Sem)
4574       --  Was_Originally_Stub (Flag13-Sem)
4575
4576       -------------------------------------
4577       -- 9.4  Protected Type Declaration --
4578       -------------------------------------
4579
4580       --  PROTECTED_TYPE_DECLARATION ::=
4581       --    protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
4582       --      is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4583
4584       --  Note: protected type declarations are not permitted in Ada 83 mode
4585
4586       --  N_Protected_Type_Declaration
4587       --  Sloc points to PROTECTED
4588       --  Defining_Identifier (Node1)
4589       --  Discriminant_Specifications (List4) (set to No_List if no
4590       --   discriminant part)
4591       --  Interface_List (List2) (set to No_List if none)
4592       --  Protected_Definition (Node3)
4593       --  Corresponding_Body (Node5-Sem)
4594
4595       ---------------------------------------
4596       -- 9.4  Single Protected Declaration --
4597       ---------------------------------------
4598
4599       --  SINGLE_PROTECTED_DECLARATION ::=
4600       --    protected DEFINING_IDENTIFIER
4601       --      is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
4602
4603       --  Note: single protected declarations are not allowed in Ada 83 mode
4604
4605       --  N_Single_Protected_Declaration
4606       --  Sloc points to PROTECTED
4607       --  Defining_Identifier (Node1)
4608       --  Interface_List (List2) (set to No_List if none)
4609       --  Protected_Definition (Node3)
4610
4611       -------------------------------
4612       -- 9.4  Protected Definition --
4613       -------------------------------
4614
4615       --  PROTECTED_DEFINITION ::=
4616       --      {PROTECTED_OPERATION_DECLARATION}
4617       --    [private
4618       --      {PROTECTED_ELEMENT_DECLARATION}]
4619       --    end [protected_IDENTIFIER]
4620
4621       --  N_Protected_Definition
4622       --  Sloc points to first token of protected definition
4623       --  Visible_Declarations (List2)
4624       --  Private_Declarations (List3) (set to No_List if no private part)
4625       --  End_Label (Node4)
4626       --  Has_Priority_Pragma (Flag6-Sem)
4627
4628       ------------------------------------------
4629       -- 9.4  Protected Operation Declaration --
4630       ------------------------------------------
4631
4632       --  PROTECTED_OPERATION_DECLARATION ::=
4633       --    SUBPROGRAM_DECLARATION
4634       --  | ENTRY_DECLARATION
4635       --  | REPRESENTATION_CLAUSE
4636
4637       ----------------------------------------
4638       -- 9.4  Protected Element Declaration --
4639       ----------------------------------------
4640
4641       --  PROTECTED_ELEMENT_DECLARATION ::=
4642       --    PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
4643
4644       -------------------------
4645       -- 9.4  Protected Body --
4646       -------------------------
4647
4648       --  PROTECTED_BODY ::=
4649       --    protected body DEFINING_IDENTIFIER is
4650       --      {PROTECTED_OPERATION_ITEM}
4651       --    end [protected_IDENTIFIER];
4652
4653       --  Note: protected bodies are not allowed in Ada 83 mode
4654
4655       --  Gigi restriction: This node never appears
4656
4657       --  N_Protected_Body
4658       --  Sloc points to PROTECTED
4659       --  Defining_Identifier (Node1)
4660       --  Declarations (List2) protected operation items (and pragmas)
4661       --  End_Label (Node4)
4662       --  Corresponding_Spec (Node5-Sem)
4663       --  Was_Originally_Stub (Flag13-Sem)
4664
4665       -----------------------------------
4666       -- 9.4  Protected Operation Item --
4667       -----------------------------------
4668
4669       --  PROTECTED_OPERATION_ITEM ::=
4670       --    SUBPROGRAM_DECLARATION
4671       --  | SUBPROGRAM_BODY
4672       --  | ENTRY_BODY
4673       --  | REPRESENTATION_CLAUSE
4674
4675       ------------------------------
4676       -- 9.5.2  Entry Declaration --
4677       ------------------------------
4678
4679       --  ENTRY_DECLARATION ::=
4680       --    [[not] overriding]
4681       --    entry DEFINING_IDENTIFIER
4682       --      [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
4683
4684       --  N_Entry_Declaration
4685       --  Sloc points to ENTRY
4686       --  Defining_Identifier (Node1)
4687       --  Discrete_Subtype_Definition (Node4) (set to Empty if not present)
4688       --  Parameter_Specifications (List3) (set to No_List if no formal part)
4689       --  Corresponding_Body (Node5-Sem)
4690       --  Must_Override (Flag14) set if overriding indicator present
4691       --  Must_Not_Override (Flag15) set if not_overriding indicator present
4692
4693       --  Note: overriding indicator is an Ada 2005 feature
4694
4695       -----------------------------
4696       -- 9.5.2  Accept statement --
4697       -----------------------------
4698
4699       --  ACCEPT_STATEMENT ::=
4700       --    accept entry_DIRECT_NAME
4701       --      [(ENTRY_INDEX)] PARAMETER_PROFILE [do
4702       --        HANDLED_SEQUENCE_OF_STATEMENTS
4703       --    end [entry_IDENTIFIER]];
4704
4705       --  Gigi restriction: This node never appears
4706
4707       --  Note: there are no explicit declarations allowed in an accept
4708       --  statement. However, the implicit declarations for any statement
4709       --  identifiers (labels and block/loop identifiers) are declarations
4710       --  that belong logically to the accept statement, and that is why
4711       --  there is a Declarations field in this node.
4712
4713       --  N_Accept_Statement
4714       --  Sloc points to ACCEPT
4715       --  Entry_Direct_Name (Node1)
4716       --  Entry_Index (Node5) (set to Empty if not present)
4717       --  Parameter_Specifications (List3) (set to No_List if no formal part)
4718       --  Handled_Statement_Sequence (Node4)
4719       --  Declarations (List2) (set to No_List if no declarations)
4720
4721       ------------------------
4722       -- 9.5.2  Entry Index --
4723       ------------------------
4724
4725       --  ENTRY_INDEX ::= EXPRESSION
4726
4727       -----------------------
4728       -- 9.5.2  Entry Body --
4729       -----------------------
4730
4731       --  ENTRY_BODY ::=
4732       --    entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
4733       --      DECLARATIVE_PART
4734       --    begin
4735       --      HANDLED_SEQUENCE_OF_STATEMENTS
4736       --    end [entry_IDENTIFIER];
4737
4738       --  ENTRY_BARRIER ::= when CONDITION
4739
4740       --  Note: we store the CONDITION of the ENTRY_BARRIER in the node for
4741       --  the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
4742       --  too full (it would otherwise have too many fields)
4743
4744       --  Gigi restriction: This node never appears
4745
4746       --  N_Entry_Body
4747       --  Sloc points to ENTRY
4748       --  Defining_Identifier (Node1)
4749       --  Entry_Body_Formal_Part (Node5)
4750       --  Declarations (List2)
4751       --  Handled_Statement_Sequence (Node4)
4752       --  Activation_Chain_Entity (Node3-Sem)
4753
4754       -----------------------------------
4755       -- 9.5.2  Entry Body Formal Part --
4756       -----------------------------------
4757
4758       --  ENTRY_BODY_FORMAL_PART ::=
4759       --    [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
4760
4761       --  Note that an entry body formal part node is present even if it is
4762       --  empty. This reflects the grammar, in which it is the components of
4763       --  the entry body formal part that are optional, not the entry body
4764       --  formal part itself. Also this means that the barrier condition
4765       --  always has somewhere to be stored.
4766
4767       --  Gigi restriction: This node never appears
4768
4769       --  N_Entry_Body_Formal_Part
4770       --  Sloc points to first token
4771       --  Entry_Index_Specification (Node4) (set to Empty if not present)
4772       --  Parameter_Specifications (List3) (set to No_List if no formal part)
4773       --  Condition (Node1) from entry barrier of entry body
4774
4775       --------------------------
4776       -- 9.5.2  Entry Barrier --
4777       --------------------------
4778
4779       --  ENTRY_BARRIER ::= when CONDITION
4780
4781       --------------------------------------
4782       -- 9.5.2  Entry Index Specification --
4783       --------------------------------------
4784
4785       --  ENTRY_INDEX_SPECIFICATION ::=
4786       --    for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
4787
4788       --  Gigi restriction: This node never appears
4789
4790       --  N_Entry_Index_Specification
4791       --  Sloc points to FOR
4792       --  Defining_Identifier (Node1)
4793       --  Discrete_Subtype_Definition (Node4)
4794
4795       ---------------------------------
4796       -- 9.5.3  Entry Call Statement --
4797       ---------------------------------
4798
4799       --  ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
4800
4801       --  The parser may generate a procedure call for this construct. The
4802       --  semantic pass must correct this misidentification where needed.
4803
4804       --  Gigi restriction: This node never appears
4805
4806       --  N_Entry_Call_Statement
4807       --  Sloc points to first token of name
4808       --  Name (Node2)
4809       --  Parameter_Associations (List3) (set to No_List if no
4810       --   actual parameter part)
4811       --  First_Named_Actual (Node4-Sem)
4812
4813       ------------------------------
4814       -- 9.5.4  Requeue Statement --
4815       ------------------------------
4816
4817       --  REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
4818
4819       --  Note: requeue statements are not permitted in Ada 83 mode
4820
4821       --  Gigi restriction: This node never appears
4822
4823       --  N_Requeue_Statement
4824       --  Sloc points to REQUEUE
4825       --  Name (Node2)
4826       --  Abort_Present (Flag15)
4827
4828       --------------------------
4829       -- 9.6  Delay Statement --
4830       --------------------------
4831
4832       --  DELAY_STATEMENT ::=
4833       --    DELAY_UNTIL_STATEMENT
4834       --  | DELAY_RELATIVE_STATEMENT
4835
4836       --------------------------------
4837       -- 9.6  Delay Until Statement --
4838       --------------------------------
4839
4840       --  DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
4841
4842       --  Note: delay until statements are not permitted in Ada 83 mode
4843
4844       --  Gigi restriction: This node never appears
4845
4846       --  N_Delay_Until_Statement
4847       --  Sloc points to DELAY
4848       --  Expression (Node3)
4849
4850       -----------------------------------
4851       -- 9.6  Delay Relative Statement --
4852       -----------------------------------
4853
4854       --  DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
4855
4856       --  Gigi restriction: This node never appears
4857
4858       --  N_Delay_Relative_Statement
4859       --  Sloc points to DELAY
4860       --  Expression (Node3)
4861
4862       ---------------------------
4863       -- 9.7  Select Statement --
4864       ---------------------------
4865
4866       --  SELECT_STATEMENT ::=
4867       --    SELECTIVE_ACCEPT
4868       --  | TIMED_ENTRY_CALL
4869       --  | CONDITIONAL_ENTRY_CALL
4870       --  | ASYNCHRONOUS_SELECT
4871
4872       -----------------------------
4873       -- 9.7.1  Selective Accept --
4874       -----------------------------
4875
4876       --  SELECTIVE_ACCEPT ::=
4877       --    select
4878       --      [GUARD]
4879       --        SELECT_ALTERNATIVE
4880       --    {or
4881       --      [GUARD]
4882       --        SELECT_ALTERNATIVE}
4883       --    [else
4884       --      SEQUENCE_OF_STATEMENTS]
4885       --    end select;
4886
4887       --  Gigi restriction: This node never appears
4888
4889       --  Note: the guard expression, if present, appears in the node for
4890       --  the select alternative.
4891
4892       --  N_Selective_Accept
4893       --  Sloc points to SELECT
4894       --  Select_Alternatives (List1)
4895       --  Else_Statements (List4) (set to No_List if no else part)
4896
4897       ------------------
4898       -- 9.7.1  Guard --
4899       ------------------
4900
4901       --  GUARD ::= when CONDITION =>
4902
4903       --  As noted above, the CONDITION that is part of a GUARD is included
4904       --  in the node for the select alernative for convenience.
4905
4906       -------------------------------
4907       -- 9.7.1  Select Alternative --
4908       -------------------------------
4909
4910       --  SELECT_ALTERNATIVE ::=
4911       --    ACCEPT_ALTERNATIVE
4912       --  | DELAY_ALTERNATIVE
4913       --  | TERMINATE_ALTERNATIVE
4914
4915       -------------------------------
4916       -- 9.7.1  Accept Alternative --
4917       -------------------------------
4918
4919       --  ACCEPT_ALTERNATIVE ::=
4920       --    ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
4921
4922       --  Gigi restriction: This node never appears
4923
4924       --  N_Accept_Alternative
4925       --  Sloc points to ACCEPT
4926       --  Accept_Statement (Node2)
4927       --  Condition (Node1) from the guard (set to Empty if no guard present)
4928       --  Statements (List3) (set to Empty_List if no statements)
4929       --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4930       --  Accept_Handler_Records (List5-Sem)
4931
4932       ------------------------------
4933       -- 9.7.1  Delay Alternative --
4934       ------------------------------
4935
4936       --  DELAY_ALTERNATIVE ::=
4937       --    DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
4938
4939       --  Gigi restriction: This node never appears
4940
4941       --  N_Delay_Alternative
4942       --  Sloc points to DELAY
4943       --  Delay_Statement (Node2)
4944       --  Condition (Node1) from the guard (set to Empty if no guard present)
4945       --  Statements (List3) (set to Empty_List if no statements)
4946       --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4947
4948       ----------------------------------
4949       -- 9.7.1  Terminate Alternative --
4950       ----------------------------------
4951
4952       --  TERMINATE_ALTERNATIVE ::= terminate;
4953
4954       --  Gigi restriction: This node never appears
4955
4956       --  N_Terminate_Alternative
4957       --  Sloc points to TERMINATE
4958       --  Condition (Node1) from the guard (set to Empty if no guard present)
4959       --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4960       --  Pragmas_After (List5) pragmas after alt (set to No_List if none)
4961
4962       -----------------------------
4963       -- 9.7.2  Timed Entry Call --
4964       -----------------------------
4965
4966       --  TIMED_ENTRY_CALL ::=
4967       --    select
4968       --      ENTRY_CALL_ALTERNATIVE
4969       --    or
4970       --      DELAY_ALTERNATIVE
4971       --    end select;
4972
4973       --  Gigi restriction: This node never appears
4974
4975       --  N_Timed_Entry_Call
4976       --  Sloc points to SELECT
4977       --  Entry_Call_Alternative (Node1)
4978       --  Delay_Alternative (Node4)
4979
4980       -----------------------------------
4981       -- 9.7.2  Entry Call Alternative --
4982       -----------------------------------
4983
4984       --  ENTRY_CALL_ALTERNATIVE ::=
4985       --    PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
4986
4987       --  PROCEDURE_OR_ENTRY_CALL ::=
4988       --    PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
4989
4990       --  Gigi restriction: This node never appears
4991
4992       --  N_Entry_Call_Alternative
4993       --  Sloc points to first token of entry call statement
4994       --  Entry_Call_Statement (Node1)
4995       --  Statements (List3) (set to Empty_List if no statements)
4996       --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
4997
4998       -----------------------------------
4999       -- 9.7.3  Conditional Entry Call --
5000       -----------------------------------
5001
5002       --  CONDITIONAL_ENTRY_CALL ::=
5003       --    select
5004       --      ENTRY_CALL_ALTERNATIVE
5005       --    else
5006       --      SEQUENCE_OF_STATEMENTS
5007       --    end select;
5008
5009       --  Gigi restriction: This node never appears
5010
5011       --  N_Conditional_Entry_Call
5012       --  Sloc points to SELECT
5013       --  Entry_Call_Alternative (Node1)
5014       --  Else_Statements (List4)
5015
5016       --------------------------------
5017       -- 9.7.4  Asynchronous Select --
5018       --------------------------------
5019
5020       --  ASYNCHRONOUS_SELECT ::=
5021       --    select
5022       --      TRIGGERING_ALTERNATIVE
5023       --    then abort
5024       --      ABORTABLE_PART
5025       --    end select;
5026
5027       --  Note: asynchronous select is not permitted in Ada 83 mode
5028
5029       --  Gigi restriction: This node never appears
5030
5031       --  N_Asynchronous_Select
5032       --  Sloc points to SELECT
5033       --  Triggering_Alternative (Node1)
5034       --  Abortable_Part (Node2)
5035
5036       -----------------------------------
5037       -- 9.7.4  Triggering Alternative --
5038       -----------------------------------
5039
5040       --  TRIGGERING_ALTERNATIVE ::=
5041       --    TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5042
5043       --  Gigi restriction: This node never appears
5044
5045       --  N_Triggering_Alternative
5046       --  Sloc points to first token of triggering statement
5047       --  Triggering_Statement (Node1)
5048       --  Statements (List3) (set to Empty_List if no statements)
5049       --  Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5050
5051       ---------------------------------
5052       -- 9.7.4  Triggering Statement --
5053       ---------------------------------
5054
5055       --  TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5056
5057       ---------------------------
5058       -- 9.7.4  Abortable Part --
5059       ---------------------------
5060
5061       --  ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5062
5063       --  Gigi restriction: This node never appears
5064
5065       --  N_Abortable_Part
5066       --  Sloc points to ABORT
5067       --  Statements (List3)
5068
5069       --------------------------
5070       -- 9.8  Abort Statement --
5071       --------------------------
5072
5073       --  ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5074
5075       --  Gigi restriction: This node never appears
5076
5077       --  N_Abort_Statement
5078       --  Sloc points to ABORT
5079       --  Names (List2)
5080
5081       -------------------------
5082       -- 10.1.1  Compilation --
5083       -------------------------
5084
5085       --  COMPILATION ::= {COMPILATION_UNIT}
5086
5087       --  There is no explicit node in the tree for a compilation, since in
5088       --  general the compiler is processing only a single compilation unit
5089       --  at a time. It is possible to parse multiple units in syntax check
5090       --  only mode, but they the trees are discarded in any case.
5091
5092       ------------------------------
5093       -- 10.1.1  Compilation Unit --
5094       ------------------------------
5095
5096       --  COMPILATION_UNIT ::=
5097       --    CONTEXT_CLAUSE LIBRARY_ITEM
5098       --  | CONTEXT_CLAUSE SUBUNIT
5099
5100       --  The N_Compilation_Unit node itself respresents the above syntax.
5101       --  However, there are two additional items not reflected in the above
5102       --  syntax. First we have the global declarations that are added by the
5103       --  code generator. These are outer level declarations (so they cannot
5104       --  be represented as being inside the units). An example is the wrapper
5105       --  subprograms that are created to do ABE checking. As always a list of
5106       --  declarations can contain actions as well (i.e. statements), and such
5107       --  statements are executed as part of the elaboration of the unit. Note
5108       --  that all such declarations are elaborated before the library unit.
5109
5110       --  Similarly, certain actions need to be elaborated at the completion
5111       --  of elaboration of the library unit (notably the statement that sets
5112       --  the Boolean flag indicating that elaboration is complete).
5113
5114       --  The third item not reflected in the syntax is pragmas that appear
5115       --  after the compilation unit. As always pragmas are a problem since
5116       --  they are not part of the formal syntax, but can be stuck into the
5117       --  source following a set of ad hoc rules, and we have to find an ad
5118       --  hoc way of sticking them into the tree. For pragmas that appear
5119       --  before the library unit, we just consider them to be part of the
5120       --  context clause, and pragmas can appear in the Context_Items list
5121       --  of the compilation unit. However, pragmas can also appear after
5122       --  the library item.
5123
5124       --  To deal with all these problems, we create an auxiliary node for
5125       --  a compilation unit, referenced from the N_Compilation_Unit node
5126       --  that contains these three items.
5127
5128       --  N_Compilation_Unit
5129       --  Sloc points to first token of defining unit name
5130       --  Library_Unit (Node4-Sem) corresponding/parent spec/body
5131       --  Context_Items (List1) context items and pragmas preceding unit
5132       --  Private_Present (Flag15) set if library unit has private keyword
5133       --  Unit (Node2) library item or subunit
5134       --  Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5135       --  Has_No_Elaboration_Code (Flag17-Sem)
5136       --  Body_Required (Flag13-Sem) set for spec if body is required
5137       --  Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5138       --  First_Inlined_Subprogram (Node3-Sem)
5139
5140       --  N_Compilation_Unit_Aux
5141       --  Sloc is a copy of the Sloc from the N_Compilation_Unit node
5142       --  Declarations (List2) (set to No_List if no global declarations)
5143       --  Actions (List1) (set to No_List if no actions)
5144       --  Pragmas_After (List5) pragmas after unit (set to No_List if none)
5145       --  Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5146
5147       --------------------------
5148       -- 10.1.1  Library Item --
5149       --------------------------
5150
5151       --  LIBRARY_ITEM ::=
5152       --    [private] LIBRARY_UNIT_DECLARATION
5153       --  | LIBRARY_UNIT_BODY
5154       --  | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5155
5156       --  Note: PRIVATE is not allowed in Ada 83 mode
5157
5158       --  There is no explicit node in the tree for library item, instead
5159       --  the declaration or body, and the flag for private if present,
5160       --  appear in the N_Compilation_Unit clause.
5161
5162       ----------------------------------------
5163       -- 10.1.1  Library Unit Declararation --
5164       ----------------------------------------
5165
5166       --  LIBRARY_UNIT_DECLARATION ::=
5167       --    SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5168       --  | GENERIC_DECLARATION    | GENERIC_INSTANTIATION
5169
5170       -------------------------------------------------
5171       -- 10.1.1  Library Unit Renaming Declararation --
5172       -------------------------------------------------
5173
5174       --  LIBRARY_UNIT_RENAMING_DECLARATION ::=
5175       --    PACKAGE_RENAMING_DECLARATION
5176       --  | GENERIC_RENAMING_DECLARATION
5177       --  | SUBPROGRAM_RENAMING_DECLARATION
5178
5179       -------------------------------
5180       -- 10.1.1  Library unit body --
5181       -------------------------------
5182
5183       --  LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5184
5185       ------------------------------
5186       -- 10.1.1  Parent Unit Name --
5187       ------------------------------
5188
5189       --  PARENT_UNIT_NAME ::= NAME
5190
5191       ----------------------------
5192       -- 10.1.2  Context clause --
5193       ----------------------------
5194
5195       --  CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5196
5197       --  The context clause can include pragmas, and any pragmas that appear
5198       --  before the context clause proper (i.e. all configuration pragmas,
5199       --  also appear at the front of this list).
5200
5201       --------------------------
5202       -- 10.1.2  Context_Item --
5203       --------------------------
5204
5205       --  CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE  | WITH_TYPE_CLAUSE
5206
5207       -------------------------
5208       -- 10.1.2  With clause --
5209       -------------------------
5210
5211       --  WITH_CLAUSE ::=
5212       --    with library_unit_NAME {,library_unit_NAME};
5213
5214       --  A separate With clause is built for each name, so that we have
5215       --  a Corresponding_Spec field for each with'ed spec. The flags
5216       --  First_Name and Last_Name are used to reconstruct the exact
5217       --  source form. When a list of names appears in one with clause,
5218       --  the first name in the list has First_Name set, and the last
5219       --  has Last_Name set. If the with clause has only one name, then
5220       --  both of the flags First_Name and Last_Name are set in this name.
5221
5222       --  Note: in the case of implicit with's that are installed by the
5223       --  Rtsfind routine, Implicit_With is set, and the Sloc is typically
5224       --  set to Standard_Location, but it is incorrect to test the Sloc
5225       --  to find out if a with clause is implicit, test the flag instead.
5226
5227       --  N_With_Clause
5228       --  Sloc points to first token of library unit name
5229       --  Name (Node2)
5230       --  Library_Unit (Node4-Sem)
5231       --  Corresponding_Spec (Node5-Sem)
5232       --  First_Name (Flag5) (set to True if first name or only one name)
5233       --  Last_Name (Flag6) (set to True if last name or only one name)
5234       --  Context_Installed (Flag13-Sem)
5235       --  Elaborate_Present (Flag4-Sem)
5236       --  Elaborate_All_Present (Flag14-Sem)
5237       --  Elaborate_All_Desirable (Flag9-Sem)
5238       --  Elaborate_Desirable (Flag11-Sem)
5239       --  Private_Present (Flag15) set if with_clause has private keyword
5240       --  Implicit_With (Flag16-Sem)
5241       --  Limited_Present (Flag17)  set if LIMITED is present
5242       --  Limited_View_Installed (Flag18-Sem)
5243       --  Unreferenced_In_Spec (Flag7-Sem)
5244       --  No_Entities_Ref_In_Spec (Flag8-Sem)
5245
5246       --  Note: Limited_Present and Limited_View_Installed give support to
5247       --        Ada 2005 (AI-50217).
5248       --  Similarly, Private_Present gives support to AI-50262.
5249
5250       ----------------------
5251       -- With_Type clause --
5252       ----------------------
5253
5254       --  This is a GNAT extension, used to implement mutually recursive
5255       --  types declared in different packages.
5256
5257       --  WITH_TYPE_CLAUSE ::=
5258       --    with type type_NAME is access | with type type_NAME is tagged
5259
5260       --  N_With_Type_Clause
5261       --  Sloc points to first token of type name
5262       --  Name (Node2)
5263       --  Tagged_Present (Flag15)
5264
5265       ---------------------
5266       -- 10.2  Body stub --
5267       ---------------------
5268
5269       --  BODY_STUB ::=
5270       --    SUBPROGRAM_BODY_STUB
5271       --  | PACKAGE_BODY_STUB
5272       --  | TASK_BODY_STUB
5273       --  | PROTECTED_BODY_STUB
5274
5275       ----------------------------------
5276       -- 10.1.3  Subprogram Body Stub --
5277       ----------------------------------
5278
5279       --  SUBPROGRAM_BODY_STUB ::=
5280       --    SUBPROGRAM_SPECIFICATION is separate;
5281
5282       --  N_Subprogram_Body_Stub
5283       --  Sloc points to FUNCTION or PROCEDURE
5284       --  Specification (Node1)
5285       --  Library_Unit (Node4-Sem) points to the subunit
5286       --  Corresponding_Body (Node5-Sem)
5287
5288       -------------------------------
5289       -- 10.1.3  Package Body Stub --
5290       -------------------------------
5291
5292       --  PACKAGE_BODY_STUB ::=
5293       --    package body DEFINING_IDENTIFIER is separate;
5294
5295       --  N_Package_Body_Stub
5296       --  Sloc points to PACKAGE
5297       --  Defining_Identifier (Node1)
5298       --  Library_Unit (Node4-Sem) points to the subunit
5299       --  Corresponding_Body (Node5-Sem)
5300
5301       ----------------------------
5302       -- 10.1.3  Task Body Stub --
5303       ----------------------------
5304
5305       --  TASK_BODY_STUB ::=
5306       --    task body DEFINING_IDENTIFIER is separate;
5307
5308       --  N_Task_Body_Stub
5309       --  Sloc points to TASK
5310       --  Defining_Identifier (Node1)
5311       --  Library_Unit (Node4-Sem) points to the subunit
5312       --  Corresponding_Body (Node5-Sem)
5313
5314       ---------------------------------
5315       -- 10.1.3  Protected Body Stub --
5316       ---------------------------------
5317
5318       --  PROTECTED_BODY_STUB ::=
5319       --    protected body DEFINING_IDENTIFIER is separate;
5320
5321       --  Note: protected body stubs are not allowed in Ada 83 mode
5322
5323       --  N_Protected_Body_Stub
5324       --  Sloc points to PROTECTED
5325       --  Defining_Identifier (Node1)
5326       --  Library_Unit (Node4-Sem) points to the subunit
5327       --  Corresponding_Body (Node5-Sem)
5328
5329       ---------------------
5330       -- 10.1.3  Subunit --
5331       ---------------------
5332
5333       --  SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5334
5335       --  N_Subunit
5336       --  Sloc points to SEPARATE
5337       --  Name (Node2) is the name of the parent unit
5338       --  Proper_Body (Node1) is the subunit body
5339       --  Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5340
5341       ---------------------------------
5342       -- 11.1  Exception Declaration --
5343       ---------------------------------
5344
5345       --  EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception;
5346
5347       --  For consistency with object declarations etc, the parser converts
5348       --  the case of multiple identifiers being declared to a series of
5349       --  declarations in which the expression is copied, using the More_Ids
5350       --  and Prev_Ids flags to remember the souce form as described in the
5351       --  section on "Handling of Defining Identifier Lists".
5352
5353       --  N_Exception_Declaration
5354       --  Sloc points to EXCEPTION
5355       --  Defining_Identifier (Node1)
5356       --  Expression (Node3-Sem)
5357       --  More_Ids (Flag5) (set to False if no more identifiers in list)
5358       --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5359
5360       ------------------------------------------
5361       -- 11.2  Handled Sequence Of Statements --
5362       ------------------------------------------
5363
5364       --  HANDLED_SEQUENCE_OF_STATEMENTS ::=
5365       --      SEQUENCE_OF_STATEMENTS
5366       --    [exception
5367       --      EXCEPTION_HANDLER
5368       --      {EXCEPTION_HANDLER}]
5369       --    [at end
5370       --      cleanup_procedure_call (param, param, param, ...);]
5371
5372       --  The AT END phrase is a GNAT extension to provide for cleanups. It is
5373       --  used only internally currently, but is considered to be syntactic.
5374       --  At the moment, the only cleanup action allowed is a single call to
5375       --  a parameterless procedure, and the Identifier field of the node is
5376       --  the procedure to be called. Also there is a current restriction
5377       --  that exception handles and a cleanup cannot be present in the same
5378       --  frame, so at least one of Exception_Handlers or the Identifier must
5379       --  be missing.
5380
5381       --  Actually, more accurately, this restriction applies to the original
5382       --  source program. In the expanded tree, if the At_End_Proc field is
5383       --  present, then there will also be an exception handler of the form:
5384
5385       --     when all others =>
5386       --        cleanup;
5387       --        raise;
5388
5389       --  where cleanup is the procedure to be generated. The reason we do
5390       --  this is so that the front end can handle the necessary entries in
5391       --  the exception tables, and other exception handler actions required
5392       --  as part of the normal handling for exception handlers.
5393
5394       --  The AT END cleanup handler protects only the sequence of statements
5395       --  (not the associated declarations of the parent), just like exception
5396       --  handlers. The big difference is that the cleanup procedure is called
5397       --  on either a normal or an abnormal exit from the statement sequence.
5398
5399       --  Note: the list of Exception_Handlers can contain pragmas as well
5400       --  as actual handlers. In practice these pragmas can only occur at
5401       --  the start of the list, since any pragmas occurring later on will
5402       --  be included in the statement list of the corresponding handler.
5403
5404       --  Note: although in the Ada syntax, the sequence of statements in
5405       --  a handled sequence of statements can only contain statements, we
5406       --  allow free mixing of declarations and statements in the resulting
5407       --  expanded tree. This is for example used to deal with the case of
5408       --  a cleanup procedure that must handle declarations as well as the
5409       --  statements of a block.
5410
5411       --  N_Handled_Sequence_Of_Statements
5412       --  Sloc points to first token of first statement
5413       --  Statements (List3)
5414       --  End_Label (Node4) (set to Empty if expander generated)
5415       --  Exception_Handlers (List5) (set to No_List if none present)
5416       --  At_End_Proc (Node1) (set to Empty if no clean up procedure)
5417       --  First_Real_Statement (Node2-Sem)
5418       --  Zero_Cost_Handling (Flag5-Sem)
5419
5420       --  Note: the parent always contains a Declarations field which contains
5421       --  declarations associated with the handled sequence of statements. This
5422       --  is true even in the case of an accept statement (see description of
5423       --  the N_Accept_Statement node).
5424
5425       --  End_Label refers to the containing construct
5426
5427       -----------------------------
5428       -- 11.2  Exception Handler --
5429       -----------------------------
5430
5431       --  EXCEPTION_HANDLER ::=
5432       --    when [CHOICE_PARAMETER_SPECIFICATION :]
5433       --      EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5434       --        SEQUENCE_OF_STATEMENTS
5435
5436       --  Note: choice parameter specification is not allowed in Ada 83 mode
5437
5438       --  N_Exception_Handler
5439       --  Sloc points to WHEN
5440       --  Choice_Parameter (Node2) (set to Empty if not present)
5441       --  Exception_Choices (List4)
5442       --  Statements (List3)
5443       --  Zero_Cost_Handling (Flag5-Sem)
5444
5445       ------------------------------------------
5446       -- 11.2  Choice parameter specification --
5447       ------------------------------------------
5448
5449       --  CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5450
5451       ----------------------------
5452       -- 11.2  Exception Choice --
5453       ----------------------------
5454
5455       --  EXCEPTION_CHOICE ::= exception_NAME | others
5456
5457       --  Except in the case of OTHERS, no explicit node appears in the tree
5458       --  for exception choice. Instead the exception name appears directly.
5459       --  An OTHERS choice is represented by a N_Others_Choice node (see
5460       --  section 3.8.1.
5461
5462       --  Note: for the exception choice created for an at end handler, the
5463       --  exception choice is an N_Others_Choice node with All_Others set.
5464
5465       ---------------------------
5466       -- 11.3  Raise Statement --
5467       ---------------------------
5468
5469       --  RAISE_STATEMENT ::= raise [exception_NAME];
5470
5471       --  In Ada 2005, we have
5472
5473       --  RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
5474
5475       --  N_Raise_Statement
5476       --  Sloc points to RAISE
5477       --  Name (Node2) (set to Empty if no exception name present)
5478       --  Expression (Node3) (set to Empty if no expression present)
5479
5480       -------------------------------
5481       -- 12.1  Generic Declaration --
5482       -------------------------------
5483
5484       --  GENERIC_DECLARATION ::=
5485       --    GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
5486
5487       ------------------------------------------
5488       -- 12.1  Generic Subprogram Declaration --
5489       ------------------------------------------
5490
5491       --  GENERIC_SUBPROGRAM_DECLARATION ::=
5492       --    GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
5493
5494       --  Note: Generic_Formal_Declarations can include pragmas
5495
5496       --  N_Generic_Subprogram_Declaration
5497       --  Sloc points to GENERIC
5498       --  Specification (Node1) subprogram specification
5499       --  Corresponding_Body (Node5-Sem)
5500       --  Generic_Formal_Declarations (List2) from generic formal part
5501       --  Parent_Spec (Node4-Sem)
5502
5503       ---------------------------------------
5504       -- 12.1  Generic Package Declaration --
5505       ---------------------------------------
5506
5507       --  GENERIC_PACKAGE_DECLARATION ::=
5508       --    GENERIC_FORMAL_PART PACKAGE_SPECIFICATION;
5509
5510       --  Note: when we do generics right, the Activation_Chain_Entity entry
5511       --  for this node can be removed (since the expander won't see generic
5512       --  units any more)???.
5513
5514       --  Note: Generic_Formal_Declarations can include pragmas
5515
5516       --  N_Generic_Package_Declaration
5517       --  Sloc points to GENERIC
5518       --  Specification (Node1) package specification
5519       --  Corresponding_Body (Node5-Sem)
5520       --  Generic_Formal_Declarations (List2) from generic formal part
5521       --  Parent_Spec (Node4-Sem)
5522       --  Activation_Chain_Entity (Node3-Sem)
5523
5524       -------------------------------
5525       -- 12.1  Generic Formal Part --
5526       -------------------------------
5527
5528       --  GENERIC_FORMAL_PART ::=
5529       --    generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
5530
5531       ------------------------------------------------
5532       -- 12.1  Generic Formal Parameter Declaration --
5533       ------------------------------------------------
5534
5535       --  GENERIC_FORMAL_PARAMETER_DECLARATION ::=
5536       --    FORMAL_OBJECT_DECLARATION
5537       --  | FORMAL_TYPE_DECLARATION
5538       --  | FORMAL_SUBPROGRAM_DECLARATION
5539       --  | FORMAL_PACKAGE_DECLARATION
5540
5541       ---------------------------------
5542       -- 12.3  Generic Instantiation --
5543       ---------------------------------
5544
5545       --  GENERIC_INSTANTIATION ::=
5546       --    package DEFINING_PROGRAM_UNIT_NAME is
5547       --      new generic_package_NAME [GENERIC_ACTUAL_PART];
5548       --  | [[not] overriding]
5549       --    procedure DEFINING_PROGRAM_UNIT_NAME is
5550       --      new generic_procedure_NAME [GENERIC_ACTUAL_PART];
5551       --  | [[not] overriding]
5552       --    function DEFINING_DESIGNATOR is
5553       --      new generic_function_NAME [GENERIC_ACTUAL_PART];
5554
5555       --  N_Package_Instantiation
5556       --  Sloc points to PACKAGE
5557       --  Defining_Unit_Name (Node1)
5558       --  Name (Node2)
5559       --  Generic_Associations (List3) (set to No_List if no
5560       --   generic actual part)
5561       --  Parent_Spec (Node4-Sem)
5562       --  Instance_Spec (Node5-Sem)
5563       --  ABE_Is_Certain (Flag18-Sem)
5564
5565       --  N_Procedure_Instantiation
5566       --  Sloc points to PROCEDURE
5567       --  Defining_Unit_Name (Node1)
5568       --  Name (Node2)
5569       --  Parent_Spec (Node4-Sem)
5570       --  Generic_Associations (List3) (set to No_List if no
5571       --   generic actual part)
5572       --  Instance_Spec (Node5-Sem)
5573       --  Must_Override (Flag14) set if overriding indicator present
5574       --  Must_Not_Override (Flag15) set if not_overriding indicator present
5575       --  ABE_Is_Certain (Flag18-Sem)
5576
5577       --  N_Function_Instantiation
5578       --  Sloc points to FUNCTION
5579       --  Defining_Unit_Name (Node1)
5580       --  Name (Node2)
5581       --  Generic_Associations (List3) (set to No_List if no
5582       --   generic actual part)
5583       --  Parent_Spec (Node4-Sem)
5584       --  Instance_Spec (Node5-Sem)
5585       --  Must_Override (Flag14) set if overriding indicator present
5586       --  Must_Not_Override (Flag15) set if not_overriding indicator present
5587       --  ABE_Is_Certain (Flag18-Sem)
5588
5589       --  Note: overriding indicator is an Ada 2005 feature
5590
5591       ------------------------------
5592       -- 12.3 Generic Actual Part --
5593       ------------------------------
5594
5595       --  GENERIC_ACTUAL_PART ::=
5596       --    (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
5597
5598       -------------------------------
5599       -- 12.3  Generic Association --
5600       -------------------------------
5601
5602       --  GENERIC_ASSOCIATION ::=
5603       --    [generic_formal_parameter_SELECTOR_NAME =>]
5604       --      EXPLICIT_GENERIC_ACTUAL_PARAMETER
5605
5606       --  Note: unlike the procedure call case, a generic association node
5607       --  is generated for every association, even if no formal is present.
5608       --  In this case the parser will leave the Selector_Name field set
5609       --  to Empty, to be filled in later by the semantic pass.
5610
5611       --  N_Generic_Association
5612       --  Sloc points to first token of generic association
5613       --  Selector_Name (Node2) (set to Empty if no formal
5614       --   parameter selector name)
5615       --  Explicit_Generic_Actual_Parameter (Node1)
5616
5617       ---------------------------------------------
5618       -- 12.3  Explicit Generic Actual Parameter --
5619       ---------------------------------------------
5620
5621       --  EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
5622       --    EXPRESSION      | variable_NAME   | subprogram_NAME
5623       --  | entry_NAME      | SUBTYPE_MARK    | package_instance_NAME
5624
5625       -------------------------------------
5626       -- 12.4  Formal Object Declaration --
5627       -------------------------------------
5628
5629       --  FORMAL_OBJECT_DECLARATION ::=
5630       --    DEFINING_IDENTIFIER_LIST :
5631       --      MODE SUBTYPE_MARK [:= DEFAULT_EXPRESSION];
5632
5633       --  Although the syntax allows multiple identifiers in the list, the
5634       --  semantics is as though successive declarations were given with
5635       --  identical type definition and expression components. To simplify
5636       --  semantic processing, the parser represents a multiple declaration
5637       --  case as a sequence of single declarations, using the More_Ids and
5638       --  Prev_Ids flags to preserve the original source form as described
5639       --  in the section on "Handling of Defining Identifier Lists".
5640
5641       --  N_Formal_Object_Declaration
5642       --  Sloc points to first identifier
5643       --  Defining_Identifier (Node1)
5644       --  In_Present (Flag15)
5645       --  Out_Present (Flag17)
5646       --  Subtype_Mark (Node4)
5647       --  Expression (Node3) (set to Empty if no default expression)
5648       --  More_Ids (Flag5) (set to False if no more identifiers in list)
5649       --  Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5650
5651       -----------------------------------
5652       -- 12.5  Formal Type Declaration --
5653       -----------------------------------
5654
5655       --  FORMAL_TYPE_DECLARATION ::=
5656       --    type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5657       --      is FORMAL_TYPE_DEFINITION;
5658
5659       --  N_Formal_Type_Declaration
5660       --  Sloc points to TYPE
5661       --  Defining_Identifier (Node1)
5662       --  Formal_Type_Definition (Node3)
5663       --  Discriminant_Specifications (List4) (set to No_List if no
5664       --   discriminant part)
5665       --  Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5666
5667       ----------------------------------
5668       -- 12.5  Formal type definition --
5669       ----------------------------------
5670
5671       --  FORMAL_TYPE_DEFINITION ::=
5672       --    FORMAL_PRIVATE_TYPE_DEFINITION
5673       --  | FORMAL_DERIVED_TYPE_DEFINITION
5674       --  | FORMAL_DISCRETE_TYPE_DEFINITION
5675       --  | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
5676       --  | FORMAL_MODULAR_TYPE_DEFINITION
5677       --  | FORMAL_FLOATING_POINT_DEFINITION
5678       --  | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
5679       --  | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
5680       --  | FORMAL_ARRAY_TYPE_DEFINITION
5681       --  | FORMAL_ACCESS_TYPE_DEFINITION
5682       --  | FORMAL_INTERFACE_TYPE_DEFINITION
5683
5684       ---------------------------------------------
5685       -- 12.5.1  Formal Private Type Definition --
5686       ---------------------------------------------
5687
5688       --  FORMAL_PRIVATE_TYPE_DEFINITION ::=
5689       --    [[abstract] tagged] [limited] private
5690
5691       --  Note: TAGGED is not allowed in Ada 83 mode
5692
5693       --  N_Formal_Private_Type_Definition
5694       --  Sloc points to PRIVATE
5695       --  Abstract_Present (Flag4)
5696       --  Tagged_Present (Flag15)
5697       --  Limited_Present (Flag17)
5698
5699       --------------------------------------------
5700       -- 12.5.1  Formal Derived Type Definition --
5701       --------------------------------------------
5702
5703       --  FORMAL_DERIVED_TYPE_DEFINITION ::=
5704       --    [abstract] new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
5705       --  Note: this construct is not allowed in Ada 83 mode
5706
5707       --  N_Formal_Derived_Type_Definition
5708       --  Sloc points to NEW
5709       --  Subtype_Mark (Node4)
5710       --  Private_Present (Flag15)
5711       --  Abstract_Present (Flag4)
5712       --  Interface_List (List2) (set to No_List if none)
5713
5714       ---------------------------------------------
5715       -- 12.5.2  Formal Discrete Type Definition --
5716       ---------------------------------------------
5717
5718       --  FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
5719
5720       --  N_Formal_Discrete_Type_Definition
5721       --  Sloc points to (
5722
5723       ---------------------------------------------------
5724       -- 12.5.2  Formal Signed Integer Type Definition --
5725       ---------------------------------------------------
5726
5727       --  FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
5728
5729       --  N_Formal_Signed_Integer_Type_Definition
5730       --  Sloc points to RANGE
5731
5732       --------------------------------------------
5733       -- 12.5.2  Formal Modular Type Definition --
5734       --------------------------------------------
5735
5736       --  FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
5737
5738       --  N_Formal_Modular_Type_Definition
5739       --  Sloc points to MOD
5740
5741       ----------------------------------------------
5742       -- 12.5.2  Formal Floating Point Definition --
5743       ----------------------------------------------
5744
5745       --  FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
5746
5747       --  N_Formal_Floating_Point_Definition
5748       --  Sloc points to DIGITS
5749
5750       ----------------------------------------------------
5751       -- 12.5.2  Formal Ordinary Fixed Point Definition --
5752       ----------------------------------------------------
5753
5754       --  FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
5755
5756       --  N_Formal_Ordinary_Fixed_Point_Definition
5757       --  Sloc points to DELTA
5758
5759       ---------------------------------------------------
5760       -- 12.5.2  Formal Decimal Fixed Point Definition --
5761       ---------------------------------------------------
5762
5763       --  FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
5764
5765       --  Note: formal decimal fixed point definition not allowed in Ada 83
5766
5767       --  N_Formal_Decimal_Fixed_Point_Definition
5768       --  Sloc points to DELTA
5769
5770       ------------------------------------------
5771       -- 12.5.3  Formal Array Type Definition --
5772       ------------------------------------------
5773
5774       --  FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
5775
5776       -------------------------------------------
5777       -- 12.5.4  Formal Access Type Definition --
5778       -------------------------------------------
5779
5780       --  FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
5781
5782       ----------------------------------------------
5783       -- 12.5.5  Formal Interface Type Definition --
5784       ----------------------------------------------
5785
5786       --  FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
5787
5788       -----------------------------------------
5789       -- 12.6  Formal Subprogram Declaration --
5790       -----------------------------------------
5791
5792       --  FORMAL_SUBPROGRAM_DECLARATION ::=
5793       --    FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
5794       --  | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
5795
5796       --------------------------------------------------
5797       -- 12.6  Formal Concrete Subprogram Declaration --
5798       --------------------------------------------------
5799
5800       --  FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
5801       --    with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT];
5802
5803       --  N_Formal_Concrete_Subprogram_Declaration
5804       --  Sloc points to WITH
5805       --  Specification (Node1)
5806       --  Default_Name (Node2) (set to Empty if no subprogram default)
5807       --  Box_Present (Flag15)
5808
5809       --  Note: if no subprogram default is present, then Name is set
5810       --  to Empty, and Box_Present is False.
5811
5812       --------------------------------------------------
5813       -- 12.6  Formal Abstract Subprogram Declaration --
5814       --------------------------------------------------
5815
5816       --  FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
5817       --    with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT];
5818
5819       --  N_Formal_Abstract_Subprogram_Declaration
5820       --  Sloc points to WITH
5821       --  Specification (Node1)
5822       --  Default_Name (Node2) (set to Empty if no subprogram default)
5823       --  Box_Present (Flag15)
5824
5825       --  Note: if no subprogram default is present, then Name is set
5826       --  to Empty, and Box_Present is False.
5827
5828       ------------------------------
5829       -- 12.6  Subprogram Default --
5830       ------------------------------
5831
5832       --  SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
5833
5834       --  There is no separate node in the tree for a subprogram default.
5835       --  Instead the parent (N_Formal_Concrete_Subprogram_Declaration
5836       --  or N_Formal_Abstract_Subprogram_Declaration) node contains the
5837       --  default name or box indication, as needed.
5838
5839       ------------------------
5840       -- 12.6  Default Name --
5841       ------------------------
5842
5843       --  DEFAULT_NAME ::= NAME
5844
5845       --------------------------------------
5846       -- 12.7  Formal Package Declaration --
5847       --------------------------------------
5848
5849       --  FORMAL_PACKAGE_DECLARATION ::=
5850       --    with package DEFINING_IDENTIFIER
5851       --      is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART;
5852
5853       --  Note: formal package declarations not allowed in Ada 83 mode
5854
5855       --  N_Formal_Package_Declaration
5856       --  Sloc points to WITH
5857       --  Defining_Identifier (Node1)
5858       --  Name (Node2)
5859       --  Generic_Associations (List3) (set to No_List if (<>) case or
5860       --   empty generic actual part)
5861       --  Box_Present (Flag15)
5862       --  Instance_Spec (Node5-Sem)
5863       --  ABE_Is_Certain (Flag18-Sem)
5864
5865       --------------------------------------
5866       -- 12.7  Formal Package Actual Part --
5867       --------------------------------------
5868
5869       --  FORMAL_PACKAGE_ACTUAL_PART ::=
5870       --    (<>) | [GENERIC_ACTUAL_PART]
5871
5872       --  There is no explicit node in the tree for a formal package
5873       --  actual part. Instead the information appears in the parent node
5874       --  (i.e. the formal package declaration node itself).
5875
5876       ---------------------------------
5877       -- 13.1  Representation clause --
5878       ---------------------------------
5879
5880       --  REPRESENTATION_CLAUSE ::=
5881       --    ATTRIBUTE_DEFINITION_CLAUSE
5882       --  | ENUMERATION_REPRESENTATION_CLAUSE
5883       --  | RECORD_REPRESENTATION_CLAUSE
5884       --  | AT_CLAUSE
5885
5886       ----------------------
5887       -- 13.1  Local Name --
5888       ----------------------
5889
5890       --  LOCAL_NAME :=
5891       --    DIRECT_NAME
5892       --  | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
5893       --  | library_unit_NAME
5894
5895       --  The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
5896       --  as an attribute reference, which has essentially the same form.
5897
5898       ---------------------------------------
5899       -- 13.3  Attribute definition clause --
5900       ---------------------------------------
5901
5902       --  ATTRIBUTE_DEFINITION_CLAUSE ::=
5903       --    for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
5904       --  | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
5905
5906       --  In Ada 83, the expression must be a simple expression and the
5907       --  local name must be a direct name.
5908
5909       --  Note: the only attribute definition clause that is processed by
5910       --  gigi is an address clause. For all other cases, the information
5911       --  is extracted by the front end and either results in setting entity
5912       --  information, e.g. Esize for the Size clause, or in appropriate
5913       --  expansion actions (e.g. in the case of Storage_Size).
5914
5915       --  For an address clause, Gigi constructs the appropriate addressing
5916       --  code. It also ensures that no aliasing optimizations are made
5917       --  for the object for which the address clause appears.
5918
5919       --  Note: for an address clause used to achieve an overlay:
5920
5921       --    A : Integer;
5922       --    B : Integer;
5923       --    for B'Address use A'Address;
5924
5925       --  the above rule means that Gigi will ensure that no optimizations
5926       --  will be made for B that would violate the implementation advice
5927       --  of RM 13.3(19). However, this advice applies only to B and not
5928       --  to A, which seems unfortunate. The GNAT front end will mark the
5929       --  object A as volatile to also prevent unwanted optimization
5930       --  assumptions based on no aliasing being made for B.
5931
5932       --  N_Attribute_Definition_Clause
5933       --  Sloc points to FOR
5934       --  Name (Node2) the local name
5935       --  Chars (Name1) the identifier name from the attribute designator
5936       --  Expression (Node3) the expression or name
5937       --  Next_Rep_Item (Node4-Sem)
5938       --  From_At_Mod (Flag4-Sem)
5939       --  Check_Address_Alignment (Flag11-Sem)
5940
5941       ---------------------------------------------
5942       -- 13.4  Enumeration representation clause --
5943       ---------------------------------------------
5944
5945       --  ENUMERATION_REPRESENTATION_CLAUSE ::=
5946       --    for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
5947
5948       --  In Ada 83, the name must be a direct name
5949
5950       --  N_Enumeration_Representation_Clause
5951       --  Sloc points to FOR
5952       --  Identifier (Node1) direct name
5953       --  Array_Aggregate (Node3)
5954       --  Next_Rep_Item (Node4-Sem)
5955
5956       ---------------------------------
5957       -- 13.4  Enumeration aggregate --
5958       ---------------------------------
5959
5960       --  ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
5961
5962       ------------------------------------------
5963       -- 13.5.1  Record representation clause --
5964       ------------------------------------------
5965
5966       --  RECORD_REPRESENTATION_CLAUSE ::=
5967       --    for first_subtype_LOCAL_NAME use
5968       --      record [MOD_CLAUSE]
5969       --        {COMPONENT_CLAUSE}
5970       --      end record;
5971
5972       --  Gigi restriction: Mod_Clause is always Empty (if present it is
5973       --  replaced by a corresponding Alignment attribute definition clause).
5974
5975       --  Note: Component_Clauses can include pragmas
5976
5977       --  N_Record_Representation_Clause
5978       --  Sloc points to FOR
5979       --  Identifier (Node1) direct name
5980       --  Mod_Clause (Node2) (set to Empty if no mod clause present)
5981       --  Component_Clauses (List3)
5982       --  Next_Rep_Item (Node4-Sem)
5983
5984       ------------------------------
5985       -- 13.5.1  Component clause --
5986       ------------------------------
5987
5988       --  COMPONENT_CLAUSE ::=
5989       --    component_LOCAL_NAME at POSITION
5990       --      range FIRST_BIT .. LAST_BIT;
5991
5992       --  N_Component_Clause
5993       --  Sloc points to AT
5994       --  Component_Name (Node1) points to Name or Attribute_Reference
5995       --  Position (Node2)
5996       --  First_Bit (Node3)
5997       --  Last_Bit (Node4)
5998
5999       ----------------------
6000       -- 13.5.1  Position --
6001       ----------------------
6002
6003       --  POSITION ::= static_EXPRESSION
6004
6005       -----------------------
6006       -- 13.5.1  First_Bit --
6007       -----------------------
6008
6009       --  FIRST_BIT ::= static_SIMPLE_EXPRESSION
6010
6011       ----------------------
6012       -- 13.5.1  Last_Bit --
6013       ----------------------
6014
6015       --  LAST_BIT ::= static_SIMPLE_EXPRESSION
6016
6017       --------------------------
6018       -- 13.8  Code statement --
6019       --------------------------
6020
6021       --  CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6022
6023       --  Note: in GNAT, the qualified expression has the form
6024
6025       --    Asm_Insn'(Asm (...));
6026
6027       --      or
6028
6029       --    Asm_Insn'(Asm_Volatile (...))
6030
6031       --  See package System.Machine_Code in file s-maccod.ads for details
6032       --  on the allowed parameters to Asm[_Volatile]. There are two ways
6033       --  this node can arise, as a code statement, in which case the
6034       --  expression is the qualified expression, or as a result of the
6035       --  expansion of an intrinsic call to the Asm or Asm_Input procedure.
6036
6037       --  N_Code_Statement
6038       --  Sloc points to first token of the expression
6039       --  Expression (Node3)
6040
6041       --  Note: package Exp_Code contains an abstract functional interface
6042       --  for use by Gigi in accessing the data from N_Code_Statement nodes.
6043
6044       ------------------------
6045       -- 13.12  Restriction --
6046       ------------------------
6047
6048       --  RESTRICTION ::=
6049       --    restriction_IDENTIFIER
6050       --  | restriction_parameter_IDENTIFIER => EXPRESSION
6051
6052       --  There is no explicit node for restrictions. Instead the restriction
6053       --  appears in normal pragma syntax as a pragma argument association,
6054       --  which has the same syntactic form.
6055
6056       --------------------------
6057       -- B.2  Shift Operators --
6058       --------------------------
6059
6060       --  Calls to the intrinsic shift functions are converted to one of
6061       --  the following shift nodes, which have the form of normal binary
6062       --  operator names. Note that for a given shift operation, one node
6063       --  covers all possible types, as for normal operators.
6064
6065       --  Note: it is perfectly permissible for the expander to generate
6066       --  shift operation nodes directly, in which case they will be analyzed
6067       --  and parsed in the usual manner.
6068
6069       --  Sprint syntax: shift-function-name!(expr, count)
6070
6071       --  Note: the Left_Opnd field holds the first argument (the value to
6072       --  be shifted). The Right_Opnd field holds the second argument (the
6073       --  shift count). The Chars field is the name of the intrinsic function.
6074
6075       --  N_Op_Rotate_Left
6076       --  Sloc points to the function name
6077       --  plus fields for binary operator
6078       --  plus fields for expression
6079       --  Shift_Count_OK (Flag4-Sem)
6080
6081       --  N_Op_Rotate_Right
6082       --  Sloc points to the function name
6083       --  plus fields for binary operator
6084       --  plus fields for expression
6085       --  Shift_Count_OK (Flag4-Sem)
6086
6087       --  N_Op_Shift_Left
6088       --  Sloc points to the function name
6089       --  plus fields for binary operator
6090       --  plus fields for expression
6091       --  Shift_Count_OK (Flag4-Sem)
6092
6093       --  N_Op_Shift_Right_Arithmetic
6094       --  Sloc points to the function name
6095       --  plus fields for binary operator
6096       --  plus fields for expression
6097       --  Shift_Count_OK (Flag4-Sem)
6098
6099       --  N_Op_Shift_Right
6100       --  Sloc points to the function name
6101       --  plus fields for binary operator
6102       --  plus fields for expression
6103       --  Shift_Count_OK (Flag4-Sem)
6104
6105    --------------------------
6106    -- Obsolescent Features --
6107    --------------------------
6108
6109       --  The syntax descriptions and tree nodes for obsolescent features are
6110       --  grouped together, corresponding to their location in appendix I in
6111       --  the RM. However, parsing and semantic analysis for these constructs
6112       --  is located in an appropriate chapter (see individual notes).
6113
6114       ---------------------------
6115       -- J.3  Delta Constraint --
6116       ---------------------------
6117
6118       --  Note: the parse routine for this construct is located in section
6119       --  3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6120       --  where delta constraint logically belongs.
6121
6122       --  DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6123
6124       --  N_Delta_Constraint
6125       --  Sloc points to DELTA
6126       --  Delta_Expression (Node3)
6127       --  Range_Constraint (Node4) (set to Empty if not present)
6128
6129       --------------------
6130       -- J.7  At Clause --
6131       --------------------
6132
6133       --  AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6134
6135       --  Note: the parse routine for this construct is located in Par-Ch13,
6136       --  and the semantic analysis is in Sem_Ch13, where at clause logically
6137       --  belongs if it were not obsolescent.
6138
6139       --  Note: in Ada 83 the expression must be a simple expression
6140
6141       --  Gigi restriction: This node never appears, it is rewritten as an
6142       --  address attribute definition clause.
6143
6144       --  N_At_Clause
6145       --  Sloc points to FOR
6146       --  Identifier (Node1)
6147       --  Expression (Node3)
6148
6149       ---------------------
6150       -- J.8  Mod clause --
6151       ---------------------
6152
6153       --  MOD_CLAUSE ::= at mod static_EXPRESSION;
6154
6155       --  Note: the parse routine for this construct is located in Par-Ch13,
6156       --  and the semantic analysis is in Sem_Ch13, where mod clause logically
6157       --  belongs if it were not obsolescent.
6158
6159       --  Note: in Ada 83, the expression must be a simple expression
6160
6161       --  Gigi restriction: this node never appears. It is replaced
6162       --  by a corresponding Alignment attribute definition clause.
6163
6164       --  Note: pragmas can appear before and after the MOD_CLAUSE since
6165       --  its name has "clause" in it. This is rather strange, but is quite
6166       --  definitely specified. The pragmas before are collected in the
6167       --  Pragmas_Before field of the mod clause node itself, and pragmas
6168       --  after are simply swallowed up in the list of component clauses.
6169
6170       --  N_Mod_Clause
6171       --  Sloc points to AT
6172       --  Expression (Node3)
6173       --  Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6174
6175    --------------------
6176    -- Semantic Nodes --
6177    --------------------
6178
6179    --  These semantic nodes are used to hold additional semantic information.
6180    --  They are inserted into the tree as a result of semantic processing.
6181    --  Although there are no legitimate source syntax constructions that
6182    --  correspond directly to these nodes, we need a source syntax for the
6183    --  reconstructed tree printed by Sprint, and the node descriptions here
6184    --  show this syntax.
6185
6186       ----------------------------
6187       -- Conditional Expression --
6188       ----------------------------
6189
6190       --  This node is used to represent an expression corresponding to the
6191       --  C construct (condition ? then-expression : else_expression), where
6192       --  Expressions is a three element list, whose first expression is the
6193       --  condition, and whose second and third expressions are the then and
6194       --  else expressions respectively.
6195
6196       --  Note: the Then_Actions and Else_Actions fields are always set to
6197       --  No_List in the tree passed to Gigi. These fields are used only
6198       --  for temporary processing purposes in the expander.
6199
6200       --  Sprint syntax: (if expr then expr else expr)
6201
6202       --  N_Conditional_Expression
6203       --  Sloc points to related node
6204       --  Expressions (List1)
6205       --  Then_Actions (List2-Sem)
6206       --  Else_Actions (List3-Sem)
6207       --  plus fields for expression
6208
6209       --  Note: in the case where a debug source file is generated, the Sloc
6210       --  for this node points to the IF keyword in the Sprint file output.
6211
6212       -------------------
6213       -- Expanded_Name --
6214       -------------------
6215
6216       --  The N_Expanded_Name node is used to represent a selected component
6217       --  name that has been resolved to an expanded name. The semantic phase
6218       --  replaces N_Selected_Component nodes that represent names by the use
6219       --  of this node, leaving the N_Selected_Component node used only when
6220       --  the prefix is a record or protected type.
6221
6222       --  The fields of the N_Expanded_Name node are layed out identically
6223       --  to those of the N_Selected_Component node, allowing conversion of
6224       --  an expanded name node to a selected component node to be done
6225       --  easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6226
6227       --  There is no special sprint syntax for an expanded name
6228
6229       --  N_Expanded_Name
6230       --  Sloc points to the period
6231       --  Chars (Name1) copy of Chars field of selector name
6232       --  Prefix (Node3)
6233       --  Selector_Name (Node2)
6234       --  Entity (Node4-Sem)
6235       --  Associated_Node (Node4-Sem)
6236       --  Redundant_Use (Flag13-Sem)
6237       --  Has_Private_View (Flag11-Sem) set in generic units.
6238       --  plus fields for expression
6239
6240       --------------------
6241       -- Free Statement --
6242       --------------------
6243
6244       --  The N_Free_Statement node is generated as a result of a call to an
6245       --  instantiation of Unchecked_Deallocation. The instantiation of this
6246       --  generic is handled specially and generates this node directly.
6247
6248       --  Sprint syntax: free expression
6249
6250       --  N_Free_Statement
6251       --  Sloc is copied from the unchecked deallocation call
6252       --  Expression (Node3) argument to unchecked deallocation call
6253       --  Storage_Pool (Node1-Sem)
6254       --  Procedure_To_Call (Node4-Sem)
6255       --  Actual_Designated_Subtype (Node2-Sem)
6256
6257       --  Note: in the case where a debug source file is generated, the Sloc
6258       --  for this node points to the FREE keyword in the Sprint file output.
6259
6260       -------------------
6261       -- Freeze Entity --
6262       -------------------
6263
6264       --  This node marks the point in a declarative part at which an entity
6265       --  declared therein becomes frozen. The expander places initialization
6266       --  procedures for types at those points. Gigi uses the freezing point
6267       --  to elaborate entities that may depend on previous private types.
6268
6269       --  See the section in Einfo "Delayed Freezing and Elaboration" for
6270       --  a full description of the use of this node.
6271
6272       --  The Entity field points back to the entity for the type (whose
6273       --  Freeze_Node field points back to this freeze node).
6274
6275       --  The Actions field contains a list of declarations and statements
6276       --  generated by the expander which are associated with the freeze
6277       --  node, and are elaborated as though the freeze node were replaced
6278       --  by this sequence of actions.
6279
6280       --  Note: the Sloc field in the freeze node references a construct
6281       --  associated with the freezing point. This is used for posting
6282       --  messages in some error/warning situations, e.g. the case where
6283       --  a primitive operation of a tagged type is declared too late.
6284
6285       --  Sprint syntax: freeze entity-name [
6286       --                   freeze actions
6287       --                 ]
6288
6289       --  N_Freeze_Entity
6290       --  Sloc points near freeze point (see above special note)
6291       --  Entity (Node4-Sem)
6292       --  Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
6293       --  TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
6294       --  Actions (List1) (set to No_List if no freeze actions)
6295       --  First_Subtype_Link (Node5-Sem) (set to Empty if no link)
6296
6297       --  The Actions field holds actions associated with the freeze. These
6298       --  actions are elaborated at the point where the type is frozen.
6299
6300       --  Note: in the case where a debug source file is generated, the Sloc
6301       --  for this node points to the FREEZE keyword in the Sprint file output.
6302
6303       --------------------------------
6304       -- Implicit Label Declaration --
6305       --------------------------------
6306
6307       --  An implicit label declaration is created for every occurrence of a
6308       --  label on a statement or a label on a block or loop. It is chained
6309       --  in the declarations of the innermost enclosing block as specified
6310       --  in RM section 5.1 (3).
6311
6312       --  The Defining_Identifier is the actual identifier for the
6313       --  statement identifier. Note that the occurrence of the label
6314       --  is a reference, NOT the defining occurrence. The defining
6315       --  occurrence occurs at the head of the innermost enclosing
6316       --  block, and is represented by this node.
6317
6318       --  Note: from the grammar, this might better be called an implicit
6319       --  statement identifier declaration, but the term we choose seems
6320       --  friendlier, since at least informally statement identifiers are
6321       --  called labels in both cases (i.e. when used in labels, and when
6322       --  used as the identifiers of blocks and loops).
6323
6324       --  Note: although this is logically a semantic node, since it does
6325       --  not correspond directly to a source syntax construction, these
6326       --  nodes are actually created by the parser in a post pass done just
6327       --  after parsing is complete, before semantic analysis is started (see
6328       --  the Par.Labl subunit in file par-labl.adb).
6329
6330       --  Sprint syntax: labelname : label;
6331
6332       --  N_Implicit_Label_Declaration
6333       --  Sloc points to the << of the label
6334       --  Defining_Identifier (Node1)
6335       --  Label_Construct (Node2-Sem)
6336
6337       --  Note: in the case where a debug source file is generated, the Sloc
6338       --  for this node points to the label name in the generated declaration.
6339
6340       ---------------------
6341       -- Itype_Reference --
6342       ---------------------
6343
6344       --  This node is used to create a reference to an Itype. The only
6345       --  purpose is to make sure that the Itype is defined if this is the
6346       --  first reference.
6347
6348       --  A typical use of this node is when an Itype is to be referenced in
6349       --  two branches of an if statement. In this case it is important that
6350       --  the first use of the Itype not be inside the conditional, since
6351       --  then it might not be defined if the wrong branch of the if is
6352       --  taken in the case where the definition generates elaboration code.
6353
6354       --  The Itype field points to the referenced Itype
6355
6356       --  sprint syntax: reference itype-name
6357
6358       --  N_Itype_Reference
6359       --  Sloc points to the node generating the reference
6360       --  Itype (Node1-Sem)
6361
6362       --  Note: in the case where a debug source file is generated, the Sloc
6363       --  for this node points to the REFERENCE keyword in the file output.
6364
6365       ---------------------
6366       -- Raise_xxx_Error --
6367       ---------------------
6368
6369       --  One of these nodes is created during semantic analysis to replace
6370       --  a node for an expression that is determined to definitely raise
6371       --  the corresponding exception.
6372
6373       --  The N_Raise_xxx_Error node may also stand alone in place
6374       --  of a declaration or statement, in which case it simply causes
6375       --  the exception to be raised (i.e. it is equivalent to a raise
6376       --  statement that raises the corresponding exception). This use
6377       --  is distinguished by the fact that the Etype in this case is
6378       --  Standard_Void_Type, In the subexprssion case, the Etype is the
6379       --  same as the type of the subexpression which it replaces.
6380
6381       --  If Condition is empty, then the raise is unconditional. If the
6382       --  Condition field is non-empty, it is a boolean expression which
6383       --  is first evaluated, and the exception is raised only if the
6384       --  value of the expression is True. In the unconditional case, the
6385       --  creation of this node is usually accompanied by a warning message
6386       --  error. The creation of this node will usually be accompanied by a
6387       --  message (unless it appears within the right operand of a short
6388       --  circuit form whose left argument is static and decisively
6389       --  eliminates elaboration of the raise operation.
6390
6391       --  The exception is generated with a message that contains the
6392       --  file name and line number, and then appended text. The Reason
6393       --  code shows the text to be added. The Reason code is an element
6394       --  of the type Types.RT_Exception_Code, and indicates both the
6395       --  message to be added, and the exception to be raised (which must
6396       --  match the node type). The value is stored by storing a Uint which
6397       --  is the Pos value of the enumeration element in this type.
6398
6399       --  Gigi restriction: This expander ensures that the type of the
6400       --  Condition field is always Standard.Boolean, even if the type
6401       --  in the source is some non-standard boolean type.
6402
6403       --  Sprint syntax: [xxx_error "msg"]
6404       --             or: [xxx_error when condition "msg"]
6405
6406       --  N_Raise_Constraint_Error
6407       --  Sloc references related construct
6408       --  Condition (Node1) (set to Empty if no condition)
6409       --  Reason (Uint3)
6410       --  plus fields for expression
6411
6412       --  N_Raise_Program_Error
6413       --  Sloc references related construct
6414       --  Condition (Node1) (set to Empty if no condition)
6415       --  Reason (Uint3)
6416       --  plus fields for expression
6417
6418       --  N_Raise_Storage_Error
6419       --  Sloc references related construct
6420       --  Condition (Node1) (set to Empty if no condition)
6421       --  Reason (Uint3)
6422       --  plus fields for expression
6423
6424       --  Note: Sloc is copied from the expression generating the exception.
6425       --  In the case where a debug source file is generated, the Sloc for
6426       --  this node points to the left bracket in the Sprint file output.
6427
6428       ---------------
6429       -- Reference --
6430       ---------------
6431
6432       --  For a number of purposes, we need to construct references to objects.
6433       --  These references are subsequently treated as normal access values.
6434       --  An example is the construction of the parameter block passed to a
6435       --  task entry. The N_Reference node is provided for this purpose. It is
6436       --  similar in effect to the use of the Unrestricted_Access attribute,
6437       --  and like Unrestricted_Access can be applied to objects which would
6438       --  not be valid prefixes for the Unchecked_Access attribute (e.g.
6439       --  objects which are not aliased, and slices). In addition it can be
6440       --  applied to composite type values as well as objects, including string
6441       --  values and aggregates.
6442
6443       --  Note: we use the Prefix field for this expression so that the
6444       --  resulting node can be treated using common code with the attribute
6445       --  nodes for the 'Access and related attributes. Logically it would make
6446       --  more sense to call it an Expression field, but then we would have to
6447       --  special case the treatment of the N_Reference node.
6448
6449       --  Sprint syntax: prefix'reference
6450
6451       --  N_Reference
6452       --  Sloc is copied from the expression
6453       --  Prefix (Node3)
6454       --  plus fields for expression
6455
6456       --  Note: in the case where a debug source file is generated, the Sloc
6457       --  for this node points to the quote in the Sprint file output.
6458
6459       ---------------------
6460       -- Subprogram_Info --
6461       ---------------------
6462
6463       --  This node generates the appropriate Subprogram_Info value for a
6464       --  given procedure. See Ada.Exceptions for further details
6465
6466       --  Sprint syntax: subprog'subprogram_info
6467
6468       --  N_Subprogram_Info
6469       --  Sloc points to the entity for the procedure
6470       --  Identifier (Node1) identifier referencing the procedure
6471       --  Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
6472
6473       --  Note: in the case where a debug source file is generated, the Sloc
6474       --  for this node points to the quote in the Sprint file output.
6475
6476       --------------------------
6477       -- Unchecked Expression --
6478       --------------------------
6479
6480       --  An unchecked expression is one that must be analyzed and resolved
6481       --  with all checks off, regardless of the current setting of scope
6482       --  suppress flags.
6483
6484       --  Sprint syntax: `(expression)
6485
6486       --  Note: this node is always removed from the tree (and replaced by
6487       --  its constituent expression) on completion of analysis, so it only
6488       --  appears in intermediate trees, and will never be seen by Gigi.
6489
6490       --  N_Unchecked_Expression
6491       --  Sloc is a copy of the Sloc of the expression
6492       --  Expression (Node3)
6493       --  plus fields for expression
6494
6495       --  Note: in the case where a debug source file is generated, the Sloc
6496       --  for this node points to the back quote in the Sprint file output.
6497
6498       -------------------------------
6499       -- Unchecked Type Conversion --
6500       -------------------------------
6501
6502       --  An unchecked type conversion node represents the semantic action
6503       --  corresponding to a call to an instantiation of Unchecked_Conversion.
6504       --  It is generated as a result of actual use of Unchecked_Conversion
6505       --  and also the expander generates unchecked type conversion nodes
6506       --  directly for expansion of complex semantic actions.
6507
6508       --  Note: an unchecked type conversion is a variable as far as the
6509       --  semantics are concerned, which is convenient for the expander.
6510       --  This does not change what Ada source programs are legal, since
6511       --  clearly a function call to an instantiation of Unchecked_Conversion
6512       --  is not a variable in any case.
6513
6514       --  Sprint syntax: subtype-mark!(expression)
6515
6516       --  N_Unchecked_Type_Conversion
6517       --  Sloc points to related node in source
6518       --  Subtype_Mark (Node4)
6519       --  Expression (Node3)
6520       --  Kill_Range_Check (Flag11-Sem)
6521       --  No_Truncation (Flag17-Sem)
6522       --  plus fields for expression
6523
6524       --  Note: in the case where a debug source file is generated, the Sloc
6525       --  for this node points to the exclamation in the Sprint file output.
6526
6527       -----------------------------------
6528       -- Validate_Unchecked_Conversion --
6529       -----------------------------------
6530
6531       --  The front end does most of the validation of unchecked conversion,
6532       --  including checking sizes (this is done after the back end is called
6533       --  to take advantage of back-annotation of calculated sizes).
6534
6535       --  The front end also deals with specific cases that are not allowed
6536       --  e.g. involving unconstrained array types.
6537
6538       --  For the case of the standard gigi backend, this means that all
6539       --  checks are done in the front-end.
6540
6541       --  However, in the case of specialized back-ends, notably the JVM
6542       --  backend for JGNAT, additional requirements and restrictions apply
6543       --  to unchecked conversion, and these are most conveniently performed
6544       --  in the specialized back-end.
6545
6546       --  To accommodate this requirement, for such back ends, the following
6547       --  special node is generated recording an unchecked conversion that
6548       --  needs to be validated. The back end should post an appropriate
6549       --  error message if the unchecked conversion is invalid or warrants
6550       --  a special warning message.
6551
6552       --  Source_Type and Target_Type point to the entities for the two
6553       --  types involved in the unchecked conversion instantiation that
6554       --  is to be validated.
6555
6556       --  Sprint syntax: validate Unchecked_Conversion (source, target);
6557
6558       --  N_Validate_Unchecked_Conversion
6559       --  Sloc points to instantiation (location for warning message)
6560       --  Source_Type (Node1-Sem)
6561       --  Target_Type (Node2-Sem)
6562
6563       --  Note: in the case where a debug source file is generated, the Sloc
6564       --  for this node points to the VALIDATE keyword in the file output.
6565
6566    -----------
6567    -- Empty --
6568    -----------
6569
6570    --  Used as the contents of the Nkind field of the dummy Empty node
6571    --  and in some other situations to indicate an uninitialized value.
6572
6573    --  N_Empty
6574    --  Chars (Name1) is set to No_Name
6575
6576    -----------
6577    -- Error --
6578    -----------
6579
6580    --  Used as the contents of the Nkind field of the dummy Error node.
6581    --  Has an Etype field, which gets set to Any_Type later on, to help
6582    --  error recovery (Error_Posted is also set in the Error node).
6583
6584    --  N_Error
6585    --  Chars (Name1) is set to Error_Name
6586    --  Etype (Node5-Sem)
6587
6588    --------------------------
6589    -- Node Type Definition --
6590    --------------------------
6591
6592    --  The following is the definition of the Node_Kind type. As previously
6593    --  discussed, this is separated off to allow rearrangement of the order
6594    --  to facilitiate definition of subtype ranges. The comments show the
6595    --  subtype classes which apply to each set of node kinds. The first
6596    --  entry in the comment characterizes the following list of nodes.
6597
6598    type Node_Kind is (
6599       N_Unused_At_Start,
6600
6601       --  N_Representation_Clause
6602
6603       N_At_Clause,
6604       N_Component_Clause,
6605       N_Enumeration_Representation_Clause,
6606       N_Mod_Clause,
6607       N_Record_Representation_Clause,
6608
6609       --  N_Representation_Clause, N_Has_Chars
6610
6611       N_Attribute_Definition_Clause,
6612
6613       --  N_Has_Chars
6614
6615       N_Empty,
6616       N_Pragma,
6617       N_Pragma_Argument_Association,
6618
6619       --  N_Has_Etype
6620
6621       N_Error,
6622
6623       --  N_Entity, N_Has_Etype, N_Has_Chars
6624
6625       N_Defining_Character_Literal,
6626       N_Defining_Identifier,
6627       N_Defining_Operator_Symbol,
6628
6629       --  N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
6630
6631       N_Expanded_Name,
6632
6633       --  N_Direct_Name, N_Subexpr, N_Has_Etype,
6634       --  N_Has_Chars, N_Has_Entity
6635
6636       N_Identifier,
6637       N_Operator_Symbol,
6638
6639       --  N_Direct_Name, N_Subexpr, N_Has_Etype,
6640       --  N_Has_Chars, N_Has_Entity
6641
6642       N_Character_Literal,
6643
6644       --  N_Binary_Op, N_Op, N_Subexpr,
6645       --  N_Has_Etype, N_Has_Chars, N_Has_Entity
6646
6647       N_Op_Add,
6648       N_Op_Concat,
6649       N_Op_Expon,
6650       N_Op_Subtract,
6651
6652       --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
6653       --  N_Has_Etype, N_Has_Chars, N_Has_Entity
6654
6655       N_Op_Divide,
6656       N_Op_Mod,
6657       N_Op_Multiply,
6658       N_Op_Rem,
6659
6660       --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6661       --  N_Has_Entity, N_Has_Chars, N_Op_Boolean
6662
6663       N_Op_And,
6664
6665       --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6666       --  N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
6667
6668       N_Op_Eq,
6669       N_Op_Ge,
6670       N_Op_Gt,
6671       N_Op_Le,
6672       N_Op_Lt,
6673       N_Op_Ne,
6674
6675       --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
6676       --  N_Has_Entity, N_Has_Chars, N_Op_Boolean
6677
6678       N_Op_Or,
6679       N_Op_Xor,
6680
6681       --  N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
6682       --  N_Op_Shift, N_Has_Chars, N_Has_Entity
6683
6684       N_Op_Rotate_Left,
6685       N_Op_Rotate_Right,
6686       N_Op_Shift_Left,
6687       N_Op_Shift_Right,
6688       N_Op_Shift_Right_Arithmetic,
6689
6690       --  N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
6691       --  N_Has_Chars, N_Has_Entity
6692
6693       N_Op_Abs,
6694       N_Op_Minus,
6695       N_Op_Not,
6696       N_Op_Plus,
6697
6698       --  N_Subexpr, N_Has_Etype, N_Has_Entity
6699
6700       N_Attribute_Reference,
6701
6702       --  N_Subexpr, N_Has_Etype
6703
6704       N_And_Then,
6705       N_Conditional_Expression,
6706       N_Explicit_Dereference,
6707       N_Function_Call,
6708       N_In,
6709       N_Indexed_Component,
6710       N_Integer_Literal,
6711       N_Not_In,
6712       N_Null,
6713       N_Or_Else,
6714       N_Procedure_Call_Statement,
6715       N_Qualified_Expression,
6716
6717       --  N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
6718
6719       N_Raise_Constraint_Error,
6720       N_Raise_Program_Error,
6721       N_Raise_Storage_Error,
6722
6723       --  N_Subexpr, N_Has_Etype
6724
6725       N_Aggregate,
6726       N_Allocator,
6727       N_Extension_Aggregate,
6728       N_Range,
6729       N_Real_Literal,
6730       N_Reference,
6731       N_Selected_Component,
6732       N_Slice,
6733       N_String_Literal,
6734       N_Subprogram_Info,
6735       N_Type_Conversion,
6736       N_Unchecked_Expression,
6737       N_Unchecked_Type_Conversion,
6738
6739       --  N_Has_Etype
6740
6741       N_Subtype_Indication,
6742
6743       --  N_Declaration
6744
6745       N_Component_Declaration,
6746       N_Entry_Declaration,
6747       N_Formal_Object_Declaration,
6748       N_Formal_Type_Declaration,
6749       N_Full_Type_Declaration,
6750       N_Incomplete_Type_Declaration,
6751       N_Loop_Parameter_Specification,
6752       N_Object_Declaration,
6753       N_Protected_Type_Declaration,
6754       N_Private_Extension_Declaration,
6755       N_Private_Type_Declaration,
6756       N_Subtype_Declaration,
6757
6758       --  N_Subprogram_Specification, N_Declaration
6759
6760       N_Function_Specification,
6761       N_Procedure_Specification,
6762
6763       --  N_Access_To_Subprogram_Definition
6764
6765       N_Access_Function_Definition,
6766       N_Access_Procedure_Definition,
6767
6768       --  N_Later_Decl_Item
6769
6770       N_Task_Type_Declaration,
6771
6772       --  N_Body_Stub, N_Later_Decl_Item
6773
6774       N_Package_Body_Stub,
6775       N_Protected_Body_Stub,
6776       N_Subprogram_Body_Stub,
6777       N_Task_Body_Stub,
6778
6779       --  N_Generic_Instantiation, N_Later_Decl_Item
6780       --  N_Subprogram_Instantiation
6781
6782       N_Function_Instantiation,
6783       N_Procedure_Instantiation,
6784
6785       --  N_Generic_Instantiation, N_Later_Decl_Item
6786
6787       N_Package_Instantiation,
6788
6789       --  N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
6790
6791       N_Package_Body,
6792       N_Subprogram_Body,
6793
6794       --  N_Later_Decl_Item, N_Proper_Body
6795
6796       N_Protected_Body,
6797       N_Task_Body,
6798
6799       --  N_Later_Decl_Item
6800
6801       N_Implicit_Label_Declaration,
6802       N_Package_Declaration,
6803       N_Single_Task_Declaration,
6804       N_Subprogram_Declaration,
6805       N_Use_Package_Clause,
6806
6807       --  N_Generic_Declaration, N_Later_Decl_Item
6808
6809       N_Generic_Package_Declaration,
6810       N_Generic_Subprogram_Declaration,
6811
6812       --  N_Array_Type_Definition
6813
6814       N_Constrained_Array_Definition,
6815       N_Unconstrained_Array_Definition,
6816
6817       --  N_Renaming_Declaration
6818
6819       N_Exception_Renaming_Declaration,
6820       N_Object_Renaming_Declaration,
6821       N_Package_Renaming_Declaration,
6822       N_Subprogram_Renaming_Declaration,
6823
6824       --  N_Generic_Renaming_Declaration, N_Renaming_Declaration
6825
6826       N_Generic_Function_Renaming_Declaration,
6827       N_Generic_Package_Renaming_Declaration,
6828       N_Generic_Procedure_Renaming_Declaration,
6829
6830       --  N_Statement_Other_Than_Procedure_Call
6831
6832       N_Abort_Statement,
6833       N_Accept_Statement,
6834       N_Assignment_Statement,
6835       N_Asynchronous_Select,
6836       N_Block_Statement,
6837       N_Case_Statement,
6838       N_Code_Statement,
6839       N_Conditional_Entry_Call,
6840
6841       --  N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
6842
6843       N_Delay_Relative_Statement,
6844       N_Delay_Until_Statement,
6845
6846       --  N_Statement_Other_Than_Procedure_Call
6847
6848       N_Entry_Call_Statement,
6849       N_Free_Statement,
6850       N_Goto_Statement,
6851       N_Loop_Statement,
6852       N_Null_Statement,
6853       N_Raise_Statement,
6854       N_Requeue_Statement,
6855       N_Return_Statement,
6856       N_Selective_Accept,
6857       N_Timed_Entry_Call,
6858
6859       --  N_Statement_Other_Than_Procedure_Call, N_Has_Condition
6860
6861       N_Exit_Statement,
6862       N_If_Statement,
6863
6864       --  N_Has_Condition
6865
6866       N_Accept_Alternative,
6867       N_Delay_Alternative,
6868       N_Elsif_Part,
6869       N_Entry_Body_Formal_Part,
6870       N_Iteration_Scheme,
6871       N_Terminate_Alternative,
6872
6873       --  N_Formal_Subprogram_Declaration
6874
6875       N_Formal_Abstract_Subprogram_Declaration,
6876       N_Formal_Concrete_Subprogram_Declaration,
6877
6878       --  Other nodes (not part of any subtype class)
6879
6880       N_Abortable_Part,
6881       N_Abstract_Subprogram_Declaration,
6882       N_Access_Definition,
6883       N_Access_To_Object_Definition,
6884       N_Case_Statement_Alternative,
6885       N_Compilation_Unit,
6886       N_Compilation_Unit_Aux,
6887       N_Component_Association,
6888       N_Component_Definition,
6889       N_Component_List,
6890       N_Derived_Type_Definition,
6891       N_Decimal_Fixed_Point_Definition,
6892       N_Defining_Program_Unit_Name,
6893       N_Delta_Constraint,
6894       N_Designator,
6895       N_Digits_Constraint,
6896       N_Discriminant_Association,
6897       N_Discriminant_Specification,
6898       N_Enumeration_Type_Definition,
6899       N_Entry_Body,
6900       N_Entry_Call_Alternative,
6901       N_Entry_Index_Specification,
6902       N_Exception_Declaration,
6903       N_Exception_Handler,
6904       N_Floating_Point_Definition,
6905       N_Formal_Decimal_Fixed_Point_Definition,
6906       N_Formal_Derived_Type_Definition,
6907       N_Formal_Discrete_Type_Definition,
6908       N_Formal_Floating_Point_Definition,
6909       N_Formal_Modular_Type_Definition,
6910       N_Formal_Ordinary_Fixed_Point_Definition,
6911       N_Formal_Package_Declaration,
6912       N_Formal_Private_Type_Definition,
6913       N_Formal_Signed_Integer_Type_Definition,
6914       N_Freeze_Entity,
6915       N_Generic_Association,
6916       N_Handled_Sequence_Of_Statements,
6917       N_Index_Or_Discriminant_Constraint,
6918       N_Itype_Reference,
6919       N_Label,
6920       N_Modular_Type_Definition,
6921       N_Number_Declaration,
6922       N_Ordinary_Fixed_Point_Definition,
6923       N_Others_Choice,
6924       N_Package_Specification,
6925       N_Parameter_Association,
6926       N_Parameter_Specification,
6927       N_Protected_Definition,
6928       N_Range_Constraint,
6929       N_Real_Range_Specification,
6930       N_Record_Definition,
6931       N_Signed_Integer_Type_Definition,
6932       N_Single_Protected_Declaration,
6933       N_Subunit,
6934       N_Task_Definition,
6935       N_Triggering_Alternative,
6936       N_Use_Type_Clause,
6937       N_Validate_Unchecked_Conversion,
6938       N_Variant,
6939       N_Variant_Part,
6940       N_With_Clause,
6941       N_With_Type_Clause,
6942       N_Unused_At_End);
6943
6944    for Node_Kind'Size use 8;
6945    --  The data structures in Atree assume this!
6946
6947    ----------------------------
6948    -- Node Class Definitions --
6949    ----------------------------
6950
6951    subtype N_Access_To_Subprogram_Definition is Node_Kind range
6952      N_Access_Function_Definition ..
6953      N_Access_Procedure_Definition;
6954
6955    subtype N_Array_Type_Definition is Node_Kind range
6956      N_Constrained_Array_Definition ..
6957      N_Unconstrained_Array_Definition;
6958
6959    subtype N_Binary_Op is Node_Kind range
6960      N_Op_Add ..
6961      N_Op_Shift_Right_Arithmetic;
6962
6963    subtype N_Body_Stub is Node_Kind range
6964      N_Package_Body_Stub ..
6965      N_Task_Body_Stub;
6966
6967    subtype N_Declaration is Node_Kind range
6968      N_Component_Declaration ..
6969      N_Procedure_Specification;
6970    --  Note: this includes all constructs normally thought of as declarations
6971    --  except those which are separately grouped as later declarations.
6972
6973    subtype N_Delay_Statement is Node_Kind range
6974       N_Delay_Relative_Statement ..
6975       N_Delay_Until_Statement;
6976
6977    subtype N_Direct_Name is Node_Kind range
6978      N_Identifier ..
6979      N_Character_Literal;
6980
6981    subtype N_Entity is Node_Kind range
6982      N_Defining_Character_Literal ..
6983      N_Defining_Operator_Symbol;
6984
6985    subtype N_Formal_Subprogram_Declaration is Node_Kind range
6986      N_Formal_Abstract_Subprogram_Declaration ..
6987      N_Formal_Concrete_Subprogram_Declaration;
6988
6989    subtype N_Generic_Declaration is Node_Kind range
6990      N_Generic_Package_Declaration ..
6991      N_Generic_Subprogram_Declaration;
6992
6993    subtype N_Generic_Instantiation is Node_Kind range
6994      N_Function_Instantiation ..
6995      N_Package_Instantiation;
6996
6997    subtype N_Generic_Renaming_Declaration is Node_Kind range
6998      N_Generic_Function_Renaming_Declaration ..
6999      N_Generic_Procedure_Renaming_Declaration;
7000
7001    subtype N_Has_Chars is Node_Kind range
7002      N_Attribute_Definition_Clause ..
7003      N_Op_Plus;
7004
7005    subtype N_Has_Entity is Node_Kind range
7006      N_Expanded_Name ..
7007      N_Attribute_Reference;
7008    --  Nodes that have Entity fields
7009    --  Warning: DOES NOT INCLUDE N_Freeze_Entity!
7010
7011    subtype N_Has_Etype is Node_Kind range
7012      N_Error ..
7013      N_Subtype_Indication;
7014
7015    subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7016       N_Op_Divide ..
7017       N_Op_Rem;
7018
7019    subtype N_Later_Decl_Item is Node_Kind range
7020      N_Task_Type_Declaration ..
7021      N_Generic_Subprogram_Declaration;
7022    --  Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and
7023    --  includes only those items which can appear as later declarative
7024    --  items. This also includes N_Implicit_Label_Declaration which is
7025    --  not specifically in the grammar but may appear as a valid later
7026    --  declarative items. It does NOT include N_Pragma which can also
7027    --  appear among later declarative items. It does however include
7028    --  N_Protected_Body, which is a bit peculiar, but harmless since
7029    --  this cannot appear in Ada 83 mode anyway.
7030
7031    subtype N_Op is Node_Kind range
7032      N_Op_Add ..
7033      N_Op_Plus;
7034
7035    subtype N_Op_Boolean is Node_Kind range
7036      N_Op_And ..
7037      N_Op_Xor;
7038    --  Binary operators which take operands of a boolean type, and yield
7039    --  a result of a boolean type.
7040
7041    subtype N_Op_Compare is Node_Kind range
7042      N_Op_Eq ..
7043      N_Op_Ne;
7044
7045    subtype N_Op_Shift is Node_Kind range
7046      N_Op_Rotate_Left ..
7047      N_Op_Shift_Right_Arithmetic;
7048
7049    subtype N_Proper_Body is Node_Kind range
7050      N_Package_Body ..
7051      N_Task_Body;
7052
7053    subtype N_Raise_xxx_Error is Node_Kind range
7054      N_Raise_Constraint_Error ..
7055      N_Raise_Storage_Error;
7056
7057    subtype N_Renaming_Declaration is Node_Kind range
7058      N_Exception_Renaming_Declaration ..
7059      N_Generic_Procedure_Renaming_Declaration;
7060
7061    subtype N_Representation_Clause is Node_Kind range
7062      N_At_Clause ..
7063      N_Attribute_Definition_Clause;
7064
7065    subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7066      N_Abort_Statement ..
7067      N_If_Statement;
7068    --  Note that this includes all statement types except for the cases of the
7069    --  N_Procedure_Call_Statement which is considered to be a subexpression
7070    --  (since overloading is possible, so it needs to go through the normal
7071    --  overloading resolution for expressions).
7072
7073    subtype N_Subprogram_Instantiation is Node_Kind range
7074      N_Function_Instantiation ..
7075      N_Procedure_Instantiation;
7076
7077    subtype N_Has_Condition is Node_Kind range
7078      N_Exit_Statement ..
7079      N_Terminate_Alternative;
7080    --  Nodes with condition fields (does not include N_Raise_xxx_Error)
7081
7082    subtype N_Subexpr is Node_Kind range
7083      N_Expanded_Name ..
7084      N_Unchecked_Type_Conversion;
7085    --  Nodes with expression fields
7086
7087    subtype N_Subprogram_Specification is Node_Kind range
7088      N_Function_Specification ..
7089      N_Procedure_Specification;
7090
7091    subtype N_Unary_Op is Node_Kind range
7092      N_Op_Abs ..
7093      N_Op_Plus;
7094
7095    subtype N_Unit_Body is Node_Kind range
7096      N_Package_Body ..
7097      N_Subprogram_Body;
7098
7099    ---------------------------
7100    -- Node Access Functions --
7101    ---------------------------
7102
7103    --  The following functions return the contents of the indicated field of
7104    --  the node referenced by the argument, which is a Node_Id. They provide
7105    --  logical access to fields in the node which could be accessed using the
7106    --  Atree.Unchecked_Access package, but the idea is always to use these
7107    --  higher level routines which preserve strong typing. In debug mode,
7108    --  these routines check that they are being applied to an appropriate
7109    --  node, as well as checking that the node is in range.
7110
7111    function ABE_Is_Certain
7112      (N : Node_Id) return Boolean;    -- Flag18
7113
7114    function Abort_Present
7115      (N : Node_Id) return Boolean;    -- Flag15
7116
7117    function Abortable_Part
7118      (N : Node_Id) return Node_Id;    -- Node2
7119
7120    function Abstract_Present
7121      (N : Node_Id) return Boolean;    -- Flag4
7122
7123    function Accept_Handler_Records
7124      (N : Node_Id) return List_Id;    -- List5
7125
7126    function Accept_Statement
7127      (N : Node_Id) return Node_Id;    -- Node2
7128
7129    function Access_Definition
7130      (N : Node_Id) return Node_Id;    -- Node3
7131
7132    function Access_To_Subprogram_Definition
7133      (N : Node_Id) return Node_Id;    -- Node3
7134
7135    function Access_Types_To_Process
7136      (N : Node_Id) return Elist_Id;   -- Elist2
7137
7138    function Actions
7139      (N : Node_Id) return List_Id;    -- List1
7140
7141    function Activation_Chain_Entity
7142      (N : Node_Id) return Node_Id;    -- Node3
7143
7144    function Acts_As_Spec
7145      (N : Node_Id) return Boolean;    -- Flag4
7146
7147    function Actual_Designated_Subtype
7148      (N : Node_Id) return Node_Id;    -- Node2
7149
7150    function Aggregate_Bounds
7151      (N : Node_Id) return Node_Id;    -- Node3
7152
7153    function Aliased_Present
7154      (N : Node_Id) return Boolean;    -- Flag4
7155
7156    function All_Others
7157      (N : Node_Id) return Boolean;    -- Flag11
7158
7159    function All_Present
7160      (N : Node_Id) return Boolean;    -- Flag15
7161
7162    function Alternatives
7163      (N : Node_Id) return List_Id;    -- List4
7164
7165    function Ancestor_Part
7166      (N : Node_Id) return Node_Id;    -- Node3
7167
7168    function Array_Aggregate
7169      (N : Node_Id) return Node_Id;    -- Node3
7170
7171    function Assignment_OK
7172      (N : Node_Id) return Boolean;    -- Flag15
7173
7174    function Associated_Node
7175      (N : Node_Id) return Node_Id;    -- Node4
7176
7177    function At_End_Proc
7178      (N : Node_Id) return Node_Id;    -- Node1
7179
7180    function Attribute_Name
7181      (N : Node_Id) return Name_Id;    -- Name2
7182
7183    function Aux_Decls_Node
7184      (N : Node_Id) return Node_Id;    -- Node5
7185
7186    function Backwards_OK
7187      (N : Node_Id) return Boolean;    -- Flag6
7188
7189    function Bad_Is_Detected
7190      (N : Node_Id) return Boolean;    -- Flag15
7191
7192    function By_Ref
7193      (N : Node_Id) return Boolean;    -- Flag5
7194
7195    function Body_Required
7196      (N : Node_Id) return Boolean;    -- Flag13
7197
7198    function Body_To_Inline
7199      (N : Node_Id) return Node_Id;    -- Node3
7200
7201    function Box_Present
7202      (N : Node_Id) return Boolean;    -- Flag15
7203
7204    function Char_Literal_Value
7205      (N : Node_Id) return Uint;       -- Uint2
7206
7207    function Chars
7208      (N : Node_Id) return Name_Id;    -- Name1
7209
7210    function Check_Address_Alignment
7211      (N : Node_Id) return Boolean;    -- Flag11
7212
7213    function Choice_Parameter
7214      (N : Node_Id) return Node_Id;    -- Node2
7215
7216    function Choices
7217      (N : Node_Id) return List_Id;    -- List1
7218
7219    function Compile_Time_Known_Aggregate
7220      (N : Node_Id) return Boolean;    -- Flag18
7221
7222    function Component_Associations
7223      (N : Node_Id) return List_Id;    -- List2
7224
7225    function Component_Clauses
7226      (N : Node_Id) return List_Id;    -- List3
7227
7228    function Component_Definition
7229      (N : Node_Id) return Node_Id;    -- Node4
7230
7231    function Component_Items
7232      (N : Node_Id) return List_Id;    -- List3
7233
7234    function Component_List
7235      (N : Node_Id) return Node_Id;    -- Node1
7236
7237    function Component_Name
7238      (N : Node_Id) return Node_Id;    -- Node1
7239
7240    function Condition
7241      (N : Node_Id) return Node_Id;    -- Node1
7242
7243    function Condition_Actions
7244      (N : Node_Id) return List_Id;    -- List3
7245
7246    function Config_Pragmas
7247      (N : Node_Id) return List_Id;    -- List4
7248
7249    function Constant_Present
7250      (N : Node_Id) return Boolean;    -- Flag17
7251
7252    function Constraint
7253      (N : Node_Id) return Node_Id;    -- Node3
7254
7255    function Constraints
7256      (N : Node_Id) return List_Id;    -- List1
7257
7258    function Context_Installed
7259      (N : Node_Id) return Boolean;    -- Flag13
7260
7261    function Context_Items
7262      (N : Node_Id) return List_Id;    -- List1
7263
7264    function Controlling_Argument
7265      (N : Node_Id) return Node_Id;    -- Node1
7266
7267    function Conversion_OK
7268      (N : Node_Id) return Boolean;    -- Flag14
7269
7270    function Corresponding_Body
7271      (N : Node_Id) return Node_Id;    -- Node5
7272
7273    function Corresponding_Formal_Spec
7274      (N : Node_Id) return Node_Id;    -- Node3
7275
7276    function Corresponding_Generic_Association
7277      (N : Node_Id) return Node_Id;    -- Node5
7278
7279    function Corresponding_Integer_Value
7280      (N : Node_Id) return Uint;       -- Uint4
7281
7282    function Corresponding_Spec
7283      (N : Node_Id) return Node_Id;    -- Node5
7284
7285    function Corresponding_Stub
7286      (N : Node_Id) return Node_Id;    -- Node3
7287
7288    function Dcheck_Function
7289      (N : Node_Id) return Entity_Id;  -- Node5
7290
7291    function Debug_Statement
7292      (N : Node_Id) return Node_Id;    -- Node3
7293
7294    function Declarations
7295      (N : Node_Id) return List_Id;    -- List2
7296
7297    function Default_Expression
7298      (N : Node_Id) return Node_Id;    -- Node5
7299
7300    function Default_Name
7301      (N : Node_Id) return Node_Id;    -- Node2
7302
7303    function Defining_Identifier
7304      (N : Node_Id) return Entity_Id;  -- Node1
7305
7306    function Defining_Unit_Name
7307      (N : Node_Id) return Node_Id;    -- Node1
7308
7309    function Delay_Alternative
7310      (N : Node_Id) return Node_Id;    -- Node4
7311
7312    function Delay_Finalize_Attach
7313      (N : Node_Id) return Boolean;    -- Flag14
7314
7315    function Delay_Statement
7316      (N : Node_Id) return Node_Id;    -- Node2
7317
7318    function Delta_Expression
7319      (N : Node_Id) return Node_Id;    -- Node3
7320
7321    function Digits_Expression
7322      (N : Node_Id) return Node_Id;    -- Node2
7323
7324    function Discr_Check_Funcs_Built
7325      (N : Node_Id) return Boolean;    -- Flag11
7326
7327    function Discrete_Choices
7328      (N : Node_Id) return List_Id;    -- List4
7329
7330    function Discrete_Range
7331      (N : Node_Id) return Node_Id;    -- Node4
7332
7333    function Discrete_Subtype_Definition
7334      (N : Node_Id) return Node_Id;    -- Node4
7335
7336    function Discrete_Subtype_Definitions
7337      (N : Node_Id) return List_Id;    -- List2
7338
7339    function Discriminant_Specifications
7340      (N : Node_Id) return List_Id;    -- List4
7341
7342    function Discriminant_Type
7343      (N : Node_Id) return Node_Id;    -- Node5
7344
7345    function Do_Accessibility_Check
7346      (N : Node_Id) return Boolean;    -- Flag13
7347
7348    function Do_Discriminant_Check
7349      (N : Node_Id) return Boolean;    -- Flag13
7350
7351    function Do_Division_Check
7352      (N : Node_Id) return Boolean;    -- Flag13
7353
7354    function Do_Length_Check
7355      (N : Node_Id) return Boolean;    -- Flag4
7356
7357    function Do_Overflow_Check
7358      (N : Node_Id) return Boolean;    -- Flag17
7359
7360    function Do_Range_Check
7361      (N : Node_Id) return Boolean;    -- Flag9
7362
7363    function Do_Storage_Check
7364      (N : Node_Id) return Boolean;    -- Flag17
7365
7366    function Do_Tag_Check
7367      (N : Node_Id) return Boolean;    -- Flag13
7368
7369    function Elaborate_All_Desirable
7370      (N : Node_Id) return Boolean;    -- Flag9
7371
7372    function Elaborate_All_Present
7373      (N : Node_Id) return Boolean;    -- Flag14
7374
7375    function Elaborate_Desirable
7376      (N : Node_Id) return Boolean;    -- Flag11
7377
7378    function Elaborate_Present
7379      (N : Node_Id) return Boolean;    -- Flag4
7380
7381    function Elaboration_Boolean
7382      (N : Node_Id) return Node_Id;    -- Node2
7383
7384    function Else_Actions
7385      (N : Node_Id) return List_Id;    -- List3
7386
7387    function Else_Statements
7388      (N : Node_Id) return List_Id;    -- List4
7389
7390    function Elsif_Parts
7391      (N : Node_Id) return List_Id;    -- List3
7392
7393    function Enclosing_Variant
7394      (N : Node_Id) return Node_Id;    -- Node2
7395
7396    function End_Label
7397      (N : Node_Id) return Node_Id;    -- Node4
7398
7399    function End_Span
7400      (N : Node_Id) return Uint;       -- Uint5
7401
7402    function Entity
7403      (N : Node_Id) return Node_Id;    -- Node4
7404
7405    function Entity_Or_Associated_Node
7406      (N : Node_Id) return Node_Id;    -- Node4
7407
7408    function Entry_Body_Formal_Part
7409      (N : Node_Id) return Node_Id;    -- Node5
7410
7411    function Entry_Call_Alternative
7412      (N : Node_Id) return Node_Id;    -- Node1
7413
7414    function Entry_Call_Statement
7415      (N : Node_Id) return Node_Id;    -- Node1
7416
7417    function Entry_Direct_Name
7418      (N : Node_Id) return Node_Id;    -- Node1
7419
7420    function Entry_Index
7421      (N : Node_Id) return Node_Id;    -- Node5
7422
7423    function Entry_Index_Specification
7424      (N : Node_Id) return Node_Id;    -- Node4
7425
7426    function Etype
7427      (N : Node_Id) return Node_Id;    -- Node5
7428
7429    function Exception_Choices
7430      (N : Node_Id) return List_Id;    -- List4
7431
7432    function Exception_Handlers
7433      (N : Node_Id) return List_Id;    -- List5
7434
7435    function Exception_Junk
7436      (N : Node_Id) return Boolean;    -- Flag7
7437
7438    function Explicit_Actual_Parameter
7439      (N : Node_Id) return Node_Id;    -- Node3
7440
7441    function Expansion_Delayed
7442      (N : Node_Id) return Boolean;    -- Flag11
7443
7444    function Explicit_Generic_Actual_Parameter
7445      (N : Node_Id) return Node_Id;    -- Node1
7446
7447    function Expression
7448      (N : Node_Id) return Node_Id;    -- Node3
7449
7450    function Expressions
7451      (N : Node_Id) return List_Id;    -- List1
7452
7453    function First_Bit
7454      (N : Node_Id) return Node_Id;    -- Node3
7455
7456    function First_Inlined_Subprogram
7457      (N : Node_Id) return Entity_Id;  -- Node3
7458
7459    function First_Name
7460      (N : Node_Id) return Boolean;    -- Flag5
7461
7462    function First_Named_Actual
7463      (N : Node_Id) return Node_Id;    -- Node4
7464
7465    function First_Real_Statement
7466      (N : Node_Id) return Node_Id;    -- Node2
7467
7468    function First_Subtype_Link
7469      (N : Node_Id) return Entity_Id;  -- Node5
7470
7471    function Float_Truncate
7472      (N : Node_Id) return Boolean;    -- Flag11
7473
7474    function Formal_Type_Definition
7475      (N : Node_Id) return Node_Id;    -- Node3
7476
7477    function Forwards_OK
7478      (N : Node_Id) return Boolean;    -- Flag5
7479
7480    function From_At_Mod
7481      (N : Node_Id) return Boolean;    -- Flag4
7482
7483    function From_Default
7484      (N : Node_Id) return Boolean;    -- Flag6
7485
7486    function Generic_Associations
7487      (N : Node_Id) return List_Id;    -- List3
7488
7489    function Generic_Formal_Declarations
7490      (N : Node_Id) return List_Id;    -- List2
7491
7492    function Generic_Parent
7493      (N : Node_Id) return Node_Id;    -- Node5
7494
7495    function Generic_Parent_Type
7496      (N : Node_Id) return Node_Id;    -- Node4
7497
7498    function Handled_Statement_Sequence
7499      (N : Node_Id) return Node_Id;    -- Node4
7500
7501    function Handler_List_Entry
7502      (N : Node_Id) return Node_Id;    -- Node2
7503
7504    function Has_Created_Identifier
7505      (N : Node_Id) return Boolean;    -- Flag15
7506
7507    function Has_Dynamic_Length_Check
7508      (N : Node_Id) return Boolean;    -- Flag10
7509
7510    function Has_Dynamic_Range_Check
7511      (N : Node_Id) return Boolean;    -- Flag12
7512
7513    function Has_No_Elaboration_Code
7514      (N : Node_Id) return Boolean;    -- Flag17
7515
7516    function Has_Priority_Pragma
7517      (N : Node_Id) return Boolean;    -- Flag6
7518
7519    function Has_Private_View
7520      (N : Node_Id) return Boolean;    -- Flag11
7521
7522    function Has_Storage_Size_Pragma
7523      (N : Node_Id) return Boolean;    -- Flag5
7524
7525    function Has_Task_Info_Pragma
7526      (N : Node_Id) return Boolean;    -- Flag7
7527
7528    function Has_Task_Name_Pragma
7529      (N : Node_Id) return Boolean;    -- Flag8
7530
7531    function Has_Wide_Character
7532      (N : Node_Id) return Boolean;    -- Flag11
7533
7534    function Hidden_By_Use_Clause
7535      (N : Node_Id) return Elist_Id;   -- Elist4
7536
7537    function High_Bound
7538      (N : Node_Id) return Node_Id;    -- Node2
7539
7540    function Identifier
7541      (N : Node_Id) return Node_Id;    -- Node1
7542
7543    function Interface_List
7544      (N : Node_Id) return List_Id;    -- List2
7545
7546    function Interface_Present
7547      (N : Node_Id) return Boolean;    -- Flag16
7548
7549    function Implicit_With
7550      (N : Node_Id) return Boolean;    -- Flag16
7551
7552    function In_Present
7553      (N : Node_Id) return Boolean;    -- Flag15
7554
7555    function Includes_Infinities
7556      (N : Node_Id) return Boolean;    -- Flag11
7557
7558    function Instance_Spec
7559      (N : Node_Id) return Node_Id;    -- Node5
7560
7561    function Intval
7562      (N : Node_Id) return Uint;       -- Uint3
7563
7564    function Is_Asynchronous_Call_Block
7565      (N : Node_Id) return Boolean;    -- Flag7
7566
7567    function Is_Component_Left_Opnd
7568      (N : Node_Id) return Boolean;    -- Flag13
7569
7570    function Is_Component_Right_Opnd
7571      (N : Node_Id) return Boolean;    -- Flag14
7572
7573    function Is_Controlling_Actual
7574      (N : Node_Id) return Boolean;    -- Flag16
7575
7576    function Is_In_Discriminant_Check
7577      (N : Node_Id) return Boolean;    -- Flag11
7578
7579    function Is_Machine_Number
7580      (N : Node_Id) return Boolean;    -- Flag11
7581
7582    function Is_Null_Loop
7583      (N : Node_Id) return Boolean;    -- Flag16
7584
7585    function Is_Overloaded
7586      (N : Node_Id) return Boolean;    -- Flag5
7587
7588    function Is_Power_Of_2_For_Shift
7589      (N : Node_Id) return Boolean;    -- Flag13
7590
7591    function Is_Protected_Subprogram_Body
7592      (N : Node_Id) return Boolean;    -- Flag7
7593
7594    function Is_Static_Expression
7595      (N : Node_Id) return Boolean;    -- Flag6
7596
7597    function Is_Subprogram_Descriptor
7598      (N : Node_Id) return Boolean;    -- Flag16
7599
7600    function Is_Task_Allocation_Block
7601      (N : Node_Id) return Boolean;    -- Flag6
7602
7603    function Is_Task_Master
7604      (N : Node_Id) return Boolean;    -- Flag5
7605
7606    function Iteration_Scheme
7607      (N : Node_Id) return Node_Id;    -- Node2
7608
7609    function Itype
7610      (N : Node_Id) return Entity_Id;  -- Node1
7611
7612    function Kill_Range_Check
7613      (N : Node_Id) return Boolean;    -- Flag11
7614
7615    function Label_Construct
7616      (N : Node_Id) return Node_Id;    -- Node2
7617
7618    function Left_Opnd
7619      (N : Node_Id) return Node_Id;    -- Node2
7620
7621    function Last_Bit
7622      (N : Node_Id) return Node_Id;    -- Node4
7623
7624    function Last_Name
7625      (N : Node_Id) return Boolean;    -- Flag6
7626
7627    function Library_Unit
7628      (N : Node_Id) return Node_Id;    -- Node4
7629
7630    function Limited_View_Installed
7631      (N : Node_Id) return Boolean;    -- Flag18
7632
7633    function Limited_Present
7634      (N : Node_Id) return Boolean;    -- Flag17
7635
7636    function Literals
7637      (N : Node_Id) return List_Id;    -- List1
7638
7639    function Loop_Actions
7640      (N : Node_Id) return List_Id;    -- List2
7641
7642    function Loop_Parameter_Specification
7643      (N : Node_Id) return Node_Id;    -- Node4
7644
7645    function Low_Bound
7646      (N : Node_Id) return Node_Id;    -- Node1
7647
7648    function Mod_Clause
7649      (N : Node_Id) return Node_Id;    -- Node2
7650
7651    function More_Ids
7652      (N : Node_Id) return Boolean;    -- Flag5
7653
7654    function Must_Be_Byte_Aligned
7655      (N : Node_Id) return Boolean;    -- Flag14
7656
7657    function Must_Not_Freeze
7658      (N : Node_Id) return Boolean;    -- Flag8
7659
7660    function Must_Not_Override
7661      (N : Node_Id) return Boolean;    -- Flag15
7662
7663    function Must_Override
7664      (N : Node_Id) return Boolean;    -- Flag14
7665
7666    function Name
7667      (N : Node_Id) return Node_Id;    -- Node2
7668
7669    function Names
7670      (N : Node_Id) return List_Id;    -- List2
7671
7672    function Next_Entity
7673      (N : Node_Id) return Node_Id;    -- Node2
7674
7675    function Next_Named_Actual
7676      (N : Node_Id) return Node_Id;    -- Node4
7677
7678    function Next_Rep_Item
7679      (N : Node_Id) return Node_Id;    -- Node4
7680
7681    function Next_Use_Clause
7682      (N : Node_Id) return Node_Id;    -- Node3
7683
7684    function No_Ctrl_Actions
7685      (N : Node_Id) return Boolean;    -- Flag7
7686
7687    function No_Elaboration_Check
7688      (N : Node_Id) return Boolean;    -- Flag14
7689
7690    function No_Entities_Ref_In_Spec
7691      (N : Node_Id) return Boolean;    -- Flag8
7692
7693    function No_Initialization
7694      (N : Node_Id) return Boolean;    -- Flag13
7695
7696    function No_Truncation
7697      (N : Node_Id) return Boolean;    -- Flag17
7698
7699    function Null_Present
7700      (N : Node_Id) return Boolean;    -- Flag13
7701
7702    function Null_Exclusion_Present
7703      (N : Node_Id) return Boolean;    -- Flag11
7704
7705    function Null_Record_Present
7706      (N : Node_Id) return Boolean;    -- Flag17
7707
7708    function Object_Definition
7709      (N : Node_Id) return Node_Id;    -- Node4
7710
7711    function Original_Discriminant
7712      (N : Node_Id) return Node_Id;    -- Node2
7713
7714    function Original_Entity
7715      (N : Node_Id) return Entity_Id;  -- Node2
7716
7717    function Others_Discrete_Choices
7718      (N : Node_Id) return List_Id;    -- List1
7719
7720    function Out_Present
7721      (N : Node_Id) return Boolean;    -- Flag17
7722
7723    function Parameter_Associations
7724      (N : Node_Id) return List_Id;    -- List3
7725
7726    function Parameter_List_Truncated
7727      (N : Node_Id) return Boolean;    -- Flag17
7728
7729    function Parameter_Specifications
7730      (N : Node_Id) return List_Id;    -- List3
7731
7732    function Parameter_Type
7733      (N : Node_Id) return Node_Id;    -- Node2
7734
7735    function Parent_Spec
7736      (N : Node_Id) return Node_Id;    -- Node4
7737
7738    function Position
7739      (N : Node_Id) return Node_Id;    -- Node2
7740
7741    function Pragma_Argument_Associations
7742      (N : Node_Id) return List_Id;    -- List2
7743
7744    function Pragmas_After
7745      (N : Node_Id) return List_Id;    -- List5
7746
7747    function Pragmas_Before
7748      (N : Node_Id) return List_Id;    -- List4
7749
7750    function Prefix
7751      (N : Node_Id) return Node_Id;    -- Node3
7752
7753    function Present_Expr
7754      (N : Node_Id) return Uint;       -- Uint3
7755
7756    function Prev_Ids
7757      (N : Node_Id) return Boolean;    -- Flag6
7758
7759    function Print_In_Hex
7760      (N : Node_Id) return Boolean;    -- Flag13
7761
7762    function Private_Declarations
7763      (N : Node_Id) return List_Id;    -- List3
7764
7765    function Private_Present
7766      (N : Node_Id) return Boolean;    -- Flag15
7767
7768    function Procedure_To_Call
7769      (N : Node_Id) return Node_Id;    -- Node4
7770
7771    function Proper_Body
7772      (N : Node_Id) return Node_Id;    -- Node1
7773
7774    function Protected_Definition
7775      (N : Node_Id) return Node_Id;    -- Node3
7776
7777    function Protected_Present
7778      (N : Node_Id) return Boolean;    -- Flag6
7779
7780    function Raises_Constraint_Error
7781      (N : Node_Id) return Boolean;    -- Flag7
7782
7783    function Range_Constraint
7784      (N : Node_Id) return Node_Id;    -- Node4
7785
7786    function Range_Expression
7787      (N : Node_Id) return Node_Id;    -- Node4
7788
7789    function Real_Range_Specification
7790      (N : Node_Id) return Node_Id;    -- Node4
7791
7792    function Realval
7793      (N : Node_Id) return Ureal;      -- Ureal3
7794
7795    function Reason
7796      (N : Node_Id) return Uint;       -- Uint3
7797
7798    function Record_Extension_Part
7799      (N : Node_Id) return Node_Id;    -- Node3
7800
7801    function Redundant_Use
7802      (N : Node_Id) return Boolean;    -- Flag13
7803
7804    function Result_Definition
7805      (N : Node_Id) return Node_Id;    -- Node4
7806
7807    function Return_Type
7808      (N : Node_Id) return Node_Id;    -- Node2
7809
7810    function Reverse_Present
7811      (N : Node_Id) return Boolean;    -- Flag15
7812
7813    function Right_Opnd
7814      (N : Node_Id) return Node_Id;    -- Node3
7815
7816    function Rounded_Result
7817      (N : Node_Id) return Boolean;    -- Flag18
7818
7819    function Scope
7820      (N : Node_Id) return Node_Id;    -- Node3
7821
7822    function Select_Alternatives
7823      (N : Node_Id) return List_Id;    -- List1
7824
7825    function Selector_Name
7826      (N : Node_Id) return Node_Id;    -- Node2
7827
7828    function Selector_Names
7829      (N : Node_Id) return List_Id;    -- List1
7830
7831    function Shift_Count_OK
7832      (N : Node_Id) return Boolean;    -- Flag4
7833
7834    function Source_Type
7835      (N : Node_Id) return Entity_Id;  -- Node1
7836
7837    function Specification
7838      (N : Node_Id) return Node_Id;    -- Node1
7839
7840    function Statements
7841      (N : Node_Id) return List_Id;    -- List3
7842
7843    function Static_Processing_OK
7844      (N : Node_Id) return Boolean;    -- Flag4
7845
7846    function Storage_Pool
7847      (N : Node_Id) return Node_Id;    -- Node1
7848
7849    function Strval
7850      (N : Node_Id) return String_Id;  -- Str3
7851
7852    function Subtype_Indication
7853      (N : Node_Id) return Node_Id;    -- Node5
7854
7855    function Subtype_Mark
7856      (N : Node_Id) return Node_Id;    -- Node4
7857
7858    function Subtype_Marks
7859      (N : Node_Id) return List_Id;    -- List2
7860
7861    function Synchronized_Present
7862      (N : Node_Id) return Boolean;    -- Flag7
7863
7864    function Tagged_Present
7865      (N : Node_Id) return Boolean;    -- Flag15
7866
7867    function Target_Type
7868      (N : Node_Id) return Entity_Id;  -- Node2
7869
7870    function Task_Definition
7871      (N : Node_Id) return Node_Id;    -- Node3
7872
7873    function Task_Present
7874      (N : Node_Id) return Boolean;    -- Flag5
7875
7876    function Then_Actions
7877      (N : Node_Id) return List_Id;    -- List2
7878
7879    function Then_Statements
7880      (N : Node_Id) return List_Id;    -- List2
7881
7882    function Treat_Fixed_As_Integer
7883      (N : Node_Id) return Boolean;    -- Flag14
7884
7885    function Triggering_Alternative
7886      (N : Node_Id) return Node_Id;    -- Node1
7887
7888    function Triggering_Statement
7889      (N : Node_Id) return Node_Id;    -- Node1
7890
7891    function TSS_Elist
7892      (N : Node_Id) return Elist_Id;   -- Elist3
7893
7894    function Type_Definition
7895      (N : Node_Id) return Node_Id;    -- Node3
7896
7897    function Unit
7898      (N : Node_Id) return Node_Id;    -- Node2
7899
7900    function Unknown_Discriminants_Present
7901      (N : Node_Id) return Boolean;    -- Flag13
7902
7903    function Unreferenced_In_Spec
7904      (N : Node_Id) return Boolean;    -- Flag7
7905
7906    function Variant_Part
7907      (N : Node_Id) return Node_Id;    -- Node4
7908
7909    function Variants
7910      (N : Node_Id) return List_Id;    -- List1
7911
7912    function Visible_Declarations
7913      (N : Node_Id) return List_Id;    -- List2
7914
7915    function Was_Originally_Stub
7916      (N : Node_Id) return Boolean;    -- Flag13
7917
7918    function Zero_Cost_Handling
7919      (N : Node_Id) return Boolean;    -- Flag5
7920
7921    --  End functions (note used by xsinfo utility program to end processing)
7922
7923    ----------------------------
7924    -- Node Update Procedures --
7925    ----------------------------
7926
7927    --  These are the corresponding node update routines, which again provide
7928    --  a high level logical access with type checking. In addition to setting
7929    --  the indicated field of the node N to the given Val, in the case of
7930    --  tree pointers (List1-4), the parent pointer of the Val node is set to
7931    --  point back to node N. This automates the setting of the parent pointer.
7932
7933    procedure Set_ABE_Is_Certain
7934      (N : Node_Id; Val : Boolean := True);    -- Flag18
7935
7936    procedure Set_Abort_Present
7937      (N : Node_Id; Val : Boolean := True);    -- Flag15
7938
7939    procedure Set_Abortable_Part
7940      (N : Node_Id; Val : Node_Id);            -- Node2
7941
7942    procedure Set_Abstract_Present
7943      (N : Node_Id; Val : Boolean := True);    -- Flag4
7944
7945    procedure Set_Accept_Handler_Records
7946      (N : Node_Id; Val : List_Id);            -- List5
7947
7948    procedure Set_Accept_Statement
7949      (N : Node_Id; Val : Node_Id);            -- Node2
7950
7951    procedure Set_Access_Definition
7952      (N : Node_Id; Val : Node_Id);            -- Node3
7953
7954    procedure Set_Access_To_Subprogram_Definition
7955      (N : Node_Id; Val : Node_Id);            -- Node3
7956
7957    procedure Set_Access_Types_To_Process
7958      (N : Node_Id; Val : Elist_Id);           -- Elist2
7959
7960    procedure Set_Actions
7961      (N : Node_Id; Val : List_Id);            -- List1
7962
7963    procedure Set_Activation_Chain_Entity
7964      (N : Node_Id; Val : Node_Id);            -- Node3
7965
7966    procedure Set_Acts_As_Spec
7967      (N : Node_Id; Val : Boolean := True);    -- Flag4
7968
7969    procedure Set_Actual_Designated_Subtype
7970      (N : Node_Id; Val : Node_Id);            -- Node2
7971
7972    procedure Set_Aggregate_Bounds
7973      (N : Node_Id; Val : Node_Id);            -- Node3
7974
7975    procedure Set_Aliased_Present
7976      (N : Node_Id; Val : Boolean := True);    -- Flag4
7977
7978    procedure Set_All_Others
7979      (N : Node_Id; Val : Boolean := True);    -- Flag11
7980
7981    procedure Set_All_Present
7982      (N : Node_Id; Val : Boolean := True);    -- Flag15
7983
7984    procedure Set_Alternatives
7985      (N : Node_Id; Val : List_Id);            -- List4
7986
7987    procedure Set_Ancestor_Part
7988      (N : Node_Id; Val : Node_Id);            -- Node3
7989
7990    procedure Set_Array_Aggregate
7991      (N : Node_Id; Val : Node_Id);            -- Node3
7992
7993    procedure Set_Assignment_OK
7994      (N : Node_Id; Val : Boolean := True);    -- Flag15
7995
7996    procedure Set_Associated_Node
7997      (N : Node_Id; Val : Node_Id);            -- Node4
7998
7999    procedure Set_Attribute_Name
8000      (N : Node_Id; Val : Name_Id);            -- Name2
8001
8002    procedure Set_At_End_Proc
8003      (N : Node_Id; Val : Node_Id);            -- Node1
8004
8005    procedure Set_Aux_Decls_Node
8006      (N : Node_Id; Val : Node_Id);            -- Node5
8007
8008    procedure Set_Backwards_OK
8009      (N : Node_Id; Val : Boolean := True);    -- Flag6
8010
8011    procedure Set_Bad_Is_Detected
8012      (N : Node_Id; Val : Boolean := True);    -- Flag15
8013
8014    procedure Set_Body_Required
8015      (N : Node_Id; Val : Boolean := True);    -- Flag13
8016
8017    procedure Set_Body_To_Inline
8018      (N : Node_Id; Val : Node_Id);            -- Node3
8019
8020    procedure Set_Box_Present
8021      (N : Node_Id; Val : Boolean := True);    -- Flag15
8022
8023    procedure Set_By_Ref
8024      (N : Node_Id; Val : Boolean := True);    -- Flag5
8025
8026    procedure Set_Char_Literal_Value
8027      (N : Node_Id; Val : Uint);               -- Uint2
8028
8029    procedure Set_Chars
8030      (N : Node_Id; Val : Name_Id);            -- Name1
8031
8032    procedure Set_Check_Address_Alignment
8033      (N : Node_Id; Val : Boolean := True);    -- Flag11
8034
8035    procedure Set_Choice_Parameter
8036      (N : Node_Id; Val : Node_Id);            -- Node2
8037
8038    procedure Set_Choices
8039      (N : Node_Id; Val : List_Id);            -- List1
8040
8041    procedure Set_Compile_Time_Known_Aggregate
8042      (N : Node_Id; Val : Boolean := True);    -- Flag18
8043
8044    procedure Set_Component_Associations
8045      (N : Node_Id; Val : List_Id);            -- List2
8046
8047    procedure Set_Component_Clauses
8048      (N : Node_Id; Val : List_Id);            -- List3
8049
8050    procedure Set_Component_Definition
8051      (N : Node_Id; Val : Node_Id);            -- Node4
8052
8053    procedure Set_Component_Items
8054      (N : Node_Id; Val : List_Id);            -- List3
8055
8056    procedure Set_Component_List
8057      (N : Node_Id; Val : Node_Id);            -- Node1
8058
8059    procedure Set_Component_Name
8060      (N : Node_Id; Val : Node_Id);            -- Node1
8061
8062    procedure Set_Condition
8063      (N : Node_Id; Val : Node_Id);            -- Node1
8064
8065    procedure Set_Condition_Actions
8066      (N : Node_Id; Val : List_Id);            -- List3
8067
8068    procedure Set_Config_Pragmas
8069      (N : Node_Id; Val : List_Id);            -- List4
8070
8071    procedure Set_Constant_Present
8072      (N : Node_Id; Val : Boolean := True);    -- Flag17
8073
8074    procedure Set_Constraint
8075      (N : Node_Id; Val : Node_Id);            -- Node3
8076
8077    procedure Set_Constraints
8078      (N : Node_Id; Val : List_Id);            -- List1
8079
8080    procedure Set_Context_Installed
8081      (N : Node_Id; Val : Boolean := True);    -- Flag13
8082
8083    procedure Set_Context_Items
8084      (N : Node_Id; Val : List_Id);            -- List1
8085
8086    procedure Set_Controlling_Argument
8087      (N : Node_Id; Val : Node_Id);            -- Node1
8088
8089    procedure Set_Conversion_OK
8090      (N : Node_Id; Val : Boolean := True);    -- Flag14
8091
8092    procedure Set_Corresponding_Body
8093      (N : Node_Id; Val : Node_Id);            -- Node5
8094
8095    procedure Set_Corresponding_Formal_Spec
8096      (N : Node_Id; Val : Node_Id);            -- Node3
8097
8098    procedure Set_Corresponding_Generic_Association
8099      (N : Node_Id; Val : Node_Id);            -- Node5
8100
8101    procedure Set_Corresponding_Integer_Value
8102      (N : Node_Id; Val : Uint);               -- Uint4
8103
8104    procedure Set_Corresponding_Spec
8105      (N : Node_Id; Val : Node_Id);            -- Node5
8106
8107    procedure Set_Corresponding_Stub
8108      (N : Node_Id; Val : Node_Id);            -- Node3
8109
8110    procedure Set_Dcheck_Function
8111      (N : Node_Id; Val : Entity_Id);          -- Node5
8112
8113    procedure Set_Debug_Statement
8114      (N : Node_Id; Val : Node_Id);            -- Node3
8115
8116    procedure Set_Declarations
8117      (N : Node_Id; Val : List_Id);            -- List2
8118
8119    procedure Set_Default_Expression
8120      (N : Node_Id; Val : Node_Id);            -- Node5
8121
8122    procedure Set_Default_Name
8123      (N : Node_Id; Val : Node_Id);            -- Node2
8124
8125    procedure Set_Defining_Identifier
8126      (N : Node_Id; Val : Entity_Id);          -- Node1
8127
8128    procedure Set_Defining_Unit_Name
8129      (N : Node_Id; Val : Node_Id);            -- Node1
8130
8131    procedure Set_Delay_Alternative
8132      (N : Node_Id; Val : Node_Id);            -- Node4
8133
8134    procedure Set_Delay_Finalize_Attach
8135      (N : Node_Id; Val : Boolean := True);    -- Flag14
8136
8137    procedure Set_Delay_Statement
8138      (N : Node_Id; Val : Node_Id);            -- Node2
8139
8140    procedure Set_Delta_Expression
8141      (N : Node_Id; Val : Node_Id);            -- Node3
8142
8143    procedure Set_Digits_Expression
8144      (N : Node_Id; Val : Node_Id);            -- Node2
8145
8146    procedure Set_Discr_Check_Funcs_Built
8147      (N : Node_Id; Val : Boolean := True);    -- Flag11
8148
8149    procedure Set_Discrete_Choices
8150      (N : Node_Id; Val : List_Id);            -- List4
8151
8152    procedure Set_Discrete_Range
8153      (N : Node_Id; Val : Node_Id);            -- Node4
8154
8155    procedure Set_Discrete_Subtype_Definition
8156      (N : Node_Id; Val : Node_Id);            -- Node4
8157
8158    procedure Set_Discrete_Subtype_Definitions
8159      (N : Node_Id; Val : List_Id);            -- List2
8160
8161    procedure Set_Discriminant_Specifications
8162      (N : Node_Id; Val : List_Id);            -- List4
8163
8164    procedure Set_Discriminant_Type
8165      (N : Node_Id; Val : Node_Id);            -- Node5
8166
8167    procedure Set_Do_Accessibility_Check
8168      (N : Node_Id; Val : Boolean := True);    -- Flag13
8169
8170    procedure Set_Do_Discriminant_Check
8171      (N : Node_Id; Val : Boolean := True);    -- Flag13
8172
8173    procedure Set_Do_Division_Check
8174      (N : Node_Id; Val : Boolean := True);    -- Flag13
8175
8176    procedure Set_Do_Length_Check
8177      (N : Node_Id; Val : Boolean := True);    -- Flag4
8178
8179    procedure Set_Do_Overflow_Check
8180      (N : Node_Id; Val : Boolean := True);    -- Flag17
8181
8182    procedure Set_Do_Range_Check
8183      (N : Node_Id; Val : Boolean := True);    -- Flag9
8184
8185    procedure Set_Do_Storage_Check
8186      (N : Node_Id; Val : Boolean := True);    -- Flag17
8187
8188    procedure Set_Do_Tag_Check
8189      (N : Node_Id; Val : Boolean := True);    -- Flag13
8190
8191    procedure Set_Elaborate_All_Desirable
8192      (N : Node_Id; Val : Boolean := True);    -- Flag9
8193
8194    procedure Set_Elaborate_All_Present
8195      (N : Node_Id; Val : Boolean := True);    -- Flag14
8196
8197    procedure Set_Elaborate_Desirable
8198      (N : Node_Id; Val : Boolean := True);    -- Flag11
8199
8200    procedure Set_Elaborate_Present
8201      (N : Node_Id; Val : Boolean := True);    -- Flag4
8202
8203    procedure Set_Elaboration_Boolean
8204      (N : Node_Id; Val : Node_Id);            -- Node2
8205
8206    procedure Set_Else_Actions
8207      (N : Node_Id; Val : List_Id);            -- List3
8208
8209    procedure Set_Else_Statements
8210      (N : Node_Id; Val : List_Id);            -- List4
8211
8212    procedure Set_Elsif_Parts
8213      (N : Node_Id; Val : List_Id);            -- List3
8214
8215    procedure Set_Enclosing_Variant
8216      (N : Node_Id; Val : Node_Id);            -- Node2
8217
8218    procedure Set_End_Label
8219      (N : Node_Id; Val : Node_Id);            -- Node4
8220
8221    procedure Set_End_Span
8222      (N : Node_Id; Val : Uint);               -- Uint5
8223
8224    procedure Set_Entity
8225      (N : Node_Id; Val : Node_Id);            -- Node4
8226
8227    procedure Set_Entry_Body_Formal_Part
8228      (N : Node_Id; Val : Node_Id);            -- Node5
8229
8230    procedure Set_Entry_Call_Alternative
8231      (N : Node_Id; Val : Node_Id);            -- Node1
8232
8233    procedure Set_Entry_Call_Statement
8234      (N : Node_Id; Val : Node_Id);            -- Node1
8235
8236    procedure Set_Entry_Direct_Name
8237      (N : Node_Id; Val : Node_Id);            -- Node1
8238
8239    procedure Set_Entry_Index
8240      (N : Node_Id; Val : Node_Id);            -- Node5
8241
8242    procedure Set_Entry_Index_Specification
8243      (N : Node_Id; Val : Node_Id);            -- Node4
8244
8245    procedure Set_Etype
8246      (N : Node_Id; Val : Node_Id);            -- Node5
8247
8248    procedure Set_Exception_Choices
8249      (N : Node_Id; Val : List_Id);            -- List4
8250
8251    procedure Set_Exception_Handlers
8252      (N : Node_Id; Val : List_Id);            -- List5
8253
8254    procedure Set_Exception_Junk
8255      (N : Node_Id; Val : Boolean := True);    -- Flag7
8256
8257    procedure Set_Expansion_Delayed
8258      (N : Node_Id; Val : Boolean := True);    -- Flag11
8259
8260    procedure Set_Explicit_Actual_Parameter
8261      (N : Node_Id; Val : Node_Id);            -- Node3
8262
8263    procedure Set_Explicit_Generic_Actual_Parameter
8264      (N : Node_Id; Val : Node_Id);            -- Node1
8265
8266    procedure Set_Expression
8267      (N : Node_Id; Val : Node_Id);            -- Node3
8268
8269    procedure Set_Expressions
8270      (N : Node_Id; Val : List_Id);            -- List1
8271
8272    procedure Set_First_Bit
8273      (N : Node_Id; Val : Node_Id);            -- Node3
8274
8275    procedure Set_First_Inlined_Subprogram
8276      (N : Node_Id; Val : Entity_Id);          -- Node3
8277
8278    procedure Set_First_Name
8279      (N : Node_Id; Val : Boolean := True);    -- Flag5
8280
8281    procedure Set_First_Named_Actual
8282      (N : Node_Id; Val : Node_Id);            -- Node4
8283
8284    procedure Set_First_Real_Statement
8285      (N : Node_Id; Val : Node_Id);            -- Node2
8286
8287    procedure Set_First_Subtype_Link
8288      (N : Node_Id; Val : Entity_Id);          -- Node5
8289
8290    procedure Set_Float_Truncate
8291      (N : Node_Id; Val : Boolean := True);    -- Flag11
8292
8293    procedure Set_Formal_Type_Definition
8294      (N : Node_Id; Val : Node_Id);            -- Node3
8295
8296    procedure Set_Forwards_OK
8297      (N : Node_Id; Val : Boolean := True);    -- Flag5
8298
8299    procedure Set_From_At_Mod
8300      (N : Node_Id; Val : Boolean := True);    -- Flag4
8301
8302    procedure Set_From_Default
8303      (N : Node_Id; Val : Boolean := True);    -- Flag6
8304
8305    procedure Set_Generic_Associations
8306      (N : Node_Id; Val : List_Id);            -- List3
8307
8308    procedure Set_Generic_Formal_Declarations
8309      (N : Node_Id; Val : List_Id);            -- List2
8310
8311    procedure Set_Generic_Parent
8312      (N : Node_Id; Val : Node_Id);            -- Node5
8313
8314    procedure Set_Generic_Parent_Type
8315      (N : Node_Id; Val : Node_Id);            -- Node4
8316
8317    procedure Set_Handled_Statement_Sequence
8318      (N : Node_Id; Val : Node_Id);            -- Node4
8319
8320    procedure Set_Handler_List_Entry
8321      (N : Node_Id; Val : Node_Id);            -- Node2
8322
8323    procedure Set_Has_Created_Identifier
8324      (N : Node_Id; Val : Boolean := True);    -- Flag15
8325
8326    procedure Set_Has_Dynamic_Length_Check
8327      (N : Node_Id; Val : Boolean := True);    -- Flag10
8328
8329    procedure Set_Has_Dynamic_Range_Check
8330      (N : Node_Id; Val : Boolean := True);    -- Flag12
8331
8332    procedure Set_Has_No_Elaboration_Code
8333      (N : Node_Id; Val : Boolean := True);    -- Flag17
8334
8335    procedure Set_Has_Priority_Pragma
8336      (N : Node_Id; Val : Boolean := True);    -- Flag6
8337
8338    procedure Set_Has_Private_View
8339      (N : Node_Id; Val : Boolean := True);    -- Flag11
8340
8341    procedure Set_Has_Storage_Size_Pragma
8342      (N : Node_Id; Val : Boolean := True);    -- Flag5
8343
8344    procedure Set_Has_Task_Info_Pragma
8345      (N : Node_Id; Val : Boolean := True);    -- Flag7
8346
8347    procedure Set_Has_Task_Name_Pragma
8348      (N : Node_Id; Val : Boolean := True);    -- Flag8
8349
8350    procedure Set_Has_Wide_Character
8351      (N : Node_Id; Val : Boolean := True);    -- Flag11
8352
8353    procedure Set_Hidden_By_Use_Clause
8354      (N : Node_Id; Val : Elist_Id);           -- Elist4
8355
8356    procedure Set_High_Bound
8357      (N : Node_Id; Val : Node_Id);            -- Node2
8358
8359    procedure Set_Identifier
8360      (N : Node_Id; Val : Node_Id);            -- Node1
8361
8362    procedure Set_Interface_List
8363      (N : Node_Id; Val : List_Id);            -- List2
8364
8365    procedure Set_Interface_Present
8366      (N : Node_Id; Val : Boolean := True);    -- Flag16
8367
8368    procedure Set_Implicit_With
8369      (N : Node_Id; Val : Boolean := True);    -- Flag16
8370
8371    procedure Set_In_Present
8372      (N : Node_Id; Val : Boolean := True);    -- Flag15
8373
8374    procedure Set_Includes_Infinities
8375      (N : Node_Id; Val : Boolean := True);    -- Flag11
8376
8377    procedure Set_Instance_Spec
8378      (N : Node_Id; Val : Node_Id);            -- Node5
8379
8380    procedure Set_Intval
8381      (N : Node_Id; Val : Uint);               -- Uint3
8382
8383    procedure Set_Is_Asynchronous_Call_Block
8384      (N : Node_Id; Val : Boolean := True);    -- Flag7
8385
8386    procedure Set_Is_Component_Left_Opnd
8387      (N : Node_Id; Val : Boolean := True);    -- Flag13
8388
8389    procedure Set_Is_Component_Right_Opnd
8390      (N : Node_Id; Val : Boolean := True);    -- Flag14
8391
8392    procedure Set_Is_Controlling_Actual
8393      (N : Node_Id; Val : Boolean := True);    -- Flag16
8394
8395    procedure Set_Is_In_Discriminant_Check
8396      (N : Node_Id; Val : Boolean := True);    -- Flag11
8397
8398    procedure Set_Is_Machine_Number
8399      (N : Node_Id; Val : Boolean := True);    -- Flag11
8400
8401    procedure Set_Is_Null_Loop
8402      (N : Node_Id; Val : Boolean := True);    -- Flag16
8403
8404    procedure Set_Is_Overloaded
8405      (N : Node_Id; Val : Boolean := True);    -- Flag5
8406
8407    procedure Set_Is_Power_Of_2_For_Shift
8408      (N : Node_Id; Val : Boolean := True);    -- Flag13
8409
8410    procedure Set_Is_Protected_Subprogram_Body
8411      (N : Node_Id; Val : Boolean := True);    -- Flag7
8412
8413    procedure Set_Is_Static_Expression
8414      (N : Node_Id; Val : Boolean := True);    -- Flag6
8415
8416    procedure Set_Is_Subprogram_Descriptor
8417      (N : Node_Id; Val : Boolean := True);    -- Flag16
8418
8419    procedure Set_Is_Task_Allocation_Block
8420      (N : Node_Id; Val : Boolean := True);    -- Flag6
8421
8422    procedure Set_Is_Task_Master
8423      (N : Node_Id; Val : Boolean := True);    -- Flag5
8424
8425    procedure Set_Iteration_Scheme
8426      (N : Node_Id; Val : Node_Id);            -- Node2
8427
8428    procedure Set_Itype
8429      (N : Node_Id; Val : Entity_Id);          -- Node1
8430
8431    procedure Set_Kill_Range_Check
8432      (N : Node_Id; Val : Boolean := True);    -- Flag11
8433
8434    procedure Set_Last_Bit
8435      (N : Node_Id; Val : Node_Id);            -- Node4
8436
8437    procedure Set_Last_Name
8438      (N : Node_Id; Val : Boolean := True);    -- Flag6
8439
8440    procedure Set_Library_Unit
8441      (N : Node_Id; Val : Node_Id);            -- Node4
8442
8443    procedure Set_Label_Construct
8444      (N : Node_Id; Val : Node_Id);            -- Node2
8445
8446    procedure Set_Left_Opnd
8447      (N : Node_Id; Val : Node_Id);            -- Node2
8448
8449    procedure Set_Limited_View_Installed
8450      (N : Node_Id; Val : Boolean := True);    -- Flag18
8451
8452    procedure Set_Limited_Present
8453      (N : Node_Id; Val : Boolean := True);    -- Flag17
8454
8455    procedure Set_Literals
8456      (N : Node_Id; Val : List_Id);            -- List1
8457
8458    procedure Set_Loop_Actions
8459      (N : Node_Id; Val : List_Id);            -- List2
8460
8461    procedure Set_Loop_Parameter_Specification
8462      (N : Node_Id; Val : Node_Id);            -- Node4
8463
8464    procedure Set_Low_Bound
8465      (N : Node_Id; Val : Node_Id);            -- Node1
8466
8467    procedure Set_Mod_Clause
8468      (N : Node_Id; Val : Node_Id);            -- Node2
8469
8470    procedure Set_More_Ids
8471      (N : Node_Id; Val : Boolean := True);    -- Flag5
8472
8473    procedure Set_Must_Be_Byte_Aligned
8474      (N : Node_Id; Val : Boolean := True);    -- Flag14
8475
8476    procedure Set_Must_Not_Freeze
8477      (N : Node_Id; Val : Boolean := True);    -- Flag8
8478
8479    procedure Set_Must_Not_Override
8480      (N : Node_Id; Val : Boolean := True);    -- Flag15
8481
8482    procedure Set_Must_Override
8483      (N : Node_Id; Val : Boolean := True);    -- Flag14
8484
8485    procedure Set_Name
8486      (N : Node_Id; Val : Node_Id);            -- Node2
8487
8488    procedure Set_Names
8489      (N : Node_Id; Val : List_Id);            -- List2
8490
8491    procedure Set_Next_Entity
8492      (N : Node_Id; Val : Node_Id);            -- Node2
8493
8494    procedure Set_Next_Named_Actual
8495      (N : Node_Id; Val : Node_Id);            -- Node4
8496
8497    procedure Set_Next_Rep_Item
8498      (N : Node_Id; Val : Node_Id);            -- Node4
8499
8500    procedure Set_Next_Use_Clause
8501      (N : Node_Id; Val : Node_Id);            -- Node3
8502
8503    procedure Set_No_Ctrl_Actions
8504      (N : Node_Id; Val : Boolean := True);    -- Flag7
8505
8506    procedure Set_No_Elaboration_Check
8507      (N : Node_Id; Val : Boolean := True);    -- Flag14
8508
8509    procedure Set_No_Entities_Ref_In_Spec
8510      (N : Node_Id; Val : Boolean := True);    -- Flag8
8511
8512    procedure Set_No_Initialization
8513      (N : Node_Id; Val : Boolean := True);    -- Flag13
8514
8515    procedure Set_No_Truncation
8516      (N : Node_Id; Val : Boolean := True);    -- Flag17
8517
8518    procedure Set_Null_Present
8519      (N : Node_Id; Val : Boolean := True);    -- Flag13
8520
8521    procedure Set_Null_Exclusion_Present
8522      (N : Node_Id; Val : Boolean := True);    -- Flag11
8523
8524    procedure Set_Null_Record_Present
8525      (N : Node_Id; Val : Boolean := True);    -- Flag17
8526
8527    procedure Set_Object_Definition
8528      (N : Node_Id; Val : Node_Id);            -- Node4
8529
8530    procedure Set_Original_Discriminant
8531      (N : Node_Id; Val : Node_Id);            -- Node2
8532
8533    procedure Set_Original_Entity
8534      (N : Node_Id; Val : Entity_Id);          -- Node2
8535
8536    procedure Set_Others_Discrete_Choices
8537      (N : Node_Id; Val : List_Id);            -- List1
8538
8539    procedure Set_Out_Present
8540      (N : Node_Id; Val : Boolean := True);    -- Flag17
8541
8542    procedure Set_Parameter_Associations
8543      (N : Node_Id; Val : List_Id);            -- List3
8544
8545    procedure Set_Parameter_List_Truncated
8546      (N : Node_Id; Val : Boolean := True);    -- Flag17
8547
8548    procedure Set_Parameter_Specifications
8549      (N : Node_Id; Val : List_Id);            -- List3
8550
8551    procedure Set_Parameter_Type
8552      (N : Node_Id; Val : Node_Id);            -- Node2
8553
8554    procedure Set_Parent_Spec
8555      (N : Node_Id; Val : Node_Id);            -- Node4
8556
8557    procedure Set_Position
8558      (N : Node_Id; Val : Node_Id);            -- Node2
8559
8560    procedure Set_Pragma_Argument_Associations
8561      (N : Node_Id; Val : List_Id);            -- List2
8562
8563    procedure Set_Pragmas_After
8564      (N : Node_Id; Val : List_Id);            -- List5
8565
8566    procedure Set_Pragmas_Before
8567      (N : Node_Id; Val : List_Id);            -- List4
8568
8569    procedure Set_Prefix
8570      (N : Node_Id; Val : Node_Id);            -- Node3
8571
8572    procedure Set_Present_Expr
8573      (N : Node_Id; Val : Uint);               -- Uint3
8574
8575    procedure Set_Prev_Ids
8576      (N : Node_Id; Val : Boolean := True);    -- Flag6
8577
8578    procedure Set_Print_In_Hex
8579      (N : Node_Id; Val : Boolean := True);    -- Flag13
8580
8581    procedure Set_Private_Declarations
8582      (N : Node_Id; Val : List_Id);            -- List3
8583
8584    procedure Set_Private_Present
8585      (N : Node_Id; Val : Boolean := True);    -- Flag15
8586
8587    procedure Set_Procedure_To_Call
8588      (N : Node_Id; Val : Node_Id);            -- Node4
8589
8590    procedure Set_Proper_Body
8591      (N : Node_Id; Val : Node_Id);            -- Node1
8592
8593    procedure Set_Protected_Definition
8594      (N : Node_Id; Val : Node_Id);            -- Node3
8595
8596    procedure Set_Protected_Present
8597      (N : Node_Id; Val : Boolean := True);    -- Flag6
8598
8599    procedure Set_Raises_Constraint_Error
8600      (N : Node_Id; Val : Boolean := True);    -- Flag7
8601
8602    procedure Set_Range_Constraint
8603      (N : Node_Id; Val : Node_Id);            -- Node4
8604
8605    procedure Set_Range_Expression
8606      (N : Node_Id; Val : Node_Id);            -- Node4
8607
8608    procedure Set_Real_Range_Specification
8609      (N : Node_Id; Val : Node_Id);            -- Node4
8610
8611    procedure Set_Realval
8612      (N : Node_Id; Val : Ureal);              -- Ureal3
8613
8614    procedure Set_Reason
8615      (N : Node_Id; Val : Uint);               -- Uint3
8616
8617    procedure Set_Record_Extension_Part
8618      (N : Node_Id; Val : Node_Id);            -- Node3
8619
8620    procedure Set_Redundant_Use
8621      (N : Node_Id; Val : Boolean := True);    -- Flag13
8622
8623    procedure Set_Result_Definition
8624      (N : Node_Id; Val : Node_Id);            -- Node4
8625
8626    procedure Set_Return_Type
8627      (N : Node_Id; Val : Node_Id);            -- Node2
8628
8629    procedure Set_Reverse_Present
8630      (N : Node_Id; Val : Boolean := True);    -- Flag15
8631
8632    procedure Set_Right_Opnd
8633      (N : Node_Id; Val : Node_Id);            -- Node3
8634
8635    procedure Set_Rounded_Result
8636      (N : Node_Id; Val : Boolean := True);    -- Flag18
8637
8638    procedure Set_Scope
8639      (N : Node_Id; Val : Node_Id);            -- Node3
8640
8641    procedure Set_Select_Alternatives
8642      (N : Node_Id; Val : List_Id);            -- List1
8643
8644    procedure Set_Selector_Name
8645      (N : Node_Id; Val : Node_Id);            -- Node2
8646
8647    procedure Set_Selector_Names
8648      (N : Node_Id; Val : List_Id);            -- List1
8649
8650    procedure Set_Shift_Count_OK
8651      (N : Node_Id; Val : Boolean := True);    -- Flag4
8652
8653    procedure Set_Source_Type
8654      (N : Node_Id; Val : Entity_Id);          -- Node1
8655
8656    procedure Set_Specification
8657      (N : Node_Id; Val : Node_Id);            -- Node1
8658
8659    procedure Set_Statements
8660      (N : Node_Id; Val : List_Id);            -- List3
8661
8662    procedure Set_Static_Processing_OK
8663      (N : Node_Id; Val : Boolean);            -- Flag4
8664
8665    procedure Set_Storage_Pool
8666      (N : Node_Id; Val : Node_Id);            -- Node1
8667
8668    procedure Set_Strval
8669      (N : Node_Id; Val : String_Id);          -- Str3
8670
8671    procedure Set_Subtype_Indication
8672      (N : Node_Id; Val : Node_Id);            -- Node5
8673
8674    procedure Set_Subtype_Mark
8675      (N : Node_Id; Val : Node_Id);            -- Node4
8676
8677    procedure Set_Subtype_Marks
8678      (N : Node_Id; Val : List_Id);            -- List2
8679
8680    procedure Set_Synchronized_Present
8681      (N : Node_Id; Val : Boolean := True);    -- Flag7
8682
8683    procedure Set_Tagged_Present
8684      (N : Node_Id; Val : Boolean := True);    -- Flag15
8685
8686    procedure Set_Target_Type
8687      (N : Node_Id; Val : Entity_Id);          -- Node2
8688
8689    procedure Set_Task_Definition
8690      (N : Node_Id; Val : Node_Id);            -- Node3
8691
8692    procedure Set_Task_Present
8693      (N : Node_Id; Val : Boolean := True);    -- Flag5
8694
8695    procedure Set_Then_Actions
8696      (N : Node_Id; Val : List_Id);            -- List2
8697
8698    procedure Set_Then_Statements
8699      (N : Node_Id; Val : List_Id);            -- List2
8700
8701    procedure Set_Treat_Fixed_As_Integer
8702      (N : Node_Id; Val : Boolean := True);    -- Flag14
8703
8704    procedure Set_Triggering_Alternative
8705      (N : Node_Id; Val : Node_Id);            -- Node1
8706
8707    procedure Set_Triggering_Statement
8708      (N : Node_Id; Val : Node_Id);            -- Node1
8709
8710    procedure Set_TSS_Elist
8711      (N : Node_Id; Val : Elist_Id);           -- Elist3
8712
8713    procedure Set_Type_Definition
8714      (N : Node_Id; Val : Node_Id);            -- Node3
8715
8716    procedure Set_Unit
8717      (N : Node_Id; Val : Node_Id);            -- Node2
8718
8719    procedure Set_Unknown_Discriminants_Present
8720      (N : Node_Id; Val : Boolean := True);    -- Flag13
8721
8722    procedure Set_Unreferenced_In_Spec
8723      (N : Node_Id; Val : Boolean := True);    -- Flag7
8724
8725    procedure Set_Variant_Part
8726      (N : Node_Id; Val : Node_Id);            -- Node4
8727
8728    procedure Set_Variants
8729      (N : Node_Id; Val : List_Id);            -- List1
8730
8731    procedure Set_Visible_Declarations
8732      (N : Node_Id; Val : List_Id);            -- List2
8733
8734    procedure Set_Was_Originally_Stub
8735      (N : Node_Id; Val : Boolean := True);    -- Flag13
8736
8737    procedure Set_Zero_Cost_Handling
8738      (N : Node_Id; Val : Boolean := True);    -- Flag5
8739
8740    -------------------------
8741    -- Iterator Procedures --
8742    -------------------------
8743
8744    --  The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
8745
8746    procedure Next_Entity       (N : in out Node_Id);
8747    procedure Next_Named_Actual (N : in out Node_Id);
8748    procedure Next_Rep_Item     (N : in out Node_Id);
8749    procedure Next_Use_Clause   (N : in out Node_Id);
8750
8751    --------------------------------------
8752    -- Logical Access to End_Span Field --
8753    --------------------------------------
8754
8755    function End_Location (N : Node_Id) return Source_Ptr;
8756    --  N is an N_If_Statement or N_Case_Statement node, and this
8757    --  function returns the location of the IF token in the END IF
8758    --  sequence by translating the value of the End_Span field.
8759
8760    procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
8761    --  N is an N_If_Statement or N_Case_Statement node. This procedure
8762    --  sets the End_Span field to correspond to the given value S. In
8763    --  other words, End_Span is set to the difference between S and
8764    --  Sloc (N), the starting location.
8765
8766    --------------------
8767    -- Inline Pragmas --
8768    --------------------
8769
8770    pragma Inline (ABE_Is_Certain);
8771    pragma Inline (Abort_Present);
8772    pragma Inline (Abortable_Part);
8773    pragma Inline (Abstract_Present);
8774    pragma Inline (Accept_Handler_Records);
8775    pragma Inline (Accept_Statement);
8776    pragma Inline (Access_Definition);
8777    pragma Inline (Access_To_Subprogram_Definition);
8778    pragma Inline (Access_Types_To_Process);
8779    pragma Inline (Actions);
8780    pragma Inline (Activation_Chain_Entity);
8781    pragma Inline (Acts_As_Spec);
8782    pragma Inline (Actual_Designated_Subtype);
8783    pragma Inline (Aggregate_Bounds);
8784    pragma Inline (Aliased_Present);
8785    pragma Inline (All_Others);
8786    pragma Inline (All_Present);
8787    pragma Inline (Alternatives);
8788    pragma Inline (Ancestor_Part);
8789    pragma Inline (Array_Aggregate);
8790    pragma Inline (Assignment_OK);
8791    pragma Inline (Associated_Node);
8792    pragma Inline (At_End_Proc);
8793    pragma Inline (Attribute_Name);
8794    pragma Inline (Aux_Decls_Node);
8795    pragma Inline (Backwards_OK);
8796    pragma Inline (Bad_Is_Detected);
8797    pragma Inline (Body_To_Inline);
8798    pragma Inline (Body_Required);
8799    pragma Inline (By_Ref);
8800    pragma Inline (Box_Present);
8801    pragma Inline (Char_Literal_Value);
8802    pragma Inline (Chars);
8803    pragma Inline (Check_Address_Alignment);
8804    pragma Inline (Choice_Parameter);
8805    pragma Inline (Choices);
8806    pragma Inline (Compile_Time_Known_Aggregate);
8807    pragma Inline (Component_Associations);
8808    pragma Inline (Component_Clauses);
8809    pragma Inline (Component_Definition);
8810    pragma Inline (Component_Items);
8811    pragma Inline (Component_List);
8812    pragma Inline (Component_Name);
8813    pragma Inline (Condition);
8814    pragma Inline (Condition_Actions);
8815    pragma Inline (Config_Pragmas);
8816    pragma Inline (Constant_Present);
8817    pragma Inline (Constraint);
8818    pragma Inline (Constraints);
8819    pragma Inline (Context_Installed);
8820    pragma Inline (Context_Items);
8821    pragma Inline (Controlling_Argument);
8822    pragma Inline (Conversion_OK);
8823    pragma Inline (Corresponding_Body);
8824    pragma Inline (Corresponding_Formal_Spec);
8825    pragma Inline (Corresponding_Generic_Association);
8826    pragma Inline (Corresponding_Integer_Value);
8827    pragma Inline (Corresponding_Spec);
8828    pragma Inline (Corresponding_Stub);
8829    pragma Inline (Dcheck_Function);
8830    pragma Inline (Debug_Statement);
8831    pragma Inline (Declarations);
8832    pragma Inline (Default_Expression);
8833    pragma Inline (Default_Name);
8834    pragma Inline (Defining_Identifier);
8835    pragma Inline (Defining_Unit_Name);
8836    pragma Inline (Delay_Alternative);
8837    pragma Inline (Delay_Finalize_Attach);
8838    pragma Inline (Delay_Statement);
8839    pragma Inline (Delta_Expression);
8840    pragma Inline (Digits_Expression);
8841    pragma Inline (Discr_Check_Funcs_Built);
8842    pragma Inline (Discrete_Choices);
8843    pragma Inline (Discrete_Range);
8844    pragma Inline (Discrete_Subtype_Definition);
8845    pragma Inline (Discrete_Subtype_Definitions);
8846    pragma Inline (Discriminant_Specifications);
8847    pragma Inline (Discriminant_Type);
8848    pragma Inline (Do_Accessibility_Check);
8849    pragma Inline (Do_Discriminant_Check);
8850    pragma Inline (Do_Length_Check);
8851    pragma Inline (Do_Division_Check);
8852    pragma Inline (Do_Overflow_Check);
8853    pragma Inline (Do_Range_Check);
8854    pragma Inline (Do_Storage_Check);
8855    pragma Inline (Do_Tag_Check);
8856    pragma Inline (Elaborate_Present);
8857    pragma Inline (Elaborate_All_Desirable);
8858    pragma Inline (Elaborate_All_Present);
8859    pragma Inline (Elaborate_Desirable);
8860    pragma Inline (Elaboration_Boolean);
8861    pragma Inline (Else_Actions);
8862    pragma Inline (Else_Statements);
8863    pragma Inline (Elsif_Parts);
8864    pragma Inline (Enclosing_Variant);
8865    pragma Inline (End_Label);
8866    pragma Inline (End_Span);
8867    pragma Inline (Entity);
8868    pragma Inline (Entity_Or_Associated_Node);
8869    pragma Inline (Entry_Body_Formal_Part);
8870    pragma Inline (Entry_Call_Alternative);
8871    pragma Inline (Entry_Call_Statement);
8872    pragma Inline (Entry_Direct_Name);
8873    pragma Inline (Entry_Index);
8874    pragma Inline (Entry_Index_Specification);
8875    pragma Inline (Etype);
8876    pragma Inline (Exception_Choices);
8877    pragma Inline (Exception_Junk);
8878    pragma Inline (Exception_Handlers);
8879    pragma Inline (Expansion_Delayed);
8880    pragma Inline (Explicit_Actual_Parameter);
8881    pragma Inline (Explicit_Generic_Actual_Parameter);
8882    pragma Inline (Expression);
8883    pragma Inline (Expressions);
8884    pragma Inline (First_Bit);
8885    pragma Inline (First_Inlined_Subprogram);
8886    pragma Inline (First_Name);
8887    pragma Inline (First_Named_Actual);
8888    pragma Inline (First_Real_Statement);
8889    pragma Inline (First_Subtype_Link);
8890    pragma Inline (Float_Truncate);
8891    pragma Inline (Formal_Type_Definition);
8892    pragma Inline (Forwards_OK);
8893    pragma Inline (From_At_Mod);
8894    pragma Inline (From_Default);
8895    pragma Inline (Generic_Associations);
8896    pragma Inline (Generic_Formal_Declarations);
8897    pragma Inline (Generic_Parent);
8898    pragma Inline (Generic_Parent_Type);
8899    pragma Inline (Handled_Statement_Sequence);
8900    pragma Inline (Handler_List_Entry);
8901    pragma Inline (Has_Created_Identifier);
8902    pragma Inline (Has_Dynamic_Length_Check);
8903    pragma Inline (Has_Dynamic_Range_Check);
8904    pragma Inline (Has_No_Elaboration_Code);
8905    pragma Inline (Has_Priority_Pragma);
8906    pragma Inline (Has_Private_View);
8907    pragma Inline (Has_Storage_Size_Pragma);
8908    pragma Inline (Has_Task_Info_Pragma);
8909    pragma Inline (Has_Task_Name_Pragma);
8910    pragma Inline (Has_Wide_Character);
8911    pragma Inline (Hidden_By_Use_Clause);
8912    pragma Inline (High_Bound);
8913    pragma Inline (Identifier);
8914    pragma Inline (Implicit_With);
8915    pragma Inline (Interface_List);
8916    pragma Inline (Interface_Present);
8917    pragma Inline (Includes_Infinities);
8918    pragma Inline (In_Present);
8919    pragma Inline (Instance_Spec);
8920    pragma Inline (Intval);
8921    pragma Inline (Is_Asynchronous_Call_Block);
8922    pragma Inline (Is_Component_Left_Opnd);
8923    pragma Inline (Is_Component_Right_Opnd);
8924    pragma Inline (Is_Controlling_Actual);
8925    pragma Inline (Is_In_Discriminant_Check);
8926    pragma Inline (Is_Machine_Number);
8927    pragma Inline (Is_Null_Loop);
8928    pragma Inline (Is_Overloaded);
8929    pragma Inline (Is_Power_Of_2_For_Shift);
8930    pragma Inline (Is_Protected_Subprogram_Body);
8931    pragma Inline (Is_Static_Expression);
8932    pragma Inline (Is_Subprogram_Descriptor);
8933    pragma Inline (Is_Task_Allocation_Block);
8934    pragma Inline (Is_Task_Master);
8935    pragma Inline (Iteration_Scheme);
8936    pragma Inline (Itype);
8937    pragma Inline (Kill_Range_Check);
8938    pragma Inline (Last_Bit);
8939    pragma Inline (Last_Name);
8940    pragma Inline (Library_Unit);
8941    pragma Inline (Label_Construct);
8942    pragma Inline (Left_Opnd);
8943    pragma Inline (Limited_View_Installed);
8944    pragma Inline (Limited_Present);
8945    pragma Inline (Literals);
8946    pragma Inline (Loop_Actions);
8947    pragma Inline (Loop_Parameter_Specification);
8948    pragma Inline (Low_Bound);
8949    pragma Inline (Mod_Clause);
8950    pragma Inline (More_Ids);
8951    pragma Inline (Must_Be_Byte_Aligned);
8952    pragma Inline (Must_Not_Freeze);
8953    pragma Inline (Must_Not_Override);
8954    pragma Inline (Must_Override);
8955    pragma Inline (Name);
8956    pragma Inline (Names);
8957    pragma Inline (Next_Entity);
8958    pragma Inline (Next_Named_Actual);
8959    pragma Inline (Next_Rep_Item);
8960    pragma Inline (Next_Use_Clause);
8961    pragma Inline (No_Ctrl_Actions);
8962    pragma Inline (No_Elaboration_Check);
8963    pragma Inline (No_Entities_Ref_In_Spec);
8964    pragma Inline (No_Initialization);
8965    pragma Inline (No_Truncation);
8966    pragma Inline (Null_Present);
8967    pragma Inline (Null_Exclusion_Present);
8968    pragma Inline (Null_Record_Present);
8969    pragma Inline (Object_Definition);
8970    pragma Inline (Original_Discriminant);
8971    pragma Inline (Original_Entity);
8972    pragma Inline (Others_Discrete_Choices);
8973    pragma Inline (Out_Present);
8974    pragma Inline (Parameter_Associations);
8975    pragma Inline (Parameter_Specifications);
8976    pragma Inline (Parameter_List_Truncated);
8977    pragma Inline (Parameter_Type);
8978    pragma Inline (Parent_Spec);
8979    pragma Inline (Position);
8980    pragma Inline (Pragma_Argument_Associations);
8981    pragma Inline (Pragmas_After);
8982    pragma Inline (Pragmas_Before);
8983    pragma Inline (Prefix);
8984    pragma Inline (Present_Expr);
8985    pragma Inline (Prev_Ids);
8986    pragma Inline (Print_In_Hex);
8987    pragma Inline (Private_Declarations);
8988    pragma Inline (Private_Present);
8989    pragma Inline (Procedure_To_Call);
8990    pragma Inline (Proper_Body);
8991    pragma Inline (Protected_Definition);
8992    pragma Inline (Protected_Present);
8993    pragma Inline (Raises_Constraint_Error);
8994    pragma Inline (Range_Constraint);
8995    pragma Inline (Range_Expression);
8996    pragma Inline (Real_Range_Specification);
8997    pragma Inline (Realval);
8998    pragma Inline (Reason);
8999    pragma Inline (Record_Extension_Part);
9000    pragma Inline (Redundant_Use);
9001    pragma Inline (Result_Definition);
9002    pragma Inline (Return_Type);
9003    pragma Inline (Reverse_Present);
9004    pragma Inline (Right_Opnd);
9005    pragma Inline (Rounded_Result);
9006    pragma Inline (Scope);
9007    pragma Inline (Select_Alternatives);
9008    pragma Inline (Selector_Name);
9009    pragma Inline (Selector_Names);
9010    pragma Inline (Shift_Count_OK);
9011    pragma Inline (Source_Type);
9012    pragma Inline (Specification);
9013    pragma Inline (Statements);
9014    pragma Inline (Static_Processing_OK);
9015    pragma Inline (Storage_Pool);
9016    pragma Inline (Strval);
9017    pragma Inline (Subtype_Indication);
9018    pragma Inline (Subtype_Mark);
9019    pragma Inline (Subtype_Marks);
9020    pragma Inline (Synchronized_Present);
9021    pragma Inline (Tagged_Present);
9022    pragma Inline (Target_Type);
9023    pragma Inline (Task_Definition);
9024    pragma Inline (Task_Present);
9025    pragma Inline (Then_Actions);
9026    pragma Inline (Then_Statements);
9027    pragma Inline (Triggering_Alternative);
9028    pragma Inline (Triggering_Statement);
9029    pragma Inline (Treat_Fixed_As_Integer);
9030    pragma Inline (TSS_Elist);
9031    pragma Inline (Type_Definition);
9032    pragma Inline (Unit);
9033    pragma Inline (Unknown_Discriminants_Present);
9034    pragma Inline (Unreferenced_In_Spec);
9035    pragma Inline (Variant_Part);
9036    pragma Inline (Variants);
9037    pragma Inline (Visible_Declarations);
9038    pragma Inline (Was_Originally_Stub);
9039    pragma Inline (Zero_Cost_Handling);
9040
9041    pragma Inline (Set_ABE_Is_Certain);
9042    pragma Inline (Set_Abort_Present);
9043    pragma Inline (Set_Abortable_Part);
9044    pragma Inline (Set_Abstract_Present);
9045    pragma Inline (Set_Accept_Handler_Records);
9046    pragma Inline (Set_Accept_Statement);
9047    pragma Inline (Set_Access_Definition);
9048    pragma Inline (Set_Access_To_Subprogram_Definition);
9049    pragma Inline (Set_Access_Types_To_Process);
9050    pragma Inline (Set_Actions);
9051    pragma Inline (Set_Activation_Chain_Entity);
9052    pragma Inline (Set_Acts_As_Spec);
9053    pragma Inline (Set_Actual_Designated_Subtype);
9054    pragma Inline (Set_Aggregate_Bounds);
9055    pragma Inline (Set_Aliased_Present);
9056    pragma Inline (Set_All_Others);
9057    pragma Inline (Set_All_Present);
9058    pragma Inline (Set_Alternatives);
9059    pragma Inline (Set_Ancestor_Part);
9060    pragma Inline (Set_Array_Aggregate);
9061    pragma Inline (Set_Assignment_OK);
9062    pragma Inline (Set_Associated_Node);
9063    pragma Inline (Set_At_End_Proc);
9064    pragma Inline (Set_Attribute_Name);
9065    pragma Inline (Set_Aux_Decls_Node);
9066    pragma Inline (Set_Backwards_OK);
9067    pragma Inline (Set_Bad_Is_Detected);
9068    pragma Inline (Set_Body_To_Inline);
9069    pragma Inline (Set_Body_Required);
9070    pragma Inline (Set_By_Ref);
9071    pragma Inline (Set_Box_Present);
9072    pragma Inline (Set_Char_Literal_Value);
9073    pragma Inline (Set_Chars);
9074    pragma Inline (Set_Check_Address_Alignment);
9075    pragma Inline (Set_Choice_Parameter);
9076    pragma Inline (Set_Choices);
9077    pragma Inline (Set_Compile_Time_Known_Aggregate);
9078    pragma Inline (Set_Component_Associations);
9079    pragma Inline (Set_Component_Clauses);
9080    pragma Inline (Set_Component_Definition);
9081    pragma Inline (Set_Component_Items);
9082    pragma Inline (Set_Component_List);
9083    pragma Inline (Set_Component_Name);
9084    pragma Inline (Set_Condition);
9085    pragma Inline (Set_Condition_Actions);
9086    pragma Inline (Set_Config_Pragmas);
9087    pragma Inline (Set_Constant_Present);
9088    pragma Inline (Set_Constraint);
9089    pragma Inline (Set_Constraints);
9090    pragma Inline (Set_Context_Installed);
9091    pragma Inline (Set_Context_Items);
9092    pragma Inline (Set_Controlling_Argument);
9093    pragma Inline (Set_Conversion_OK);
9094    pragma Inline (Set_Corresponding_Body);
9095    pragma Inline (Set_Corresponding_Formal_Spec);
9096    pragma Inline (Set_Corresponding_Generic_Association);
9097    pragma Inline (Set_Corresponding_Integer_Value);
9098    pragma Inline (Set_Corresponding_Spec);
9099    pragma Inline (Set_Corresponding_Stub);
9100    pragma Inline (Set_Dcheck_Function);
9101    pragma Inline (Set_Debug_Statement);
9102    pragma Inline (Set_Declarations);
9103    pragma Inline (Set_Default_Expression);
9104    pragma Inline (Set_Default_Name);
9105    pragma Inline (Set_Defining_Identifier);
9106    pragma Inline (Set_Defining_Unit_Name);
9107    pragma Inline (Set_Delay_Alternative);
9108    pragma Inline (Set_Delay_Finalize_Attach);
9109    pragma Inline (Set_Delay_Statement);
9110    pragma Inline (Set_Delta_Expression);
9111    pragma Inline (Set_Digits_Expression);
9112    pragma Inline (Set_Discr_Check_Funcs_Built);
9113    pragma Inline (Set_Discrete_Choices);
9114    pragma Inline (Set_Discrete_Range);
9115    pragma Inline (Set_Discrete_Subtype_Definition);
9116    pragma Inline (Set_Discrete_Subtype_Definitions);
9117    pragma Inline (Set_Discriminant_Specifications);
9118    pragma Inline (Set_Discriminant_Type);
9119    pragma Inline (Set_Do_Accessibility_Check);
9120    pragma Inline (Set_Do_Discriminant_Check);
9121    pragma Inline (Set_Do_Length_Check);
9122    pragma Inline (Set_Do_Division_Check);
9123    pragma Inline (Set_Do_Overflow_Check);
9124    pragma Inline (Set_Do_Range_Check);
9125    pragma Inline (Set_Do_Storage_Check);
9126    pragma Inline (Set_Do_Tag_Check);
9127    pragma Inline (Set_Elaborate_Present);
9128    pragma Inline (Set_Elaborate_All_Desirable);
9129    pragma Inline (Set_Elaborate_All_Present);
9130    pragma Inline (Set_Elaborate_Desirable);
9131    pragma Inline (Set_Elaboration_Boolean);
9132    pragma Inline (Set_Else_Actions);
9133    pragma Inline (Set_Else_Statements);
9134    pragma Inline (Set_Elsif_Parts);
9135    pragma Inline (Set_Enclosing_Variant);
9136    pragma Inline (Set_End_Label);
9137    pragma Inline (Set_End_Span);
9138    pragma Inline (Set_Entity);
9139    pragma Inline (Set_Entry_Body_Formal_Part);
9140    pragma Inline (Set_Entry_Call_Alternative);
9141    pragma Inline (Set_Entry_Call_Statement);
9142    pragma Inline (Set_Entry_Direct_Name);
9143    pragma Inline (Set_Entry_Index);
9144    pragma Inline (Set_Entry_Index_Specification);
9145    pragma Inline (Set_Etype);
9146    pragma Inline (Set_Exception_Choices);
9147    pragma Inline (Set_Exception_Junk);
9148    pragma Inline (Set_Exception_Handlers);
9149    pragma Inline (Set_Expansion_Delayed);
9150    pragma Inline (Set_Explicit_Actual_Parameter);
9151    pragma Inline (Set_Explicit_Generic_Actual_Parameter);
9152    pragma Inline (Set_Expression);
9153    pragma Inline (Set_Expressions);
9154    pragma Inline (Set_First_Bit);
9155    pragma Inline (Set_First_Inlined_Subprogram);
9156    pragma Inline (Set_First_Name);
9157    pragma Inline (Set_First_Named_Actual);
9158    pragma Inline (Set_First_Real_Statement);
9159    pragma Inline (Set_First_Subtype_Link);
9160    pragma Inline (Set_Float_Truncate);
9161    pragma Inline (Set_Formal_Type_Definition);
9162    pragma Inline (Set_Forwards_OK);
9163    pragma Inline (Set_From_At_Mod);
9164    pragma Inline (Set_From_Default);
9165    pragma Inline (Set_Generic_Associations);
9166    pragma Inline (Set_Generic_Formal_Declarations);
9167    pragma Inline (Set_Generic_Parent);
9168    pragma Inline (Set_Generic_Parent_Type);
9169    pragma Inline (Set_Handled_Statement_Sequence);
9170    pragma Inline (Set_Handler_List_Entry);
9171    pragma Inline (Set_Has_Created_Identifier);
9172    pragma Inline (Set_Has_Dynamic_Length_Check);
9173    pragma Inline (Set_Has_Dynamic_Range_Check);
9174    pragma Inline (Set_Has_No_Elaboration_Code);
9175    pragma Inline (Set_Has_Priority_Pragma);
9176    pragma Inline (Set_Has_Private_View);
9177    pragma Inline (Set_Has_Storage_Size_Pragma);
9178    pragma Inline (Set_Has_Task_Info_Pragma);
9179    pragma Inline (Set_Has_Task_Name_Pragma);
9180    pragma Inline (Set_Has_Wide_Character);
9181    pragma Inline (Set_Hidden_By_Use_Clause);
9182    pragma Inline (Set_High_Bound);
9183    pragma Inline (Set_Identifier);
9184    pragma Inline (Set_Implicit_With);
9185    pragma Inline (Set_Includes_Infinities);
9186    pragma Inline (Set_Interface_List);
9187    pragma Inline (Set_Interface_Present);
9188    pragma Inline (Set_In_Present);
9189    pragma Inline (Set_Instance_Spec);
9190    pragma Inline (Set_Intval);
9191    pragma Inline (Set_Is_Asynchronous_Call_Block);
9192    pragma Inline (Set_Is_Component_Left_Opnd);
9193    pragma Inline (Set_Is_Component_Right_Opnd);
9194    pragma Inline (Set_Is_Controlling_Actual);
9195    pragma Inline (Set_Is_In_Discriminant_Check);
9196    pragma Inline (Set_Is_Machine_Number);
9197    pragma Inline (Set_Is_Null_Loop);
9198    pragma Inline (Set_Is_Overloaded);
9199    pragma Inline (Set_Is_Power_Of_2_For_Shift);
9200    pragma Inline (Set_Is_Protected_Subprogram_Body);
9201    pragma Inline (Set_Is_Static_Expression);
9202    pragma Inline (Set_Is_Subprogram_Descriptor);
9203    pragma Inline (Set_Is_Task_Allocation_Block);
9204    pragma Inline (Set_Is_Task_Master);
9205    pragma Inline (Set_Iteration_Scheme);
9206    pragma Inline (Set_Itype);
9207    pragma Inline (Set_Kill_Range_Check);
9208    pragma Inline (Set_Last_Bit);
9209    pragma Inline (Set_Last_Name);
9210    pragma Inline (Set_Library_Unit);
9211    pragma Inline (Set_Label_Construct);
9212    pragma Inline (Set_Left_Opnd);
9213    pragma Inline (Set_Limited_View_Installed);
9214    pragma Inline (Set_Limited_Present);
9215    pragma Inline (Set_Literals);
9216    pragma Inline (Set_Loop_Actions);
9217    pragma Inline (Set_Loop_Parameter_Specification);
9218    pragma Inline (Set_Low_Bound);
9219    pragma Inline (Set_Mod_Clause);
9220    pragma Inline (Set_More_Ids);
9221    pragma Inline (Set_Must_Be_Byte_Aligned);
9222    pragma Inline (Set_Must_Not_Freeze);
9223    pragma Inline (Set_Must_Not_Override);
9224    pragma Inline (Set_Must_Override);
9225    pragma Inline (Set_Name);
9226    pragma Inline (Set_Names);
9227    pragma Inline (Set_Next_Entity);
9228    pragma Inline (Set_Next_Named_Actual);
9229    pragma Inline (Set_Next_Use_Clause);
9230    pragma Inline (Set_No_Ctrl_Actions);
9231    pragma Inline (Set_No_Elaboration_Check);
9232    pragma Inline (Set_No_Entities_Ref_In_Spec);
9233    pragma Inline (Set_No_Initialization);
9234    pragma Inline (Set_No_Truncation);
9235    pragma Inline (Set_Null_Present);
9236    pragma Inline (Set_Null_Exclusion_Present);
9237    pragma Inline (Set_Null_Record_Present);
9238    pragma Inline (Set_Object_Definition);
9239    pragma Inline (Set_Original_Discriminant);
9240    pragma Inline (Set_Original_Entity);
9241    pragma Inline (Set_Others_Discrete_Choices);
9242    pragma Inline (Set_Out_Present);
9243    pragma Inline (Set_Parameter_Associations);
9244    pragma Inline (Set_Parameter_Specifications);
9245    pragma Inline (Set_Parameter_List_Truncated);
9246    pragma Inline (Set_Parameter_Type);
9247    pragma Inline (Set_Parent_Spec);
9248    pragma Inline (Set_Position);
9249    pragma Inline (Set_Pragma_Argument_Associations);
9250    pragma Inline (Set_Pragmas_After);
9251    pragma Inline (Set_Pragmas_Before);
9252    pragma Inline (Set_Prefix);
9253    pragma Inline (Set_Present_Expr);
9254    pragma Inline (Set_Prev_Ids);
9255    pragma Inline (Set_Print_In_Hex);
9256    pragma Inline (Set_Private_Declarations);
9257    pragma Inline (Set_Private_Present);
9258    pragma Inline (Set_Procedure_To_Call);
9259    pragma Inline (Set_Proper_Body);
9260    pragma Inline (Set_Protected_Definition);
9261    pragma Inline (Set_Protected_Present);
9262    pragma Inline (Set_Raises_Constraint_Error);
9263    pragma Inline (Set_Range_Constraint);
9264    pragma Inline (Set_Range_Expression);
9265    pragma Inline (Set_Real_Range_Specification);
9266    pragma Inline (Set_Realval);
9267    pragma Inline (Set_Reason);
9268    pragma Inline (Set_Record_Extension_Part);
9269    pragma Inline (Set_Redundant_Use);
9270    pragma Inline (Set_Result_Definition);
9271    pragma Inline (Set_Return_Type);
9272    pragma Inline (Set_Reverse_Present);
9273    pragma Inline (Set_Right_Opnd);
9274    pragma Inline (Set_Rounded_Result);
9275    pragma Inline (Set_Scope);
9276    pragma Inline (Set_Select_Alternatives);
9277    pragma Inline (Set_Selector_Name);
9278    pragma Inline (Set_Selector_Names);
9279    pragma Inline (Set_Shift_Count_OK);
9280    pragma Inline (Set_Source_Type);
9281    pragma Inline (Set_Specification);
9282    pragma Inline (Set_Statements);
9283    pragma Inline (Set_Static_Processing_OK);
9284    pragma Inline (Set_Storage_Pool);
9285    pragma Inline (Set_Strval);
9286    pragma Inline (Set_Subtype_Indication);
9287    pragma Inline (Set_Subtype_Mark);
9288    pragma Inline (Set_Subtype_Marks);
9289    pragma Inline (Set_Synchronized_Present);
9290    pragma Inline (Set_Tagged_Present);
9291    pragma Inline (Set_Target_Type);
9292    pragma Inline (Set_Task_Definition);
9293    pragma Inline (Set_Task_Present);
9294    pragma Inline (Set_Then_Actions);
9295    pragma Inline (Set_Then_Statements);
9296    pragma Inline (Set_Triggering_Alternative);
9297    pragma Inline (Set_Triggering_Statement);
9298    pragma Inline (Set_Treat_Fixed_As_Integer);
9299    pragma Inline (Set_TSS_Elist);
9300    pragma Inline (Set_Type_Definition);
9301    pragma Inline (Set_Unit);
9302    pragma Inline (Set_Unknown_Discriminants_Present);
9303    pragma Inline (Set_Unreferenced_In_Spec);
9304    pragma Inline (Set_Variant_Part);
9305    pragma Inline (Set_Variants);
9306    pragma Inline (Set_Visible_Declarations);
9307    pragma Inline (Set_Was_Originally_Stub);
9308    pragma Inline (Set_Zero_Cost_Handling);
9309
9310 end Sinfo;