OSDN Git Service

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