1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 -- This package defines the structure of the abstract syntax tree. The Tree
33 -- package provides a basic tree structure. Sinfo describes how this structure
34 -- is used to represent the syntax of an Ada program.
36 -- The grammar in the RM is followed very closely in the tree design, and is
37 -- repeated as part of this source file.
39 -- The tree contains not only the full syntactic representation of the
40 -- program, but also the results of semantic analysis. In particular, the
41 -- nodes for defining identifiers, defining character literals and defining
42 -- operator symbols, collectively referred to as entities, represent what
43 -- would normally be regarded as the symbol table information. In addition a
44 -- number of the tree nodes contain semantic information.
46 -- WARNING: Several files are automatically generated from this package.
47 -- See below for details.
49 with Namet; use Namet;
50 with Types; use Types;
51 with Uintp; use Uintp;
52 with Urealp; use Urealp;
56 ---------------------------------
57 -- Making Changes to This File --
58 ---------------------------------
60 -- If changes are made to this file, a number of related steps must be
61 -- carried out to ensure consistency. First, if a field access function is
62 -- added, it appears in these places:
65 -- The documentation associated with the field (if semantic)
66 -- The documentation associated with the node
67 -- The spec of the access function
68 -- The spec of the set procedure
69 -- The entries in Is_Syntactic_Field
70 -- The pragma Inline for the access function
71 -- The pragma Inline for the set procedure
73 -- The body of the access function
74 -- The body of the set procedure
76 -- The field chosen must be consistent in all places, and, for a node that
77 -- is a subexpression, must not overlap any of the standard expression
80 -- In addition, if any of the standard expression fields is changed, then
81 -- the utility program which creates the Treeprs spec (in file treeprs.ads)
82 -- must be updated appropriately, since it special cases expression fields.
84 -- If a new tree node is added, then the following changes are made
86 -- Add it to the documentation in the appropriate place
87 -- Add its fields to this documentation section
88 -- Define it in the appropriate classification in Node_Kind
89 -- In the body (sinfo), add entries to the access functions for all
90 -- its fields (except standard expression fields) to include the new
91 -- node in the checks.
92 -- Add an appropriate section to the case statement in sprint.adb
93 -- Add an appropriate section to the case statement in sem.adb
94 -- Add an appropriate section to the case statement in exp_util.adb
95 -- (Insert_Actions procedure)
96 -- For a subexpression, add an appropriate section to the case
97 -- statement in sem_eval.adb
98 -- For a subexpression, add an appropriate section to the case
99 -- statement in sem_res.adb
101 -- Finally, four utility programs must be run:
103 -- (Optional.) Run CSinfo to check that you have made the changes
104 -- consistently. It checks most of the rules given above. This utility
105 -- reads sinfo.ads and sinfo.adb and generates a report to standard
106 -- output. This step is optional because XSinfo runs CSinfo.
108 -- Run XSinfo to create sinfo.h, the corresponding C header. This
109 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
110 -- not need to read sinfo.adb, since the contents of the body are
111 -- algorithmically determinable from the spec.
113 -- Run XTreeprs to create treeprs.ads, an updated version of the module
114 -- that is used to drive the tree print routine. This utility reads (but
115 -- does not modify) treeprs.adt, the template that provides the basic
116 -- structure of the file, and then fills in the data from the comments
119 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
120 -- spec of the Nmake package which contains functions for constructing
123 -- The above steps are done automatically by the build scripts when you do
126 -- Note: sometime we could write a utility that actually generated the body
127 -- of sinfo from the spec instead of simply checking it, since, as noted
128 -- above, the contents of the body can be determined from the spec.
130 --------------------------------
131 -- Implicit Nodes in the Tree --
132 --------------------------------
134 -- Generally the structure of the tree very closely follows the grammar as
135 -- defined in the RM. However, certain nodes are omitted to save space and
136 -- simplify semantic processing. Two general classes of such omitted nodes
139 -- If the only possibilities for a non-terminal are one or more other
140 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
141 -- corresponding node is omitted from the tree, and the target construct
142 -- appears directly. For example, a real type definition is either
143 -- floating point definition or a fixed point definition. No explicit node
144 -- appears for real type definition. Instead either the floating point
145 -- definition or fixed point definition appears directly.
147 -- If a non-terminal corresponds to a list of some other non-terminal
148 -- (possibly with separating punctuation), then usually it is omitted from
149 -- the tree, and a list of components appears instead. For example,
150 -- sequence of statements does not appear explicitly in the tree. Instead
151 -- a list of statements appears directly.
153 -- Some additional cases of omitted nodes occur and are documented
154 -- individually. In particular, many nodes are omitted in the tree
155 -- generated for an expression.
157 -------------------------------------------
158 -- Handling of Defining Identifier Lists --
159 -------------------------------------------
161 -- In several declarative forms in the syntax, lists of defining
162 -- identifiers appear (object declarations, component declarations, number
163 -- declarations etc.)
165 -- The semantics of such statements are equivalent to a series of identical
166 -- declarations of single defining identifiers (except that conformance
167 -- checks require the same grouping of identifiers in the parameter case).
169 -- To simplify semantic processing, the parser breaks down such multiple
170 -- declaration cases into sequences of single declarations, duplicating
171 -- type and initialization information as required. The flags More_Ids and
172 -- Prev_Ids are used to record the original form of the source in the case
173 -- where the original source used a list of names, More_Ids being set on
174 -- all but the last name and Prev_Ids being set on all but the first name.
175 -- These flags are used to reconstruct the original source (e.g. in the
176 -- Sprint package), and also are included in the conformance checks, but
177 -- otherwise have no semantic significance.
179 -- Note: the reason that we use More_Ids and Prev_Ids rather than
180 -- First_Name and Last_Name flags is so that the flags are off in the
181 -- normal one identifier case, which minimizes tree print output.
183 -----------------------
184 -- Use of Node Lists --
185 -----------------------
187 -- With a few exceptions, if a construction of the form {non-terminal}
188 -- appears in the tree, lists are used in the corresponding tree node (see
189 -- package Nlists for handling of node lists). In this case a field of the
190 -- parent node points to a list of nodes for the non-terminal. The field
191 -- name for such fields has a plural name which always ends in "s". For
192 -- example, a case statement has a field Alternatives pointing to list of
193 -- case statement alternative nodes.
195 -- Only fields pointing to lists have names ending in "s", so generally the
196 -- structure is strongly typed, fields not ending in s point to single
197 -- nodes, and fields ending in s point to lists.
199 -- The following example shows how a traversal of a list is written. We
200 -- suppose here that Stmt points to a N_Case_Statement node which has a
201 -- list field called Alternatives:
203 -- Alt := First (Alternatives (Stmt));
204 -- while Present (Alt) loop
206 -- -- processing for case statement alternative Alt
208 -- Alt := Next (Alt);
211 -- The Present function tests for Empty, which in this case signals the end
212 -- of the list. First returns Empty immediately if the list is empty.
213 -- Present is defined in Atree, First and Next are defined in Nlists.
215 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
216 -- contexts, which is handled as described in the previous section, and
217 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
218 -- using the First_Name and Last_Name flags, as further detailed in the
219 -- description of the N_With_Clause node.
225 -- Pragmas can appear in many different context, but are not included in
226 -- the grammar. Still they must appear in the tree, so they can be properly
229 -- Two approaches are used. In some cases, an extra field is defined in an
230 -- appropriate node that contains a list of pragmas appearing in the
231 -- expected context. For example pragmas can appear before an
232 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
233 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
235 -- The other approach is to simply allow pragmas to appear in syntactic
236 -- lists where the grammar (of course) does not include the possibility.
237 -- For example, the Variants field of an N_Variant_Part node points to a
238 -- list that can contain both N_Pragma and N_Variant nodes.
240 -- To make processing easier in the latter case, the Nlists package
241 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
242 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
243 -- ignoring all pragmas.
245 -- In the case of the variants list, we can either write:
247 -- Variant := First (Variants (N));
248 -- while Present (Variant) loop
250 -- Variant := Next (Variant);
255 -- Variant := First_Non_Pragma (Variants (N));
256 -- while Present (Variant) loop
258 -- Variant := Next_Non_Pragma (Variant);
261 -- In the first form of the loop, Variant can either be an N_Pragma or an
262 -- N_Variant node. In the second form, Variant can only be N_Variant since
263 -- all pragmas are skipped.
265 ---------------------
266 -- Optional Fields --
267 ---------------------
269 -- Fields which correspond to a section of the syntax enclosed in square
270 -- brackets are generally omitted (and the corresponding field set to Empty
271 -- for a node, or No_List for a list). The documentation of such fields
272 -- notes these cases. One exception to this rule occurs in the case of
273 -- possibly empty statement sequences (such as the sequence of statements
274 -- in an entry call alternative). Such cases appear in the syntax rules as
275 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
276 -- statement sequences always contain an empty list (not No_List) if no
277 -- statements are present.
279 -- Note: the utility program that constructs the body and spec of the Nmake
280 -- package relies on the format of the comments to determine if a field
281 -- should have a default value in the corresponding make routine. The rule
282 -- is that if the first line of the description of the field contains the
283 -- string "(set to xxx if", then a default value of xxx is provided for
284 -- this field in the corresponding Make_yyy routine.
286 -----------------------------------
287 -- Note on Body/Spec Terminology --
288 -----------------------------------
290 -- In informal discussions about Ada, it is customary to refer to package
291 -- and subprogram specs and bodies. However, this is not technically
292 -- correct, what is normally referred to as a spec or specification is in
293 -- fact a package declaration or subprogram declaration. We are careful in
294 -- GNAT to use the correct terminology and in particular, the full word
295 -- specification is never used as an incorrect substitute for declaration.
296 -- The structure and terminology used in the tree also reflects the grammar
297 -- and thus uses declaration and specification in the technically correct
300 -- However, there are contexts in which the informal terminology is useful.
301 -- We have the word "body" to refer to the Interp_Etype declared by the
302 -- declaration of a unit body, and in some contexts we need similar term to
303 -- refer to the entity declared by the package or subprogram declaration,
304 -- and simply using declaration can be confusing since the body also has a
307 -- An example of such a context is the link between the package body and
308 -- its declaration. With_Declaration is confusing, since the package body
309 -- itself is a declaration.
311 -- To deal with this problem, we reserve the informal term Spec, i.e. the
312 -- popular abbreviation used in this context, to refer to the entity
313 -- declared by the package or subprogram declaration. So in the above
314 -- example case, the field in the body is called With_Spec.
316 -- Another important context for the use of the word Spec is in error
317 -- messages, where a hyper-correct use of declaration would be confusing to
318 -- a typical Ada programmer, and even for an expert programmer can cause
319 -- confusion since the body has a declaration as well.
323 -- Declaration always refers to the syntactic entity that is called
324 -- a declaration. In particular, subprogram declaration
325 -- and package declaration are used to describe the
326 -- syntactic entity that includes the semicolon.
328 -- Specification always refers to the syntactic entity that is called
329 -- a specification. In particular, the terms procedure
330 -- specification, function specification, package
331 -- specification, subprogram specification always refer
332 -- to the syntactic entity that has no semicolon.
334 -- Spec is an informal term, used to refer to the entity
335 -- that is declared by a task declaration, protected
336 -- declaration, generic declaration, subprogram
337 -- declaration or package declaration.
339 -- This convention is followed throughout the GNAT documentation
340 -- both internal and external, and in all error message text.
342 ------------------------
343 -- Internal Use Nodes --
344 ------------------------
346 -- These are Node_Kind settings used in the internal implementation which
347 -- are not logically part of the specification.
350 -- Completely unused entry at the start of the enumeration type. This
351 -- is inserted so that no legitimate value is zero, which helps to get
352 -- better debugging behavior, since zero is a likely uninitialized value).
355 -- Completely unused entry at the end of the enumeration type. This is
356 -- handy so that arrays with Node_Kind as the index type have an extra
357 -- entry at the end (see for example the use of the Pchar_Pos_Array in
358 -- Treepr, where the extra entry provides the limit value when dealing with
359 -- the last used entry in the array).
361 -----------------------------------------
362 -- Note on the settings of Sloc fields --
363 -----------------------------------------
365 -- The Sloc field of nodes that come from the source is set by the parser.
366 -- For internal nodes, and nodes generated during expansion the Sloc is
367 -- usually set in the call to the constructor for the node. In general the
368 -- Sloc value chosen for an internal node is the Sloc of the source node
369 -- whose processing is responsible for the expansion. For example, the Sloc
370 -- of an inherited primitive operation is the Sloc of the corresponding
371 -- derived type declaration.
373 -- For the nodes of a generic instantiation, the Sloc value is encoded to
374 -- represent both the original Sloc in the generic unit, and the Sloc of
375 -- the instantiation itself. See Sinput.ads for details.
377 -- Subprogram instances create two callable entities: one is the visible
378 -- subprogram instance, and the other is an anonymous subprogram nested
379 -- within a wrapper package that contains the renamings for the actuals.
380 -- Both of these entities have the Sloc of the defining entity in the
381 -- instantiation node. This simplifies some ASIS queries.
383 -----------------------
384 -- Field Definitions --
385 -----------------------
387 -- In the following node definitions, all fields, both syntactic and
388 -- semantic, are documented. The one exception is in the case of entities
389 -- (defining identifiers, character literals and operator symbols), where
390 -- the usage of the fields depends on the entity kind. Entity fields are
391 -- fully documented in the separate package Einfo.
393 -- In the node definitions, three common sets of fields are abbreviated to
394 -- save both space in the documentation, and also space in the string
395 -- (defined in Tree_Print_Strings) used to print trees. The following
396 -- abbreviations are used:
398 -- Note: the utility program that creates the Treeprs spec (in the file
399 -- xtreeprs.adb) knows about the special fields here, so it must be
400 -- modified if any change is made to these fields.
402 -- "plus fields for binary operator"
403 -- Chars (Name1) Name_Id for the operator
404 -- Left_Opnd (Node2) left operand expression
405 -- Right_Opnd (Node3) right operand expression
406 -- Entity (Node4-Sem) defining entity for operator
407 -- Associated_Node (Node4-Sem) for generic processing
408 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
409 -- Has_Private_View (Flag11-Sem) set in generic units.
411 -- "plus fields for unary operator"
412 -- Chars (Name1) Name_Id for the operator
413 -- Right_Opnd (Node3) right operand expression
414 -- Entity (Node4-Sem) defining entity for operator
415 -- Associated_Node (Node4-Sem) for generic processing
416 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
417 -- Has_Private_View (Flag11-Sem) set in generic units.
419 -- "plus fields for expression"
420 -- Paren_Count number of parentheses levels
421 -- Etype (Node5-Sem) type of the expression
422 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
423 -- Is_Static_Expression (Flag6-Sem) set for static expression
424 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
425 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
426 -- Do_Range_Check (Flag9-Sem) set if a range check needed
427 -- Has_Dynamic_Length_Check (Flag10-Sem) set if length check inserted
428 -- Has_Dynamic_Range_Check (Flag12-Sem) set if range check inserted
429 -- Assignment_OK (Flag15-Sem) set if modification is OK
430 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
432 -- Note: see under (EXPRESSION) for further details on the use of
433 -- the Paren_Count field to record the number of parentheses levels.
435 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
436 -- The actual definition of this type is given later (the reason for this
437 -- is that we want the descriptions ordered by logical chapter in the RM,
438 -- but the type definition is reordered to facilitate the definition of
439 -- some subtype ranges. The individual descriptions of the nodes show how
440 -- the various fields are used in each node kind, as well as providing
441 -- logical names for the fields. Functions and procedures are provided for
442 -- accessing and setting these fields using these logical names.
444 -----------------------
445 -- Gigi Restrictions --
446 -----------------------
448 -- The tree passed to Gigi is more restricted than the general tree form.
449 -- For example, as a result of expansion, most of the tasking nodes can
450 -- never appear. For each node to which either a complete or partial
451 -- restriction applies, a note entitled "Gigi restriction" appears which
452 -- documents the restriction.
454 -- Note that most of these restrictions apply only to trees generated when
455 -- code is being generated, since they involved expander actions that
458 ------------------------
459 -- Common Flag Fields --
460 ------------------------
462 -- The following flag fields appear in all nodes
465 -- This flag is used to indicate that a node (and all its children have
466 -- been analyzed. It is used to avoid reanalysis of a node that has
467 -- already been analyzed, both for efficiency and functional correctness
471 -- This flag is set if the node comes directly from an explicit construct
472 -- in the source. It is normally on for any nodes built by the scanner or
473 -- parser from the source program, with the exception that in a few cases
474 -- the parser adds nodes to normalize the representation (in particular
475 -- a null statement is added to a package body if there is no begin/end
476 -- initialization section.
478 -- Most nodes inserted by the analyzer or expander are not considered
479 -- as coming from source, so the flag is off for such nodes. In a few
480 -- cases, the expander constructs nodes closely equivalent to nodes
481 -- from the source program (e.g. the allocator built for build-in-place
482 -- case), and the Comes_From_Source flag is deliberately set.
485 -- This flag is used to avoid multiple error messages being posted on or
486 -- referring to the same node. This flag is set if an error message
487 -- refers to a node or is posted on its source location, and has the
488 -- effect of inhibiting further messages involving this same node.
490 ------------------------------------
491 -- Description of Semantic Fields --
492 ------------------------------------
494 -- The meaning of the syntactic fields is generally clear from their names
495 -- without any further description, since the names are chosen to
496 -- correspond very closely to the syntax in the reference manual. This
497 -- section describes the usage of the semantic fields, which are used to
498 -- contain additional information determined during semantic analysis.
500 -- ABE_Is_Certain (Flag18-Sem)
501 -- This flag is set in an instantiation node or a call node is determined
502 -- to be sure to raise an ABE. This is used to trigger special handling
503 -- of such cases, particularly in the instantiation case where we avoid
504 -- instantiating the body if this flag is set. This flag is also present
505 -- in an N_Formal_Package_Declaration_Node since formal package
506 -- declarations are treated like instantiations, but it is always set to
507 -- False in this context.
509 -- Accept_Handler_Records (List5-Sem)
510 -- This field is present only in an N_Accept_Alternative node. It is used
511 -- to temporarily hold the exception handler records from an accept
512 -- statement in a selective accept. These exception handlers will
513 -- eventually be placed in the Handler_Records list of the procedure
514 -- built for this accept (see Expand_N_Selective_Accept procedure in
515 -- Exp_Ch9 for further details).
517 -- Access_Types_To_Process (Elist2-Sem)
518 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
519 -- Contains the list of access types which may require specific treatment
520 -- when the nature of the type completion is completely known. An example
521 -- of such treatment is the generation of the associated_final_chain.
523 -- Actions (List1-Sem)
524 -- This field contains a sequence of actions that are associated with the
525 -- node holding the field. See the individual node types for details of
526 -- how this field is used, as well as the description of the specific use
527 -- for a particular node type.
529 -- Activation_Chain_Entity (Node3-Sem)
530 -- This is used in tree nodes representing task activators (blocks,
531 -- subprogram bodies, package declarations, and task bodies). It is
532 -- initially Empty, and then gets set to point to the entity for the
533 -- declared Activation_Chain variable when the first task is declared.
534 -- When tasks are declared in the corresponding declarative region this
535 -- entity is located by name (its name is always _Chain) and the declared
536 -- tasks are added to the chain. Note that N_Extended_Return_Statement
537 -- does not have this attribute, although it does have an activation
538 -- chain. This chain is used to store the tasks temporarily, and is not
539 -- used for activating them. On successful completion of the return
540 -- statement, the tasks are moved to the caller's chain, and the caller
543 -- Acts_As_Spec (Flag4-Sem)
544 -- A flag set in the N_Subprogram_Body node for a subprogram body which
545 -- is acting as its own spec, except in the case of a library level
546 -- subprogram, in which case the flag is set on the parent compilation
547 -- unit node instead (see further description in spec of Lib package).
548 -- ??? Above note about Lib is dubious since lib.ads does not mention
549 -- Acts_As_Spec at all.
551 -- Actual_Designated_Subtype (Node4-Sem)
552 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
553 -- needs to known the dynamic constrained subtype of the designated
554 -- object, this attribute is set to that type. This is done for
555 -- N_Free_Statements for access-to-classwide types and access to
556 -- unconstrained packed array types, and for N_Explicit_Dereference when
557 -- the designated type is an unconstrained packed array and the
558 -- dereference is the prefix of a 'Size attribute reference.
560 -- Address_Warning_Posted (Flag18-Sem)
561 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
562 -- posted a warning for the address clause regarding size or alignment
563 -- issues. Used to inhibit multiple redundant messages.
565 -- Aggregate_Bounds (Node3-Sem)
566 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
567 -- known at compile time, this field points to an N_Range node with those
568 -- bounds. Otherwise Empty.
570 -- All_Others (Flag11-Sem)
571 -- Present in an N_Others_Choice node. This flag is set for an others
572 -- exception where all exceptions are to be caught, even those that are
573 -- not normally handled (in particular the tasking abort signal). This
574 -- is used for translation of the at end handler into a normal exception
577 -- Aspect_Rep_Item (Node2-Sem)
578 -- Present in N_Aspect_Specification nodes. Points to the corresponding
579 -- pragma/attribute definition node used to process the aspect.
581 -- Assignment_OK (Flag15-Sem)
582 -- This flag is set in a subexpression node for an object, indicating
583 -- that the associated object can be modified, even if this would not
584 -- normally be permissible (either by direct assignment, or by being
585 -- passed as an out or in-out parameter). This is used by the expander
586 -- for a number of purposes, including initialization of constants and
587 -- limited type objects (such as tasks), setting discriminant fields,
588 -- setting tag values, etc. N_Object_Declaration nodes also have this
589 -- flag defined. Here it is used to indicate that an initialization
590 -- expression is valid, even where it would normally not be allowed
591 -- (e.g. where the type involved is limited).
593 -- Associated_Node (Node4-Sem)
594 -- Present in nodes that can denote an entity: identifiers, character
595 -- literals, operator symbols, expanded names, operator nodes, and
596 -- attribute reference nodes (all these nodes have an Entity field).
597 -- This field is also present in N_Aggregate, N_Selected_Component, and
598 -- N_Extension_Aggregate nodes. This field is used in generic processing
599 -- to create links between the generic template and the generic copy.
600 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
601 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
602 -- the normal function of Entity is not required at the point where the
603 -- Associated_Node is set. Note also, that in generic templates, this
604 -- means that the Entity field does not necessarily point to an Entity.
605 -- Since the back end is expected to ignore generic templates, this is
608 -- At_End_Proc (Node1)
609 -- This field is present in an N_Handled_Sequence_Of_Statements node.
610 -- It contains an identifier reference for the cleanup procedure to be
611 -- called. See description of this node for further details.
613 -- Backwards_OK (Flag6-Sem)
614 -- A flag present in the N_Assignment_Statement node. It is used only
615 -- if the type being assigned is an array type, and is set if analysis
616 -- determines that it is definitely safe to do the copy backwards, i.e.
617 -- starting at the highest addressed element. This is the case if either
618 -- the operands do not overlap, or they may overlap, but if they do,
619 -- then the left operand is at a higher address than the right operand.
621 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
622 -- means that the front end could not determine that either direction is
623 -- definitely safe, and a runtime check may be required if the backend
624 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
625 -- set, it means that the front end can assure no overlap of operands.
627 -- Body_To_Inline (Node3-Sem)
628 -- present in subprogram declarations. Denotes analyzed but unexpanded
629 -- body of subprogram, to be used when inlining calls. Present when the
630 -- subprogram has an Inline pragma and inlining is enabled. If the
631 -- declaration is completed by a renaming_as_body, and the renamed en-
632 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
633 -- which is used directly in later calls to the original subprogram.
635 -- Body_Required (Flag13-Sem)
636 -- A flag that appears in the N_Compilation_Unit node indicating that
637 -- the corresponding unit requires a body. For the package case, this
638 -- indicates that a completion is required. In Ada 95, if the flag is not
639 -- set for the package case, then a body may not be present. In Ada 83,
640 -- if the flag is not set for the package case, then body is optional.
641 -- For a subprogram declaration, the flag is set except in the case where
642 -- a pragma Import or Interface applies, in which case no body is
643 -- permitted (in Ada 83 or Ada 95).
645 -- By_Ref (Flag5-Sem)
646 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
647 -- this flag is set when the returned expression is already allocated on
648 -- the secondary stack and thus the result is passed by reference rather
649 -- than copied another time.
651 -- Check_Address_Alignment (Flag11-Sem)
652 -- A flag present in N_Attribute_Definition clause for a 'Address
653 -- attribute definition. This flag is set if a dynamic check should be
654 -- generated at the freeze point for the entity to which this address
655 -- clause applies. The reason that we need this flag is that we want to
656 -- check for range checks being suppressed at the point where the
657 -- attribute definition clause is given, rather than testing this at the
660 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
661 -- Present in N_Simple_Return_Statement nodes. True if this node was
662 -- constructed as part of the N_Extended_Return_Statement expansion.
664 -- Compile_Time_Known_Aggregate (Flag18-Sem)
665 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
666 -- evaluated at compile time without raising constraint error. Such
667 -- aggregates can be passed as is to Gigi without any expansion. See
668 -- Sem_Aggr for the specific conditions under which an aggregate has this
669 -- flag set. See also the flag Static_Processing_OK.
671 -- Componentwise_Assignment (Flag14-Sem)
672 -- Present in N_Assignment_Statement nodes. Set for a record assignment
673 -- where all that needs doing is to expand it into component-by-component
674 -- assignments. This is used internally for the case of tagged types with
675 -- rep clauses, where we need to avoid recursion (we don't want to try to
676 -- generate a call to the primitive operation, because this is the case
677 -- where we are compiling the primitive operation). Note that when we are
678 -- expanding component assignments in this case, we never assign the _tag
679 -- field, but we recursively assign components of the parent type.
681 -- Condition_Actions (List3-Sem)
682 -- This field appears in else-if nodes and in the iteration scheme node
683 -- for while loops. This field is only used during semantic processing to
684 -- temporarily hold actions inserted into the tree. In the tree passed
685 -- to gigi, the condition actions field is always set to No_List. For
686 -- details on how this field is used, see the routine Insert_Actions in
687 -- package Exp_Util, and also the expansion routines for the relevant
690 -- Context_Pending (Flag16-Sem)
691 -- This field appears in Compilation_Unit nodes, to indicate that the
692 -- context of the unit is being compiled. Used to detect circularities
693 -- that are not otherwise detected by the loading mechanism. Such
694 -- circularities can occur in the presence of limited and non-limited
695 -- with_clauses that mention the same units.
697 -- Controlling_Argument (Node1-Sem)
698 -- This field is set in procedure and function call nodes if the call
699 -- is a dispatching call (it is Empty for a non-dispatching call). It
700 -- indicates the source of the call's controlling tag. For procedure
701 -- calls, the Controlling_Argument is one of the actuals. For function
702 -- that has a dispatching result, it is an entity in the context of the
703 -- call that can provide a tag, or else it is the tag of the root type
704 -- of the class. It can also specify a tag directly rather than being a
705 -- tagged object. The latter is needed by the implementations of AI-239
708 -- Conversion_OK (Flag14-Sem)
709 -- A flag set on type conversion nodes to indicate that the conversion
710 -- is to be considered as being valid, even though it is the case that
711 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
712 -- Fixed_Value and Integer_Value, for internal conversions done for
713 -- fixed-point operations, and for certain conversions for calls to
714 -- initialization procedures. If Conversion_OK is set, then Etype must be
715 -- set (the analyzer assumes that Etype has been set). For the case of
716 -- fixed-point operands, it also indicates that the conversion is to be
717 -- direct conversion of the underlying integer result, with no regard to
718 -- the small operand.
720 -- Corresponding_Body (Node5-Sem)
721 -- This field is set in subprogram declarations, package declarations,
722 -- entry declarations of protected types, and in generic units. It points
723 -- to the defining entity for the corresponding body (NOT the node for
726 -- Corresponding_Formal_Spec (Node3-Sem)
727 -- This field is set in subprogram renaming declarations, where it points
728 -- to the defining entity for a formal subprogram in the case where the
729 -- renaming corresponds to a generic formal subprogram association in an
730 -- instantiation. The field is Empty if the renaming does not correspond
731 -- to such a formal association.
733 -- Corresponding_Generic_Association (Node5-Sem)
734 -- This field is defined for object declarations and object renaming
735 -- declarations. It is set for the declarations within an instance that
736 -- map generic formals to their actuals. If set, the field points to
737 -- a generic_association which is the original parent of the expression
738 -- or name appearing in the declaration. This simplifies ASIS queries.
740 -- Corresponding_Integer_Value (Uint4-Sem)
741 -- This field is set in real literals of fixed-point types (it is not
742 -- used for floating-point types). It contains the integer value used
743 -- to represent the fixed-point value. It is also set on the universal
744 -- real literals used to represent bounds of fixed-point base types
745 -- and their first named subtypes.
747 -- Corresponding_Spec (Node5-Sem)
748 -- This field is set in subprogram, package, task, and protected body
749 -- nodes, where it points to the defining entity in the corresponding
750 -- spec. The attribute is also set in N_With_Clause nodes where it points
751 -- to the defining entity for the with'ed spec, and in a subprogram
752 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
753 -- if there is no corresponding spec, as in the case of a subprogram body
754 -- that serves as its own spec.
756 -- Corresponding_Stub (Node3-Sem)
757 -- This field is present in an N_Subunit node. It holds the node in
758 -- the parent unit that is the stub declaration for the subunit. It is
759 -- set when analysis of the stub forces loading of the proper body. If
760 -- expansion of the proper body creates new declarative nodes, they are
761 -- inserted at the point of the corresponding_stub.
763 -- Dcheck_Function (Node5-Sem)
764 -- This field is present in an N_Variant node, It references the entity
765 -- for the discriminant checking function for the variant.
767 -- Default_Expression (Node5-Sem)
768 -- This field is Empty if there is no default expression. If there is a
769 -- simple default expression (one with no side effects), then this field
770 -- simply contains a copy of the Expression field (both point to the tree
771 -- for the default expression). Default_Expression is used for
772 -- conformance checking.
774 -- Default_Storage_Pool (Node3-Sem)
775 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
776 -- copy of Opt.Default_Pool at the end of the compilation unit. See
777 -- package Opt for details. This is used for inheriting the
778 -- Default_Storage_Pool in child units.
780 -- Discr_Check_Funcs_Built (Flag11-Sem)
781 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
782 -- discriminant checking functions are constructed. The purpose is to
783 -- avoid attempting to set these functions more than once.
785 -- Do_Accessibility_Check (Flag13-Sem)
786 -- This flag is set on N_Parameter_Specification nodes to indicate
787 -- that an accessibility check is required for the parameter. It is
788 -- not yet decided who takes care of this check (TBD ???).
790 -- Do_Discriminant_Check (Flag13-Sem)
791 -- This flag is set on N_Selected_Component nodes to indicate that a
792 -- discriminant check is required using the discriminant check routine
793 -- associated with the selector. The actual check is generated by the
794 -- expander when processing selected components.
796 -- Do_Division_Check (Flag13-Sem)
797 -- This flag is set on a division operator (/ mod rem) to indicate
798 -- that a zero divide check is required. The actual check is dealt
799 -- with by the backend (all the front end does is to set the flag).
801 -- Do_Length_Check (Flag4-Sem)
802 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
803 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
804 -- is required. It is not determined who deals with this flag (???).
806 -- Do_Overflow_Check (Flag17-Sem)
807 -- This flag is set on an operator where an overflow check is required on
808 -- the operation. The actual check is dealt with by the backend (all the
809 -- front end does is to set the flag). The other cases where this flag is
810 -- used is on a Type_Conversion node and for attribute reference nodes.
811 -- For a type conversion, it means that the conversion is from one base
812 -- type to another, and the value may not fit in the target base type.
813 -- See also the description of Do_Range_Check for this case. The only
814 -- attribute references which use this flag are Pred and Succ, where it
815 -- means that the result should be checked for going outside the base
816 -- range. Note that this flag is not set for modular types.
818 -- Do_Range_Check (Flag9-Sem)
819 -- This flag is set on an expression which appears in a context where a
820 -- range check is required. The target type is clear from the context.
821 -- The contexts in which this flag can appear are the following:
823 -- Right side of an assignment. In this case the target type is
824 -- taken from the left side of the assignment, which is referenced
825 -- by the Name of the N_Assignment_Statement node.
827 -- Subscript expressions in an indexed component. In this case the
828 -- target type is determined from the type of the array, which is
829 -- referenced by the Prefix of the N_Indexed_Component node.
831 -- Argument expression for a parameter, appearing either directly in
832 -- the Parameter_Associations list of a call or as the Expression of an
833 -- N_Parameter_Association node that appears in this list. In either
834 -- case, the check is against the type of the formal. Note that the
835 -- flag is relevant only in IN and IN OUT parameters, and will be
836 -- ignored for OUT parameters, where no check is required in the call,
837 -- and if a check is required on the return, it is generated explicitly
838 -- with a type conversion.
840 -- Initialization expression for the initial value in an object
841 -- declaration. In this case the Do_Range_Check flag is set on
842 -- the initialization expression, and the check is against the
843 -- range of the type of the object being declared.
845 -- The expression of a type conversion. In this case the range check is
846 -- against the target type of the conversion. See also the use of
847 -- Do_Overflow_Check on a type conversion. The distinction is that the
848 -- overflow check protects against a value that is outside the range of
849 -- the target base type, whereas a range check checks that the
850 -- resulting value (which is a value of the base type of the target
851 -- type), satisfies the range constraint of the target type.
853 -- Note: when a range check is required in contexts other than those
854 -- listed above (e.g. in a return statement), an additional type
855 -- conversion node is introduced to represent the required check.
857 -- Do_Storage_Check (Flag17-Sem)
858 -- This flag is set in an N_Allocator node to indicate that a storage
859 -- check is required for the allocation, or in an N_Subprogram_Body node
860 -- to indicate that a stack check is required in the subprogram prolog.
861 -- The N_Allocator case is handled by the routine that expands the call
862 -- to the runtime routine. The N_Subprogram_Body case is handled by the
863 -- backend, and all the semantics does is set the flag.
865 -- Do_Tag_Check (Flag13-Sem)
866 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
867 -- N_Procedure_Call_Statement, N_Type_Conversion,
868 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
869 -- node to indicate that the tag check can be suppressed. It is not
870 -- yet decided how this flag is used (TBD ???).
872 -- Elaborate_Present (Flag4-Sem)
873 -- This flag is set in the N_With_Clause node to indicate that pragma
874 -- Elaborate pragma appears for the with'ed units.
876 -- Elaborate_All_Desirable (Flag9-Sem)
877 -- This flag is set in the N_With_Clause mode to indicate that the static
878 -- elaboration processing has determined that an Elaborate_All pragma is
879 -- desirable for correct elaboration for this unit.
881 -- Elaborate_All_Present (Flag14-Sem)
882 -- This flag is set in the N_With_Clause node to indicate that a
883 -- pragma Elaborate_All pragma appears for the with'ed units.
885 -- Elaborate_Desirable (Flag11-Sem)
886 -- This flag is set in the N_With_Clause mode to indicate that the static
887 -- elaboration processing has determined that an Elaborate pragma is
888 -- desirable for correct elaboration for this unit.
890 -- Elaboration_Boolean (Node2-Sem)
891 -- This field is present in function and procedure specification nodes.
892 -- If set, it points to the entity for a Boolean flag that must be tested
893 -- for certain calls to check for access before elaboration. See body of
894 -- Sem_Elab for further details. This field is Empty if no elaboration
895 -- boolean is required.
897 -- Else_Actions (List3-Sem)
898 -- This field is present in conditional expression nodes. During code
899 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
900 -- actions at an appropriate place in the tree to get elaborated at the
901 -- right time. For conditional expressions, we have to be sure that the
902 -- actions for the Else branch are only elaborated if the condition is
903 -- False. The Else_Actions field is used as a temporary parking place for
904 -- these actions. The final tree is always rewritten to eliminate the
905 -- need for this field, so in the tree passed to Gigi, this field is
906 -- always set to No_List.
908 -- Enclosing_Variant (Node2-Sem)
909 -- This field is present in the N_Variant node and identifies the Node_Id
910 -- corresponding to the immediately enclosing variant when the variant is
911 -- nested, and N_Empty otherwise. Set during semantic processing of the
912 -- variant part of a record type.
914 -- Entity (Node4-Sem)
915 -- Appears in all direct names (identifiers, character literals, and
916 -- operator symbols), as well as expanded names, and attributes that
917 -- denote entities, such as 'Class. Points to entity for corresponding
918 -- defining occurrence. Set after name resolution. For identifiers in a
919 -- WITH list, the corresponding defining occurrence is in a separately
920 -- compiled file, and Entity must be set by the library Load procedure.
922 -- Note: During name resolution, the value in Entity may be temporarily
923 -- incorrect (e.g. during overload resolution, Entity is initially set to
924 -- the first possible correct interpretation, and then later modified if
925 -- necessary to contain the correct value after resolution).
927 -- Note: This field overlaps Associated_Node, which is used during
928 -- generic processing (see Sem_Ch12 for details). Note also that in
929 -- generic templates, this means that the Entity field does not always
930 -- point to an Entity. Since the back end is expected to ignore generic
931 -- templates, this is harmless.
933 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
934 -- It is used only for stream attributes definition clauses. In this
935 -- case, it denotes a (possibly dummy) subprogram entity that is declared
936 -- conceptually at the point of the clause. Thus the visibility of the
937 -- attribute definition clause (in the sense of 8.3(23) as amended by
938 -- AI-195) can be checked by testing the visibility of that subprogram.
940 -- Note: Normally the Entity field of an identifier points to the entity
941 -- for the corresponding defining identifier, and hence the Chars field
942 -- of an identifier will match the Chars field of the entity. However,
943 -- there is no requirement that these match, and there are obscure cases
944 -- of generated code where they do not match.
946 -- Note: Aspect specifications, introduced in Ada2012, require additional
947 -- links between identifiers and various attributes. These attributes
948 -- can be of arbitrary types, and the entity field of identifiers that
949 -- denote aspects must be used to store arbitrary expressions for later
950 -- semantic checks. See section on Aspect specifications for details.
952 -- Entity_Or_Associated_Node (Node4-Sem)
953 -- A synonym for both Entity and Associated_Node. Used by convention in
954 -- the code when referencing this field in cases where it is not known
955 -- whether the field contains an Entity or an Associated_Node.
958 -- Appears in all expression nodes, all direct names, and all entities.
959 -- Points to the entity for the related type. Set after type resolution.
960 -- Normally this is the actual subtype of the expression. However, in
961 -- certain contexts such as the right side of an assignment, subscripts,
962 -- arguments to calls, returned value in a function, initial value etc.
963 -- it is the desired target type. In the event that this is different
964 -- from the actual type, the Do_Range_Check flag will be set if a range
965 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
966 -- points to an essentially arbitrary choice from the possible set of
969 -- Exception_Junk (Flag8-Sem)
970 -- This flag is set in a various nodes appearing in a statement sequence
971 -- to indicate that the corresponding node is an artifact of the
972 -- generated code for exception handling, and should be ignored when
973 -- analyzing the control flow of the relevant sequence of statements
974 -- (e.g. to check that it does not end with a bad return statement).
976 -- Exception_Label (Node5-Sem)
977 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
978 -- to be used for transforming the corresponding exception into a goto,
979 -- or contains Empty, if this exception is not to be transformed. Also
980 -- appears in N_Exception_Handler nodes, where, if set, it indicates
981 -- that there may be a local raise for the handler, so that expansion
982 -- to allow a goto is required (and this field contains the label for
983 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
985 -- Expansion_Delayed (Flag11-Sem)
986 -- Set on aggregates and extension aggregates that need a top-down rather
987 -- than bottom-up expansion. Typically aggregate expansion happens bottom
988 -- up. For nested aggregates the expansion is delayed until the enclosing
989 -- aggregate itself is expanded, e.g. in the context of a declaration. To
990 -- delay it we set this flag. This is done to avoid creating a temporary
991 -- for each level of a nested aggregates, and also to prevent the
992 -- premature generation of constraint checks. This is also a requirement
993 -- if we want to generate the proper attachment to the internal
994 -- finalization lists (for record with controlled components). Top down
995 -- expansion of aggregates is also used for in-place array aggregate
996 -- assignment or initialization. When the full context is known, the
997 -- target of the assignment or initialization is used to generate the
998 -- left-hand side of individual assignment to each sub-component.
1000 -- First_Inlined_Subprogram (Node3-Sem)
1001 -- Present in the N_Compilation_Unit node for the main program. Points
1002 -- to a chain of entities for subprograms that are to be inlined. The
1003 -- Next_Inlined_Subprogram field of these entities is used as a link
1004 -- pointer with Empty marking the end of the list. This field is Empty
1005 -- if there are no inlined subprograms or inlining is not active.
1007 -- First_Named_Actual (Node4-Sem)
1008 -- Present in procedure call statement and function call nodes, and also
1009 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1010 -- named parameter where parameters are ordered by declaration order (as
1011 -- opposed to the actual order in the call which may be different due to
1012 -- named associations). Note: this field points to the explicit actual
1013 -- parameter itself, not the N_Parameter_Association node (its parent).
1015 -- First_Real_Statement (Node2-Sem)
1016 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1017 -- Empty. Used only when declarations are moved into the statement part
1018 -- of a construct as a result of wrapping an AT END handler that is
1019 -- required to cover the declarations. In this case, this field is used
1020 -- to remember the location in the statements list of the first real
1021 -- statement, i.e. the statement that used to be first in the statement
1022 -- list before the declarations were prepended.
1024 -- First_Subtype_Link (Node5-Sem)
1025 -- Present in N_Freeze_Entity node for an anonymous base type that is
1026 -- implicitly created by the declaration of a first subtype. It points
1027 -- to the entity for the first subtype.
1029 -- Float_Truncate (Flag11-Sem)
1030 -- A flag present in type conversion nodes. This is used for float to
1031 -- integer conversions where truncation is required rather than rounding.
1032 -- Note that Gigi does not handle type conversions from real to integer
1033 -- with rounding (see Expand_N_Type_Conversion).
1035 -- Forwards_OK (Flag5-Sem)
1036 -- A flag present in the N_Assignment_Statement node. It is used only
1037 -- if the type being assigned is an array type, and is set if analysis
1038 -- determines that it is definitely safe to do the copy forwards, i.e.
1039 -- starting at the lowest addressed element. This is the case if either
1040 -- the operands do not overlap, or they may overlap, but if they do,
1041 -- then the left operand is at a lower address than the right operand.
1043 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1044 -- means that the front end could not determine that either direction is
1045 -- definitely safe, and a runtime check may be required if the backend
1046 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1047 -- set, it means that the front end can assure no overlap of operands.
1049 -- From_Aspect_Specification (Flag13-Sem)
1050 -- Processing of aspect specifications typically results in insertion in
1051 -- the tree of corresponding pragma or attribute definition clause nodes.
1052 -- These generated nodes have the From_Aspect_Specification flag set to
1053 -- indicate that they came from aspect specifications originally.
1055 -- From_At_End (Flag4-Sem)
1056 -- This flag is set on an N_Raise_Statement node if it corresponds to
1057 -- the reraise statement generated as the last statement of an AT END
1058 -- handler when SJLJ exception handling is active. It is used to stop
1059 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1060 -- because if the restriction is set, the reraise is not generated.
1062 -- From_At_Mod (Flag4-Sem)
1063 -- This flag is set on the attribute definition clause node that is
1064 -- generated by a transformation of an at mod phrase in a record
1065 -- representation clause. This is used to give slightly different (Ada 83
1066 -- compatible) semantics to such a clause, namely it is used to specify a
1067 -- minimum acceptable alignment for the base type and all subtypes. In
1068 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1069 -- must be a multiple of the given value, and the representation clause
1070 -- is considered to be type specific instead of subtype specific.
1072 -- From_Default (Flag6-Sem)
1073 -- This flag is set on the subprogram renaming declaration created in an
1074 -- instance for a formal subprogram, when the formal is declared with a
1075 -- box, and there is no explicit actual. If the flag is present, the
1076 -- declaration is treated as an implicit reference to the formal in the
1079 -- From_Dynamic_Predicate (Flag7-Sem)
1080 -- Set for generated pragma Predicate node if this is generated by a
1081 -- Dynamic_Predicate aspect.
1083 -- From_Static_Predicate (Flag8-Sem)
1084 -- Set for generated pragma Predicate node if this is generated by a
1085 -- Static_Predicate aspect.
1087 -- Generic_Parent (Node5-Sem)
1088 -- Generic_Parent is defined on declaration nodes that are instances. The
1089 -- value of Generic_Parent is the generic entity from which the instance
1090 -- is obtained. Generic_Parent is also defined for the renaming
1091 -- declarations and object declarations created for the actuals in an
1092 -- instantiation. The generic parent of such a declaration is the
1093 -- corresponding generic association in the Instantiation node.
1095 -- Generic_Parent_Type (Node4-Sem)
1096 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1097 -- actuals of formal private and derived types. Within the instance, the
1098 -- operations on the actual are those inherited from the parent. For a
1099 -- formal private type, the parent type is the generic type itself. The
1100 -- Generic_Parent_Type is also used in an instance to determine whether a
1101 -- private operation overrides an inherited one.
1103 -- Handler_List_Entry (Node2-Sem)
1104 -- This field is present in N_Object_Declaration nodes. It is set only
1105 -- for the Handler_Record entry generated for an exception in zero cost
1106 -- exception handling mode. It references the corresponding item in the
1107 -- handler list, and is used to delete this entry if the corresponding
1108 -- handler is deleted during optimization. For further details on why
1109 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1111 -- Has_Dynamic_Length_Check (Flag10-Sem)
1112 -- This flag is present in all expression nodes. It is set to indicate
1113 -- that one of the routines in unit Checks has generated a length check
1114 -- action which has been inserted at the flagged node. This is used to
1115 -- avoid the generation of duplicate checks.
1117 -- Has_Dynamic_Range_Check (Flag12-Sem)
1118 -- This flag is present in N_Subtype_Declaration nodes and on all
1119 -- expression nodes. It is set to indicate that one of the routines in
1120 -- unit Checks has generated a range check action which has been inserted
1121 -- at the flagged node. This is used to avoid the generation of duplicate
1122 -- checks. Why does this occur on N_Subtype_Declaration nodes, what does
1123 -- it mean in that context???
1125 -- Has_Local_Raise (Flag8-Sem)
1126 -- Present in exception handler nodes. Set if the handler can be entered
1127 -- via a local raise that gets transformed to a goto statement. This will
1128 -- always be set if Local_Raise_Statements is non-empty, but can also be
1129 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
1130 -- nodes requiring generation of back end checks.
1132 -- Has_No_Elaboration_Code (Flag17-Sem)
1133 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1134 -- or not elaboration code is present for this unit. It is initially set
1135 -- true for subprogram specs and bodies and for all generic units and
1136 -- false for non-generic package specs and bodies. Gigi may set the flag
1137 -- in the non-generic package case if it determines that no elaboration
1138 -- code is generated. Note that this flag is not related to the
1139 -- Is_Preelaborated status, there can be preelaborated packages that
1140 -- generate elaboration code, and non-preelaborated packages which do
1141 -- not generate elaboration code.
1143 -- Has_Pragma_CPU (Flag14-Sem)
1144 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1145 -- flag the presence of a CPU pragma in the declaration sequence (public
1146 -- or private in the task case).
1148 -- Has_Pragma_Suppress_All (Flag14-Sem)
1149 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1150 -- pragma appears anywhere in the unit. This accommodates the rather
1151 -- strange placement rules of other compilers (DEC permits it at the
1152 -- end of a unit, and Rational allows it as a program unit pragma). We
1153 -- allow it anywhere at all, and consider it equivalent to a pragma
1154 -- Suppress (All_Checks) appearing at the start of the configuration
1155 -- pragmas for the unit.
1157 -- Has_Pragma_Priority (Flag6-Sem)
1158 -- A flag present in N_Subprogram_Body, N_Task_Definition and
1159 -- N_Protected_Definition nodes to flag the presence of either a Priority
1160 -- or Interrupt_Priority pragma in the declaration sequence (public or
1161 -- private in the task and protected cases)
1163 -- Has_Private_View (Flag11-Sem)
1164 -- A flag present in generic nodes that have an entity, to indicate that
1165 -- the node has a private type. Used to exchange private and full
1166 -- declarations if the visibility at instantiation is different from the
1167 -- visibility at generic definition.
1169 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1170 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1171 -- flag the presence of a pragma Relative_Deadline.
1173 -- Has_Self_Reference (Flag13-Sem)
1174 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1175 -- of the expressions contains an access attribute reference to the
1176 -- enclosing type. Such a self-reference can only appear in default-
1177 -- initialized aggregate for a record type.
1179 -- Has_Storage_Size_Pragma (Flag5-Sem)
1180 -- A flag present in an N_Task_Definition node to flag the presence of a
1181 -- Storage_Size pragma.
1183 -- Has_Task_Info_Pragma (Flag7-Sem)
1184 -- A flag present in an N_Task_Definition node to flag the presence of a
1185 -- Task_Info pragma. Used to detect duplicate pragmas.
1187 -- Has_Task_Name_Pragma (Flag8-Sem)
1188 -- A flag present in N_Task_Definition nodes to flag the presence of a
1189 -- Task_Name pragma in the declaration sequence for the task.
1191 -- Has_Wide_Character (Flag11-Sem)
1192 -- Present in string literals, set if any wide character (i.e. character
1193 -- code outside the Character range but within Wide_Character range)
1194 -- appears in the string. Used to implement pragma preference rules.
1196 -- Has_Wide_Wide_Character (Flag13-Sem)
1197 -- Present in string literals, set if any wide character (i.e. character
1198 -- code outside the Wide_Character range) appears in the string. Used to
1199 -- implement pragma preference rules.
1201 -- Hidden_By_Use_Clause (Elist4-Sem)
1202 -- An entity list present in use clauses that appear within
1203 -- instantiations. For the resolution of local entities, entities
1204 -- introduced by these use clauses have priority over global ones, and
1205 -- outer entities must be explicitly hidden/restored on exit.
1207 -- Implicit_With (Flag16-Sem)
1208 -- This flag is set in the N_With_Clause node that is implicitly
1209 -- generated for runtime units that are loaded by the expander, and also
1210 -- for package System, if it is loaded implicitly by a use of the
1211 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1214 -- Import_Interface_Present (Flag16-Sem)
1215 -- This flag is set in an Interface or Import pragma if a matching
1216 -- pragma of the other kind is also present. This is used to avoid
1217 -- generating some unwanted error messages.
1219 -- Includes_Infinities (Flag11-Sem)
1220 -- This flag is present in N_Range nodes. It is set for the range of
1221 -- unconstrained float types defined in Standard, which include not only
1222 -- the given range of values, but also legitimately can include infinite
1223 -- values. This flag is false for any float type for which an explicit
1224 -- range is given by the programmer, even if that range is identical to
1225 -- the range for Float.
1227 -- Inherited_Discriminant (Flag13-Sem)
1228 -- This flag is present in N_Component_Association nodes. It indicates
1229 -- that a given component association in an extension aggregate is the
1230 -- value obtained from a constraint on an ancestor. Used to prevent
1231 -- double expansion when the aggregate has expansion delayed.
1233 -- Instance_Spec (Node5-Sem)
1234 -- This field is present in generic instantiation nodes, and also in
1235 -- formal package declaration nodes (formal package declarations are
1236 -- treated in a manner very similar to package instantiations). It points
1237 -- to the node for the spec of the instance, inserted as part of the
1238 -- semantic processing for instantiations in Sem_Ch12.
1240 -- Is_Accessibility_Actual (Flag12-Sem)
1241 -- Present in N_Parameter_Association nodes. True if the parameter is
1242 -- an extra actual that carries the accessibility level of the actual
1243 -- for an access parameter, in a function that dispatches on result and
1244 -- is called in a dispatching context. Used to prevent a formal/actual
1245 -- mismatch when the call is rewritten as a dispatching call.
1247 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1248 -- A flag set in a Block_Statement node to indicate that it is the
1249 -- expansion of an asynchronous entry call. Such a block needs cleanup
1250 -- handler to assure that the call is cancelled.
1252 -- Is_Boolean_Aspect (Flag16-Sem)
1253 -- Present in N_Aspect_Specification node. Set if the aspect is for a
1254 -- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1256 -- Is_Component_Left_Opnd (Flag13-Sem)
1257 -- Is_Component_Right_Opnd (Flag14-Sem)
1258 -- Present in concatenation nodes, to indicate that the corresponding
1259 -- operand is of the component type of the result. Used in resolving
1260 -- concatenation nodes in instances.
1262 -- Is_Delayed_Aspect (Flag14-Sem)
1263 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1264 -- come from aspect specifications, where the evaluation of the aspect
1265 -- must be delayed to the freeze point. This flag is also set True in
1266 -- the corresponding N_Aspect_Specification node.
1268 -- Is_Controlling_Actual (Flag16-Sem)
1269 -- This flag is set on in an expression that is a controlling argument in
1270 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1271 -- details of its use.
1273 -- Is_Dynamic_Coextension (Flag18-Sem)
1274 -- Present in allocator nodes, to indicate that this is an allocator
1275 -- for an access discriminant of a dynamically allocated object. The
1276 -- coextension must be deallocated and finalized at the same time as
1277 -- the enclosing object.
1279 -- Is_Entry_Barrier_Function (Flag8-Sem)
1280 -- This flag is set in an N_Subprogram_Body node which is the expansion
1281 -- of an entry barrier from a protected entry body. It is used for the
1282 -- circuitry checking for incorrect use of Current_Task.
1284 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1285 -- This flag is set in an N_Function_Call node to indicate that the extra
1286 -- actuals to support a build-in-place style of call have been added to
1289 -- Is_In_Discriminant_Check (Flag11-Sem)
1290 -- This flag is present in a selected component, and is used to indicate
1291 -- that the reference occurs within a discriminant check. The
1292 -- significance is that optimizations based on assuming that the
1293 -- discriminant check has a correct value cannot be performed in this
1294 -- case (or the discriminant check may be optimized away!)
1296 -- Is_Machine_Number (Flag11-Sem)
1297 -- This flag is set in an N_Real_Literal node to indicate that the value
1298 -- is a machine number. This avoids some unnecessary cases of converting
1299 -- real literals to machine numbers.
1301 -- Is_Null_Loop (Flag16-Sem)
1302 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1303 -- can be determined to be null at compile time. This is used to remove
1304 -- the loop entirely at expansion time.
1306 -- Is_Overloaded (Flag5-Sem)
1307 -- A flag present in all expression nodes. Used temporarily during
1308 -- overloading determination. The setting of this flag is not relevant
1309 -- once overloading analysis is complete.
1311 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1312 -- A flag present only in N_Op_Expon nodes. It is set when the
1313 -- exponentiation is of the form 2 ** N, where the type of N is an
1314 -- unsigned integral subtype whose size does not exceed the size of
1315 -- Standard_Integer (i.e. a type that can be safely converted to
1316 -- Natural), and the exponentiation appears as the right operand of an
1317 -- integer multiplication or an integer division where the dividend is
1318 -- unsigned. It is also required that overflow checking is off for both
1319 -- the exponentiation and the multiply/divide node. If this set of
1320 -- conditions holds, and the flag is set, then the division or
1321 -- multiplication can be (and is) converted to a shift.
1323 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1324 -- A flag set in a Subprogram_Body block to indicate that it is the
1325 -- implementation of a protected subprogram. Such a body needs cleanup
1326 -- handler to make sure that the associated protected object is unlocked
1327 -- when the subprogram completes.
1329 -- Is_Static_Coextension (Flag14-Sem)
1330 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1331 -- of an object allocated on the stack rather than the heap.
1333 -- Is_Static_Expression (Flag6-Sem)
1334 -- Indicates that an expression is a static expression (RM 4.9). See spec
1335 -- of package Sem_Eval for full details on the use of this flag.
1337 -- Is_Subprogram_Descriptor (Flag16-Sem)
1338 -- Present in N_Object_Declaration, and set only for the object
1339 -- declaration generated for a subprogram descriptor in fast exception
1340 -- mode. See Exp_Ch11 for details of use.
1342 -- Is_Task_Allocation_Block (Flag6-Sem)
1343 -- A flag set in a Block_Statement node to indicate that it is the
1344 -- expansion of a task allocator, or the allocator of an object
1345 -- containing tasks. Such a block requires a cleanup handler to call
1346 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1347 -- allocated but not activated when the allocator completes abnormally.
1349 -- Is_Task_Master (Flag5-Sem)
1350 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1351 -- indicate that the construct is a task master (i.e. has declared tasks
1352 -- or declares an access to a task type).
1354 -- Itype (Node1-Sem)
1355 -- Used in N_Itype_Reference node to reference an itype for which it is
1356 -- important to ensure that it is defined. See description of this node
1357 -- for further details.
1359 -- Kill_Range_Check (Flag11-Sem)
1360 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1361 -- result should not be subjected to range checks. This is used for the
1362 -- implementation of Normalize_Scalars.
1364 -- Label_Construct (Node2-Sem)
1365 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1366 -- N_Block_Statement or N_Loop_Statement node to which the label
1367 -- declaration applies. This is not currently used in the compiler
1368 -- itself, but it is useful in the implementation of ASIS queries.
1369 -- This field is left empty for the special labels generated as part
1370 -- of expanding raise statements with a local exception handler.
1372 -- Library_Unit (Node4-Sem)
1373 -- In a stub node, Library_Unit points to the compilation unit node of
1374 -- the corresponding subunit.
1376 -- In a with clause node, Library_Unit points to the spec of the with'ed
1379 -- In a compilation unit node, the usage depends on the unit type:
1381 -- For a library unit body, Library_Unit points to the compilation unit
1382 -- node of the corresponding spec, unless it's a subprogram body with
1383 -- Acts_As_Spec set, in which case it points to itself.
1385 -- For a spec, Library_Unit points to the compilation unit node of the
1386 -- corresponding body, if present. The body will be present if the spec
1387 -- is or contains generics that we needed to instantiate. Similarly, the
1388 -- body will be present if we needed it for inlining purposes. Thus, if
1389 -- we have a spec/body pair, both of which are present, they point to
1390 -- each other via Library_Unit.
1392 -- For a subunit, Library_Unit points to the compilation unit node of
1395 -- Note that this field is not used to hold the parent pointer for child
1396 -- unit (which might in any case need to use it for some other purpose as
1397 -- described above). Instead for a child unit, implicit with's are
1398 -- generated for all parents.
1400 -- Local_Raise_Statements (Elist1)
1401 -- This field is present in exception handler nodes. It is set to
1402 -- No_Elist in the normal case. If there is at least one raise statement
1403 -- which can potentially be handled as a local raise, then this field
1404 -- points to a list of raise nodes, which are calls to a routine to raise
1405 -- an exception. These are raise nodes which can be optimized into gotos
1406 -- if the handler turns out to meet the conditions which permit this
1407 -- transformation. Note that this does NOT include instances of the
1408 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1409 -- handled by the back end (using the N_Push/N_Pop mechanism).
1411 -- Loop_Actions (List2-Sem)
1412 -- A list present in Component_Association nodes in array aggregates.
1413 -- Used to collect actions that must be executed within the loop because
1414 -- they may need to be evaluated anew each time through.
1416 -- Limited_View_Installed (Flag18-Sem)
1417 -- Present in With_Clauses and in package specifications. If set on
1418 -- with_clause, it indicates that this clause has created the current
1419 -- limited view of the designated package. On a package specification, it
1420 -- indicates that the limited view has already been created because the
1421 -- package is mentioned in a limited_with_clause in the closure of the
1422 -- unit being compiled.
1424 -- Local_Raise_Not_OK (Flag7-Sem)
1425 -- Present in N_Exception_Handler nodes. Set if the handler contains
1426 -- a construct (reraise statement, or call to subprogram in package
1427 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1428 -- for a local raise (one that could otherwise be converted to a goto).
1430 -- Must_Be_Byte_Aligned (Flag14-Sem)
1431 -- This flag is present in N_Attribute_Reference nodes. It can be set
1432 -- only for the Address and Unrestricted_Access attributes. If set it
1433 -- means that the object for which the address/access is given must be on
1434 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1435 -- of the object is to be made before taking the address (this copy is in
1436 -- the current scope on the stack frame). This is used for certain cases
1437 -- of code generated by the expander that passes parameters by address.
1439 -- The reason the copy is not made by the front end is that the back end
1440 -- has more information about type layout and may be able to (but is not
1441 -- guaranteed to) prevent making unnecessary copies.
1443 -- Must_Not_Freeze (Flag8-Sem)
1444 -- A flag present in all expression nodes. Normally expressions cause
1445 -- freezing as described in the RM. If this flag is set, then this is
1446 -- inhibited. This is used by the analyzer and expander to label nodes
1447 -- that are created by semantic analysis or expansion and which must not
1448 -- cause freezing even though they normally would. This flag is also
1449 -- present in an N_Subtype_Indication node, since we also use these in
1450 -- calls to Freeze_Expression.
1452 -- Next_Entity (Node2-Sem)
1453 -- Present in defining identifiers, defining character literals and
1454 -- defining operator symbols (i.e. in all entities). The entities of a
1455 -- scope are chained, and this field is used as the forward pointer for
1456 -- this list. See Einfo for further details.
1458 -- Next_Exit_Statement (Node3-Sem)
1459 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
1460 -- chained (in reverse order of appearance) from the First_Exit_Statement
1461 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
1462 -- the next entry on this chain (Empty = end of list).
1464 -- Next_Implicit_With (Node3-Sem)
1465 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1466 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1467 -- to prevent multiple with_clauses for the same unit in a given context.
1468 -- A postorder traversal of the tree whose nodes are units and whose
1469 -- links are with_clauses defines the order in which Inspector must
1470 -- examine a compiled unit and its full context. This ordering ensures
1471 -- that any subprogram call is examined after the subprogram declaration
1474 -- Next_Named_Actual (Node4-Sem)
1475 -- Present in parameter association node. Set during semantic analysis to
1476 -- point to the next named parameter, where parameters are ordered by
1477 -- declaration order (as opposed to the actual order in the call, which
1478 -- may be different due to named associations). Not that this field
1479 -- points to the explicit actual parameter itself, not to the
1480 -- N_Parameter_Association node (its parent).
1482 -- Next_Pragma (Node1-Sem)
1483 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1484 -- nodes. Currently used for two purposes:
1486 -- Create a list of linked Check_Policy pragmas. The head of this list
1487 -- is stored in Opt.Check_Policy_List (which has further details).
1489 -- Used by processing for Pre/Postcondition pragmas to store a list of
1490 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1493 -- Next_Rep_Item (Node5-Sem)
1494 -- Present in pragma nodes, attribute definition nodes, enumeration rep
1495 -- clauses, record rep clauses, aspect specification nodes. Used to link
1496 -- representation items that apply to an entity. See full description of
1497 -- First_Rep_Item field in Einfo for further details.
1499 -- Next_Use_Clause (Node3-Sem)
1500 -- While use clauses are active during semantic processing, they are
1501 -- chained from the scope stack entry, using Next_Use_Clause as a link
1502 -- pointer, with Empty marking the end of the list. The head pointer is
1503 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1504 -- processing (i.e. when Gigi sees the tree, the contents of this field
1505 -- is undefined and should not be read).
1507 -- No_Ctrl_Actions (Flag7-Sem)
1508 -- Present in N_Assignment_Statement to indicate that no finalize nor
1509 -- adjust should take place on this assignment even though the rhs is
1510 -- controlled. This is used in init procs and aggregate expansions where
1511 -- the generated assignments are more initialisations than real
1514 -- No_Elaboration_Check (Flag14-Sem)
1515 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1516 -- that no elaboration check is needed on the call, because it appears in
1517 -- the context of a local Suppress pragma. This is used on calls within
1518 -- task bodies, where the actual elaboration checks are applied after
1519 -- analysis, when the local scope stack is not present.
1521 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1522 -- Present in N_With_Clause nodes. Set if the with clause is on the
1523 -- package or subprogram spec where the main unit is the corresponding
1524 -- body, and no entities of the with'ed unit are referenced by the spec
1525 -- (an entity may still be referenced in the body, so this flag is used
1526 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1529 -- No_Initialization (Flag13-Sem)
1530 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1531 -- object must not be initialized (by Initialize or call to an init
1532 -- proc). This is needed for controlled aggregates. When the Object
1533 -- declaration has an expression, this flag means that this expression
1534 -- should not be taken into account (needed for in place initialization
1535 -- with aggregates).
1537 -- No_Truncation (Flag17-Sem)
1538 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1539 -- only if the RM_Size of the source is greater than the RM_Size of the
1540 -- target for scalar operands. Normally in such a case we truncate some
1541 -- higher order bits of the source, and then sign/zero extend the result
1542 -- to form the output value. But if this flag is set, then we do not do
1543 -- any truncation, so for example, if an 8 bit input is converted to 5
1544 -- bit result which is in fact stored in 8 bits, then the high order
1545 -- three bits of the target result will be copied from the source. This
1546 -- is used for properly setting out of range values for use by pragmas
1547 -- Initialize_Scalars and Normalize_Scalars.
1549 -- Original_Discriminant (Node2-Sem)
1550 -- Present in identifiers. Used in references to discriminants that
1551 -- appear in generic units. Because the names of the discriminants may be
1552 -- different in an instance, we use this field to recover the position of
1553 -- the discriminant in the original type, and replace it with the
1554 -- discriminant at the same position in the instantiated type.
1556 -- Original_Entity (Node2-Sem)
1557 -- Present in numeric literals. Used to denote the named number that has
1558 -- been constant-folded into the given literal. If literal is from
1559 -- source, or the result of some other constant-folding operation, then
1560 -- Original_Entity is empty. This field is needed to handle properly
1561 -- named numbers in generic units, where the Associated_Node field
1562 -- interferes with the Entity field, making it impossible to preserve the
1563 -- original entity at the point of instantiation (ASIS problem).
1565 -- Others_Discrete_Choices (List1-Sem)
1566 -- When a case statement or variant is analyzed, the semantic checks
1567 -- determine the actual list of choices that correspond to an others
1568 -- choice. This list is materialized for later use by the expander and
1569 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1570 -- this materialized list of choices, which is in standard format for a
1571 -- list of discrete choices, except that of course it cannot contain an
1572 -- N_Others_Choice entry.
1574 -- Parameter_List_Truncated (Flag17-Sem)
1575 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1576 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as
1577 -- a result of a First_Optional_Parameter specification in an
1578 -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma.
1579 -- The truncation is done by the expander by removing trailing parameters
1580 -- from the argument list, in accordance with the set of rules allowing
1581 -- such parameter removal. In particular, parameters can be removed
1582 -- working from the end of the parameter list backwards up to and
1583 -- including the entry designated by First_Optional_Parameter in the
1584 -- Import pragma. Parameters can be removed if they are implicit and the
1585 -- default value is a known-at-compile-time value, including the use of
1586 -- the Null_Parameter attribute, or if explicit parameter values are
1587 -- present that match the corresponding defaults.
1589 -- Parent_Spec (Node4-Sem)
1590 -- For a library unit that is a child unit spec (package or subprogram
1591 -- declaration, generic declaration or instantiation, or library level
1592 -- rename, this field points to the compilation unit node for the parent
1593 -- package specification. This field is Empty for library bodies (the
1594 -- parent spec in this case can be found from the corresponding spec).
1596 -- Present_Expr (Uint3-Sem)
1597 -- Present in an N_Variant node. This has a meaningful value only after
1598 -- Gigi has back annotated the tree with representation information. At
1599 -- this point, it contains a reference to a gcc expression that depends
1600 -- on the values of one or more discriminants. Give a set of discriminant
1601 -- values, this expression evaluates to False (zero) if variant is not
1602 -- present, and True (non-zero) if it is present. See unit Repinfo for
1603 -- further details on gigi back annotation. This field is used during
1604 -- ASIS processing (data decomposition annex) to determine if a field is
1607 -- Print_In_Hex (Flag13-Sem)
1608 -- Set on an N_Integer_Literal node to indicate that the value should be
1609 -- printed in hexadecimal in the sprint listing. Has no effect on
1610 -- legality or semantics of program, only on the displayed output. This
1611 -- is used to clarify output from the packed array cases.
1613 -- Procedure_To_Call (Node2-Sem)
1614 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1615 -- and N_Extended_Return_Statement nodes. References the entity for the
1616 -- declaration of the procedure to be called to accomplish the required
1617 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1618 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1619 -- allocating the return value), and for the Deallocate procedure in the
1620 -- case of N_Free_Statement.
1622 -- Raises_Constraint_Error (Flag7-Sem)
1623 -- Set on an expression whose evaluation will definitely fail constraint
1624 -- error check. In the case of static expressions, this flag must be set
1625 -- accurately (and if it is set, the expression is typically illegal
1626 -- unless it appears as a non-elaborated branch of a short-circuit form).
1627 -- For a non-static expression, this flag may be set whenever an
1628 -- expression (e.g. an aggregate) is known to raise constraint error. If
1629 -- set, the expression definitely will raise CE if elaborated at runtime.
1630 -- If not set, the expression may or may not raise CE. In other words, on
1631 -- static expressions, the flag is set accurately, on non-static
1632 -- expressions it is set conservatively.
1634 -- Redundant_Use (Flag13-Sem)
1635 -- Present in nodes that can appear as an operand in a use clause or use
1636 -- type clause (identifiers, expanded names, attribute references). Set
1637 -- to indicate that a use is redundant (and therefore need not be undone
1640 -- Renaming_Exception (Node2-Sem)
1641 -- Present in N_Exception_Declaration node. Used to point back to the
1642 -- exception renaming for an exception declared within a subprogram.
1643 -- What happens is that an exception declared in a subprogram is moved
1644 -- to the library level with a unique name, and the original exception
1645 -- becomes a renaming. This link from the library level exception to the
1646 -- renaming declaration allows registering of the proper exception name.
1648 -- Return_Statement_Entity (Node5-Sem)
1649 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1650 -- Points to an E_Return_Statement representing the return statement.
1652 -- Return_Object_Declarations (List3)
1653 -- Present in N_Extended_Return_Statement. Points to a list initially
1654 -- containing a single N_Object_Declaration representing the return
1655 -- object. We use a list (instead of just a pointer to the object decl)
1656 -- because Analyze wants to insert extra actions on this list.
1658 -- Rounded_Result (Flag18-Sem)
1659 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1660 -- Used in the fixed-point cases to indicate that the result must be
1661 -- rounded as a result of the use of the 'Round attribute. Also used for
1662 -- integer N_Op_Divide nodes to indicate that the result should be
1663 -- rounded to the nearest integer (breaking ties away from zero), rather
1664 -- than truncated towards zero as usual. These rounded integer operations
1665 -- are the result of expansion of rounded fixed-point divide, conversion
1666 -- and multiplication operations.
1668 -- SCIL_Entity (Node4-Sem)
1669 -- Present in SCIL nodes. Used to reference the tagged type associated
1670 -- with the SCIL node.
1672 -- SCIL_Controlling_Tag (Node5-Sem)
1673 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the
1674 -- controlling tag of a dispatching call.
1676 -- SCIL_Tag_Value (Node5-Sem)
1677 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
1678 -- value that is being tested.
1680 -- SCIL_Target_Prim (Node2-Sem)
1681 -- Present in N_SCIL_Dispatching_Call nodes. Used to reference the tagged
1682 -- type primitive associated with the SCIL node.
1684 -- Scope (Node3-Sem)
1685 -- Present in defining identifiers, defining character literals and
1686 -- defining operator symbols (i.e. in all entities). The entities of a
1687 -- scope all use this field to reference the corresponding scope entity.
1688 -- See Einfo for further details.
1690 -- Shift_Count_OK (Flag4-Sem)
1691 -- A flag present in shift nodes to indicate that the shift count is
1692 -- known to be in range, i.e. is in the range from zero to word length
1693 -- minus one. If this flag is not set, then the shift count may be
1694 -- outside this range, i.e. larger than the word length, and the code
1695 -- must ensure that such shift counts give the appropriate result.
1697 -- Source_Type (Node1-Sem)
1698 -- Used in an N_Validate_Unchecked_Conversion node to point to the
1699 -- source type entity for the unchecked conversion instantiation
1700 -- which gigi must do size validation for.
1702 -- Split_PPC (Flag17)
1703 -- When a Pre or Post aspect specification is processed, it is broken
1704 -- into AND THEN sections. The left most section has Split_PPC set to
1705 -- False, indicating that it is the original specification (e.g. for
1706 -- posting errors). For other sections, Split_PPC is set to True.
1707 -- This flag is set in both the N_Aspect_Specification node itself,
1708 -- and in the pragma which is generated from this node.
1710 -- Static_Processing_OK (Flag4-Sem)
1711 -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate
1712 -- flag is set, the full value of the aggregate can be determined at
1713 -- compile time and the aggregate can be passed as is to the back-end.
1714 -- In this event it is irrelevant whether this flag is set or not.
1715 -- However, if the flag Compile_Time_Known_Aggregate is not set but
1716 -- Static_Processing_OK is set, the aggregate can (but need not) be
1717 -- converted into a compile time known aggregate by the expander. See
1718 -- Sem_Aggr for the specific conditions under which an aggregate has its
1719 -- Static_Processing_OK flag set.
1721 -- Storage_Pool (Node1-Sem)
1722 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1723 -- and N_Extended_Return_Statement nodes. References the entity for the
1724 -- storage pool to be used for the allocate or free call or for the
1725 -- allocation of the returned value from function. Empty indicates that
1726 -- the global default pool is to be used. Note that in the case
1727 -- of a return statement, this field is set only if the function returns
1728 -- value of a type whose size is not known at compile time on the
1731 -- Suppress_Assignment_Checks (Flag18-Sem)
1732 -- Used in generated N_Assignment_Statement nodes to suppress predicate
1733 -- and range checks in cases where the generated code knows that the
1734 -- value being assigned is in range and satisfies any predicate. Also
1735 -- can be set in N_Object_Declaration nodes, to similarly suppress any
1736 -- checks on the initializing value.
1738 -- Suppress_Loop_Warnings (Flag17-Sem)
1739 -- Used in N_Loop_Statement node to indicate that warnings within the
1740 -- body of the loop should be suppressed. This is set when the range
1741 -- of a FOR loop is known to be null, or is probably null (loop would
1742 -- only execute if invalid values are present).
1744 -- Target_Type (Node2-Sem)
1745 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
1746 -- type entity for the unchecked conversion instantiation which gigi must
1747 -- do size validation for.
1749 -- Then_Actions (List3-Sem)
1750 -- This field is present in conditional expression nodes. During code
1751 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1752 -- actions at an appropriate place in the tree to get elaborated at the
1753 -- right time. For conditional expressions, we have to be sure that the
1754 -- actions for the Then branch are only elaborated if the condition is
1755 -- True. The Then_Actions field is used as a temporary parking place for
1756 -- these actions. The final tree is always rewritten to eliminate the
1757 -- need for this field, so in the tree passed to Gigi, this field is
1758 -- always set to No_List.
1760 -- Treat_Fixed_As_Integer (Flag14-Sem)
1761 -- This flag appears in operator nodes for divide, multiply, mod and rem
1762 -- on fixed-point operands. It indicates that the operands are to be
1763 -- treated as integer values, ignoring small values. This flag is only
1764 -- set as a result of expansion of fixed-point operations. Typically a
1765 -- fixed-point multiplication in the source generates subsidiary
1766 -- multiplication and division operations that work with the underlying
1767 -- integer values and have this flag set. Note that this flag is not
1768 -- needed on other arithmetic operations (add, neg, subtract etc.) since
1769 -- in these cases it is always the case that fixed is treated as integer.
1770 -- The Etype field MUST be set if this flag is set. The analyzer knows to
1771 -- leave such nodes alone, and whoever makes them must set the correct
1774 -- TSS_Elist (Elist3-Sem)
1775 -- Present in N_Freeze_Entity nodes. Holds an element list containing
1776 -- entries for each TSS (type support subprogram) associated with the
1777 -- frozen type. The elements of the list are the entities for the
1778 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
1779 -- if there are no type support subprograms for the type or if the freeze
1780 -- node is not for a type.
1782 -- Unreferenced_In_Spec (Flag7-Sem)
1783 -- Present in N_With_Clause nodes. Set if the with clause is on the
1784 -- package or subprogram spec where the main unit is the corresponding
1785 -- body, and is not referenced by the spec (it may still be referenced by
1786 -- the body, so this flag is used to generate the proper message (see
1787 -- Sem_Util.Check_Unused_Withs for details)
1789 -- Used_Operations (Elist5-Sem)
1790 -- Present in N_Use_Type_Clause nodes. Holds the list of operations that
1791 -- are made potentially use-visible by the clause. Simplifies processing
1792 -- on exit from the scope of the use_type_clause, in particular in the
1793 -- case of Use_All_Type, when those operations several scopes.
1795 -- Was_Originally_Stub (Flag13-Sem)
1796 -- This flag is set in the node for a proper body that replaces stub.
1797 -- During the analysis procedure, stubs in some situations get rewritten
1798 -- by the corresponding bodies, and we set this flag to remember that
1799 -- this happened. Note that it is not good enough to rely on the use of
1800 -- Original_Node here because of the case of nested instantiations where
1801 -- the substituted node can be copied.
1803 -- Withed_Body (Node1-Sem)
1804 -- Present in N_With_Clause nodes. Set if the unit in whose context
1805 -- the with_clause appears instantiates a generic contained in the
1806 -- library unit of the with_clause and as a result loads its body.
1807 -- Used for a more precise unit traversal for CodePeer.
1809 -- Zero_Cost_Handling (Flag5-Sem)
1810 -- This flag is set in all handled sequence of statement and exception
1811 -- handler nodes if exceptions are to be handled using the zero-cost
1812 -- mechanism (see Ada.Exceptions and System.Exceptions in files
1813 -- a-except.ads/adb and s-except.ads for full details). What gigi needs
1814 -- to do for such a handler is simply to put the code in the handler
1815 -- somewhere. The front end has generated all necessary labels.
1817 --------------------------------------------------
1818 -- Note on Use of End_Label and End_Span Fields --
1819 --------------------------------------------------
1821 -- Several constructs have end lines:
1823 -- Loop Statement end loop [loop_IDENTIFIER];
1824 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
1825 -- Task Definition end [task_IDENTIFIER]
1826 -- Protected Definition end [protected_IDENTIFIER]
1827 -- Protected Body end [protected_IDENTIFIER]
1829 -- Block Statement end [block_IDENTIFIER];
1830 -- Subprogram Body end [DESIGNATOR];
1831 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
1832 -- Task Body end [task_IDENTIFIER];
1833 -- Accept Statement end [entry_IDENTIFIER]];
1834 -- Entry Body end [entry_IDENTIFIER];
1836 -- If Statement end if;
1837 -- Case Statement end case;
1839 -- Record Definition end record;
1840 -- Enumeration Definition );
1842 -- The End_Label and End_Span fields are used to mark the locations of
1843 -- these lines, and also keep track of the label in the case where a label
1846 -- For the first group above, the End_Label field of the corresponding node
1847 -- is used to point to the label identifier. In the case where there is no
1848 -- label in the source, the parser supplies a dummy identifier (with
1849 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
1850 -- marks the location of the token following the END token.
1852 -- For the second group, the use of End_Label is similar, but the End_Label
1853 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
1854 -- simply because in some cases there is no room in the parent node.
1856 -- For the third group, there is never any label, and instead of using
1857 -- End_Label, we use the End_Span field which gives the location of the
1858 -- token following END, relative to the starting Sloc of the construct,
1859 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
1860 -- following the End_Label.
1862 -- The record definition case is handled specially, we treat it as though
1863 -- it required an optional label which is never present, and so the parser
1864 -- always builds a dummy identifier with Comes From Source set False. The
1865 -- reason we do this, rather than using End_Span in this case, is that we
1866 -- want to generate a cross-ref entry for the end of a record, since it
1867 -- represents a scope for name declaration purposes.
1869 -- The enumeration definition case is handled in an exactly similar manner,
1870 -- building a dummy identifier to get a cross-reference.
1872 -- Note: the reason we store the difference as a Uint, instead of storing
1873 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
1874 -- distinguished from other types of values, and we count on all general
1875 -- use fields being self describing. To make things easier for clients,
1876 -- note that we provide function End_Location, and procedure
1877 -- Set_End_Location to allow access to the logical value (which is the
1878 -- Source_Ptr value for the end token).
1880 ---------------------
1881 -- Syntactic Nodes --
1882 ---------------------
1884 ---------------------
1885 -- 2.3 Identifier --
1886 ---------------------
1888 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
1889 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
1891 -- An IDENTIFIER shall not be a reserved word
1893 -- In the Ada grammar identifiers are the bottom level tokens which have
1894 -- very few semantics. Actual program identifiers are direct names. If
1895 -- we were being 100% honest with the grammar, then we would have a node
1896 -- called N_Direct_Name which would point to an identifier. However,
1897 -- that's too many extra nodes, so we just use the N_Identifier node
1898 -- directly as a direct name, and it contains the expression fields and
1899 -- Entity field that correspond to its use as a direct name. In those
1900 -- few cases where identifiers appear in contexts where they are not
1901 -- direct names (pragmas, pragma argument associations, attribute
1902 -- references and attribute definition clauses), the Chars field of the
1903 -- node contains the Name_Id for the identifier name.
1905 -- Note: in GNAT, a reserved word can be treated as an identifier in two
1906 -- cases. First, an incorrect use of a reserved word as an identifier is
1907 -- diagnosed and then treated as a normal identifier. Second, an
1908 -- attribute designator of the form of a reserved word (access, delta,
1909 -- digits, range) is treated as an identifier.
1911 -- Note: The set of letters that is permitted in an identifier depends
1912 -- on the character set in use. See package Csets for full details.
1915 -- Sloc points to identifier
1916 -- Chars (Name1) contains the Name_Id for the identifier
1917 -- Entity (Node4-Sem)
1918 -- Associated_Node (Node4-Sem)
1919 -- Original_Discriminant (Node2-Sem)
1920 -- Redundant_Use (Flag13-Sem)
1921 -- Has_Private_View (Flag11-Sem) (set in generic units)
1922 -- plus fields for expression
1924 --------------------------
1925 -- 2.4 Numeric Literal --
1926 --------------------------
1928 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
1930 ----------------------------
1931 -- 2.4.1 Decimal Literal --
1932 ----------------------------
1934 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
1936 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
1938 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
1940 -- Decimal literals appear in the tree as either integer literal nodes
1941 -- or real literal nodes, depending on whether a period is present.
1943 -- Note: literal nodes appear as a result of direct use of literals
1944 -- in the source program, and also as the result of evaluating
1945 -- expressions at compile time. In the latter case, it is possible
1946 -- to construct real literals that have no syntactic representation
1947 -- using the standard literal format. Such literals are listed by
1948 -- Sprint using the notation [numerator / denominator].
1950 -- Note: the value of an integer literal node created by the front end
1951 -- is never outside the range of values of the base type. However, it
1952 -- can be the case that the created value is outside the range of the
1953 -- particular subtype. This happens in the case of integer overflows
1954 -- with checks suppressed.
1956 -- N_Integer_Literal
1957 -- Sloc points to literal
1958 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1959 -- has been constant-folded into its literal value.
1960 -- Intval (Uint3) contains integer value of literal
1961 -- plus fields for expression
1962 -- Print_In_Hex (Flag13-Sem)
1965 -- Sloc points to literal
1966 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
1967 -- has been constant-folded into its literal value.
1968 -- Realval (Ureal3) contains real value of literal
1969 -- Corresponding_Integer_Value (Uint4-Sem)
1970 -- Is_Machine_Number (Flag11-Sem)
1971 -- plus fields for expression
1973 --------------------------
1974 -- 2.4.2 Based Literal --
1975 --------------------------
1977 -- BASED_LITERAL ::=
1978 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
1982 -- BASED_NUMERAL ::=
1983 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
1985 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
1987 -- Based literals appear in the tree as either integer literal nodes
1988 -- or real literal nodes, depending on whether a period is present.
1990 ----------------------------
1991 -- 2.5 Character Literal --
1992 ----------------------------
1994 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
1996 -- N_Character_Literal
1997 -- Sloc points to literal
1998 -- Chars (Name1) contains the Name_Id for the identifier
1999 -- Char_Literal_Value (Uint2) contains the literal value
2000 -- Entity (Node4-Sem)
2001 -- Associated_Node (Node4-Sem)
2002 -- Has_Private_View (Flag11-Sem) set in generic units.
2003 -- plus fields for expression
2005 -- Note: the Entity field will be missing (set to Empty) for character
2006 -- literals whose type is Standard.Wide_Character or Standard.Character
2007 -- or a type derived from one of these two. In this case the character
2008 -- literal stands for its own coding. The reason we take this irregular
2009 -- short cut is to avoid the need to build lots of junk defining
2010 -- character literal nodes.
2012 -------------------------
2013 -- 2.6 String Literal --
2014 -------------------------
2016 -- STRING LITERAL ::= "{STRING_ELEMENT}"
2018 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
2019 -- single GRAPHIC_CHARACTER other than a quotation mark.
2021 -- Is_Folded_In_Parser is True if the parser created this literal by
2022 -- folding a sequence of "&" operators. For example, if the source code
2023 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2024 -- is set. This flag is needed because the parser doesn't know about
2025 -- visibility, so the folded result might be wrong, and semantic
2026 -- analysis needs to check for that.
2029 -- Sloc points to literal
2030 -- Strval (Str3) contains Id of string value
2031 -- Has_Wide_Character (Flag11-Sem)
2032 -- Has_Wide_Wide_Character (Flag13-Sem)
2033 -- Is_Folded_In_Parser (Flag4)
2034 -- plus fields for expression
2040 -- A COMMENT starts with two adjacent hyphens and extends up to the
2041 -- end of the line. A COMMENT may appear on any line of a program.
2043 -- Comments are skipped by the scanner and do not appear in the tree.
2044 -- It is possible to reconstruct the position of comments with respect
2045 -- to the elements of the tree by using the source position (Sloc)
2046 -- pointers that appear in every tree node.
2052 -- PRAGMA ::= pragma IDENTIFIER
2053 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2055 -- Note that a pragma may appear in the tree anywhere a declaration
2056 -- or a statement may appear, as well as in some other situations
2057 -- which are explicitly documented.
2060 -- Sloc points to PRAGMA
2061 -- Next_Pragma (Node1-Sem)
2062 -- Pragma_Argument_Associations (List2) (set to No_List if none)
2063 -- Pragma_Identifier (Node4)
2064 -- Next_Rep_Item (Node5-Sem)
2065 -- From_Aspect_Specification (Flag13-Sem)
2066 -- Is_Delayed_Aspect (Flag14-Sem)
2067 -- Import_Interface_Present (Flag16-Sem)
2068 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2069 -- Class_Present (Flag6) set if from Aspect with 'Class
2070 -- From_Dynamic_Predicate (Flag7-Sem) Set if Dynamic_Predicate aspect
2071 -- From_Static_Predicate (Flag8-Sem) Set if Static_Predicate aspect
2073 -- Note: we should have a section on what pragmas are passed on to
2074 -- the back end to be processed. This section should note that pragma
2075 -- Psect_Object is always converted to Common_Object, but there are
2076 -- undoubtedly many other similar notes required ???
2078 -- Note: a utility function Pragma_Name may be applied to pragma nodes
2079 -- to conveniently obtain the Chars field of the Pragma_Identifier.
2081 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2082 -- aspect name, as does the Pragma_Identifier. In this case if the
2083 -- pragma has a local name argument (such as pragma Inline), it is
2084 -- resolved to point to the specific entity affected by the pragma.
2086 --------------------------------------
2087 -- 2.8 Pragma Argument Association --
2088 --------------------------------------
2090 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2091 -- [pragma_argument_IDENTIFIER =>] NAME
2092 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2094 -- N_Pragma_Argument_Association
2095 -- Sloc points to first token in association
2096 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2097 -- Expression (Node3)
2099 ------------------------
2100 -- 2.9 Reserved Word --
2101 ------------------------
2103 -- Reserved words are parsed by the scanner, and returned as the
2104 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2106 ----------------------------
2107 -- 3.1 Basic Declaration --
2108 ----------------------------
2110 -- BASIC_DECLARATION ::=
2111 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2112 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2113 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2114 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2115 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2116 -- | GENERIC_INSTANTIATION
2118 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2119 -- see further description in section on semantic nodes.
2121 -- Also, in the tree that is constructed, a pragma may appear
2122 -- anywhere that a declaration may appear.
2124 ------------------------------
2125 -- 3.1 Defining Identifier --
2126 ------------------------------
2128 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2130 -- A defining identifier is an entity, which has additional fields
2131 -- depending on the setting of the Ekind field. These additional
2132 -- fields are defined (and access subprograms declared) in package
2135 -- Note: N_Defining_Identifier is an extended node whose fields are
2136 -- deliberate layed out to match the layout of fields in an ordinary
2137 -- N_Identifier node allowing for easy alteration of an identifier
2138 -- node into a defining identifier node. For details, see procedure
2139 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2141 -- N_Defining_Identifier
2142 -- Sloc points to identifier
2143 -- Chars (Name1) contains the Name_Id for the identifier
2144 -- Next_Entity (Node2-Sem)
2145 -- Scope (Node3-Sem)
2146 -- Etype (Node5-Sem)
2148 -----------------------------
2149 -- 3.2.1 Type Declaration --
2150 -----------------------------
2152 -- TYPE_DECLARATION ::=
2153 -- FULL_TYPE_DECLARATION
2154 -- | INCOMPLETE_TYPE_DECLARATION
2155 -- | PRIVATE_TYPE_DECLARATION
2156 -- | PRIVATE_EXTENSION_DECLARATION
2158 ----------------------------------
2159 -- 3.2.1 Full Type Declaration --
2160 ----------------------------------
2162 -- FULL_TYPE_DECLARATION ::=
2163 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2164 -- is TYPE_DEFINITION
2165 -- [ASPECT_SPECIFICATIONS];
2167 -- | TASK_TYPE_DECLARATION
2168 -- | PROTECTED_TYPE_DECLARATION
2170 -- The full type declaration node is used only for the first case. The
2171 -- second case (concurrent type declaration), is represented directly
2172 -- by a task type declaration or a protected type declaration.
2174 -- N_Full_Type_Declaration
2175 -- Sloc points to TYPE
2176 -- Defining_Identifier (Node1)
2177 -- Discriminant_Specifications (List4) (set to No_List if none)
2178 -- Type_Definition (Node3)
2179 -- Discr_Check_Funcs_Built (Flag11-Sem)
2181 ----------------------------
2182 -- 3.2.1 Type Definition --
2183 ----------------------------
2185 -- TYPE_DEFINITION ::=
2186 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2187 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2188 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2189 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2191 --------------------------------
2192 -- 3.2.2 Subtype Declaration --
2193 --------------------------------
2195 -- SUBTYPE_DECLARATION ::=
2196 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION;
2198 -- The subtype indication field is set to Empty for subtypes
2199 -- declared in package Standard (Positive, Natural).
2201 -- N_Subtype_Declaration
2202 -- Sloc points to SUBTYPE
2203 -- Defining_Identifier (Node1)
2204 -- Null_Exclusion_Present (Flag11)
2205 -- Subtype_Indication (Node5)
2206 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2207 -- Exception_Junk (Flag8-Sem)
2208 -- Has_Dynamic_Range_Check (Flag12-Sem)
2210 -------------------------------
2211 -- 3.2.2 Subtype Indication --
2212 -------------------------------
2214 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2216 -- Note: if no constraint is present, the subtype indication appears
2217 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2218 -- node is used only if a constraint is present.
2220 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2221 -- with the null-exclusion part (see AI-231), we had to introduce a new
2222 -- attribute in all the parents of subtype_indication nodes to indicate
2223 -- if the null-exclusion is present.
2225 -- Note: the reason that this node has expression fields is that a
2226 -- subtype indication can appear as an operand of a membership test.
2228 -- N_Subtype_Indication
2229 -- Sloc points to first token of subtype mark
2230 -- Subtype_Mark (Node4)
2231 -- Constraint (Node3)
2232 -- Etype (Node5-Sem)
2233 -- Must_Not_Freeze (Flag8-Sem)
2235 -- Note: Etype is a copy of the Etype field of the Subtype_Mark. The
2236 -- reason for this redundancy is so that in a list of array index types,
2237 -- the Etype can be uniformly accessed to determine the subscript type.
2238 -- This means that no Itype is constructed for the actual subtype that
2239 -- is created by the subtype indication. If such an Itype is required,
2240 -- it is constructed in the context in which the indication appears.
2242 -------------------------
2243 -- 3.2.2 Subtype Mark --
2244 -------------------------
2246 -- SUBTYPE_MARK ::= subtype_NAME
2248 -----------------------
2249 -- 3.2.2 Constraint --
2250 -----------------------
2252 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2254 ------------------------------
2255 -- 3.2.2 Scalar Constraint --
2256 ------------------------------
2258 -- SCALAR_CONSTRAINT ::=
2259 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2261 ---------------------------------
2262 -- 3.2.2 Composite Constraint --
2263 ---------------------------------
2265 -- COMPOSITE_CONSTRAINT ::=
2266 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2268 -------------------------------
2269 -- 3.3.1 Object Declaration --
2270 -------------------------------
2272 -- OBJECT_DECLARATION ::=
2273 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2274 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2275 -- [ASPECT_SPECIFICATIONS];
2276 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2277 -- ACCESS_DEFINITION [:= EXPRESSION]
2278 -- [ASPECT_SPECIFICATIONS];
2279 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2280 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2281 -- [ASPECT_SPECIFICATIONS];
2282 -- | SINGLE_TASK_DECLARATION
2283 -- | SINGLE_PROTECTED_DECLARATION
2285 -- Note: aliased is not permitted in Ada 83 mode
2287 -- The N_Object_Declaration node is only for the first two cases.
2288 -- Single task declaration is handled by P_Task (9.1)
2289 -- Single protected declaration is handled by P_protected (9.5)
2291 -- Although the syntax allows multiple identifiers in the list, the
2292 -- semantics is as though successive declarations were given with
2293 -- identical type definition and expression components. To simplify
2294 -- semantic processing, the parser represents a multiple declaration
2295 -- case as a sequence of single declarations, using the More_Ids and
2296 -- Prev_Ids flags to preserve the original source form as described
2297 -- in the section on "Handling of Defining Identifier Lists".
2299 -- The flag Has_Init_Expression is set if an initializing expression
2300 -- is present. Normally it is set if and only if Expression contains
2301 -- a non-empty value, but there is an exception to this. When the
2302 -- initializing expression is an aggregate which requires explicit
2303 -- assignments, the Expression field gets set to Empty, but this flag
2304 -- is still set, so we don't forget we had an initializing expression.
2306 -- Note: if a range check is required for the initialization
2307 -- expression then the Do_Range_Check flag is set in the Expression,
2308 -- with the check being done against the type given by the object
2309 -- definition, which is also the Etype of the defining identifier.
2311 -- Note: the contents of the Expression field must be ignored (i.e.
2312 -- treated as though it were Empty) if No_Initialization is set True.
2314 -- Note: the back end places some restrictions on the form of the
2315 -- Expression field. If the object being declared is Atomic, then
2316 -- the Expression may not have the form of an aggregate (since this
2317 -- might cause the back end to generate separate assignments). In this
2318 -- case the front end must generate an extra temporary and initialize
2319 -- this temporary as required (the temporary itself is not atomic).
2321 -- Note: there is not node kind for object definition. Instead, the
2322 -- corresponding field holds a subtype indication, an array type
2323 -- definition, or (Ada 2005, AI-406) an access definition.
2325 -- N_Object_Declaration
2326 -- Sloc points to first identifier
2327 -- Defining_Identifier (Node1)
2328 -- Aliased_Present (Flag4) set if ALIASED appears
2329 -- Constant_Present (Flag17) set if CONSTANT appears
2330 -- Null_Exclusion_Present (Flag11)
2331 -- Object_Definition (Node4) subtype indic./array type def./access def.
2332 -- Expression (Node3) (set to Empty if not present)
2333 -- Handler_List_Entry (Node2-Sem)
2334 -- Corresponding_Generic_Association (Node5-Sem)
2335 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2336 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2337 -- No_Initialization (Flag13-Sem)
2338 -- Assignment_OK (Flag15-Sem)
2339 -- Exception_Junk (Flag8-Sem)
2340 -- Is_Subprogram_Descriptor (Flag16-Sem)
2341 -- Has_Init_Expression (Flag14)
2342 -- Suppress_Assignment_Checks (Flag18-Sem)
2344 -------------------------------------
2345 -- 3.3.1 Defining Identifier List --
2346 -------------------------------------
2348 -- DEFINING_IDENTIFIER_LIST ::=
2349 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2351 -------------------------------
2352 -- 3.3.2 Number Declaration --
2353 -------------------------------
2355 -- NUMBER_DECLARATION ::=
2356 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2358 -- Although the syntax allows multiple identifiers in the list, the
2359 -- semantics is as though successive declarations were given with
2360 -- identical expressions. To simplify semantic processing, the parser
2361 -- represents a multiple declaration case as a sequence of single
2362 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2363 -- the original source form as described in the section on "Handling
2364 -- of Defining Identifier Lists".
2366 -- N_Number_Declaration
2367 -- Sloc points to first identifier
2368 -- Defining_Identifier (Node1)
2369 -- Expression (Node3)
2370 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2371 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2373 ----------------------------------
2374 -- 3.4 Derived Type Definition --
2375 ----------------------------------
2377 -- DERIVED_TYPE_DEFINITION ::=
2378 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2379 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2381 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2384 -- Note: a record extension part is required if ABSTRACT is present
2386 -- N_Derived_Type_Definition
2387 -- Sloc points to NEW
2388 -- Abstract_Present (Flag4)
2389 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2390 -- Subtype_Indication (Node5)
2391 -- Record_Extension_Part (Node3) (set to Empty if not present)
2392 -- Limited_Present (Flag17)
2393 -- Task_Present (Flag5) set in task interfaces
2394 -- Protected_Present (Flag6) set in protected interfaces
2395 -- Synchronized_Present (Flag7) set in interfaces
2396 -- Interface_List (List2) (set to No_List if none)
2397 -- Interface_Present (Flag16) set in abstract interfaces
2399 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2400 -- Interface_List, and Interface_Present are used for abstract
2401 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2403 ---------------------------
2404 -- 3.5 Range Constraint --
2405 ---------------------------
2407 -- RANGE_CONSTRAINT ::= range RANGE
2409 -- N_Range_Constraint
2410 -- Sloc points to RANGE
2411 -- Range_Expression (Node4)
2418 -- RANGE_ATTRIBUTE_REFERENCE
2419 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2421 -- Note: the case of a range given as a range attribute reference
2422 -- appears directly in the tree as an attribute reference.
2424 -- Note: the field name for a reference to a range is Range_Expression
2425 -- rather than Range, because range is a reserved keyword in Ada!
2427 -- Note: the reason that this node has expression fields is that a
2428 -- range can appear as an operand of a membership test. The Etype
2429 -- field is the type of the range (we do NOT construct an implicit
2430 -- subtype to represent the range exactly).
2433 -- Sloc points to ..
2434 -- Low_Bound (Node1)
2435 -- High_Bound (Node2)
2436 -- Includes_Infinities (Flag11)
2437 -- plus fields for expression
2439 -- Note: if the range appears in a context, such as a subtype
2440 -- declaration, where range checks are required on one or both of
2441 -- the expression fields, then type conversion nodes are inserted
2442 -- to represent the required checks.
2444 ----------------------------------------
2445 -- 3.5.1 Enumeration Type Definition --
2446 ----------------------------------------
2448 -- ENUMERATION_TYPE_DEFINITION ::=
2449 -- (ENUMERATION_LITERAL_SPECIFICATION
2450 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2452 -- Note: the Literals field in the node described below is null for
2453 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2454 -- which special processing handles these types as special cases.
2456 -- N_Enumeration_Type_Definition
2457 -- Sloc points to left parenthesis
2458 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2459 -- End_Label (Node4) (set to Empty if internally generated record)
2461 ----------------------------------------------
2462 -- 3.5.1 Enumeration Literal Specification --
2463 ----------------------------------------------
2465 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2466 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2468 ---------------------------------------
2469 -- 3.5.1 Defining Character Literal --
2470 ---------------------------------------
2472 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2474 -- A defining character literal is an entity, which has additional
2475 -- fields depending on the setting of the Ekind field. These
2476 -- additional fields are defined (and access subprograms declared)
2477 -- in package Einfo.
2479 -- Note: N_Defining_Character_Literal is an extended node whose fields
2480 -- are deliberate layed out to match the layout of fields in an ordinary
2481 -- N_Character_Literal node allowing for easy alteration of a character
2482 -- literal node into a defining character literal node. For details, see
2483 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2485 -- N_Defining_Character_Literal
2486 -- Sloc points to literal
2487 -- Chars (Name1) contains the Name_Id for the identifier
2488 -- Next_Entity (Node2-Sem)
2489 -- Scope (Node3-Sem)
2490 -- Etype (Node5-Sem)
2492 ------------------------------------
2493 -- 3.5.4 Integer Type Definition --
2494 ------------------------------------
2496 -- Note: there is an error in this rule in the latest version of the
2497 -- grammar, so we have retained the old rule pending clarification.
2499 -- INTEGER_TYPE_DEFINITION ::=
2500 -- SIGNED_INTEGER_TYPE_DEFINITION
2501 -- | MODULAR_TYPE_DEFINITION
2503 -------------------------------------------
2504 -- 3.5.4 Signed Integer Type Definition --
2505 -------------------------------------------
2507 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2508 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2510 -- Note: the Low_Bound and High_Bound fields are set to Empty
2511 -- for integer types defined in package Standard.
2513 -- N_Signed_Integer_Type_Definition
2514 -- Sloc points to RANGE
2515 -- Low_Bound (Node1)
2516 -- High_Bound (Node2)
2518 ------------------------------------
2519 -- 3.5.4 Modular Type Definition --
2520 ------------------------------------
2522 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2524 -- N_Modular_Type_Definition
2525 -- Sloc points to MOD
2526 -- Expression (Node3)
2528 ---------------------------------
2529 -- 3.5.6 Real Type Definition --
2530 ---------------------------------
2532 -- REAL_TYPE_DEFINITION ::=
2533 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2535 --------------------------------------
2536 -- 3.5.7 Floating Point Definition --
2537 --------------------------------------
2539 -- FLOATING_POINT_DEFINITION ::=
2540 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2542 -- Note: The Digits_Expression and Real_Range_Specifications fields
2543 -- are set to Empty for floating-point types declared in Standard.
2545 -- N_Floating_Point_Definition
2546 -- Sloc points to DIGITS
2547 -- Digits_Expression (Node2)
2548 -- Real_Range_Specification (Node4) (set to Empty if not present)
2550 -------------------------------------
2551 -- 3.5.7 Real Range Specification --
2552 -------------------------------------
2554 -- REAL_RANGE_SPECIFICATION ::=
2555 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2557 -- N_Real_Range_Specification
2558 -- Sloc points to RANGE
2559 -- Low_Bound (Node1)
2560 -- High_Bound (Node2)
2562 -----------------------------------
2563 -- 3.5.9 Fixed Point Definition --
2564 -----------------------------------
2566 -- FIXED_POINT_DEFINITION ::=
2567 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2569 --------------------------------------------
2570 -- 3.5.9 Ordinary Fixed Point Definition --
2571 --------------------------------------------
2573 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2574 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2576 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2578 -- N_Ordinary_Fixed_Point_Definition
2579 -- Sloc points to DELTA
2580 -- Delta_Expression (Node3)
2581 -- Real_Range_Specification (Node4)
2583 -------------------------------------------
2584 -- 3.5.9 Decimal Fixed Point Definition --
2585 -------------------------------------------
2587 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2588 -- delta static_EXPRESSION
2589 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2591 -- Note: decimal types are not permitted in Ada 83 mode
2593 -- N_Decimal_Fixed_Point_Definition
2594 -- Sloc points to DELTA
2595 -- Delta_Expression (Node3)
2596 -- Digits_Expression (Node2)
2597 -- Real_Range_Specification (Node4) (set to Empty if not present)
2599 ------------------------------
2600 -- 3.5.9 Digits Constraint --
2601 ------------------------------
2603 -- DIGITS_CONSTRAINT ::=
2604 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2606 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2607 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2609 -- N_Digits_Constraint
2610 -- Sloc points to DIGITS
2611 -- Digits_Expression (Node2)
2612 -- Range_Constraint (Node4) (set to Empty if not present)
2614 --------------------------------
2615 -- 3.6 Array Type Definition --
2616 --------------------------------
2618 -- ARRAY_TYPE_DEFINITION ::=
2619 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2621 -----------------------------------------
2622 -- 3.6 Unconstrained Array Definition --
2623 -----------------------------------------
2625 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2626 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2627 -- COMPONENT_DEFINITION
2629 -- Note: dimensionality of array is indicated by number of entries in
2630 -- the Subtype_Marks list, which has one entry for each dimension.
2632 -- N_Unconstrained_Array_Definition
2633 -- Sloc points to ARRAY
2634 -- Subtype_Marks (List2)
2635 -- Component_Definition (Node4)
2637 -----------------------------------
2638 -- 3.6 Index Subtype Definition --
2639 -----------------------------------
2641 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2643 -- There is no explicit node in the tree for an index subtype
2644 -- definition since the N_Unconstrained_Array_Definition node
2645 -- incorporates the type marks which appear in this context.
2647 ---------------------------------------
2648 -- 3.6 Constrained Array Definition --
2649 ---------------------------------------
2651 -- CONSTRAINED_ARRAY_DEFINITION ::=
2652 -- array (DISCRETE_SUBTYPE_DEFINITION
2653 -- {, DISCRETE_SUBTYPE_DEFINITION})
2654 -- of COMPONENT_DEFINITION
2656 -- Note: dimensionality of array is indicated by number of entries
2657 -- in the Discrete_Subtype_Definitions list, which has one entry
2658 -- for each dimension.
2660 -- N_Constrained_Array_Definition
2661 -- Sloc points to ARRAY
2662 -- Discrete_Subtype_Definitions (List2)
2663 -- Component_Definition (Node4)
2665 --------------------------------------
2666 -- 3.6 Discrete Subtype Definition --
2667 --------------------------------------
2669 -- DISCRETE_SUBTYPE_DEFINITION ::=
2670 -- discrete_SUBTYPE_INDICATION | RANGE
2672 -------------------------------
2673 -- 3.6 Component Definition --
2674 -------------------------------
2676 -- COMPONENT_DEFINITION ::=
2677 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
2679 -- Note: although the syntax does not permit a component definition to
2680 -- be an anonymous array (and the parser will diagnose such an attempt
2681 -- with an appropriate message), it is possible for anonymous arrays
2682 -- to appear as component definitions. The semantics and back end handle
2683 -- this case properly, and the expander in fact generates such cases.
2684 -- Access_Definition is an optional field that gives support to
2685 -- Ada 2005 (AI-230). The parser generates nodes that have either the
2686 -- Subtype_Indication field or else the Access_Definition field.
2688 -- N_Component_Definition
2689 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
2690 -- Aliased_Present (Flag4)
2691 -- Null_Exclusion_Present (Flag11)
2692 -- Subtype_Indication (Node5) (set to Empty if not present)
2693 -- Access_Definition (Node3) (set to Empty if not present)
2695 -----------------------------
2696 -- 3.6.1 Index Constraint --
2697 -----------------------------
2699 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
2701 -- It is not in general possible to distinguish between discriminant
2702 -- constraints and index constraints at parse time, since a simple
2703 -- name could be either the subtype mark of a discrete range, or an
2704 -- expression in a discriminant association with no name. Either
2705 -- entry appears simply as the name, and the semantic parse must
2706 -- distinguish between the two cases. Thus we use a common tree
2707 -- node format for both of these constraint types.
2709 -- See Discriminant_Constraint for format of node
2711 ---------------------------
2712 -- 3.6.1 Discrete Range --
2713 ---------------------------
2715 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
2717 ----------------------------
2718 -- 3.7 Discriminant Part --
2719 ----------------------------
2721 -- DISCRIMINANT_PART ::=
2722 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
2724 ------------------------------------
2725 -- 3.7 Unknown Discriminant Part --
2726 ------------------------------------
2728 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
2730 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
2732 -- There is no explicit node in the tree for an unknown discriminant
2733 -- part. Instead the Unknown_Discriminants_Present flag is set in the
2736 ----------------------------------
2737 -- 3.7 Known Discriminant Part --
2738 ----------------------------------
2740 -- KNOWN_DISCRIMINANT_PART ::=
2741 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
2743 -------------------------------------
2744 -- 3.7 Discriminant Specification --
2745 -------------------------------------
2747 -- DISCRIMINANT_SPECIFICATION ::=
2748 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
2749 -- [:= DEFAULT_EXPRESSION]
2750 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
2751 -- [:= DEFAULT_EXPRESSION]
2753 -- Although the syntax allows multiple identifiers in the list, the
2754 -- semantics is as though successive specifications were given with
2755 -- identical type definition and expression components. To simplify
2756 -- semantic processing, the parser represents a multiple declaration
2757 -- case as a sequence of single specifications, using the More_Ids and
2758 -- Prev_Ids flags to preserve the original source form as described
2759 -- in the section on "Handling of Defining Identifier Lists".
2761 -- N_Discriminant_Specification
2762 -- Sloc points to first identifier
2763 -- Defining_Identifier (Node1)
2764 -- Null_Exclusion_Present (Flag11)
2765 -- Discriminant_Type (Node5) subtype mark or access parameter definition
2766 -- Expression (Node3) (set to Empty if no default expression)
2767 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2768 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2770 -----------------------------
2771 -- 3.7 Default Expression --
2772 -----------------------------
2774 -- DEFAULT_EXPRESSION ::= EXPRESSION
2776 ------------------------------------
2777 -- 3.7.1 Discriminant Constraint --
2778 ------------------------------------
2780 -- DISCRIMINANT_CONSTRAINT ::=
2781 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
2783 -- It is not in general possible to distinguish between discriminant
2784 -- constraints and index constraints at parse time, since a simple
2785 -- name could be either the subtype mark of a discrete range, or an
2786 -- expression in a discriminant association with no name. Either
2787 -- entry appears simply as the name, and the semantic parse must
2788 -- distinguish between the two cases. Thus we use a common tree
2789 -- node format for both of these constraint types.
2791 -- N_Index_Or_Discriminant_Constraint
2792 -- Sloc points to left paren
2793 -- Constraints (List1) points to list of discrete ranges or
2794 -- discriminant associations
2796 -------------------------------------
2797 -- 3.7.1 Discriminant Association --
2798 -------------------------------------
2800 -- DISCRIMINANT_ASSOCIATION ::=
2801 -- [discriminant_SELECTOR_NAME
2802 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
2804 -- Note: a discriminant association that has no selector name list
2805 -- appears directly as an expression in the tree.
2807 -- N_Discriminant_Association
2808 -- Sloc points to first token of discriminant association
2809 -- Selector_Names (List1) (always non-empty, since if no selector
2810 -- names are present, this node is not used, see comment above)
2811 -- Expression (Node3)
2813 ---------------------------------
2814 -- 3.8 Record Type Definition --
2815 ---------------------------------
2817 -- RECORD_TYPE_DEFINITION ::=
2818 -- [[abstract] tagged] [limited] RECORD_DEFINITION
2820 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
2822 -- There is no explicit node in the tree for a record type definition.
2823 -- Instead the flags for Tagged_Present and Limited_Present appear in
2824 -- the N_Record_Definition node for a record definition appearing in
2825 -- the context of a record type definition.
2827 ----------------------------
2828 -- 3.8 Record Definition --
2829 ----------------------------
2831 -- RECORD_DEFINITION ::=
2837 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
2838 -- flags appear only for a record definition appearing in a record
2841 -- Note: the NULL RECORD case is not permitted in Ada 83
2843 -- N_Record_Definition
2844 -- Sloc points to RECORD or NULL
2845 -- End_Label (Node4) (set to Empty if internally generated record)
2846 -- Abstract_Present (Flag4)
2847 -- Tagged_Present (Flag15)
2848 -- Limited_Present (Flag17)
2849 -- Component_List (Node1) empty in null record case
2850 -- Null_Present (Flag13) set in null record case
2851 -- Task_Present (Flag5) set in task interfaces
2852 -- Protected_Present (Flag6) set in protected interfaces
2853 -- Synchronized_Present (Flag7) set in interfaces
2854 -- Interface_Present (Flag16) set in abstract interfaces
2855 -- Interface_List (List2) (set to No_List if none)
2857 -- Note: Task_Present, Protected_Present, Synchronized _Present,
2858 -- Interface_List and Interface_Present are used for abstract
2859 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2861 -------------------------
2862 -- 3.8 Component List --
2863 -------------------------
2865 -- COMPONENT_LIST ::=
2866 -- COMPONENT_ITEM {COMPONENT_ITEM}
2867 -- | {COMPONENT_ITEM} VARIANT_PART
2871 -- Sloc points to first token of component list
2872 -- Component_Items (List3)
2873 -- Variant_Part (Node4) (set to Empty if no variant part)
2874 -- Null_Present (Flag13)
2876 -------------------------
2877 -- 3.8 Component Item --
2878 -------------------------
2880 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
2882 -- Note: A component item can also be a pragma, and in the tree
2883 -- that is obtained after semantic processing, a component item
2884 -- can be an N_Null node resulting from a non-recognized pragma.
2886 --------------------------------
2887 -- 3.8 Component Declaration --
2888 --------------------------------
2890 -- COMPONENT_DECLARATION ::=
2891 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
2892 -- [:= DEFAULT_EXPRESSION]
2893 -- [ASPECT_SPECIFICATIONS];
2895 -- Note: although the syntax does not permit a component definition to
2896 -- be an anonymous array (and the parser will diagnose such an attempt
2897 -- with an appropriate message), it is possible for anonymous arrays
2898 -- to appear as component definitions. The semantics and back end handle
2899 -- this case properly, and the expander in fact generates such cases.
2901 -- Although the syntax allows multiple identifiers in the list, the
2902 -- semantics is as though successive declarations were given with the
2903 -- same component definition and expression components. To simplify
2904 -- semantic processing, the parser represents a multiple declaration
2905 -- case as a sequence of single declarations, using the More_Ids and
2906 -- Prev_Ids flags to preserve the original source form as described
2907 -- in the section on "Handling of Defining Identifier Lists".
2909 -- N_Component_Declaration
2910 -- Sloc points to first identifier
2911 -- Defining_Identifier (Node1)
2912 -- Component_Definition (Node4)
2913 -- Expression (Node3) (set to Empty if no default expression)
2914 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2915 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2917 -------------------------
2918 -- 3.8.1 Variant Part --
2919 -------------------------
2922 -- case discriminant_DIRECT_NAME is
2927 -- Note: the variants list can contain pragmas as well as variants.
2928 -- In a properly formed program there is at least one variant.
2931 -- Sloc points to CASE
2935 --------------------
2937 --------------------
2940 -- when DISCRETE_CHOICE_LIST =>
2944 -- Sloc points to WHEN
2945 -- Discrete_Choices (List4)
2946 -- Component_List (Node1)
2947 -- Enclosing_Variant (Node2-Sem)
2948 -- Present_Expr (Uint3-Sem)
2949 -- Dcheck_Function (Node5-Sem)
2951 ---------------------------------
2952 -- 3.8.1 Discrete Choice List --
2953 ---------------------------------
2955 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
2957 ----------------------------
2958 -- 3.8.1 Discrete Choice --
2959 ----------------------------
2961 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
2963 -- Note: in Ada 83 mode, the expression must be a simple expression
2965 -- The only choice that appears explicitly is the OTHERS choice, as
2966 -- defined here. Other cases of discrete choice (expression and
2967 -- discrete range) appear directly. This production is also used
2968 -- for the OTHERS possibility of an exception choice.
2970 -- Note: in accordance with the syntax, the parser does not check that
2971 -- OTHERS appears at the end on its own in a choice list context. This
2972 -- is a semantic check.
2975 -- Sloc points to OTHERS
2976 -- Others_Discrete_Choices (List1-Sem)
2977 -- All_Others (Flag11-Sem)
2979 ----------------------------------
2980 -- 3.9.1 Record Extension Part --
2981 ----------------------------------
2983 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
2985 -- Note: record extension parts are not permitted in Ada 83 mode
2987 --------------------------------------
2988 -- 3.9.4 Interface Type Definition --
2989 --------------------------------------
2991 -- INTERFACE_TYPE_DEFINITION ::=
2992 -- [limited | task | protected | synchronized]
2993 -- interface [interface_list]
2995 -- Note: Interfaces are implemented with N_Record_Definition and
2996 -- N_Derived_Type_Definition nodes because most of the support
2997 -- for the analysis of abstract types has been reused to
2998 -- analyze abstract interfaces.
3000 ----------------------------------
3001 -- 3.10 Access Type Definition --
3002 ----------------------------------
3004 -- ACCESS_TYPE_DEFINITION ::=
3005 -- ACCESS_TO_OBJECT_DEFINITION
3006 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3008 --------------------------
3009 -- 3.10 Null Exclusion --
3010 --------------------------
3012 -- NULL_EXCLUSION ::= not null
3014 ---------------------------------------
3015 -- 3.10 Access To Object Definition --
3016 ---------------------------------------
3018 -- ACCESS_TO_OBJECT_DEFINITION ::=
3019 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3020 -- SUBTYPE_INDICATION
3022 -- N_Access_To_Object_Definition
3023 -- Sloc points to ACCESS
3024 -- All_Present (Flag15)
3025 -- Null_Exclusion_Present (Flag11)
3026 -- Subtype_Indication (Node5)
3027 -- Constant_Present (Flag17)
3029 -----------------------------------
3030 -- 3.10 General Access Modifier --
3031 -----------------------------------
3033 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3035 -- Note: general access modifiers are not permitted in Ada 83 mode
3037 -- There is no explicit node in the tree for general access modifier.
3038 -- Instead the All_Present or Constant_Present flags are set in the
3041 -------------------------------------------
3042 -- 3.10 Access To Subprogram Definition --
3043 -------------------------------------------
3045 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3046 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3047 -- | [NULL_EXCLUSION] access [protected] function
3048 -- PARAMETER_AND_RESULT_PROFILE
3050 -- Note: access to subprograms are not permitted in Ada 83 mode
3052 -- N_Access_Function_Definition
3053 -- Sloc points to ACCESS
3054 -- Null_Exclusion_Present (Flag11)
3055 -- Null_Exclusion_In_Return_Present (Flag14)
3056 -- Protected_Present (Flag6)
3057 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3058 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3060 -- N_Access_Procedure_Definition
3061 -- Sloc points to ACCESS
3062 -- Null_Exclusion_Present (Flag11)
3063 -- Protected_Present (Flag6)
3064 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3066 -----------------------------
3067 -- 3.10 Access Definition --
3068 -----------------------------
3070 -- ACCESS_DEFINITION ::=
3071 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3072 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3074 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3076 -- N_Access_Definition
3077 -- Sloc points to ACCESS
3078 -- Null_Exclusion_Present (Flag11)
3079 -- All_Present (Flag15)
3080 -- Constant_Present (Flag17)
3081 -- Subtype_Mark (Node4)
3082 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3084 -----------------------------------------
3085 -- 3.10.1 Incomplete Type Declaration --
3086 -----------------------------------------
3088 -- INCOMPLETE_TYPE_DECLARATION ::=
3089 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3091 -- N_Incomplete_Type_Declaration
3092 -- Sloc points to TYPE
3093 -- Defining_Identifier (Node1)
3094 -- Discriminant_Specifications (List4) (set to No_List if no
3095 -- discriminant part, or if the discriminant part is an
3096 -- unknown discriminant part)
3097 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3098 -- Tagged_Present (Flag15)
3100 ----------------------------
3101 -- 3.11 Declarative Part --
3102 ----------------------------
3104 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3106 -- Note: although the parser enforces the syntactic requirement that
3107 -- a declarative part can contain only declarations, the semantic
3108 -- processing may add statements to the list of actions in a
3109 -- declarative part, so the code generator should be prepared
3110 -- to accept a statement in this position.
3112 ----------------------------
3113 -- 3.11 Declarative Item --
3114 ----------------------------
3116 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3118 ----------------------------------
3119 -- 3.11 Basic Declarative Item --
3120 ----------------------------------
3122 -- BASIC_DECLARATIVE_ITEM ::=
3123 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3129 -- BODY ::= PROPER_BODY | BODY_STUB
3131 -----------------------
3132 -- 3.11 Proper Body --
3133 -----------------------
3136 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3143 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3144 -- | INDEXED_COMPONENT | SLICE
3145 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3146 -- | TYPE_CONVERSION | FUNCTION_CALL
3147 -- | CHARACTER_LITERAL
3149 ----------------------
3150 -- 4.1 Direct Name --
3151 ----------------------
3153 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3159 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3161 -------------------------------
3162 -- 4.1 Explicit Dereference --
3163 -------------------------------
3165 -- EXPLICIT_DEREFERENCE ::= NAME . all
3167 -- N_Explicit_Dereference
3168 -- Sloc points to ALL
3170 -- Actual_Designated_Subtype (Node4-Sem)
3171 -- plus fields for expression
3173 -------------------------------
3174 -- 4.1 Implicit Dereference --
3175 -------------------------------
3177 -- IMPLICIT_DEREFERENCE ::= NAME
3179 ------------------------------
3180 -- 4.1.1 Indexed Component --
3181 ------------------------------
3183 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3185 -- Note: the parser may generate this node in some situations where it
3186 -- should be a function call. The semantic pass must correct this
3187 -- misidentification (which is inevitable at the parser level).
3189 -- N_Indexed_Component
3190 -- Sloc contains a copy of the Sloc value of the Prefix
3192 -- Expressions (List1)
3193 -- plus fields for expression
3195 -- Note: if any of the subscripts requires a range check, then the
3196 -- Do_Range_Check flag is set on the corresponding expression, with
3197 -- the index type being determined from the type of the Prefix, which
3198 -- references the array being indexed.
3200 -- Note: in a fully analyzed and expanded indexed component node, and
3201 -- hence in any such node that gigi sees, if the prefix is an access
3202 -- type, then an explicit dereference operation has been inserted.
3208 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3210 -- Note: an implicit subtype is created to describe the resulting
3211 -- type, so that the bounds of this type are the bounds of the slice.
3214 -- Sloc points to first token of prefix
3216 -- Discrete_Range (Node4)
3217 -- plus fields for expression
3219 -------------------------------
3220 -- 4.1.3 Selected Component --
3221 -------------------------------
3223 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3225 -- Note: selected components that are semantically expanded names get
3226 -- changed during semantic processing into the separate N_Expanded_Name
3227 -- node. See description of this node in the section on semantic nodes.
3229 -- N_Selected_Component
3230 -- Sloc points to period
3232 -- Selector_Name (Node2)
3233 -- Associated_Node (Node4-Sem)
3234 -- Do_Discriminant_Check (Flag13-Sem)
3235 -- Is_In_Discriminant_Check (Flag11-Sem)
3236 -- plus fields for expression
3238 --------------------------
3239 -- 4.1.3 Selector Name --
3240 --------------------------
3242 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3244 --------------------------------
3245 -- 4.1.4 Attribute Reference --
3246 --------------------------------
3248 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3250 -- Note: the syntax is quite ambiguous at this point. Consider:
3252 -- A'Length (X) X is part of the attribute designator
3253 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3254 -- A'Class (X) X is the expression of a type conversion
3256 -- It would be possible for the parser to distinguish these cases
3257 -- by looking at the attribute identifier. However, that would mean
3258 -- more work in introducing new implementation defined attributes,
3259 -- and also it would mean that special processing for attributes
3260 -- would be scattered around, instead of being centralized in the
3261 -- semantic routine that handles an N_Attribute_Reference node.
3262 -- Consequently, the parser in all the above cases stores the
3263 -- expression (X in these examples) as a single element list in
3264 -- in the Expressions field of the N_Attribute_Reference node.
3266 -- Similarly, for attributes like Max which take two arguments,
3267 -- we store the two arguments as a two element list in the
3268 -- Expressions field. Of course it is clear at parse time that
3269 -- this case is really a function call with an attribute as the
3270 -- prefix, but it turns out to be convenient to handle the two
3271 -- argument case in a similar manner to the one argument case,
3272 -- and indeed in general the parser will accept any number of
3273 -- expressions in this position and store them as a list in the
3274 -- attribute reference node. This allows for future addition of
3275 -- attributes that take more than two arguments.
3277 -- Note: named associates are not permitted in function calls where
3278 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3279 -- to skip the normal subprogram argument processing.
3281 -- Note: for the attributes whose designators are technically keywords,
3282 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3283 -- the corresponding name, even though no identifier is involved.
3285 -- Note: the generated code may contain stream attributes applied to
3286 -- limited types for which no stream routines exist officially. In such
3287 -- case, the result is to use the stream attribute for the underlying
3288 -- full type, or in the case of a protected type, the components
3289 -- (including any discriminants) are merely streamed in order.
3291 -- See Exp_Attr for a complete description of which attributes are
3292 -- passed onto Gigi, and which are handled entirely by the front end.
3294 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3295 -- a non-standard enumeration type or a nonzero/zero semantics
3296 -- boolean type, so the value is simply the stored representation.
3298 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3299 -- references a subprogram that is a renaming, then the front end must
3300 -- rewrite the attribute to refer directly to the renamed entity.
3302 -- Note: In generated code, the Address and Unrestricted_Access
3303 -- attributes can be applied to any expression, and the meaning is
3304 -- to create an object containing the value (the object is in the
3305 -- current stack frame), and pass the address of this value. If the
3306 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3307 -- is taken must be on a byte (storage unit) boundary, and if it is
3308 -- not (or may not be), then the generated code must create a copy
3309 -- that is byte aligned, and pass the address of this copy.
3311 -- N_Attribute_Reference
3312 -- Sloc points to apostrophe
3314 -- Attribute_Name (Name2) identifier name from attribute designator
3315 -- Expressions (List1) (set to No_List if no associated expressions)
3316 -- Entity (Node4-Sem) used if the attribute yields a type
3317 -- Associated_Node (Node4-Sem)
3318 -- Do_Overflow_Check (Flag17-Sem)
3319 -- Redundant_Use (Flag13-Sem)
3320 -- Must_Be_Byte_Aligned (Flag14)
3321 -- plus fields for expression
3323 ---------------------------------
3324 -- 4.1.4 Attribute Designator --
3325 ---------------------------------
3327 -- ATTRIBUTE_DESIGNATOR ::=
3328 -- IDENTIFIER [(static_EXPRESSION)]
3329 -- | access | delta | digits
3331 -- There is no explicit node in the tree for an attribute designator.
3332 -- Instead the Attribute_Name and Expressions fields of the parent
3333 -- node (N_Attribute_Reference node) hold the information.
3335 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3336 -- designator, then they are treated as identifiers internally
3337 -- rather than the keywords of the same name.
3339 --------------------------------------
3340 -- 4.1.4 Range Attribute Reference --
3341 --------------------------------------
3343 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3345 -- A range attribute reference is represented in the tree using the
3346 -- normal N_Attribute_Reference node.
3348 ---------------------------------------
3349 -- 4.1.4 Range Attribute Designator --
3350 ---------------------------------------
3352 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3354 -- A range attribute designator is represented in the tree using the
3355 -- normal N_Attribute_Reference node.
3357 --------------------
3359 --------------------
3362 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3364 -----------------------------
3365 -- 4.3.1 Record Aggregate --
3366 -----------------------------
3368 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3371 -- Sloc points to left parenthesis
3372 -- Expressions (List1) (set to No_List if none or null record case)
3373 -- Component_Associations (List2) (set to No_List if none)
3374 -- Null_Record_Present (Flag17)
3375 -- Aggregate_Bounds (Node3-Sem)
3376 -- Associated_Node (Node4-Sem)
3377 -- Static_Processing_OK (Flag4-Sem)
3378 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3379 -- Expansion_Delayed (Flag11-Sem)
3380 -- Has_Self_Reference (Flag13-Sem)
3381 -- plus fields for expression
3383 -- Note: this structure is used for both record and array aggregates
3384 -- since the two cases are not separable by the parser. The parser
3385 -- makes no attempt to enforce consistency here, so it is up to the
3386 -- semantic phase to make sure that the aggregate is consistent (i.e.
3387 -- that it is not a "half-and-half" case that mixes record and array
3388 -- syntax. In particular, for a record aggregate, the expressions
3389 -- field will be set if there are positional associations.
3391 -- Note: N_Aggregate is not used for all aggregates; in particular,
3392 -- there is a separate node kind for extension aggregates.
3394 -- Note: gigi/gcc can handle array aggregates correctly providing that
3395 -- they are entirely positional, and the array subtype involved has a
3396 -- known at compile time length and is not bit packed, or a convention
3397 -- Fortran array with more than one dimension. If these conditions
3398 -- are not met, then the front end must translate the aggregate into
3399 -- an appropriate set of assignments into a temporary.
3401 -- Note: for the record aggregate case, gigi/gcc can handle all cases of
3402 -- record aggregates, including those for packed, and rep-claused
3403 -- records, and also variant records, providing that there are no
3404 -- variable length fields whose size is not known at compile time, and
3405 -- providing that the aggregate is presented in fully named form.
3407 ----------------------------------------------
3408 -- 4.3.1 Record Component Association List --
3409 ----------------------------------------------
3411 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3412 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3415 -- There is no explicit node in the tree for a record component
3416 -- association list. Instead the Null_Record_Present flag is set in
3417 -- the parent node for the NULL RECORD case.
3419 ------------------------------------------------------
3420 -- 4.3.1 Record Component Association (also 4.3.3) --
3421 ------------------------------------------------------
3423 -- RECORD_COMPONENT_ASSOCIATION ::=
3424 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3426 -- N_Component_Association
3427 -- Sloc points to first selector name
3429 -- Loop_Actions (List2-Sem)
3430 -- Expression (Node3)
3431 -- Box_Present (Flag15)
3432 -- Inherited_Discriminant (Flag13)
3434 -- Note: this structure is used for both record component associations
3435 -- and array component associations, since the two cases aren't always
3436 -- separable by the parser. The choices list may represent either a
3437 -- list of selector names in the record aggregate case, or a list of
3438 -- discrete choices in the array aggregate case or an N_Others_Choice
3439 -- node (which appears as a singleton list). Box_Present gives support
3440 -- to Ada 2005 (AI-287).
3442 ----------------------------------
3443 -- 4.3.1 Component Choice List --
3444 ----------------------------------
3446 -- COMPONENT_CHOICE_LIST ::=
3447 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3450 -- The entries of a component choice list appear in the Choices list of
3451 -- the associated N_Component_Association, as either selector names, or
3452 -- as an N_Others_Choice node.
3454 --------------------------------
3455 -- 4.3.2 Extension Aggregate --
3456 --------------------------------
3458 -- EXTENSION_AGGREGATE ::=
3459 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3461 -- Note: extension aggregates are not permitted in Ada 83 mode
3463 -- N_Extension_Aggregate
3464 -- Sloc points to left parenthesis
3465 -- Ancestor_Part (Node3)
3466 -- Associated_Node (Node4-Sem)
3467 -- Expressions (List1) (set to No_List if none or null record case)
3468 -- Component_Associations (List2) (set to No_List if none)
3469 -- Null_Record_Present (Flag17)
3470 -- Expansion_Delayed (Flag11-Sem)
3471 -- Has_Self_Reference (Flag13-Sem)
3472 -- plus fields for expression
3474 --------------------------
3475 -- 4.3.2 Ancestor Part --
3476 --------------------------
3478 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3480 ----------------------------
3481 -- 4.3.3 Array Aggregate --
3482 ----------------------------
3484 -- ARRAY_AGGREGATE ::=
3485 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3487 ---------------------------------------
3488 -- 4.3.3 Positional Array Aggregate --
3489 ---------------------------------------
3491 -- POSITIONAL_ARRAY_AGGREGATE ::=
3492 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3493 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3495 -- See Record_Aggregate (4.3.1) for node structure
3497 ----------------------------------
3498 -- 4.3.3 Named Array Aggregate --
3499 ----------------------------------
3501 -- NAMED_ARRAY_AGGREGATE ::=
3502 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3504 -- See Record_Aggregate (4.3.1) for node structure
3506 ----------------------------------------
3507 -- 4.3.3 Array Component Association --
3508 ----------------------------------------
3510 -- ARRAY_COMPONENT_ASSOCIATION ::=
3511 -- DISCRETE_CHOICE_LIST => EXPRESSION
3513 -- See Record_Component_Association (4.3.1) for node structure
3515 --------------------------------------------------
3516 -- 4.4 Expression/Relation/Term/Factor/Primary --
3517 --------------------------------------------------
3520 -- RELATION {LOGICAL_OPERATOR RELATION}
3522 -- CHOICE_EXPRESSION ::=
3523 -- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
3525 -- CHOICE_RELATION ::=
3526 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3529 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
3531 -- MEMBERSHIP_CHOICE_LIST ::=
3532 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
3534 -- MEMBERSHIP_CHOICE ::=
3535 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
3537 -- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
3539 -- SIMPLE_EXPRESSION ::=
3540 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3542 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3544 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3546 -- No nodes are generated for any of these constructs. Instead, the
3547 -- node for the operator appears directly. When we refer to an
3548 -- expression in this description, we mean any of the possible
3549 -- constituent components of an expression (e.g. identifier is
3550 -- an example of an expression).
3552 -- Note: the above syntax is that Ada 2012 syntax which restricts
3553 -- choice relations to simple expressions to avoid ambiguities in
3554 -- some contexts with set membership notation. It has been decided
3555 -- that in retrospect, the Ada 95 change allowing general expressions
3556 -- in this context was a mistake, so we have reverted to the above
3557 -- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
3558 -- expressions was there in Ada 83 from the start).
3565 -- NUMERIC_LITERAL | null
3566 -- | STRING_LITERAL | AGGREGATE
3567 -- | NAME | QUALIFIED_EXPRESSION
3568 -- | ALLOCATOR | (EXPRESSION)
3570 -- Usually there is no explicit node in the tree for primary. Instead
3571 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3572 -- exceptions. First, there is an explicit node for a null primary.
3575 -- Sloc points to NULL
3576 -- plus fields for expression
3578 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3579 -- that the parser keep track of which subexpressions are enclosed
3580 -- in parentheses, and how many levels of parentheses are used. This
3581 -- information is required for optimization purposes, and also for
3582 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3583 -- conform with ((((1)))) in the body).
3585 -- The parentheses are recorded by keeping a Paren_Count field in every
3586 -- subexpression node (it is actually present in all nodes, but only
3587 -- used in subexpression nodes). This count records the number of
3588 -- levels of parentheses. If the number of levels in the source exceeds
3589 -- the maximum accommodated by this count, then the count is simply left
3590 -- at the maximum value. This means that there are some pathological
3591 -- cases of failure to detect conformance failures (e.g. an expression
3592 -- with 500 levels of parens will conform with one with 501 levels),
3593 -- but we do not need to lose sleep over this.
3595 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3596 -- type N_Parenthesized_Expression used to accurately record unlimited
3597 -- numbers of levels of parentheses. However, it turned out to be a
3598 -- real nuisance to have to take into account the possible presence of
3599 -- this node during semantic analysis, since basically parentheses have
3600 -- zero relevance to semantic analysis.
3602 -- Note: the level of parentheses always present in things like
3603 -- aggregates does not count, only the parentheses in the primary
3604 -- (EXPRESSION) affect the setting of the Paren_Count field.
3606 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
3607 -- treated as though it were Empty) if No_Initialization is set True.
3609 --------------------------------------
3610 -- 4.5 Short Circuit Control Forms --
3611 --------------------------------------
3614 -- RELATION {and then RELATION} | RELATION {or else RELATION}
3616 -- Gigi restriction: For both these control forms, the operand and
3617 -- result types are always Standard.Boolean. The expander inserts the
3618 -- required conversion operations where needed to ensure this is the
3622 -- Sloc points to AND of AND THEN
3623 -- Left_Opnd (Node2)
3624 -- Right_Opnd (Node3)
3625 -- Actions (List1-Sem)
3626 -- plus fields for expression
3629 -- Sloc points to OR of OR ELSE
3630 -- Left_Opnd (Node2)
3631 -- Right_Opnd (Node3)
3632 -- Actions (List1-Sem)
3633 -- plus fields for expression
3635 -- Note: The Actions field is used to hold actions associated with
3636 -- the right hand operand. These have to be treated specially since
3637 -- they are not unconditionally executed. See Insert_Actions for a
3638 -- more detailed description of how these actions are handled.
3640 ---------------------------
3641 -- 4.5 Membership Tests --
3642 ---------------------------
3645 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
3647 -- MEMBERSHIP_CHOICE_LIST ::=
3648 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
3650 -- MEMBERSHIP_CHOICE ::=
3651 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
3653 -- Note: although the grammar above allows only a range or a subtype
3654 -- mark, the parser in fact will accept any simple expression in place
3655 -- of a subtype mark. This means that the semantic analyzer must be able
3656 -- to deal with, and diagnose a simple expression other than a name for
3657 -- the right operand. This simplifies error recovery in the parser.
3659 -- The Alternatives field below is present only if there is more
3660 -- than one Membership_Choice present (which is legitimate only in
3661 -- Ada 2012 mode) in which case Right_Opnd is Empty, and Alternatives
3662 -- contains the list of choices. In the tree passed to the back end,
3663 -- Alternatives is always No_List, and Right_Opnd is set (i.e. the
3664 -- expansion circuitry expands out the complex set membership case
3665 -- using simple membership operations).
3667 -- Should we rename Alternatives here to Membership_Choices ???
3670 -- Sloc points to IN
3671 -- Left_Opnd (Node2)
3672 -- Right_Opnd (Node3)
3673 -- Alternatives (List4) (set to No_List if only one set alternative)
3674 -- plus fields for expression
3677 -- Sloc points to NOT of NOT IN
3678 -- Left_Opnd (Node2)
3679 -- Right_Opnd (Node3)
3680 -- Alternatives (List4) (set to No_List if only one set alternative)
3681 -- plus fields for expression
3683 --------------------
3685 --------------------
3687 -- LOGICAL_OPERATOR ::= and | or | xor
3689 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
3691 -- BINARY_ADDING_OPERATOR ::= + | - | &
3693 -- UNARY_ADDING_OPERATOR ::= + | -
3695 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
3697 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
3699 -- Sprint syntax if Treat_Fixed_As_Integer is set:
3706 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
3707 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
3708 -- All handling of smalls for multiplication and division is handled
3709 -- by the front end (mod and rem result only from expansion). Gigi
3710 -- thus never needs to worry about small values (for other operators
3711 -- operating on fixed-point, e.g. addition, the small value does not
3712 -- have any semantic effect anyway, these are always integer operations.
3714 -- Gigi restriction: For all operators taking Boolean operands, the
3715 -- type is always Standard.Boolean. The expander inserts the required
3716 -- conversion operations where needed to ensure this is the case.
3719 -- Sloc points to AND
3720 -- Do_Length_Check (Flag4-Sem)
3721 -- plus fields for binary operator
3722 -- plus fields for expression
3725 -- Sloc points to OR
3726 -- Do_Length_Check (Flag4-Sem)
3727 -- plus fields for binary operator
3728 -- plus fields for expression
3731 -- Sloc points to XOR
3732 -- Do_Length_Check (Flag4-Sem)
3733 -- plus fields for binary operator
3734 -- plus fields for expression
3738 -- plus fields for binary operator
3739 -- plus fields for expression
3742 -- Sloc points to /=
3743 -- plus fields for binary operator
3744 -- plus fields for expression
3748 -- plus fields for binary operator
3749 -- plus fields for expression
3752 -- Sloc points to <=
3753 -- plus fields for binary operator
3754 -- plus fields for expression
3758 -- plus fields for binary operator
3759 -- plus fields for expression
3762 -- Sloc points to >=
3763 -- plus fields for binary operator
3764 -- plus fields for expression
3767 -- Sloc points to + (binary)
3768 -- plus fields for binary operator
3769 -- plus fields for expression
3772 -- Sloc points to - (binary)
3773 -- plus fields for binary operator
3774 -- plus fields for expression
3778 -- Is_Component_Left_Opnd (Flag13-Sem)
3779 -- Is_Component_Right_Opnd (Flag14-Sem)
3780 -- plus fields for binary operator
3781 -- plus fields for expression
3785 -- Treat_Fixed_As_Integer (Flag14-Sem)
3786 -- Rounded_Result (Flag18-Sem)
3787 -- plus fields for binary operator
3788 -- plus fields for expression
3792 -- Treat_Fixed_As_Integer (Flag14-Sem)
3793 -- Do_Division_Check (Flag13-Sem)
3794 -- Rounded_Result (Flag18-Sem)
3795 -- plus fields for binary operator
3796 -- plus fields for expression
3799 -- Sloc points to MOD
3800 -- Treat_Fixed_As_Integer (Flag14-Sem)
3801 -- Do_Division_Check (Flag13-Sem)
3802 -- plus fields for binary operator
3803 -- plus fields for expression
3806 -- Sloc points to REM
3807 -- Treat_Fixed_As_Integer (Flag14-Sem)
3808 -- Do_Division_Check (Flag13-Sem)
3809 -- plus fields for binary operator
3810 -- plus fields for expression
3813 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
3814 -- Sloc points to **
3815 -- plus fields for binary operator
3816 -- plus fields for expression
3819 -- Sloc points to + (unary)
3820 -- plus fields for unary operator
3821 -- plus fields for expression
3824 -- Sloc points to - (unary)
3825 -- plus fields for unary operator
3826 -- plus fields for expression
3829 -- Sloc points to ABS
3830 -- plus fields for unary operator
3831 -- plus fields for expression
3834 -- Sloc points to NOT
3835 -- plus fields for unary operator
3836 -- plus fields for expression
3838 -- See also shift operators in section B.2
3840 -- Note on fixed-point operations passed to Gigi: For adding operators,
3841 -- the semantics is to treat these simply as integer operations, with
3842 -- the small values being ignored (the bounds are already stored in
3843 -- units of small, so that constraint checking works as usual). For the
3844 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
3845 -- point operands if the Treat_Fixed_As_Integer flag is set and will
3846 -- thus treat these nodes in identical manner, ignoring small values.
3848 ---------------------------------
3849 -- 4.5.9 Quantified Expression --
3850 ---------------------------------
3852 -- QUANTIFIED_EXPRESSION ::=
3853 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
3854 -- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
3856 -- QUANTIFIER ::= all | some
3858 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
3859 -- is present at a time, in which case the other one is empty.
3861 -- N_Quantified_Expression
3862 -- Sloc points to FOR
3863 -- Iterator_Specification (Node2)
3864 -- Loop_Parameter_Specification (Node4)
3865 -- Condition (Node1)
3866 -- All_Present (Flag15)
3868 --------------------------
3869 -- 4.6 Type Conversion --
3870 --------------------------
3872 -- TYPE_CONVERSION ::=
3873 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
3875 -- In the (NAME) case, the name is stored as the expression
3877 -- Note: the parser never generates a type conversion node, since it
3878 -- looks like an indexed component which is generated by preference.
3879 -- The semantic pass must correct this misidentification.
3881 -- Gigi handles conversions that involve no change in the root type,
3882 -- and also all conversions from integer to floating-point types.
3883 -- Conversions from floating-point to integer are only handled in
3884 -- the case where Float_Truncate flag set. Other conversions from
3885 -- floating-point to integer (involving rounding) and all conversions
3886 -- involving fixed-point types are handled by the expander.
3888 -- Sprint syntax if Float_Truncate set: X^(Y)
3889 -- Sprint syntax if Conversion_OK set X?(Y)
3890 -- Sprint syntax if both flags set X?^(Y)
3892 -- Note: If either the operand or result type is fixed-point, Gigi will
3893 -- only see a type conversion node with Conversion_OK set. The front end
3894 -- takes care of all handling of small's for fixed-point conversions.
3896 -- N_Type_Conversion
3897 -- Sloc points to first token of subtype mark
3898 -- Subtype_Mark (Node4)
3899 -- Expression (Node3)
3900 -- Do_Tag_Check (Flag13-Sem)
3901 -- Do_Length_Check (Flag4-Sem)
3902 -- Do_Overflow_Check (Flag17-Sem)
3903 -- Float_Truncate (Flag11-Sem)
3904 -- Rounded_Result (Flag18-Sem)
3905 -- Conversion_OK (Flag14-Sem)
3906 -- plus fields for expression
3908 -- Note: if a range check is required, then the Do_Range_Check flag
3909 -- is set in the Expression with the check being done against the
3910 -- target type range (after the base type conversion, if any).
3912 -------------------------------
3913 -- 4.7 Qualified Expression --
3914 -------------------------------
3916 -- QUALIFIED_EXPRESSION ::=
3917 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
3919 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
3920 -- the expression, so the Expression field of this node always points
3921 -- to a parenthesized expression in this case (i.e. Paren_Count will
3922 -- always be non-zero for the referenced expression if it is not an
3925 -- N_Qualified_Expression
3926 -- Sloc points to apostrophe
3927 -- Subtype_Mark (Node4)
3928 -- Expression (Node3) expression or aggregate
3929 -- plus fields for expression
3931 --------------------
3933 --------------------
3936 -- new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
3937 -- | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
3939 -- SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
3941 -- Sprint syntax (when storage pool present)
3942 -- new xxx (storage_pool = pool)
3944 -- new (subpool) xxx (storage_pool = pool)
3947 -- Sloc points to NEW
3948 -- Expression (Node3) subtype indication or qualified expression
3949 -- Subpool_Handle_Name (Node4) (set to Empty if not present)
3950 -- Storage_Pool (Node1-Sem)
3951 -- Procedure_To_Call (Node2-Sem)
3952 -- Null_Exclusion_Present (Flag11)
3953 -- No_Initialization (Flag13-Sem)
3954 -- Is_Static_Coextension (Flag14-Sem)
3955 -- Do_Storage_Check (Flag17-Sem)
3956 -- Is_Dynamic_Coextension (Flag18-Sem)
3957 -- plus fields for expression
3959 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
3960 -- This flag has a special function in conjunction with the restriction
3961 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
3962 -- is not set. This means that if a source allocator is replaced with
3963 -- a constructed allocator, the Comes_From_Source flag should be copied
3964 -- to the newly created allocator.
3966 ---------------------------------
3967 -- 5.1 Sequence Of Statements --
3968 ---------------------------------
3970 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
3972 -- Note: Although the parser will not accept a declaration as a
3973 -- statement, the semantic analyzer may insert declarations (e.g.
3974 -- declarations of implicit types needed for execution of other
3975 -- statements) into a sequence of statements, so the code generator
3976 -- should be prepared to accept a declaration where a statement is
3977 -- expected. Note also that pragmas can appear as statements.
3979 --------------------
3981 --------------------
3984 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
3986 -- There is no explicit node in the tree for a statement. Instead, the
3987 -- individual statement appears directly. Labels are treated as a
3988 -- kind of statement, i.e. they are linked into a statement list at
3989 -- the point they appear, so the labeled statement appears following
3990 -- the label or labels in the statement list.
3992 ---------------------------
3993 -- 5.1 Simple Statement --
3994 ---------------------------
3996 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
3997 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
3998 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
3999 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
4000 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
4001 -- | ABORT_STATEMENT | RAISE_STATEMENT
4004 -----------------------------
4005 -- 5.1 Compound Statement --
4006 -----------------------------
4008 -- COMPOUND_STATEMENT ::=
4009 -- IF_STATEMENT | CASE_STATEMENT
4010 -- | LOOP_STATEMENT | BLOCK_STATEMENT
4011 -- | EXTENDED_RETURN_STATEMENT
4012 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
4014 -------------------------
4015 -- 5.1 Null Statement --
4016 -------------------------
4018 -- NULL_STATEMENT ::= null;
4021 -- Sloc points to NULL
4027 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4029 -- Note that the occurrence of a label is not a defining identifier,
4030 -- but rather a referencing occurrence. The defining occurrence is
4031 -- in the implicit label declaration which occurs in the innermost
4035 -- Sloc points to <<
4036 -- Identifier (Node1) direct name of statement identifier
4037 -- Exception_Junk (Flag8-Sem)
4039 -- Note: Before Ada 2012, a label is always followed by a statement,
4040 -- and this is true in the tree even in Ada 2012 mode (the parser
4041 -- inserts a null statement marked with Comes_From_Source False).
4043 -------------------------------
4044 -- 5.1 Statement Identifier --
4045 -------------------------------
4047 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
4049 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4050 -- (not an OPERATOR_SYMBOL)
4052 -------------------------------
4053 -- 5.2 Assignment Statement --
4054 -------------------------------
4056 -- ASSIGNMENT_STATEMENT ::=
4057 -- variable_NAME := EXPRESSION;
4059 -- N_Assignment_Statement
4060 -- Sloc points to :=
4062 -- Expression (Node3)
4063 -- Do_Tag_Check (Flag13-Sem)
4064 -- Do_Length_Check (Flag4-Sem)
4065 -- Forwards_OK (Flag5-Sem)
4066 -- Backwards_OK (Flag6-Sem)
4067 -- No_Ctrl_Actions (Flag7-Sem)
4068 -- Componentwise_Assignment (Flag14-Sem)
4069 -- Suppress_Assignment_Checks (Flag18-Sem)
4071 -- Note: if a range check is required, then the Do_Range_Check flag
4072 -- is set in the Expression (right hand side), with the check being
4073 -- done against the type of the Name (left hand side).
4075 -- Note: the back end places some restrictions on the form of the
4076 -- Expression field. If the object being assigned to is Atomic, then
4077 -- the Expression may not have the form of an aggregate (since this
4078 -- might cause the back end to generate separate assignments). In this
4079 -- case the front end must generate an extra temporary and initialize
4080 -- this temporary as required (the temporary itself is not atomic).
4082 -----------------------
4083 -- 5.3 If Statement --
4084 -----------------------
4087 -- if CONDITION then
4088 -- SEQUENCE_OF_STATEMENTS
4089 -- {elsif CONDITION then
4090 -- SEQUENCE_OF_STATEMENTS}
4092 -- SEQUENCE_OF_STATEMENTS]
4095 -- Gigi restriction: This expander ensures that the type of the
4096 -- Condition fields is always Standard.Boolean, even if the type
4097 -- in the source is some non-standard boolean type.
4100 -- Sloc points to IF
4101 -- Condition (Node1)
4102 -- Then_Statements (List2)
4103 -- Elsif_Parts (List3) (set to No_List if none present)
4104 -- Else_Statements (List4) (set to No_List if no else part present)
4105 -- End_Span (Uint5) (set to No_Uint if expander generated)
4108 -- Sloc points to ELSIF
4109 -- Condition (Node1)
4110 -- Then_Statements (List2)
4111 -- Condition_Actions (List3-Sem)
4113 --------------------
4115 --------------------
4117 -- CONDITION ::= boolean_EXPRESSION
4119 -------------------------
4120 -- 5.4 Case Statement --
4121 -------------------------
4123 -- CASE_STATEMENT ::=
4124 -- case EXPRESSION is
4125 -- CASE_STATEMENT_ALTERNATIVE
4126 -- {CASE_STATEMENT_ALTERNATIVE}
4129 -- Note: the Alternatives can contain pragmas. These only occur at
4130 -- the start of the list, since any pragmas occurring after the first
4131 -- alternative are absorbed into the corresponding statement sequence.
4134 -- Sloc points to CASE
4135 -- Expression (Node3)
4136 -- Alternatives (List4)
4137 -- End_Span (Uint5) (set to No_Uint if expander generated)
4139 -- Note: Before Ada 2012, a pragma in a statement sequence is always
4140 -- followed by a statement, and this is true in the tree even in Ada
4141 -- 2012 mode (the parser inserts a null statement marked with the flag
4142 -- Comes_From_Source False).
4144 -------------------------------------
4145 -- 5.4 Case Statement Alternative --
4146 -------------------------------------
4148 -- CASE_STATEMENT_ALTERNATIVE ::=
4149 -- when DISCRETE_CHOICE_LIST =>
4150 -- SEQUENCE_OF_STATEMENTS
4152 -- N_Case_Statement_Alternative
4153 -- Sloc points to WHEN
4154 -- Discrete_Choices (List4)
4155 -- Statements (List3)
4157 -------------------------
4158 -- 5.5 Loop Statement --
4159 -------------------------
4161 -- LOOP_STATEMENT ::=
4162 -- [loop_STATEMENT_IDENTIFIER :]
4163 -- [ITERATION_SCHEME] loop
4164 -- SEQUENCE_OF_STATEMENTS
4165 -- end loop [loop_IDENTIFIER];
4167 -- Note: The occurrence of a loop label is not a defining identifier
4168 -- but rather a referencing occurrence. The defining occurrence is in
4169 -- the implicit label declaration which occurs in the innermost
4172 -- Note: there is always a loop statement identifier present in
4173 -- the tree, even if none was given in the source. In the case where
4174 -- no loop identifier is given in the source, the parser creates
4175 -- a name of the form _Loop_n, where n is a decimal integer (the
4176 -- two underlines ensure that the loop names created in this manner
4177 -- do not conflict with any user defined identifiers), and the flag
4178 -- Has_Created_Identifier is set to True. The only exception to the
4179 -- rule that all loop statement nodes have identifiers occurs for
4180 -- loops constructed by the expander, and the semantic analyzer will
4181 -- create and supply dummy loop identifiers in these cases.
4184 -- Sloc points to LOOP
4185 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4186 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4187 -- Statements (List3)
4188 -- End_Label (Node4)
4189 -- Has_Created_Identifier (Flag15)
4190 -- Is_Null_Loop (Flag16)
4191 -- Suppress_Loop_Warnings (Flag17)
4193 -- Note: the parser fills in the Identifier field if there is an
4194 -- explicit loop identifier. Otherwise the parser leaves this field
4195 -- set to Empty, and then the semantic processing for a loop statement
4196 -- creates an identifier, setting the Has_Created_Identifier flag to
4197 -- True. So after semantic analysis, the Identifier is always set,
4198 -- referencing an identifier whose entity has an Ekind of E_Loop.
4200 ---------------------------
4201 -- 5.5 Iteration Scheme --
4202 ---------------------------
4204 -- ITERATION_SCHEME ::=
4206 -- | for LOOP_PARAMETER_SPECIFICATION
4207 -- | for ITERATOR_SPECIFICATION
4209 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4210 -- is present at a time, in which case the other one is empty. Both are
4211 -- empty in the case of a WHILE loop.
4213 -- Gigi restriction: This expander ensures that the type of the
4214 -- Condition field is always Standard.Boolean, even if the type
4215 -- in the source is some non-standard boolean type.
4217 -- N_Iteration_Scheme
4218 -- Sloc points to WHILE or FOR
4219 -- Condition (Node1) (set to Empty if FOR case)
4220 -- Condition_Actions (List3-Sem)
4221 -- Iterator_Specification (Node2) (set to Empty if WHILE case)
4222 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4224 ---------------------------------------
4225 -- 5.5 Loop Parameter Specification --
4226 ---------------------------------------
4228 -- LOOP_PARAMETER_SPECIFICATION ::=
4229 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4231 -- N_Loop_Parameter_Specification
4232 -- Sloc points to first identifier
4233 -- Defining_Identifier (Node1)
4234 -- Reverse_Present (Flag15)
4235 -- Discrete_Subtype_Definition (Node4)
4237 -----------------------------------
4238 -- 5.5.1 Iterator Specification --
4239 -----------------------------------
4241 -- ITERATOR_SPECIFICATION ::=
4242 -- DEFINING_IDENTIFIER in [reverse] NAME
4243 -- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
4245 -- N_Iterator_Specification
4246 -- Sloc points to defining identifier
4247 -- Defining_Identifier (Node1)
4249 -- Reverse_Present (Flag15)
4250 -- Of_Present (Flag16)
4251 -- Subtype_Indication (Node5)
4253 -- Note: The Of_Present flag distinguishes the two forms
4255 --------------------------
4256 -- 5.6 Block Statement --
4257 --------------------------
4259 -- BLOCK_STATEMENT ::=
4260 -- [block_STATEMENT_IDENTIFIER:]
4262 -- DECLARATIVE_PART]
4264 -- HANDLED_SEQUENCE_OF_STATEMENTS
4265 -- end [block_IDENTIFIER];
4267 -- Note that the occurrence of a block identifier is not a defining
4268 -- identifier, but rather a referencing occurrence. The defining
4269 -- occurrence is an E_Block entity declared by the implicit label
4270 -- declaration which occurs in the innermost enclosing block statement
4271 -- or body; the block identifier denotes that E_Block.
4273 -- For block statements that come from source code, there is always a
4274 -- block statement identifier present in the tree, denoting an
4275 -- E_Block. In the case where no block identifier is given in the
4276 -- source, the parser creates a name of the form B_n, where n is a
4277 -- decimal integer, and the flag Has_Created_Identifier is set to
4278 -- True. Blocks constructed by the expander usually have no identifier,
4279 -- and no corresponding entity.
4281 -- Note: the block statement created for an extended return statement
4282 -- has an entity, and this entity is an E_Return_Statement, rather than
4283 -- the usual E_Block.
4285 -- Note: Exception_Junk is set for the wrapping blocks created during
4286 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4288 -- N_Block_Statement
4289 -- Sloc points to DECLARE or BEGIN
4290 -- Identifier (Node1) block direct name (set to Empty if not present)
4291 -- Declarations (List2) (set to No_List if no DECLARE part)
4292 -- Handled_Statement_Sequence (Node4)
4293 -- Is_Task_Master (Flag5-Sem)
4294 -- Activation_Chain_Entity (Node3-Sem)
4295 -- Has_Created_Identifier (Flag15)
4296 -- Is_Task_Allocation_Block (Flag6)
4297 -- Is_Asynchronous_Call_Block (Flag7)
4298 -- Exception_Junk (Flag8-Sem)
4300 -------------------------
4301 -- 5.7 Exit Statement --
4302 -------------------------
4304 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4306 -- Gigi restriction: This expander ensures that the type of the
4307 -- Condition field is always Standard.Boolean, even if the type
4308 -- in the source is some non-standard boolean type.
4311 -- Sloc points to EXIT
4312 -- Name (Node2) (set to Empty if no loop name present)
4313 -- Condition (Node1) (set to Empty if no WHEN part present)
4314 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
4316 -------------------------
4317 -- 5.9 Goto Statement --
4318 -------------------------
4320 -- GOTO_STATEMENT ::= goto label_NAME;
4323 -- Sloc points to GOTO
4325 -- Exception_Junk (Flag8-Sem)
4327 ---------------------------------
4328 -- 6.1 Subprogram Declaration --
4329 ---------------------------------
4331 -- SUBPROGRAM_DECLARATION ::=
4332 -- SUBPROGRAM_SPECIFICATION
4333 -- [ASPECT_SPECIFICATIONS];
4335 -- N_Subprogram_Declaration
4336 -- Sloc points to FUNCTION or PROCEDURE
4337 -- Specification (Node1)
4338 -- Body_To_Inline (Node3-Sem)
4339 -- Corresponding_Body (Node5-Sem)
4340 -- Parent_Spec (Node4-Sem)
4342 ------------------------------------------
4343 -- 6.1 Abstract Subprogram Declaration --
4344 ------------------------------------------
4346 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4347 -- SUBPROGRAM_SPECIFICATION is abstract
4348 -- [ASPECT_SPECIFICATIONS];
4350 -- N_Abstract_Subprogram_Declaration
4351 -- Sloc points to ABSTRACT
4352 -- Specification (Node1)
4354 -----------------------------------
4355 -- 6.1 Subprogram Specification --
4356 -----------------------------------
4358 -- SUBPROGRAM_SPECIFICATION ::=
4359 -- [[not] overriding]
4360 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4361 -- | [[not] overriding]
4362 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4364 -- Note: there are no separate nodes for the profiles, instead the
4365 -- information appears directly in the following nodes.
4367 -- N_Function_Specification
4368 -- Sloc points to FUNCTION
4369 -- Defining_Unit_Name (Node1) (the designator)
4370 -- Elaboration_Boolean (Node2-Sem)
4371 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4372 -- Null_Exclusion_Present (Flag11)
4373 -- Result_Definition (Node4) for result subtype
4374 -- Generic_Parent (Node5-Sem)
4375 -- Must_Override (Flag14) set if overriding indicator present
4376 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4378 -- N_Procedure_Specification
4379 -- Sloc points to PROCEDURE
4380 -- Defining_Unit_Name (Node1)
4381 -- Elaboration_Boolean (Node2-Sem)
4382 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4383 -- Generic_Parent (Node5-Sem)
4384 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4385 -- Must_Override (Flag14) set if overriding indicator present
4386 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4388 -- Note: overriding indicator is an Ada 2005 feature
4390 ---------------------
4391 -- 6.1 Designator --
4392 ---------------------
4395 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4397 -- Designators that are simply identifiers or operator symbols appear
4398 -- directly in the tree in this form. The following node is used only
4399 -- in the case where the designator has a parent unit name component.
4402 -- Sloc points to period
4403 -- Name (Node2) holds the parent unit name. Note that this is always
4404 -- non-Empty, since this node is only used for the case where a
4405 -- parent library unit package name is present.
4406 -- Identifier (Node1)
4408 -- Note that the identifier can also be an operator symbol here
4410 ------------------------------
4411 -- 6.1 Defining Designator --
4412 ------------------------------
4414 -- DEFINING_DESIGNATOR ::=
4415 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4417 -------------------------------------
4418 -- 6.1 Defining Program Unit Name --
4419 -------------------------------------
4421 -- DEFINING_PROGRAM_UNIT_NAME ::=
4422 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4424 -- The parent unit name is present only in the case of a child unit
4425 -- name (permissible only for Ada 95 for a library level unit, i.e.
4426 -- a unit at scope level one). If no such name is present, the defining
4427 -- program unit name is represented simply as the defining identifier.
4428 -- In the child unit case, the following node is used to represent the
4431 -- N_Defining_Program_Unit_Name
4432 -- Sloc points to period
4433 -- Name (Node2) holds the parent unit name. Note that this is always
4434 -- non-Empty, since this node is only used for the case where a
4435 -- parent unit name is present.
4436 -- Defining_Identifier (Node1)
4438 --------------------------
4439 -- 6.1 Operator Symbol --
4440 --------------------------
4442 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4444 -- Note: the fields of the N_Operator_Symbol node are laid out to
4445 -- match the corresponding fields of an N_Character_Literal node. This
4446 -- allows easy conversion of the operator symbol node into a character
4447 -- literal node in the case where a string constant of the form of an
4448 -- operator symbol is scanned out as such, but turns out semantically
4449 -- to be a string literal that is not an operator. For details see
4450 -- Sinfo.CN.Change_Operator_Symbol_To_String_Literal.
4452 -- N_Operator_Symbol
4453 -- Sloc points to literal
4454 -- Chars (Name1) contains the Name_Id for the operator symbol
4455 -- Strval (Str3) Id of string value. This is used if the operator
4456 -- symbol turns out to be a normal string after all.
4457 -- Entity (Node4-Sem)
4458 -- Associated_Node (Node4-Sem)
4459 -- Has_Private_View (Flag11-Sem) set in generic units.
4460 -- Etype (Node5-Sem)
4462 -- Note: the Strval field may be set to No_String for generated
4463 -- operator symbols that are known not to be string literals
4466 -----------------------------------
4467 -- 6.1 Defining Operator Symbol --
4468 -----------------------------------
4470 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4472 -- A defining operator symbol is an entity, which has additional
4473 -- fields depending on the setting of the Ekind field. These
4474 -- additional fields are defined (and access subprograms declared)
4475 -- in package Einfo.
4477 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4478 -- are deliberately layed out to match the layout of fields in an
4479 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4480 -- an operator symbol node into a defining operator symbol node.
4481 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
4482 -- for further details.
4484 -- N_Defining_Operator_Symbol
4485 -- Sloc points to literal
4486 -- Chars (Name1) contains the Name_Id for the operator symbol
4487 -- Next_Entity (Node2-Sem)
4488 -- Scope (Node3-Sem)
4489 -- Etype (Node5-Sem)
4491 ----------------------------
4492 -- 6.1 Parameter Profile --
4493 ----------------------------
4495 -- PARAMETER_PROFILE ::= [FORMAL_PART]
4497 ---------------------------------------
4498 -- 6.1 Parameter and Result Profile --
4499 ---------------------------------------
4501 -- PARAMETER_AND_RESULT_PROFILE ::=
4502 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
4503 -- | [FORMAL_PART] return ACCESS_DEFINITION
4505 -- There is no explicit node in the tree for a parameter and result
4506 -- profile. Instead the information appears directly in the parent.
4508 ----------------------
4509 -- 6.1 Formal Part --
4510 ----------------------
4513 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
4515 ----------------------------------
4516 -- 6.1 Parameter Specification --
4517 ----------------------------------
4519 -- PARAMETER_SPECIFICATION ::=
4520 -- DEFINING_IDENTIFIER_LIST : MODE [NULL_EXCLUSION] SUBTYPE_MARK
4521 -- [:= DEFAULT_EXPRESSION]
4522 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
4523 -- [:= DEFAULT_EXPRESSION]
4525 -- Although the syntax allows multiple identifiers in the list, the
4526 -- semantics is as though successive specifications were given with
4527 -- identical type definition and expression components. To simplify
4528 -- semantic processing, the parser represents a multiple declaration
4529 -- case as a sequence of single Specifications, using the More_Ids and
4530 -- Prev_Ids flags to preserve the original source form as described
4531 -- in the section on "Handling of Defining Identifier Lists".
4533 -- N_Parameter_Specification
4534 -- Sloc points to first identifier
4535 -- Defining_Identifier (Node1)
4536 -- In_Present (Flag15)
4537 -- Out_Present (Flag17)
4538 -- Null_Exclusion_Present (Flag11)
4539 -- Parameter_Type (Node2) subtype mark or access definition
4540 -- Expression (Node3) (set to Empty if no default expression present)
4541 -- Do_Accessibility_Check (Flag13-Sem)
4542 -- More_Ids (Flag5) (set to False if no more identifiers in list)
4543 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
4544 -- Default_Expression (Node5-Sem)
4550 -- MODE ::= [in] | in out | out
4552 -- There is no explicit node in the tree for the Mode. Instead the
4553 -- In_Present and Out_Present flags are set in the parent node to
4554 -- record the presence of keywords specifying the mode.
4556 --------------------------
4557 -- 6.3 Subprogram Body --
4558 --------------------------
4560 -- SUBPROGRAM_BODY ::=
4561 -- SUBPROGRAM_SPECIFICATION is
4564 -- HANDLED_SEQUENCE_OF_STATEMENTS
4565 -- end [DESIGNATOR];
4567 -- N_Subprogram_Body
4568 -- Sloc points to FUNCTION or PROCEDURE
4569 -- Specification (Node1)
4570 -- Declarations (List2)
4571 -- Handled_Statement_Sequence (Node4)
4572 -- Activation_Chain_Entity (Node3-Sem)
4573 -- Corresponding_Spec (Node5-Sem)
4574 -- Acts_As_Spec (Flag4-Sem)
4575 -- Bad_Is_Detected (Flag15) used only by parser
4576 -- Do_Storage_Check (Flag17-Sem)
4577 -- Has_Pragma_Priority (Flag6-Sem)
4578 -- Is_Protected_Subprogram_Body (Flag7-Sem)
4579 -- Is_Entry_Barrier_Function (Flag8-Sem)
4580 -- Is_Task_Master (Flag5-Sem)
4581 -- Was_Originally_Stub (Flag13-Sem)
4582 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
4583 -- Has_Pragma_CPU (Flag14-Sem)
4585 -------------------------
4586 -- Expression Function --
4587 -------------------------
4589 -- This is an Ada 2012 extension, we put it here for now, to be labeled
4590 -- and put in its proper section when we know exactly where that is!
4592 -- EXPRESSION_FUNCTION ::=
4593 -- FUNCTION SPECIFICATION IS (EXPRESSION);
4595 -- N_Expression_Function
4596 -- Sloc points to FUNCTION
4597 -- Specification (Node1)
4598 -- Expression (Node3)
4600 -----------------------------------
4601 -- 6.4 Procedure Call Statement --
4602 -----------------------------------
4604 -- PROCEDURE_CALL_STATEMENT ::=
4605 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
4607 -- Note: the reason that a procedure call has expression fields is
4608 -- that it semantically resembles an expression, e.g. overloading is
4609 -- allowed and a type is concocted for semantic processing purposes.
4610 -- Certain of these fields, such as Parens are not relevant, but it
4611 -- is easier to just supply all of them together!
4613 -- N_Procedure_Call_Statement
4614 -- Sloc points to first token of name or prefix
4615 -- Name (Node2) stores name or prefix
4616 -- Parameter_Associations (List3) (set to No_List if no
4617 -- actual parameter part)
4618 -- First_Named_Actual (Node4-Sem)
4619 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4620 -- Do_Tag_Check (Flag13-Sem)
4621 -- No_Elaboration_Check (Flag14-Sem)
4622 -- Parameter_List_Truncated (Flag17-Sem)
4623 -- ABE_Is_Certain (Flag18-Sem)
4624 -- plus fields for expression
4626 -- If any IN parameter requires a range check, then the corresponding
4627 -- argument expression has the Do_Range_Check flag set, and the range
4628 -- check is done against the formal type. Note that this argument
4629 -- expression may appear directly in the Parameter_Associations list,
4630 -- or may be a descendent of an N_Parameter_Association node that
4631 -- appears in this list.
4633 ------------------------
4634 -- 6.4 Function Call --
4635 ------------------------
4637 -- FUNCTION_CALL ::=
4638 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
4640 -- Note: the parser may generate an indexed component node or simply
4641 -- a name node instead of a function call node. The semantic pass must
4642 -- correct this misidentification.
4645 -- Sloc points to first token of name or prefix
4646 -- Name (Node2) stores name or prefix
4647 -- Parameter_Associations (List3) (set to No_List if no
4648 -- actual parameter part)
4649 -- First_Named_Actual (Node4-Sem)
4650 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
4651 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
4652 -- Do_Tag_Check (Flag13-Sem)
4653 -- No_Elaboration_Check (Flag14-Sem)
4654 -- Parameter_List_Truncated (Flag17-Sem)
4655 -- ABE_Is_Certain (Flag18-Sem)
4656 -- plus fields for expression
4658 --------------------------------
4659 -- 6.4 Actual Parameter Part --
4660 --------------------------------
4662 -- ACTUAL_PARAMETER_PART ::=
4663 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
4665 --------------------------------
4666 -- 6.4 Parameter Association --
4667 --------------------------------
4669 -- PARAMETER_ASSOCIATION ::=
4670 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
4672 -- Note: the N_Parameter_Association node is built only if a formal
4673 -- parameter selector name is present, otherwise the parameter
4674 -- association appears in the tree simply as the node for the
4675 -- explicit actual parameter.
4677 -- N_Parameter_Association
4678 -- Sloc points to formal parameter
4679 -- Selector_Name (Node2) (always non-Empty)
4680 -- Explicit_Actual_Parameter (Node3)
4681 -- Next_Named_Actual (Node4-Sem)
4682 -- Is_Accessibility_Actual (Flag13-Sem)
4684 ---------------------------
4685 -- 6.4 Actual Parameter --
4686 ---------------------------
4688 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
4690 ---------------------------
4691 -- 6.5 Return Statement --
4692 ---------------------------
4694 -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95
4696 -- In Ada 2005, we have:
4698 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
4700 -- EXTENDED_RETURN_STATEMENT ::=
4701 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4702 -- [:= EXPRESSION] [do
4703 -- HANDLED_SEQUENCE_OF_STATEMENTS
4706 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
4708 -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal, but
4709 -- "return statement" is defined in 6.5 to mean a
4710 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT.
4712 -- N_Return_Statement
4713 -- Sloc points to RETURN
4714 -- Return_Statement_Entity (Node5-Sem)
4715 -- Expression (Node3) (set to Empty if no expression present)
4716 -- Storage_Pool (Node1-Sem)
4717 -- Procedure_To_Call (Node2-Sem)
4718 -- Do_Tag_Check (Flag13-Sem)
4719 -- By_Ref (Flag5-Sem)
4720 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
4722 -- N_Return_Statement represents a simple_return_statement, and is
4723 -- renamed to be N_Simple_Return_Statement below. Clients should refer
4724 -- to N_Simple_Return_Statement. We retain N_Return_Statement because
4725 -- that's how gigi knows it. See also renaming of Make_Return_Statement
4726 -- as Make_Simple_Return_Statement in Sem_Util.
4728 -- Note: Return_Statement_Entity points to an E_Return_Statement
4730 -- If a range check is required, then Do_Range_Check is set on the
4731 -- Expression. The check is against the return subtype of the function.
4733 -- N_Extended_Return_Statement
4734 -- Sloc points to RETURN
4735 -- Return_Statement_Entity (Node5-Sem)
4736 -- Return_Object_Declarations (List3)
4737 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
4738 -- Storage_Pool (Node1-Sem)
4739 -- Procedure_To_Call (Node2-Sem)
4740 -- Do_Tag_Check (Flag13-Sem)
4741 -- By_Ref (Flag5-Sem)
4743 -- Note: Return_Statement_Entity points to an E_Return_Statement.
4745 -- Note that Return_Object_Declarations is a list containing the
4746 -- N_Object_Declaration -- see comment on this field above.
4748 -- The declared object will have Is_Return_Object = True.
4750 -- There is no such syntactic category as return_object_declaration
4751 -- in the RM. Return_Object_Declarations represents this portion of
4752 -- the syntax for EXTENDED_RETURN_STATEMENT:
4753 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
4756 -- There are two entities associated with an extended_return_statement:
4757 -- the Return_Statement_Entity represents the statement itself, and the
4758 -- Defining_Identifier of the Object_Declaration in
4759 -- Return_Object_Declarations represents the object being
4760 -- returned. N_Simple_Return_Statement has only the former.
4762 ------------------------------
4763 -- 7.1 Package Declaration --
4764 ------------------------------
4766 -- PACKAGE_DECLARATION ::=
4767 -- PACKAGE_SPECIFICATION;
4769 -- Note: the activation chain entity for a package spec is used for
4770 -- all tasks declared in the package spec, or in the package body.
4772 -- N_Package_Declaration
4773 -- Sloc points to PACKAGE
4774 -- Specification (Node1)
4775 -- Corresponding_Body (Node5-Sem)
4776 -- Parent_Spec (Node4-Sem)
4777 -- Activation_Chain_Entity (Node3-Sem)
4779 --------------------------------
4780 -- 7.1 Package Specification --
4781 --------------------------------
4783 -- PACKAGE_SPECIFICATION ::=
4784 -- package DEFINING_PROGRAM_UNIT_NAME
4785 -- [ASPECT_SPECIFICATIONS]
4787 -- {BASIC_DECLARATIVE_ITEM}
4789 -- {BASIC_DECLARATIVE_ITEM}]
4790 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
4792 -- N_Package_Specification
4793 -- Sloc points to PACKAGE
4794 -- Defining_Unit_Name (Node1)
4795 -- Visible_Declarations (List2)
4796 -- Private_Declarations (List3) (set to No_List if no private
4798 -- End_Label (Node4)
4799 -- Generic_Parent (Node5-Sem)
4800 -- Limited_View_Installed (Flag18-Sem)
4802 -----------------------
4803 -- 7.1 Package Body --
4804 -----------------------
4807 -- package body DEFINING_PROGRAM_UNIT_NAME
4808 -- [ASPECT_SPECIFICATIONS]
4812 -- HANDLED_SEQUENCE_OF_STATEMENTS]
4813 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
4816 -- Sloc points to PACKAGE
4817 -- Defining_Unit_Name (Node1)
4818 -- Declarations (List2)
4819 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
4820 -- Corresponding_Spec (Node5-Sem)
4821 -- Was_Originally_Stub (Flag13-Sem)
4823 -- Note: if a source level package does not contain a handled sequence
4824 -- of statements, then the parser supplies a dummy one with a null
4825 -- sequence of statements. Comes_From_Source will be False in this
4826 -- constructed sequence. The reason we need this is for the End_Label
4827 -- field in the HSS.
4829 -----------------------------------
4830 -- 7.4 Private Type Declaration --
4831 -----------------------------------
4833 -- PRIVATE_TYPE_DECLARATION ::=
4834 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
4835 -- is [[abstract] tagged] [limited] private;
4837 -- Note: TAGGED is not permitted in Ada 83 mode
4839 -- N_Private_Type_Declaration
4840 -- Sloc points to TYPE
4841 -- Defining_Identifier (Node1)
4842 -- Discriminant_Specifications (List4) (set to No_List if no
4843 -- discriminant part)
4844 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4845 -- Abstract_Present (Flag4)
4846 -- Tagged_Present (Flag15)
4847 -- Limited_Present (Flag17)
4849 ----------------------------------------
4850 -- 7.4 Private Extension Declaration --
4851 ----------------------------------------
4853 -- PRIVATE_EXTENSION_DECLARATION ::=
4854 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
4855 -- [abstract] [limited | synchronized]
4856 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
4859 -- Note: LIMITED, and private extension declarations are not allowed
4862 -- N_Private_Extension_Declaration
4863 -- Sloc points to TYPE
4864 -- Defining_Identifier (Node1)
4865 -- Discriminant_Specifications (List4) (set to No_List if no
4866 -- discriminant part)
4867 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
4868 -- Abstract_Present (Flag4)
4869 -- Limited_Present (Flag17)
4870 -- Synchronized_Present (Flag7)
4871 -- Subtype_Indication (Node5)
4872 -- Interface_List (List2) (set to No_List if none)
4874 ---------------------
4875 -- 8.4 Use Clause --
4876 ---------------------
4878 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
4880 -----------------------------
4881 -- 8.4 Use Package Clause --
4882 -----------------------------
4884 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
4886 -- N_Use_Package_Clause
4887 -- Sloc points to USE
4889 -- Next_Use_Clause (Node3-Sem)
4890 -- Hidden_By_Use_Clause (Elist4-Sem)
4892 --------------------------
4893 -- 8.4 Use Type Clause --
4894 --------------------------
4896 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
4898 -- Note: use type clause is not permitted in Ada 83 mode
4900 -- Note: the ALL keyword can appear only in Ada 2012 mode
4902 -- N_Use_Type_Clause
4903 -- Sloc points to USE
4904 -- Subtype_Marks (List2)
4905 -- Next_Use_Clause (Node3-Sem)
4906 -- Hidden_By_Use_Clause (Elist4-Sem)
4907 -- Used_Operations (Elist5-Sem)
4908 -- All_Present (Flag15)
4910 -------------------------------
4911 -- 8.5 Renaming Declaration --
4912 -------------------------------
4914 -- RENAMING_DECLARATION ::=
4915 -- OBJECT_RENAMING_DECLARATION
4916 -- | EXCEPTION_RENAMING_DECLARATION
4917 -- | PACKAGE_RENAMING_DECLARATION
4918 -- | SUBPROGRAM_RENAMING_DECLARATION
4919 -- | GENERIC_RENAMING_DECLARATION
4921 --------------------------------------
4922 -- 8.5 Object Renaming Declaration --
4923 --------------------------------------
4925 -- OBJECT_RENAMING_DECLARATION ::=
4926 -- DEFINING_IDENTIFIER :
4927 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME;
4928 -- | DEFINING_IDENTIFIER :
4929 -- ACCESS_DEFINITION renames object_NAME;
4931 -- Note: Access_Definition is an optional field that gives support to
4932 -- Ada 2005 (AI-230). The parser generates nodes that have either the
4933 -- Subtype_Indication field or else the Access_Definition field.
4935 -- N_Object_Renaming_Declaration
4936 -- Sloc points to first identifier
4937 -- Defining_Identifier (Node1)
4938 -- Null_Exclusion_Present (Flag11) (set to False if not present)
4939 -- Subtype_Mark (Node4) (set to Empty if not present)
4940 -- Access_Definition (Node3) (set to Empty if not present)
4942 -- Corresponding_Generic_Association (Node5-Sem)
4944 -----------------------------------------
4945 -- 8.5 Exception Renaming Declaration --
4946 -----------------------------------------
4948 -- EXCEPTION_RENAMING_DECLARATION ::=
4949 -- DEFINING_IDENTIFIER : exception renames exception_NAME;
4951 -- N_Exception_Renaming_Declaration
4952 -- Sloc points to first identifier
4953 -- Defining_Identifier (Node1)
4956 ---------------------------------------
4957 -- 8.5 Package Renaming Declaration --
4958 ---------------------------------------
4960 -- PACKAGE_RENAMING_DECLARATION ::=
4961 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME;
4963 -- N_Package_Renaming_Declaration
4964 -- Sloc points to PACKAGE
4965 -- Defining_Unit_Name (Node1)
4967 -- Parent_Spec (Node4-Sem)
4969 ------------------------------------------
4970 -- 8.5 Subprogram Renaming Declaration --
4971 ------------------------------------------
4973 -- SUBPROGRAM_RENAMING_DECLARATION ::=
4974 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
4976 -- N_Subprogram_Renaming_Declaration
4977 -- Sloc points to RENAMES
4978 -- Specification (Node1)
4980 -- Parent_Spec (Node4-Sem)
4981 -- Corresponding_Spec (Node5-Sem)
4982 -- Corresponding_Formal_Spec (Node3-Sem)
4983 -- From_Default (Flag6-Sem)
4985 -----------------------------------------
4986 -- 8.5.5 Generic Renaming Declaration --
4987 -----------------------------------------
4989 -- GENERIC_RENAMING_DECLARATION ::=
4990 -- generic package DEFINING_PROGRAM_UNIT_NAME
4991 -- renames generic_package_NAME
4992 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
4993 -- renames generic_procedure_NAME
4994 -- | generic function DEFINING_PROGRAM_UNIT_NAME
4995 -- renames generic_function_NAME
4997 -- N_Generic_Package_Renaming_Declaration
4998 -- Sloc points to GENERIC
4999 -- Defining_Unit_Name (Node1)
5001 -- Parent_Spec (Node4-Sem)
5003 -- N_Generic_Procedure_Renaming_Declaration
5004 -- Sloc points to GENERIC
5005 -- Defining_Unit_Name (Node1)
5007 -- Parent_Spec (Node4-Sem)
5009 -- N_Generic_Function_Renaming_Declaration
5010 -- Sloc points to GENERIC
5011 -- Defining_Unit_Name (Node1)
5013 -- Parent_Spec (Node4-Sem)
5015 --------------------------------
5016 -- 9.1 Task Type Declaration --
5017 --------------------------------
5019 -- TASK_TYPE_DECLARATION ::=
5020 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5021 -- [ASPECT_SPECIFICATIONS]
5022 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5024 -- N_Task_Type_Declaration
5025 -- Sloc points to TASK
5026 -- Defining_Identifier (Node1)
5027 -- Discriminant_Specifications (List4) (set to No_List if no
5028 -- discriminant part)
5029 -- Interface_List (List2) (set to No_List if none)
5030 -- Task_Definition (Node3) (set to Empty if not present)
5031 -- Corresponding_Body (Node5-Sem)
5033 ----------------------------------
5034 -- 9.1 Single Task Declaration --
5035 ----------------------------------
5037 -- SINGLE_TASK_DECLARATION ::=
5038 -- task DEFINING_IDENTIFIER
5039 -- [ASPECT_SPECIFICATIONS]
5040 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5042 -- N_Single_Task_Declaration
5043 -- Sloc points to TASK
5044 -- Defining_Identifier (Node1)
5045 -- Interface_List (List2) (set to No_List if none)
5046 -- Task_Definition (Node3) (set to Empty if not present)
5048 --------------------------
5049 -- 9.1 Task Definition --
5050 --------------------------
5052 -- TASK_DEFINITION ::=
5056 -- end [task_IDENTIFIER]
5058 -- Note: as a result of semantic analysis, the list of task items can
5059 -- include implicit type declarations resulting from entry families.
5061 -- N_Task_Definition
5062 -- Sloc points to first token of task definition
5063 -- Visible_Declarations (List2)
5064 -- Private_Declarations (List3) (set to No_List if no private part)
5065 -- End_Label (Node4)
5066 -- Has_Pragma_Priority (Flag6-Sem)
5067 -- Has_Storage_Size_Pragma (Flag5-Sem)
5068 -- Has_Task_Info_Pragma (Flag7-Sem)
5069 -- Has_Task_Name_Pragma (Flag8-Sem)
5070 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5071 -- Has_Pragma_CPU (Flag14-Sem)
5073 --------------------
5075 --------------------
5077 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5079 --------------------
5081 --------------------
5084 -- task body task_DEFINING_IDENTIFIER
5085 -- [ASPECT_SPECIFICATIONS]
5089 -- HANDLED_SEQUENCE_OF_STATEMENTS
5090 -- end [task_IDENTIFIER];
5092 -- Gigi restriction: This node never appears
5095 -- Sloc points to TASK
5096 -- Defining_Identifier (Node1)
5097 -- Declarations (List2)
5098 -- Handled_Statement_Sequence (Node4)
5099 -- Is_Task_Master (Flag5-Sem)
5100 -- Activation_Chain_Entity (Node3-Sem)
5101 -- Corresponding_Spec (Node5-Sem)
5102 -- Was_Originally_Stub (Flag13-Sem)
5104 -------------------------------------
5105 -- 9.4 Protected Type Declaration --
5106 -------------------------------------
5108 -- PROTECTED_TYPE_DECLARATION ::=
5109 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5110 -- [ASPECT_SPECIFICATIONS]
5111 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5113 -- Note: protected type declarations are not permitted in Ada 83 mode
5115 -- N_Protected_Type_Declaration
5116 -- Sloc points to PROTECTED
5117 -- Defining_Identifier (Node1)
5118 -- Discriminant_Specifications (List4) (set to No_List if no
5119 -- discriminant part)
5120 -- Interface_List (List2) (set to No_List if none)
5121 -- Protected_Definition (Node3)
5122 -- Corresponding_Body (Node5-Sem)
5124 ---------------------------------------
5125 -- 9.4 Single Protected Declaration --
5126 ---------------------------------------
5128 -- SINGLE_PROTECTED_DECLARATION ::=
5129 -- protected DEFINING_IDENTIFIER
5130 -- [ASPECT_SPECIFICATIONS]
5131 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5133 -- Note: single protected declarations are not allowed in Ada 83 mode
5135 -- N_Single_Protected_Declaration
5136 -- Sloc points to PROTECTED
5137 -- Defining_Identifier (Node1)
5138 -- Interface_List (List2) (set to No_List if none)
5139 -- Protected_Definition (Node3)
5141 -------------------------------
5142 -- 9.4 Protected Definition --
5143 -------------------------------
5145 -- PROTECTED_DEFINITION ::=
5146 -- {PROTECTED_OPERATION_DECLARATION}
5148 -- {PROTECTED_ELEMENT_DECLARATION}]
5149 -- end [protected_IDENTIFIER]
5151 -- N_Protected_Definition
5152 -- Sloc points to first token of protected definition
5153 -- Visible_Declarations (List2)
5154 -- Private_Declarations (List3) (set to No_List if no private part)
5155 -- End_Label (Node4)
5156 -- Has_Pragma_Priority (Flag6-Sem)
5158 ------------------------------------------
5159 -- 9.4 Protected Operation Declaration --
5160 ------------------------------------------
5162 -- PROTECTED_OPERATION_DECLARATION ::=
5163 -- SUBPROGRAM_DECLARATION
5164 -- | ENTRY_DECLARATION
5165 -- | REPRESENTATION_CLAUSE
5167 ----------------------------------------
5168 -- 9.4 Protected Element Declaration --
5169 ----------------------------------------
5171 -- PROTECTED_ELEMENT_DECLARATION ::=
5172 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
5174 -------------------------
5175 -- 9.4 Protected Body --
5176 -------------------------
5178 -- PROTECTED_BODY ::=
5179 -- protected body DEFINING_IDENTIFIER
5180 -- [ASPECT_SPECIFICATIONS];
5182 -- {PROTECTED_OPERATION_ITEM}
5183 -- end [protected_IDENTIFIER];
5185 -- Note: protected bodies are not allowed in Ada 83 mode
5187 -- Gigi restriction: This node never appears
5190 -- Sloc points to PROTECTED
5191 -- Defining_Identifier (Node1)
5192 -- Declarations (List2) protected operation items (and pragmas)
5193 -- End_Label (Node4)
5194 -- Corresponding_Spec (Node5-Sem)
5195 -- Was_Originally_Stub (Flag13-Sem)
5197 -----------------------------------
5198 -- 9.4 Protected Operation Item --
5199 -----------------------------------
5201 -- PROTECTED_OPERATION_ITEM ::=
5202 -- SUBPROGRAM_DECLARATION
5203 -- | SUBPROGRAM_BODY
5205 -- | REPRESENTATION_CLAUSE
5207 ------------------------------
5208 -- 9.5.2 Entry Declaration --
5209 ------------------------------
5211 -- ENTRY_DECLARATION ::=
5212 -- [[not] overriding]
5213 -- entry DEFINING_IDENTIFIER
5214 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE;
5216 -- N_Entry_Declaration
5217 -- Sloc points to ENTRY
5218 -- Defining_Identifier (Node1)
5219 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
5220 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5221 -- Corresponding_Body (Node5-Sem)
5222 -- Must_Override (Flag14) set if overriding indicator present
5223 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5225 -- Note: overriding indicator is an Ada 2005 feature
5227 -----------------------------
5228 -- 9.5.2 Accept statement --
5229 -----------------------------
5231 -- ACCEPT_STATEMENT ::=
5232 -- accept entry_DIRECT_NAME
5233 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
5234 -- HANDLED_SEQUENCE_OF_STATEMENTS
5235 -- end [entry_IDENTIFIER]];
5237 -- Gigi restriction: This node never appears
5239 -- Note: there are no explicit declarations allowed in an accept
5240 -- statement. However, the implicit declarations for any statement
5241 -- identifiers (labels and block/loop identifiers) are declarations
5242 -- that belong logically to the accept statement, and that is why
5243 -- there is a Declarations field in this node.
5245 -- N_Accept_Statement
5246 -- Sloc points to ACCEPT
5247 -- Entry_Direct_Name (Node1)
5248 -- Entry_Index (Node5) (set to Empty if not present)
5249 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5250 -- Handled_Statement_Sequence (Node4)
5251 -- Declarations (List2) (set to No_List if no declarations)
5253 ------------------------
5254 -- 9.5.2 Entry Index --
5255 ------------------------
5257 -- ENTRY_INDEX ::= EXPRESSION
5259 -----------------------
5260 -- 9.5.2 Entry Body --
5261 -----------------------
5264 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5267 -- HANDLED_SEQUENCE_OF_STATEMENTS
5268 -- end [entry_IDENTIFIER];
5270 -- ENTRY_BARRIER ::= when CONDITION
5272 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5273 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5274 -- too full (it would otherwise have too many fields)
5276 -- Gigi restriction: This node never appears
5279 -- Sloc points to ENTRY
5280 -- Defining_Identifier (Node1)
5281 -- Entry_Body_Formal_Part (Node5)
5282 -- Declarations (List2)
5283 -- Handled_Statement_Sequence (Node4)
5284 -- Activation_Chain_Entity (Node3-Sem)
5286 -----------------------------------
5287 -- 9.5.2 Entry Body Formal Part --
5288 -----------------------------------
5290 -- ENTRY_BODY_FORMAL_PART ::=
5291 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5293 -- Note that an entry body formal part node is present even if it is
5294 -- empty. This reflects the grammar, in which it is the components of
5295 -- the entry body formal part that are optional, not the entry body
5296 -- formal part itself. Also this means that the barrier condition
5297 -- always has somewhere to be stored.
5299 -- Gigi restriction: This node never appears
5301 -- N_Entry_Body_Formal_Part
5302 -- Sloc points to first token
5303 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5304 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5305 -- Condition (Node1) from entry barrier of entry body
5307 --------------------------
5308 -- 9.5.2 Entry Barrier --
5309 --------------------------
5311 -- ENTRY_BARRIER ::= when CONDITION
5313 --------------------------------------
5314 -- 9.5.2 Entry Index Specification --
5315 --------------------------------------
5317 -- ENTRY_INDEX_SPECIFICATION ::=
5318 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5320 -- Gigi restriction: This node never appears
5322 -- N_Entry_Index_Specification
5323 -- Sloc points to FOR
5324 -- Defining_Identifier (Node1)
5325 -- Discrete_Subtype_Definition (Node4)
5327 ---------------------------------
5328 -- 9.5.3 Entry Call Statement --
5329 ---------------------------------
5331 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5333 -- The parser may generate a procedure call for this construct. The
5334 -- semantic pass must correct this misidentification where needed.
5336 -- Gigi restriction: This node never appears
5338 -- N_Entry_Call_Statement
5339 -- Sloc points to first token of name
5341 -- Parameter_Associations (List3) (set to No_List if no
5342 -- actual parameter part)
5343 -- First_Named_Actual (Node4-Sem)
5345 ------------------------------
5346 -- 9.5.4 Requeue Statement --
5347 ------------------------------
5349 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5351 -- Note: requeue statements are not permitted in Ada 83 mode
5353 -- Gigi restriction: This node never appears
5355 -- N_Requeue_Statement
5356 -- Sloc points to REQUEUE
5358 -- Abort_Present (Flag15)
5360 --------------------------
5361 -- 9.6 Delay Statement --
5362 --------------------------
5364 -- DELAY_STATEMENT ::=
5365 -- DELAY_UNTIL_STATEMENT
5366 -- | DELAY_RELATIVE_STATEMENT
5368 --------------------------------
5369 -- 9.6 Delay Until Statement --
5370 --------------------------------
5372 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5374 -- Note: delay until statements are not permitted in Ada 83 mode
5376 -- Gigi restriction: This node never appears
5378 -- N_Delay_Until_Statement
5379 -- Sloc points to DELAY
5380 -- Expression (Node3)
5382 -----------------------------------
5383 -- 9.6 Delay Relative Statement --
5384 -----------------------------------
5386 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5388 -- Gigi restriction: This node never appears
5390 -- N_Delay_Relative_Statement
5391 -- Sloc points to DELAY
5392 -- Expression (Node3)
5394 ---------------------------
5395 -- 9.7 Select Statement --
5396 ---------------------------
5398 -- SELECT_STATEMENT ::=
5400 -- | TIMED_ENTRY_CALL
5401 -- | CONDITIONAL_ENTRY_CALL
5402 -- | ASYNCHRONOUS_SELECT
5404 -----------------------------
5405 -- 9.7.1 Selective Accept --
5406 -----------------------------
5408 -- SELECTIVE_ACCEPT ::=
5411 -- SELECT_ALTERNATIVE
5414 -- SELECT_ALTERNATIVE}
5416 -- SEQUENCE_OF_STATEMENTS]
5419 -- Gigi restriction: This node never appears
5421 -- Note: the guard expression, if present, appears in the node for
5422 -- the select alternative.
5424 -- N_Selective_Accept
5425 -- Sloc points to SELECT
5426 -- Select_Alternatives (List1)
5427 -- Else_Statements (List4) (set to No_List if no else part)
5433 -- GUARD ::= when CONDITION =>
5435 -- As noted above, the CONDITION that is part of a GUARD is included
5436 -- in the node for the select alternative for convenience.
5438 -------------------------------
5439 -- 9.7.1 Select Alternative --
5440 -------------------------------
5442 -- SELECT_ALTERNATIVE ::=
5443 -- ACCEPT_ALTERNATIVE
5444 -- | DELAY_ALTERNATIVE
5445 -- | TERMINATE_ALTERNATIVE
5447 -------------------------------
5448 -- 9.7.1 Accept Alternative --
5449 -------------------------------
5451 -- ACCEPT_ALTERNATIVE ::=
5452 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5454 -- Gigi restriction: This node never appears
5456 -- N_Accept_Alternative
5457 -- Sloc points to ACCEPT
5458 -- Accept_Statement (Node2)
5459 -- Condition (Node1) from the guard (set to Empty if no guard present)
5460 -- Statements (List3) (set to Empty_List if no statements)
5461 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5462 -- Accept_Handler_Records (List5-Sem)
5464 ------------------------------
5465 -- 9.7.1 Delay Alternative --
5466 ------------------------------
5468 -- DELAY_ALTERNATIVE ::=
5469 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5471 -- Gigi restriction: This node never appears
5473 -- N_Delay_Alternative
5474 -- Sloc points to DELAY
5475 -- Delay_Statement (Node2)
5476 -- Condition (Node1) from the guard (set to Empty if no guard present)
5477 -- Statements (List3) (set to Empty_List if no statements)
5478 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5480 ----------------------------------
5481 -- 9.7.1 Terminate Alternative --
5482 ----------------------------------
5484 -- TERMINATE_ALTERNATIVE ::= terminate;
5486 -- Gigi restriction: This node never appears
5488 -- N_Terminate_Alternative
5489 -- Sloc points to TERMINATE
5490 -- Condition (Node1) from the guard (set to Empty if no guard present)
5491 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5492 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
5494 -----------------------------
5495 -- 9.7.2 Timed Entry Call --
5496 -----------------------------
5498 -- TIMED_ENTRY_CALL ::=
5500 -- ENTRY_CALL_ALTERNATIVE
5502 -- DELAY_ALTERNATIVE
5505 -- Gigi restriction: This node never appears
5507 -- N_Timed_Entry_Call
5508 -- Sloc points to SELECT
5509 -- Entry_Call_Alternative (Node1)
5510 -- Delay_Alternative (Node4)
5512 -----------------------------------
5513 -- 9.7.2 Entry Call Alternative --
5514 -----------------------------------
5516 -- ENTRY_CALL_ALTERNATIVE ::=
5517 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
5519 -- PROCEDURE_OR_ENTRY_CALL ::=
5520 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
5522 -- Gigi restriction: This node never appears
5524 -- N_Entry_Call_Alternative
5525 -- Sloc points to first token of entry call statement
5526 -- Entry_Call_Statement (Node1)
5527 -- Statements (List3) (set to Empty_List if no statements)
5528 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5530 -----------------------------------
5531 -- 9.7.3 Conditional Entry Call --
5532 -----------------------------------
5534 -- CONDITIONAL_ENTRY_CALL ::=
5536 -- ENTRY_CALL_ALTERNATIVE
5538 -- SEQUENCE_OF_STATEMENTS
5541 -- Gigi restriction: This node never appears
5543 -- N_Conditional_Entry_Call
5544 -- Sloc points to SELECT
5545 -- Entry_Call_Alternative (Node1)
5546 -- Else_Statements (List4)
5548 --------------------------------
5549 -- 9.7.4 Asynchronous Select --
5550 --------------------------------
5552 -- ASYNCHRONOUS_SELECT ::=
5554 -- TRIGGERING_ALTERNATIVE
5559 -- Note: asynchronous select is not permitted in Ada 83 mode
5561 -- Gigi restriction: This node never appears
5563 -- N_Asynchronous_Select
5564 -- Sloc points to SELECT
5565 -- Triggering_Alternative (Node1)
5566 -- Abortable_Part (Node2)
5568 -----------------------------------
5569 -- 9.7.4 Triggering Alternative --
5570 -----------------------------------
5572 -- TRIGGERING_ALTERNATIVE ::=
5573 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
5575 -- Gigi restriction: This node never appears
5577 -- N_Triggering_Alternative
5578 -- Sloc points to first token of triggering statement
5579 -- Triggering_Statement (Node1)
5580 -- Statements (List3) (set to Empty_List if no statements)
5581 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5583 ---------------------------------
5584 -- 9.7.4 Triggering Statement --
5585 ---------------------------------
5587 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
5589 ---------------------------
5590 -- 9.7.4 Abortable Part --
5591 ---------------------------
5593 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
5595 -- Gigi restriction: This node never appears
5598 -- Sloc points to ABORT
5599 -- Statements (List3)
5601 --------------------------
5602 -- 9.8 Abort Statement --
5603 --------------------------
5605 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
5607 -- Gigi restriction: This node never appears
5609 -- N_Abort_Statement
5610 -- Sloc points to ABORT
5613 -------------------------
5614 -- 10.1.1 Compilation --
5615 -------------------------
5617 -- COMPILATION ::= {COMPILATION_UNIT}
5619 -- There is no explicit node in the tree for a compilation, since in
5620 -- general the compiler is processing only a single compilation unit
5621 -- at a time. It is possible to parse multiple units in syntax check
5622 -- only mode, but the trees are discarded in that case.
5624 ------------------------------
5625 -- 10.1.1 Compilation Unit --
5626 ------------------------------
5628 -- COMPILATION_UNIT ::=
5629 -- CONTEXT_CLAUSE LIBRARY_ITEM
5630 -- | CONTEXT_CLAUSE SUBUNIT
5632 -- The N_Compilation_Unit node itself represents the above syntax.
5633 -- However, there are two additional items not reflected in the above
5634 -- syntax. First we have the global declarations that are added by the
5635 -- code generator. These are outer level declarations (so they cannot
5636 -- be represented as being inside the units). An example is the wrapper
5637 -- subprograms that are created to do ABE checking. As always a list of
5638 -- declarations can contain actions as well (i.e. statements), and such
5639 -- statements are executed as part of the elaboration of the unit. Note
5640 -- that all such declarations are elaborated before the library unit.
5642 -- Similarly, certain actions need to be elaborated at the completion
5643 -- of elaboration of the library unit (notably the statement that sets
5644 -- the Boolean flag indicating that elaboration is complete).
5646 -- The third item not reflected in the syntax is pragmas that appear
5647 -- after the compilation unit. As always pragmas are a problem since
5648 -- they are not part of the formal syntax, but can be stuck into the
5649 -- source following a set of ad hoc rules, and we have to find an ad
5650 -- hoc way of sticking them into the tree. For pragmas that appear
5651 -- before the library unit, we just consider them to be part of the
5652 -- context clause, and pragmas can appear in the Context_Items list
5653 -- of the compilation unit. However, pragmas can also appear after
5654 -- the library item.
5656 -- To deal with all these problems, we create an auxiliary node for
5657 -- a compilation unit, referenced from the N_Compilation_Unit node,
5658 -- that contains these items.
5660 -- N_Compilation_Unit
5661 -- Sloc points to first token of defining unit name
5662 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
5663 -- Context_Items (List1) context items and pragmas preceding unit
5664 -- Private_Present (Flag15) set if library unit has private keyword
5665 -- Unit (Node2) library item or subunit
5666 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
5667 -- Has_No_Elaboration_Code (Flag17-Sem)
5668 -- Body_Required (Flag13-Sem) set for spec if body is required
5669 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
5670 -- Context_Pending (Flag16-Sem)
5671 -- First_Inlined_Subprogram (Node3-Sem)
5672 -- Has_Pragma_Suppress_All (Flag14-Sem)
5674 -- N_Compilation_Unit_Aux
5675 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
5676 -- Declarations (List2) (set to No_List if no global declarations)
5677 -- Actions (List1) (set to No_List if no actions)
5678 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
5679 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
5680 -- Default_Storage_Pool (Node3-Sem)
5682 --------------------------
5683 -- 10.1.1 Library Item --
5684 --------------------------
5687 -- [private] LIBRARY_UNIT_DECLARATION
5688 -- | LIBRARY_UNIT_BODY
5689 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
5691 -- Note: PRIVATE is not allowed in Ada 83 mode
5693 -- There is no explicit node in the tree for library item, instead
5694 -- the declaration or body, and the flag for private if present,
5695 -- appear in the N_Compilation_Unit node.
5697 --------------------------------------
5698 -- 10.1.1 Library Unit Declaration --
5699 --------------------------------------
5701 -- LIBRARY_UNIT_DECLARATION ::=
5702 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
5703 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
5705 -----------------------------------------------
5706 -- 10.1.1 Library Unit Renaming Declaration --
5707 -----------------------------------------------
5709 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
5710 -- PACKAGE_RENAMING_DECLARATION
5711 -- | GENERIC_RENAMING_DECLARATION
5712 -- | SUBPROGRAM_RENAMING_DECLARATION
5714 -------------------------------
5715 -- 10.1.1 Library unit body --
5716 -------------------------------
5718 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
5720 ------------------------------
5721 -- 10.1.1 Parent Unit Name --
5722 ------------------------------
5724 -- PARENT_UNIT_NAME ::= NAME
5726 ----------------------------
5727 -- 10.1.2 Context clause --
5728 ----------------------------
5730 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
5732 -- The context clause can include pragmas, and any pragmas that appear
5733 -- before the context clause proper (i.e. all configuration pragmas,
5734 -- also appear at the front of this list).
5736 --------------------------
5737 -- 10.1.2 Context_Item --
5738 --------------------------
5740 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
5742 -------------------------
5743 -- 10.1.2 With clause --
5744 -------------------------
5747 -- with library_unit_NAME {,library_unit_NAME};
5749 -- A separate With clause is built for each name, so that we have
5750 -- a Corresponding_Spec field for each with'ed spec. The flags
5751 -- First_Name and Last_Name are used to reconstruct the exact
5752 -- source form. When a list of names appears in one with clause,
5753 -- the first name in the list has First_Name set, and the last
5754 -- has Last_Name set. If the with clause has only one name, then
5755 -- both of the flags First_Name and Last_Name are set in this name.
5757 -- Note: in the case of implicit with's that are installed by the
5758 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
5759 -- set to Standard_Location, but it is incorrect to test the Sloc
5760 -- to find out if a with clause is implicit, test the flag instead.
5763 -- Sloc points to first token of library unit name
5764 -- Withed_Body (Node1-Sem)
5766 -- Next_Implicit_With (Node3-Sem)
5767 -- Library_Unit (Node4-Sem)
5768 -- Corresponding_Spec (Node5-Sem)
5769 -- First_Name (Flag5) (set to True if first name or only one name)
5770 -- Last_Name (Flag6) (set to True if last name or only one name)
5771 -- Context_Installed (Flag13-Sem)
5772 -- Elaborate_Present (Flag4-Sem)
5773 -- Elaborate_All_Present (Flag14-Sem)
5774 -- Elaborate_All_Desirable (Flag9-Sem)
5775 -- Elaborate_Desirable (Flag11-Sem)
5776 -- Private_Present (Flag15) set if with_clause has private keyword
5777 -- Implicit_With (Flag16-Sem)
5778 -- Limited_Present (Flag17) set if LIMITED is present
5779 -- Limited_View_Installed (Flag18-Sem)
5780 -- Unreferenced_In_Spec (Flag7-Sem)
5781 -- No_Entities_Ref_In_Spec (Flag8-Sem)
5783 -- Note: Limited_Present and Limited_View_Installed give support to
5784 -- Ada 2005 (AI-50217).
5785 -- Similarly, Private_Present gives support to AI-50262.
5787 ----------------------
5788 -- With_Type clause --
5789 ----------------------
5791 -- This is a GNAT extension, used to implement mutually recursive
5792 -- types declared in different packages.
5793 -- Note: this is now obsolete. The functionality of this construct
5794 -- is now implemented by the Ada 2005 Limited_with_Clause.
5796 ---------------------
5797 -- 10.2 Body stub --
5798 ---------------------
5801 -- SUBPROGRAM_BODY_STUB
5802 -- | PACKAGE_BODY_STUB
5804 -- | PROTECTED_BODY_STUB
5806 ----------------------------------
5807 -- 10.1.3 Subprogram Body Stub --
5808 ----------------------------------
5810 -- SUBPROGRAM_BODY_STUB ::=
5811 -- SUBPROGRAM_SPECIFICATION is separate;
5813 -- N_Subprogram_Body_Stub
5814 -- Sloc points to FUNCTION or PROCEDURE
5815 -- Specification (Node1)
5816 -- Library_Unit (Node4-Sem) points to the subunit
5817 -- Corresponding_Body (Node5-Sem)
5819 -------------------------------
5820 -- 10.1.3 Package Body Stub --
5821 -------------------------------
5823 -- PACKAGE_BODY_STUB ::=
5824 -- package body DEFINING_IDENTIFIER is separate;
5826 -- N_Package_Body_Stub
5827 -- Sloc points to PACKAGE
5828 -- Defining_Identifier (Node1)
5829 -- Library_Unit (Node4-Sem) points to the subunit
5830 -- Corresponding_Body (Node5-Sem)
5832 ----------------------------
5833 -- 10.1.3 Task Body Stub --
5834 ----------------------------
5836 -- TASK_BODY_STUB ::=
5837 -- task body DEFINING_IDENTIFIER is separate;
5840 -- Sloc points to TASK
5841 -- Defining_Identifier (Node1)
5842 -- Library_Unit (Node4-Sem) points to the subunit
5843 -- Corresponding_Body (Node5-Sem)
5845 ---------------------------------
5846 -- 10.1.3 Protected Body Stub --
5847 ---------------------------------
5849 -- PROTECTED_BODY_STUB ::=
5850 -- protected body DEFINING_IDENTIFIER is separate;
5852 -- Note: protected body stubs are not allowed in Ada 83 mode
5854 -- N_Protected_Body_Stub
5855 -- Sloc points to PROTECTED
5856 -- Defining_Identifier (Node1)
5857 -- Library_Unit (Node4-Sem) points to the subunit
5858 -- Corresponding_Body (Node5-Sem)
5860 ---------------------
5861 -- 10.1.3 Subunit --
5862 ---------------------
5864 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
5867 -- Sloc points to SEPARATE
5868 -- Name (Node2) is the name of the parent unit
5869 -- Proper_Body (Node1) is the subunit body
5870 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
5872 ---------------------------------
5873 -- 11.1 Exception Declaration --
5874 ---------------------------------
5876 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
5877 -- [ASPECT_SPECIFICATIONS];
5879 -- For consistency with object declarations etc., the parser converts
5880 -- the case of multiple identifiers being declared to a series of
5881 -- declarations in which the expression is copied, using the More_Ids
5882 -- and Prev_Ids flags to remember the source form as described in the
5883 -- section on "Handling of Defining Identifier Lists".
5885 -- N_Exception_Declaration
5886 -- Sloc points to EXCEPTION
5887 -- Defining_Identifier (Node1)
5888 -- Expression (Node3-Sem)
5889 -- Renaming_Exception (Node2-Sem)
5890 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5891 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5893 ------------------------------------------
5894 -- 11.2 Handled Sequence Of Statements --
5895 ------------------------------------------
5897 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
5898 -- SEQUENCE_OF_STATEMENTS
5900 -- EXCEPTION_HANDLER
5901 -- {EXCEPTION_HANDLER}]
5903 -- cleanup_procedure_call (param, param, param, ...);]
5905 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
5906 -- used only internally currently, but is considered to be syntactic.
5907 -- At the moment, the only cleanup action allowed is a single call to
5908 -- a parameterless procedure, and the Identifier field of the node is
5909 -- the procedure to be called. The cleanup action occurs whenever the
5910 -- sequence of statements is left for any reason. The possible reasons
5912 -- 1. reaching the end of the sequence
5913 -- 2. exit, return, or goto
5914 -- 3. exception or abort
5915 -- For some back ends, such as gcc with ZCX, "at end" is implemented
5916 -- entirely in the back end. In this case, a handled sequence of
5917 -- statements with an "at end" cannot also have exception handlers.
5918 -- For other back ends, such as gcc with SJLJ and .NET, the
5919 -- implementation is split between the front end and back end; the front
5920 -- end implements 3, and the back end implements 1 and 2. In this case,
5921 -- if there is an "at end", the front end inserts the appropriate
5922 -- exception handler, and this handler takes precedence over "at end"
5923 -- in case of exception.
5925 -- The inserted exception handler is of the form:
5927 -- when all others =>
5931 -- where cleanup is the procedure to be called. The reason we do this is
5932 -- so that the front end can handle the necessary entries in the
5933 -- exception tables, and other exception handler actions required as
5934 -- part of the normal handling for exception handlers.
5936 -- The AT END cleanup handler protects only the sequence of statements
5937 -- (not the associated declarations of the parent), just like exception
5938 -- handlers. The big difference is that the cleanup procedure is called
5939 -- on either a normal or an abnormal exit from the statement sequence.
5941 -- Note: the list of Exception_Handlers can contain pragmas as well
5942 -- as actual handlers. In practice these pragmas can only occur at
5943 -- the start of the list, since any pragmas occurring later on will
5944 -- be included in the statement list of the corresponding handler.
5946 -- Note: although in the Ada syntax, the sequence of statements in
5947 -- a handled sequence of statements can only contain statements, we
5948 -- allow free mixing of declarations and statements in the resulting
5949 -- expanded tree. This is for example used to deal with the case of
5950 -- a cleanup procedure that must handle declarations as well as the
5951 -- statements of a block.
5953 -- N_Handled_Sequence_Of_Statements
5954 -- Sloc points to first token of first statement
5955 -- Statements (List3)
5956 -- End_Label (Node4) (set to Empty if expander generated)
5957 -- Exception_Handlers (List5) (set to No_List if none present)
5958 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
5959 -- First_Real_Statement (Node2-Sem)
5960 -- Zero_Cost_Handling (Flag5-Sem)
5962 -- Note: the parent always contains a Declarations field which contains
5963 -- declarations associated with the handled sequence of statements. This
5964 -- is true even in the case of an accept statement (see description of
5965 -- the N_Accept_Statement node).
5967 -- End_Label refers to the containing construct
5969 -----------------------------
5970 -- 11.2 Exception Handler --
5971 -----------------------------
5973 -- EXCEPTION_HANDLER ::=
5974 -- when [CHOICE_PARAMETER_SPECIFICATION :]
5975 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
5976 -- SEQUENCE_OF_STATEMENTS
5978 -- Note: choice parameter specification is not allowed in Ada 83 mode
5980 -- N_Exception_Handler
5981 -- Sloc points to WHEN
5982 -- Choice_Parameter (Node2) (set to Empty if not present)
5983 -- Exception_Choices (List4)
5984 -- Statements (List3)
5985 -- Exception_Label (Node5-Sem) (set to Empty of not present)
5986 -- Zero_Cost_Handling (Flag5-Sem)
5987 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
5988 -- Local_Raise_Not_OK (Flag7-Sem)
5989 -- Has_Local_Raise (Flag8-Sem)
5991 ------------------------------------------
5992 -- 11.2 Choice parameter specification --
5993 ------------------------------------------
5995 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
5997 ----------------------------
5998 -- 11.2 Exception Choice --
5999 ----------------------------
6001 -- EXCEPTION_CHOICE ::= exception_NAME | others
6003 -- Except in the case of OTHERS, no explicit node appears in the tree
6004 -- for exception choice. Instead the exception name appears directly.
6005 -- An OTHERS choice is represented by a N_Others_Choice node (see
6008 -- Note: for the exception choice created for an at end handler, the
6009 -- exception choice is an N_Others_Choice node with All_Others set.
6011 ---------------------------
6012 -- 11.3 Raise Statement --
6013 ---------------------------
6015 -- RAISE_STATEMENT ::= raise [exception_NAME];
6017 -- In Ada 2005, we have
6019 -- RAISE_STATEMENT ::= raise; | raise exception_NAME [with EXPRESSION];
6021 -- N_Raise_Statement
6022 -- Sloc points to RAISE
6023 -- Name (Node2) (set to Empty if no exception name present)
6024 -- Expression (Node3) (set to Empty if no expression present)
6025 -- From_At_End (Flag4-Sem)
6027 -------------------------------
6028 -- 12.1 Generic Declaration --
6029 -------------------------------
6031 -- GENERIC_DECLARATION ::=
6032 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
6034 ------------------------------------------
6035 -- 12.1 Generic Subprogram Declaration --
6036 ------------------------------------------
6038 -- GENERIC_SUBPROGRAM_DECLARATION ::=
6039 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION;
6041 -- Note: Generic_Formal_Declarations can include pragmas
6043 -- N_Generic_Subprogram_Declaration
6044 -- Sloc points to GENERIC
6045 -- Specification (Node1) subprogram specification
6046 -- Corresponding_Body (Node5-Sem)
6047 -- Generic_Formal_Declarations (List2) from generic formal part
6048 -- Parent_Spec (Node4-Sem)
6050 ---------------------------------------
6051 -- 12.1 Generic Package Declaration --
6052 ---------------------------------------
6054 -- GENERIC_PACKAGE_DECLARATION ::=
6055 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
6056 -- [ASPECT_SPECIFICATIONS];
6058 -- Note: when we do generics right, the Activation_Chain_Entity entry
6059 -- for this node can be removed (since the expander won't see generic
6060 -- units any more)???.
6062 -- Note: Generic_Formal_Declarations can include pragmas
6064 -- N_Generic_Package_Declaration
6065 -- Sloc points to GENERIC
6066 -- Specification (Node1) package specification
6067 -- Corresponding_Body (Node5-Sem)
6068 -- Generic_Formal_Declarations (List2) from generic formal part
6069 -- Parent_Spec (Node4-Sem)
6070 -- Activation_Chain_Entity (Node3-Sem)
6072 -------------------------------
6073 -- 12.1 Generic Formal Part --
6074 -------------------------------
6076 -- GENERIC_FORMAL_PART ::=
6077 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
6079 ------------------------------------------------
6080 -- 12.1 Generic Formal Parameter Declaration --
6081 ------------------------------------------------
6083 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
6084 -- FORMAL_OBJECT_DECLARATION
6085 -- | FORMAL_TYPE_DECLARATION
6086 -- | FORMAL_SUBPROGRAM_DECLARATION
6087 -- | FORMAL_PACKAGE_DECLARATION
6089 ---------------------------------
6090 -- 12.3 Generic Instantiation --
6091 ---------------------------------
6093 -- GENERIC_INSTANTIATION ::=
6094 -- package DEFINING_PROGRAM_UNIT_NAME is
6095 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
6096 -- [ASPECT_SPECIFICATIONS];
6097 -- | [[not] overriding]
6098 -- procedure DEFINING_PROGRAM_UNIT_NAME is
6099 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
6100 -- [ASPECT_SPECIFICATIONS];
6101 -- | [[not] overriding]
6102 -- function DEFINING_DESIGNATOR is
6103 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
6104 -- [ASPECT_SPECIFICATIONS];
6106 -- N_Package_Instantiation
6107 -- Sloc points to PACKAGE
6108 -- Defining_Unit_Name (Node1)
6110 -- Generic_Associations (List3) (set to No_List if no
6111 -- generic actual part)
6112 -- Parent_Spec (Node4-Sem)
6113 -- Instance_Spec (Node5-Sem)
6114 -- ABE_Is_Certain (Flag18-Sem)
6116 -- N_Procedure_Instantiation
6117 -- Sloc points to PROCEDURE
6118 -- Defining_Unit_Name (Node1)
6120 -- Parent_Spec (Node4-Sem)
6121 -- Generic_Associations (List3) (set to No_List if no
6122 -- generic actual part)
6123 -- Instance_Spec (Node5-Sem)
6124 -- Must_Override (Flag14) set if overriding indicator present
6125 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6126 -- ABE_Is_Certain (Flag18-Sem)
6128 -- N_Function_Instantiation
6129 -- Sloc points to FUNCTION
6130 -- Defining_Unit_Name (Node1)
6132 -- Generic_Associations (List3) (set to No_List if no
6133 -- generic actual part)
6134 -- Parent_Spec (Node4-Sem)
6135 -- Instance_Spec (Node5-Sem)
6136 -- Must_Override (Flag14) set if overriding indicator present
6137 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6138 -- ABE_Is_Certain (Flag18-Sem)
6140 -- Note: overriding indicator is an Ada 2005 feature
6142 -------------------------------
6143 -- 12.3 Generic Actual Part --
6144 -------------------------------
6146 -- GENERIC_ACTUAL_PART ::=
6147 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
6149 -------------------------------
6150 -- 12.3 Generic Association --
6151 -------------------------------
6153 -- GENERIC_ASSOCIATION ::=
6154 -- [generic_formal_parameter_SELECTOR_NAME =>]
6156 -- Note: unlike the procedure call case, a generic association node
6157 -- is generated for every association, even if no formal parameter
6158 -- selector name is present. In this case the parser will leave the
6159 -- Selector_Name field set to Empty, to be filled in later by the
6162 -- In Ada 2005, a formal may be associated with a box, if the
6163 -- association is part of the list of actuals for a formal package.
6164 -- If the association is given by OTHERS => <>, the association is
6165 -- an N_Others_Choice.
6167 -- N_Generic_Association
6168 -- Sloc points to first token of generic association
6169 -- Selector_Name (Node2) (set to Empty if no formal
6170 -- parameter selector name)
6171 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
6172 -- Box_Present (Flag15) (for formal_package associations with a box)
6174 ---------------------------------------------
6175 -- 12.3 Explicit Generic Actual Parameter --
6176 ---------------------------------------------
6178 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
6179 -- EXPRESSION | variable_NAME | subprogram_NAME
6180 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
6182 -------------------------------------
6183 -- 12.4 Formal Object Declaration --
6184 -------------------------------------
6186 -- FORMAL_OBJECT_DECLARATION ::=
6187 -- DEFINING_IDENTIFIER_LIST :
6188 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
6189 -- [ASPECT_SPECIFICATIONS];
6190 -- | DEFINING_IDENTIFIER_LIST :
6191 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
6192 -- [ASPECT_SPECIFICATIONS];
6194 -- Although the syntax allows multiple identifiers in the list, the
6195 -- semantics is as though successive declarations were given with
6196 -- identical type definition and expression components. To simplify
6197 -- semantic processing, the parser represents a multiple declaration
6198 -- case as a sequence of single declarations, using the More_Ids and
6199 -- Prev_Ids flags to preserve the original source form as described
6200 -- in the section on "Handling of Defining Identifier Lists".
6202 -- N_Formal_Object_Declaration
6203 -- Sloc points to first identifier
6204 -- Defining_Identifier (Node1)
6205 -- In_Present (Flag15)
6206 -- Out_Present (Flag17)
6207 -- Null_Exclusion_Present (Flag11) (set to False if not present)
6208 -- Subtype_Mark (Node4) (set to Empty if not present)
6209 -- Access_Definition (Node3) (set to Empty if not present)
6210 -- Default_Expression (Node5) (set to Empty if no default expression)
6211 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6212 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6214 -----------------------------------
6215 -- 12.5 Formal Type Declaration --
6216 -----------------------------------
6218 -- FORMAL_TYPE_DECLARATION ::=
6219 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
6220 -- is FORMAL_TYPE_DEFINITION
6221 -- [ASPECT_SPECIFICATIONS];
6223 -- N_Formal_Type_Declaration
6224 -- Sloc points to TYPE
6225 -- Defining_Identifier (Node1)
6226 -- Formal_Type_Definition (Node3)
6227 -- Discriminant_Specifications (List4) (set to No_List if no
6228 -- discriminant part)
6229 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
6231 ----------------------------------
6232 -- 12.5 Formal type definition --
6233 ----------------------------------
6235 -- FORMAL_TYPE_DEFINITION ::=
6236 -- FORMAL_PRIVATE_TYPE_DEFINITION
6237 -- | FORMAL_DERIVED_TYPE_DEFINITION
6238 -- | FORMAL_DISCRETE_TYPE_DEFINITION
6239 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
6240 -- | FORMAL_MODULAR_TYPE_DEFINITION
6241 -- | FORMAL_FLOATING_POINT_DEFINITION
6242 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
6243 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
6244 -- | FORMAL_ARRAY_TYPE_DEFINITION
6245 -- | FORMAL_ACCESS_TYPE_DEFINITION
6246 -- | FORMAL_INTERFACE_TYPE_DEFINITION
6248 ---------------------------------------------
6249 -- 12.5.1 Formal Private Type Definition --
6250 ---------------------------------------------
6252 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
6253 -- [[abstract] tagged] [limited] private
6255 -- Note: TAGGED is not allowed in Ada 83 mode
6257 -- N_Formal_Private_Type_Definition
6258 -- Sloc points to PRIVATE
6259 -- Abstract_Present (Flag4)
6260 -- Tagged_Present (Flag15)
6261 -- Limited_Present (Flag17)
6263 --------------------------------------------
6264 -- 12.5.1 Formal Derived Type Definition --
6265 --------------------------------------------
6267 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6268 -- [abstract] [limited | synchronized]
6269 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6270 -- Note: this construct is not allowed in Ada 83 mode
6272 -- N_Formal_Derived_Type_Definition
6273 -- Sloc points to NEW
6274 -- Subtype_Mark (Node4)
6275 -- Private_Present (Flag15)
6276 -- Abstract_Present (Flag4)
6277 -- Limited_Present (Flag17)
6278 -- Synchronized_Present (Flag7)
6279 -- Interface_List (List2) (set to No_List if none)
6281 ---------------------------------------------
6282 -- 12.5.2 Formal Discrete Type Definition --
6283 ---------------------------------------------
6285 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6287 -- N_Formal_Discrete_Type_Definition
6290 ---------------------------------------------------
6291 -- 12.5.2 Formal Signed Integer Type Definition --
6292 ---------------------------------------------------
6294 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6296 -- N_Formal_Signed_Integer_Type_Definition
6297 -- Sloc points to RANGE
6299 --------------------------------------------
6300 -- 12.5.2 Formal Modular Type Definition --
6301 --------------------------------------------
6303 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6305 -- N_Formal_Modular_Type_Definition
6306 -- Sloc points to MOD
6308 ----------------------------------------------
6309 -- 12.5.2 Formal Floating Point Definition --
6310 ----------------------------------------------
6312 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6314 -- N_Formal_Floating_Point_Definition
6315 -- Sloc points to DIGITS
6317 ----------------------------------------------------
6318 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6319 ----------------------------------------------------
6321 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6323 -- N_Formal_Ordinary_Fixed_Point_Definition
6324 -- Sloc points to DELTA
6326 ---------------------------------------------------
6327 -- 12.5.2 Formal Decimal Fixed Point Definition --
6328 ---------------------------------------------------
6330 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6332 -- Note: formal decimal fixed point definition not allowed in Ada 83
6334 -- N_Formal_Decimal_Fixed_Point_Definition
6335 -- Sloc points to DELTA
6337 ------------------------------------------
6338 -- 12.5.3 Formal Array Type Definition --
6339 ------------------------------------------
6341 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6343 -------------------------------------------
6344 -- 12.5.4 Formal Access Type Definition --
6345 -------------------------------------------
6347 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6349 ----------------------------------------------
6350 -- 12.5.5 Formal Interface Type Definition --
6351 ----------------------------------------------
6353 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6355 -----------------------------------------
6356 -- 12.6 Formal Subprogram Declaration --
6357 -----------------------------------------
6359 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6360 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6361 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6363 --------------------------------------------------
6364 -- 12.6 Formal Concrete Subprogram Declaration --
6365 --------------------------------------------------
6367 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6368 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
6369 -- [ASPECT_SPECIFICATIONS];
6371 -- N_Formal_Concrete_Subprogram_Declaration
6372 -- Sloc points to WITH
6373 -- Specification (Node1)
6374 -- Default_Name (Node2) (set to Empty if no subprogram default)
6375 -- Box_Present (Flag15)
6377 -- Note: if no subprogram default is present, then Name is set
6378 -- to Empty, and Box_Present is False.
6380 --------------------------------------------------
6381 -- 12.6 Formal Abstract Subprogram Declaration --
6382 --------------------------------------------------
6384 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6385 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
6386 -- [ASPECT_SPECIFICATIONS];
6388 -- N_Formal_Abstract_Subprogram_Declaration
6389 -- Sloc points to WITH
6390 -- Specification (Node1)
6391 -- Default_Name (Node2) (set to Empty if no subprogram default)
6392 -- Box_Present (Flag15)
6394 -- Note: if no subprogram default is present, then Name is set
6395 -- to Empty, and Box_Present is False.
6397 ------------------------------
6398 -- 12.6 Subprogram Default --
6399 ------------------------------
6401 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6403 -- There is no separate node in the tree for a subprogram default.
6404 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6405 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6406 -- default name or box indication, as needed.
6408 ------------------------
6409 -- 12.6 Default Name --
6410 ------------------------
6412 -- DEFAULT_NAME ::= NAME
6414 --------------------------------------
6415 -- 12.7 Formal Package Declaration --
6416 --------------------------------------
6418 -- FORMAL_PACKAGE_DECLARATION ::=
6419 -- with package DEFINING_IDENTIFIER
6420 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
6421 -- [ASPECT_SPECIFICATIONS];
6423 -- Note: formal package declarations not allowed in Ada 83 mode
6425 -- N_Formal_Package_Declaration
6426 -- Sloc points to WITH
6427 -- Defining_Identifier (Node1)
6429 -- Generic_Associations (List3) (set to No_List if (<>) case or
6430 -- empty generic actual part)
6431 -- Box_Present (Flag15)
6432 -- Instance_Spec (Node5-Sem)
6433 -- ABE_Is_Certain (Flag18-Sem)
6435 --------------------------------------
6436 -- 12.7 Formal Package Actual Part --
6437 --------------------------------------
6439 -- FORMAL_PACKAGE_ACTUAL_PART ::=
6441 -- | [GENERIC_ACTUAL_PART]
6442 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
6444 -- FORMAL_PACKAGE_ASSOCIATION ::=
6445 -- GENERIC_ASSOCIATION
6446 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
6448 -- There is no explicit node in the tree for a formal package actual
6449 -- part. Instead the information appears in the parent node (i.e. the
6450 -- formal package declaration node itself).
6452 -- There is no explicit node for a formal package association. All of
6453 -- them are represented either by a generic association, possibly with
6454 -- Box_Present, or by an N_Others_Choice.
6456 ---------------------------------
6457 -- 13.1 Representation clause --
6458 ---------------------------------
6460 -- REPRESENTATION_CLAUSE ::=
6461 -- ATTRIBUTE_DEFINITION_CLAUSE
6462 -- | ENUMERATION_REPRESENTATION_CLAUSE
6463 -- | RECORD_REPRESENTATION_CLAUSE
6466 ----------------------
6467 -- 13.1 Local Name --
6468 ----------------------
6472 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
6473 -- | library_unit_NAME
6475 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
6476 -- as an attribute reference, which has essentially the same form.
6478 ---------------------------------------
6479 -- 13.3 Attribute definition clause --
6480 ---------------------------------------
6482 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
6483 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
6484 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
6486 -- In Ada 83, the expression must be a simple expression and the
6487 -- local name must be a direct name.
6489 -- Note: the only attribute definition clause that is processed by
6490 -- gigi is an address clause. For all other cases, the information
6491 -- is extracted by the front end and either results in setting entity
6492 -- information, e.g. Esize for the Size clause, or in appropriate
6493 -- expansion actions (e.g. in the case of Storage_Size).
6495 -- For an address clause, Gigi constructs the appropriate addressing
6496 -- code. It also ensures that no aliasing optimizations are made
6497 -- for the object for which the address clause appears.
6499 -- Note: for an address clause used to achieve an overlay:
6503 -- for B'Address use A'Address;
6505 -- the above rule means that Gigi will ensure that no optimizations
6506 -- will be made for B that would violate the implementation advice
6507 -- of RM 13.3(19). However, this advice applies only to B and not
6508 -- to A, which seems unfortunate. The GNAT front end will mark the
6509 -- object A as volatile to also prevent unwanted optimization
6510 -- assumptions based on no aliasing being made for B.
6512 -- N_Attribute_Definition_Clause
6513 -- Sloc points to FOR
6514 -- Name (Node2) the local name
6515 -- Chars (Name1) the identifier name from the attribute designator
6516 -- Expression (Node3) the expression or name
6517 -- Entity (Node4-Sem)
6518 -- Next_Rep_Item (Node5-Sem)
6519 -- From_At_Mod (Flag4-Sem)
6520 -- Check_Address_Alignment (Flag11-Sem)
6521 -- From_Aspect_Specification (Flag13-Sem)
6522 -- Is_Delayed_Aspect (Flag14-Sem)
6523 -- Address_Warning_Posted (Flag18-Sem)
6525 -- Note: if From_Aspect_Specification is set, then Sloc points to the
6526 -- aspect name, and Entity is resolved already to reference the entity
6527 -- to which the aspect applies.
6529 -----------------------------------
6530 -- 13.3.1 Aspect Specifications --
6531 -----------------------------------
6533 -- We modify the RM grammar here, the RM grammar is:
6535 -- ASPECT_SPECIFICATION ::=
6536 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {.
6537 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
6539 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6541 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
6543 -- That's inconvenient, since there is no non-terminal name for a single
6544 -- entry in the list of aspects. So we use this grammar instead:
6546 -- ASPECT_SPECIFICATIONS ::=
6547 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
6549 -- ASPECT_SPECIFICATION =>
6550 -- ASPECT_MARK [=> ASPECT_DEFINITION]
6552 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
6554 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
6556 -- See separate package Aspects for details on the incorporation of
6557 -- these nodes into the tree, and how aspect specifications for a given
6558 -- declaration node are associated with that node.
6560 -- N_Aspect_Specification
6561 -- Sloc points to aspect identifier
6562 -- Identifier (Node1) aspect identifier
6563 -- Aspect_Rep_Item (Node2-Sem)
6564 -- Expression (Node3) Aspect_Definition (set to Empty if none)
6565 -- Entity (Node4-Sem) entity to which the aspect applies
6566 -- Class_Present (Flag6) Set if 'Class present
6567 -- Next_Rep_Item (Node5-Sem)
6568 -- Split_PPC (Flag17) Set if split pre/post attribute
6569 -- Is_Boolean_Aspect (Flag16-Sem)
6570 -- Is_Delayed_Aspect (Flag14-Sem)
6572 -- Note: Aspect_Specification is an Ada 2012 feature
6574 -- Note: The Identifier serves to identify the aspect involved (it
6575 -- is the aspect whose name corresponds to the Chars field). This
6576 -- means that the other fields of this identifier are unused, and
6577 -- in particular we use the Entity field of this identifier to save
6578 -- a copy of the expression for visibility analysis, see spec of
6579 -- Sem_Ch13 for full details of this usage.
6581 -- Note: When a Pre or Post aspect specification is processed, it is
6582 -- broken into AND THEN sections. The left most section has Split_PPC
6583 -- set to False, indicating that it is the original specification (e.g.
6584 -- for posting errors). For the other sections, Split_PPC is set True.
6586 ---------------------------------------------
6587 -- 13.4 Enumeration representation clause --
6588 ---------------------------------------------
6590 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
6591 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
6593 -- In Ada 83, the name must be a direct name
6595 -- N_Enumeration_Representation_Clause
6596 -- Sloc points to FOR
6597 -- Identifier (Node1) direct name
6598 -- Array_Aggregate (Node3)
6599 -- Next_Rep_Item (Node5-Sem)
6601 ---------------------------------
6602 -- 13.4 Enumeration aggregate --
6603 ---------------------------------
6605 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
6607 ------------------------------------------
6608 -- 13.5.1 Record representation clause --
6609 ------------------------------------------
6611 -- RECORD_REPRESENTATION_CLAUSE ::=
6612 -- for first_subtype_LOCAL_NAME use
6613 -- record [MOD_CLAUSE]
6614 -- {COMPONENT_CLAUSE}
6617 -- Gigi restriction: Mod_Clause is always Empty (if present it is
6618 -- replaced by a corresponding Alignment attribute definition clause).
6620 -- Note: Component_Clauses can include pragmas
6622 -- N_Record_Representation_Clause
6623 -- Sloc points to FOR
6624 -- Identifier (Node1) direct name
6625 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
6626 -- Component_Clauses (List3)
6627 -- Next_Rep_Item (Node5-Sem)
6629 ------------------------------
6630 -- 13.5.1 Component clause --
6631 ------------------------------
6633 -- COMPONENT_CLAUSE ::=
6634 -- component_LOCAL_NAME at POSITION
6635 -- range FIRST_BIT .. LAST_BIT;
6637 -- N_Component_Clause
6638 -- Sloc points to AT
6639 -- Component_Name (Node1) points to Name or Attribute_Reference
6641 -- First_Bit (Node3)
6644 ----------------------
6645 -- 13.5.1 Position --
6646 ----------------------
6648 -- POSITION ::= static_EXPRESSION
6650 -----------------------
6651 -- 13.5.1 First_Bit --
6652 -----------------------
6654 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
6656 ----------------------
6657 -- 13.5.1 Last_Bit --
6658 ----------------------
6660 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
6662 --------------------------
6663 -- 13.8 Code statement --
6664 --------------------------
6666 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
6668 -- Note: in GNAT, the qualified expression has the form
6670 -- Asm_Insn'(Asm (...));
6672 -- See package System.Machine_Code in file s-maccod.ads for details on
6673 -- the allowed parameters to Asm. There are two ways this node can
6674 -- arise, as a code statement, in which case the expression is the
6675 -- qualified expression, or as a result of the expansion of an intrinsic
6676 -- call to the Asm or Asm_Input procedure.
6679 -- Sloc points to first token of the expression
6680 -- Expression (Node3)
6682 -- Note: package Exp_Code contains an abstract functional interface
6683 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
6685 ------------------------
6686 -- 13.12 Restriction --
6687 ------------------------
6690 -- restriction_IDENTIFIER
6691 -- | restriction_parameter_IDENTIFIER => EXPRESSION
6693 -- There is no explicit node for restrictions. Instead the restriction
6694 -- appears in normal pragma syntax as a pragma argument association,
6695 -- which has the same syntactic form.
6697 --------------------------
6698 -- B.2 Shift Operators --
6699 --------------------------
6701 -- Calls to the intrinsic shift functions are converted to one of
6702 -- the following shift nodes, which have the form of normal binary
6703 -- operator names. Note that for a given shift operation, one node
6704 -- covers all possible types, as for normal operators.
6706 -- Note: it is perfectly permissible for the expander to generate
6707 -- shift operation nodes directly, in which case they will be analyzed
6708 -- and parsed in the usual manner.
6710 -- Sprint syntax: shift-function-name!(expr, count)
6712 -- Note: the Left_Opnd field holds the first argument (the value to
6713 -- be shifted). The Right_Opnd field holds the second argument (the
6714 -- shift count). The Chars field is the name of the intrinsic function.
6717 -- Sloc points to the function name
6718 -- plus fields for binary operator
6719 -- plus fields for expression
6720 -- Shift_Count_OK (Flag4-Sem)
6722 -- N_Op_Rotate_Right
6723 -- Sloc points to the function name
6724 -- plus fields for binary operator
6725 -- plus fields for expression
6726 -- Shift_Count_OK (Flag4-Sem)
6729 -- Sloc points to the function name
6730 -- plus fields for binary operator
6731 -- plus fields for expression
6732 -- Shift_Count_OK (Flag4-Sem)
6734 -- N_Op_Shift_Right_Arithmetic
6735 -- Sloc points to the function name
6736 -- plus fields for binary operator
6737 -- plus fields for expression
6738 -- Shift_Count_OK (Flag4-Sem)
6741 -- Sloc points to the function name
6742 -- plus fields for binary operator
6743 -- plus fields for expression
6744 -- Shift_Count_OK (Flag4-Sem)
6746 --------------------------
6747 -- Obsolescent Features --
6748 --------------------------
6750 -- The syntax descriptions and tree nodes for obsolescent features are
6751 -- grouped together, corresponding to their location in appendix I in
6752 -- the RM. However, parsing and semantic analysis for these constructs
6753 -- is located in an appropriate chapter (see individual notes).
6755 ---------------------------
6756 -- J.3 Delta Constraint --
6757 ---------------------------
6759 -- Note: the parse routine for this construct is located in section
6760 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
6761 -- where delta constraint logically belongs.
6763 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
6765 -- N_Delta_Constraint
6766 -- Sloc points to DELTA
6767 -- Delta_Expression (Node3)
6768 -- Range_Constraint (Node4) (set to Empty if not present)
6770 --------------------
6772 --------------------
6774 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
6776 -- Note: the parse routine for this construct is located in Par-Ch13,
6777 -- and the semantic analysis is in Sem_Ch13, where at clause logically
6778 -- belongs if it were not obsolescent.
6780 -- Note: in Ada 83 the expression must be a simple expression
6782 -- Gigi restriction: This node never appears, it is rewritten as an
6783 -- address attribute definition clause.
6786 -- Sloc points to FOR
6787 -- Identifier (Node1)
6788 -- Expression (Node3)
6790 ---------------------
6791 -- J.8 Mod clause --
6792 ---------------------
6794 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
6796 -- Note: the parse routine for this construct is located in Par-Ch13,
6797 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
6798 -- belongs if it were not obsolescent.
6800 -- Note: in Ada 83, the expression must be a simple expression
6802 -- Gigi restriction: this node never appears. It is replaced
6803 -- by a corresponding Alignment attribute definition clause.
6805 -- Note: pragmas can appear before and after the MOD_CLAUSE since
6806 -- its name has "clause" in it. This is rather strange, but is quite
6807 -- definitely specified. The pragmas before are collected in the
6808 -- Pragmas_Before field of the mod clause node itself, and pragmas
6809 -- after are simply swallowed up in the list of component clauses.
6812 -- Sloc points to AT
6813 -- Expression (Node3)
6814 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
6816 --------------------
6817 -- Semantic Nodes --
6818 --------------------
6820 -- These semantic nodes are used to hold additional semantic information.
6821 -- They are inserted into the tree as a result of semantic processing.
6822 -- Although there are no legitimate source syntax constructions that
6823 -- correspond directly to these nodes, we need a source syntax for the
6824 -- reconstructed tree printed by Sprint, and the node descriptions here
6825 -- show this syntax.
6827 -- Note: Case_Expression and Conditional_Expression is in this section for
6828 -- now, since they are extensions. We will move them to their appropriate
6829 -- places when they are officially approved as extensions (and then we will
6830 -- know what the exact grammar and place in the Reference Manual is!)
6832 ---------------------
6833 -- Case Expression --
6834 ---------------------
6836 -- CASE_EXPRESSION ::=
6837 -- case EXPRESSION is
6838 -- CASE_EXPRESSION_ALTERNATIVE
6839 -- {CASE_EXPRESSION_ALTERNATIVE}
6841 -- Note that the Alternatives cannot include pragmas (this contrasts
6842 -- with the situation of case statements where pragmas are allowed).
6844 -- N_Case_Expression
6845 -- Sloc points to CASE
6846 -- Expression (Node3)
6847 -- Alternatives (List4)
6849 ---------------------------------
6850 -- Case Expression Alternative --
6851 ---------------------------------
6853 -- CASE_STATEMENT_ALTERNATIVE ::=
6854 -- when DISCRETE_CHOICE_LIST =>
6857 -- N_Case_Expression_Alternative
6858 -- Sloc points to WHEN
6860 -- Discrete_Choices (List4)
6861 -- Expression (Node3)
6863 -- Note: The Actions field temporarily holds any actions associated with
6864 -- evaluation of the Expression. During expansion of the case expression
6865 -- these actions are wrapped into an N_Expressions_With_Actions node
6866 -- replacing the original expression.
6868 ----------------------------
6869 -- Conditional Expression --
6870 ----------------------------
6872 -- This node is used to represent an expression corresponding to the
6873 -- C construct (condition ? then-expression : else_expression), where
6874 -- Expressions is a three element list, whose first expression is the
6875 -- condition, and whose second and third expressions are the then and
6876 -- else expressions respectively.
6878 -- Note: the Then_Actions and Else_Actions fields are always set to
6879 -- No_List in the tree passed to Gigi. These fields are used only
6880 -- for temporary processing purposes in the expander.
6882 -- The Ada language does not permit conditional expressions, however
6883 -- this is under discussion as a possible extension by the ARG, and we
6884 -- have implemented a form of this capability in GNAT under control of
6885 -- the -gnatX switch. The syntax is:
6887 -- CONDITIONAL_EXPRESSION ::=
6888 -- if EXPRESSION then EXPRESSION
6889 -- {elsif EXPRESSION then EXPRESSION}
6890 -- [else EXPRESSION]
6892 -- And we add the additional constructs
6894 -- PRIMARY ::= ( CONDITIONAL_EXPRESSION )
6895 -- PRAGMA_ARGUMENT_ASSOCIATION ::= CONDITIONAL_EXPRESSION
6897 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
6898 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
6899 -- the Is_Elsif flag is set on the inner conditional expression.
6901 -- N_Conditional_Expression
6902 -- Sloc points to IF or ELSIF keyword
6903 -- Expressions (List1)
6904 -- Then_Actions (List2-Sem)
6905 -- Else_Actions (List3-Sem)
6906 -- Is_Elsif (Flag13) (set if comes from ELSIF)
6907 -- plus fields for expression
6913 -- This node is used to hold the various parts of an entry or subprogram
6914 -- contract, consisting in pre- and postconditions on the one hand, and
6915 -- test-cases on the other hand.
6917 -- It is referenced from an entry, a subprogram or a generic subprogram
6920 -- Sprint syntax: <none> as the node should not appear in the tree, but
6921 -- only attached to an entry or [generic] subprogram
6925 -- Sloc points to the subprogram's name
6926 -- Spec_PPC_List (Node1) (set to Empty if none)
6927 -- Spec_TC_List (Node2) (set to Empty if none)
6929 -- Spec_PPC_List points to a list of Precondition and Postcondition
6930 -- pragma nodes for preconditions and postconditions declared in the
6931 -- spec of the entry/subprogram. The last pragma encountered is at the
6932 -- head of this list, so it is in reverse order of textual appearance.
6933 -- Note that this includes precondition/postcondition pragmas generated
6934 -- to correspond to Pre/Post aspects.
6936 -- Spec_TC_List points to a list of Test_Case pragma nodes for
6937 -- test-cases declared in the spec of the entry/subprogram. The last
6938 -- pragma encountered is at the head of this list, so it is in reverse
6939 -- order of textual appearance. Note that this includes test-case
6940 -- pragmas generated to correspond to Test_Case aspects.
6946 -- The N_Expanded_Name node is used to represent a selected component
6947 -- name that has been resolved to an expanded name. The semantic phase
6948 -- replaces N_Selected_Component nodes that represent names by the use
6949 -- of this node, leaving the N_Selected_Component node used only when
6950 -- the prefix is a record or protected type.
6952 -- The fields of the N_Expanded_Name node are layed out identically
6953 -- to those of the N_Selected_Component node, allowing conversion of
6954 -- an expanded name node to a selected component node to be done
6955 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
6957 -- There is no special sprint syntax for an expanded name
6960 -- Sloc points to the period
6961 -- Chars (Name1) copy of Chars field of selector name
6963 -- Selector_Name (Node2)
6964 -- Entity (Node4-Sem)
6965 -- Associated_Node (Node4-Sem)
6966 -- Redundant_Use (Flag13-Sem)
6967 -- Has_Private_View (Flag11-Sem) set in generic units.
6968 -- plus fields for expression
6970 -----------------------------
6971 -- Expression with Actions --
6972 -----------------------------
6974 -- This node is created by the analyzer/expander to handle some
6975 -- expansion cases, notably short circuit forms where there are
6976 -- actions associated with the right-hand side operand.
6978 -- The N_Expression_With_Actions node represents an expression with
6979 -- an associated set of actions (which are executable statements and
6980 -- declarations, as might occur in a handled statement sequence).
6982 -- The required semantics is that the set of actions is executed in
6983 -- the order in which it appears just before the expression is
6984 -- evaluated (and these actions must only be executed if the value
6985 -- of the expression is evaluated). The node is considered to be
6986 -- a subexpression, whose value is the value of the Expression after
6987 -- executing all the actions.
6989 -- Note: if the actions contain declarations, then these declarations
6990 -- may be referenced within the expression. It is thus appropriate for
6991 -- the back-end to create a scope that encompasses the construct (any
6992 -- declarations within the actions will definitely not be referenced
6993 -- once elaboration of the construct is completed).
6995 -- Sprint syntax: do
7000 -- in expression end
7002 -- N_Expression_With_Actions
7004 -- Expression (Node3)
7005 -- plus fields for expression
7007 -- Note: the actions list is always non-null, since we would
7008 -- never have created this node if there weren't some actions.
7010 --------------------
7011 -- Free Statement --
7012 --------------------
7014 -- The N_Free_Statement node is generated as a result of a call to an
7015 -- instantiation of Unchecked_Deallocation. The instantiation of this
7016 -- generic is handled specially and generates this node directly.
7018 -- Sprint syntax: free expression
7021 -- Sloc is copied from the unchecked deallocation call
7022 -- Expression (Node3) argument to unchecked deallocation call
7023 -- Storage_Pool (Node1-Sem)
7024 -- Procedure_To_Call (Node2-Sem)
7025 -- Actual_Designated_Subtype (Node4-Sem)
7027 -- Note: in the case where a debug source file is generated, the Sloc
7028 -- for this node points to the FREE keyword in the Sprint file output.
7034 -- This node marks the point in a declarative part at which an entity
7035 -- declared therein becomes frozen. The expander places initialization
7036 -- procedures for types at those points. Gigi uses the freezing point
7037 -- to elaborate entities that may depend on previous private types.
7039 -- See the section in Einfo "Delayed Freezing and Elaboration" for
7040 -- a full description of the use of this node.
7042 -- The Entity field points back to the entity for the type (whose
7043 -- Freeze_Node field points back to this freeze node).
7045 -- The Actions field contains a list of declarations and statements
7046 -- generated by the expander which are associated with the freeze
7047 -- node, and are elaborated as though the freeze node were replaced
7048 -- by this sequence of actions.
7050 -- Note: the Sloc field in the freeze node references a construct
7051 -- associated with the freezing point. This is used for posting
7052 -- messages in some error/warning situations, e.g. the case where
7053 -- a primitive operation of a tagged type is declared too late.
7055 -- Sprint syntax: freeze entity-name [
7060 -- Sloc points near freeze point (see above special note)
7061 -- Entity (Node4-Sem)
7062 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
7063 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
7064 -- Actions (List1) (set to No_List if no freeze actions)
7065 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
7067 -- The Actions field holds actions associated with the freeze. These
7068 -- actions are elaborated at the point where the type is frozen.
7070 -- Note: in the case where a debug source file is generated, the Sloc
7071 -- for this node points to the FREEZE keyword in the Sprint file output.
7073 --------------------------------
7074 -- Implicit Label Declaration --
7075 --------------------------------
7077 -- An implicit label declaration is created for every occurrence of a
7078 -- label on a statement or a label on a block or loop. It is chained
7079 -- in the declarations of the innermost enclosing block as specified
7080 -- in RM section 5.1 (3).
7082 -- The Defining_Identifier is the actual identifier for the statement
7083 -- identifier. Note that the occurrence of the label is a reference, NOT
7084 -- the defining occurrence. The defining occurrence occurs at the head
7085 -- of the innermost enclosing block, and is represented by this node.
7087 -- Note: from the grammar, this might better be called an implicit
7088 -- statement identifier declaration, but the term we choose seems
7089 -- friendlier, since at least informally statement identifiers are
7090 -- called labels in both cases (i.e. when used in labels, and when
7091 -- used as the identifiers of blocks and loops).
7093 -- Note: although this is logically a semantic node, since it does not
7094 -- correspond directly to a source syntax construction, these nodes are
7095 -- actually created by the parser in a post pass done just after parsing
7096 -- is complete, before semantic analysis is started (see Par.Labl).
7098 -- Sprint syntax: labelname : label;
7100 -- N_Implicit_Label_Declaration
7101 -- Sloc points to the << of the label
7102 -- Defining_Identifier (Node1)
7103 -- Label_Construct (Node2-Sem)
7105 -- Note: in the case where a debug source file is generated, the Sloc
7106 -- for this node points to the label name in the generated declaration.
7108 ---------------------
7109 -- Itype_Reference --
7110 ---------------------
7112 -- This node is used to create a reference to an Itype. The only purpose
7113 -- is to make sure the Itype is defined if this is the first reference.
7115 -- A typical use of this node is when an Itype is to be referenced in
7116 -- two branches of an IF statement. In this case it is important that
7117 -- the first use of the Itype not be inside the conditional, since then
7118 -- it might not be defined if the other branch of the IF is taken, in
7119 -- the case where the definition generates elaboration code.
7121 -- The Itype field points to the referenced Itype
7123 -- Sprint syntax: reference itype-name
7125 -- N_Itype_Reference
7126 -- Sloc points to the node generating the reference
7127 -- Itype (Node1-Sem)
7129 -- Note: in the case where a debug source file is generated, the Sloc
7130 -- for this node points to the REFERENCE keyword in the file output.
7132 ---------------------
7133 -- Raise_xxx_Error --
7134 ---------------------
7136 -- One of these nodes is created during semantic analysis to replace
7137 -- a node for an expression that is determined to definitely raise
7138 -- the corresponding exception.
7140 -- The N_Raise_xxx_Error node may also stand alone in place
7141 -- of a declaration or statement, in which case it simply causes
7142 -- the exception to be raised (i.e. it is equivalent to a raise
7143 -- statement that raises the corresponding exception). This use
7144 -- is distinguished by the fact that the Etype in this case is
7145 -- Standard_Void_Type, In the subexpression case, the Etype is the
7146 -- same as the type of the subexpression which it replaces.
7148 -- If Condition is empty, then the raise is unconditional. If the
7149 -- Condition field is non-empty, it is a boolean expression which
7150 -- is first evaluated, and the exception is raised only if the
7151 -- value of the expression is True. In the unconditional case, the
7152 -- creation of this node is usually accompanied by a warning message
7153 -- error. The creation of this node will usually be accompanied by a
7154 -- message (unless it appears within the right operand of a short
7155 -- circuit form whose left argument is static and decisively
7156 -- eliminates elaboration of the raise operation. The condition field
7157 -- can ONLY be present when the node is used as a statement form, it
7158 -- may NOT be present in the case where the node appears within an
7161 -- The exception is generated with a message that contains the
7162 -- file name and line number, and then appended text. The Reason
7163 -- code shows the text to be added. The Reason code is an element
7164 -- of the type Types.RT_Exception_Code, and indicates both the
7165 -- message to be added, and the exception to be raised (which must
7166 -- match the node type). The value is stored by storing a Uint which
7167 -- is the Pos value of the enumeration element in this type.
7169 -- Gigi restriction: This expander ensures that the type of the
7170 -- Condition field is always Standard.Boolean, even if the type
7171 -- in the source is some non-standard boolean type.
7173 -- Sprint syntax: [xxx_error "msg"]
7174 -- or: [xxx_error when condition "msg"]
7176 -- N_Raise_Constraint_Error
7177 -- Sloc references related construct
7178 -- Condition (Node1) (set to Empty if no condition)
7180 -- plus fields for expression
7182 -- N_Raise_Program_Error
7183 -- Sloc references related construct
7184 -- Condition (Node1) (set to Empty if no condition)
7186 -- plus fields for expression
7188 -- N_Raise_Storage_Error
7189 -- Sloc references related construct
7190 -- Condition (Node1) (set to Empty if no condition)
7192 -- plus fields for expression
7194 -- Note: Sloc is copied from the expression generating the exception.
7195 -- In the case where a debug source file is generated, the Sloc for
7196 -- this node points to the left bracket in the Sprint file output.
7198 -- Note: the back end may be required to translate these nodes into
7199 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
7201 ---------------------------------------------
7202 -- Optimization of Exception Raise to Goto --
7203 ---------------------------------------------
7205 -- In some cases, the front end will determine that any exception raised
7206 -- by the back end for a certain exception should be transformed into a
7209 -- There are three kinds of exceptions raised by the back end (note that
7210 -- for this purpose we consider gigi to be part of the back end in the
7213 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
7214 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
7215 -- 3. Other cases not specifically marked by the front end
7217 -- Normally all such exceptions are translated into calls to the proper
7218 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
7219 -- and the exception message.
7221 -- The front end may determine that for a particular sequence of code,
7222 -- exceptions in any of these three categories for a particular builtin
7223 -- exception should result in a goto, rather than a call to Rcheck_xx.
7224 -- The exact sequence to be generated is:
7226 -- Local_Raise (exception'Identity);
7229 -- The front end marks such a sequence of code by bracketing it with
7230 -- push and pop nodes:
7232 -- N_Push_xxx_Label (referencing the label)
7234 -- (code where transformation is expected for exception xxx)
7238 -- The use of push/pop reflects the fact that such regions can properly
7239 -- nest, and one special case is a subregion in which no transformation
7240 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
7241 -- Exception_Label field is Empty.
7243 -- N_Push_Constraint_Error_Label
7244 -- Sloc references first statement in region covered
7245 -- Exception_Label (Node5-Sem)
7247 -- N_Push_Program_Error_Label
7248 -- Sloc references first statement in region covered
7249 -- Exception_Label (Node5-Sem)
7251 -- N_Push_Storage_Error_Label
7252 -- Sloc references first statement in region covered
7253 -- Exception_Label (Node5-Sem)
7255 -- N_Pop_Constraint_Error_Label
7256 -- Sloc references last statement in region covered
7258 -- N_Pop_Program_Error_Label
7259 -- Sloc references last statement in region covered
7261 -- N_Pop_Storage_Error_Label
7262 -- Sloc references last statement in region covered
7268 -- For a number of purposes, we need to construct references to objects.
7269 -- These references are subsequently treated as normal access values.
7270 -- An example is the construction of the parameter block passed to a
7271 -- task entry. The N_Reference node is provided for this purpose. It is
7272 -- similar in effect to the use of the Unrestricted_Access attribute,
7273 -- and like Unrestricted_Access can be applied to objects which would
7274 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
7275 -- objects which are not aliased, and slices). In addition it can be
7276 -- applied to composite type values as well as objects, including string
7277 -- values and aggregates.
7279 -- Note: we use the Prefix field for this expression so that the
7280 -- resulting node can be treated using common code with the attribute
7281 -- nodes for the 'Access and related attributes. Logically it would make
7282 -- more sense to call it an Expression field, but then we would have to
7283 -- special case the treatment of the N_Reference node.
7285 -- Sprint syntax: prefix'reference
7288 -- Sloc is copied from the expression
7290 -- plus fields for expression
7292 -- Note: in the case where a debug source file is generated, the Sloc
7293 -- for this node points to the quote in the Sprint file output.
7299 -- SCIL nodes are special nodes added to the tree when the CodePeer
7300 -- mode is active. They help the CodePeer backend to locate nodes that
7301 -- require special processing.
7303 -- Major documentation on the general design of the SCIL interface, and
7304 -- in particular detailed description of these nodes is missing and is
7305 -- to be supplied in the future, when the design has finalized ???
7307 -- Meanwhile these nodes should be considered in experimental form, and
7308 -- should be ignored by all code generating back ends. ???
7310 -- N_SCIL_Dispatch_Table_Tag_Init
7311 -- Sloc references a node for a tag initialization
7312 -- SCIL_Entity (Node4-Sem)
7314 -- N_SCIL_Dispatching_Call
7315 -- Sloc references the node of a dispatching call
7316 -- SCIL_Target_Prim (Node2-Sem)
7317 -- SCIL_Entity (Node4-Sem)
7318 -- SCIL_Controlling_Tag (Node5-Sem)
7320 -- N_SCIL_Membership_Test
7321 -- Sloc references the node of a membership test
7322 -- SCIL_Tag_Value (Node5-Sem)
7323 -- SCIL_Entity (Node4-Sem)
7325 ---------------------
7326 -- Subprogram_Info --
7327 ---------------------
7329 -- This node generates the appropriate Subprogram_Info value for a
7330 -- given procedure. See Ada.Exceptions for further details
7332 -- Sprint syntax: subprog'subprogram_info
7334 -- N_Subprogram_Info
7335 -- Sloc points to the entity for the procedure
7336 -- Identifier (Node1) identifier referencing the procedure
7337 -- Etype (Node5-Sem) type (always set to Ada.Exceptions.Code_Loc
7339 -- Note: in the case where a debug source file is generated, the Sloc
7340 -- for this node points to the quote in the Sprint file output.
7342 --------------------------
7343 -- Unchecked Expression --
7344 --------------------------
7346 -- An unchecked expression is one that must be analyzed and resolved
7347 -- with all checks off, regardless of the current setting of scope
7350 -- Sprint syntax: `(expression)
7352 -- Note: this node is always removed from the tree (and replaced by
7353 -- its constituent expression) on completion of analysis, so it only
7354 -- appears in intermediate trees, and will never be seen by Gigi.
7356 -- N_Unchecked_Expression
7357 -- Sloc is a copy of the Sloc of the expression
7358 -- Expression (Node3)
7359 -- plus fields for expression
7361 -- Note: in the case where a debug source file is generated, the Sloc
7362 -- for this node points to the back quote in the Sprint file output.
7364 -------------------------------
7365 -- Unchecked Type Conversion --
7366 -------------------------------
7368 -- An unchecked type conversion node represents the semantic action
7369 -- corresponding to a call to an instantiation of Unchecked_Conversion.
7370 -- It is generated as a result of actual use of Unchecked_Conversion
7371 -- and also the expander generates unchecked type conversion nodes
7372 -- directly for expansion of complex semantic actions.
7374 -- Note: an unchecked type conversion is a variable as far as the
7375 -- semantics are concerned, which is convenient for the expander.
7376 -- This does not change what Ada source programs are legal, since
7377 -- clearly a function call to an instantiation of Unchecked_Conversion
7378 -- is not a variable in any case.
7380 -- Sprint syntax: subtype-mark!(expression)
7382 -- N_Unchecked_Type_Conversion
7383 -- Sloc points to related node in source
7384 -- Subtype_Mark (Node4)
7385 -- Expression (Node3)
7386 -- Kill_Range_Check (Flag11-Sem)
7387 -- No_Truncation (Flag17-Sem)
7388 -- plus fields for expression
7390 -- Note: in the case where a debug source file is generated, the Sloc
7391 -- for this node points to the exclamation in the Sprint file output.
7393 -----------------------------------
7394 -- Validate_Unchecked_Conversion --
7395 -----------------------------------
7397 -- The front end does most of the validation of unchecked conversion,
7398 -- including checking sizes (this is done after the back end is called
7399 -- to take advantage of back-annotation of calculated sizes).
7401 -- The front end also deals with specific cases that are not allowed
7402 -- e.g. involving unconstrained array types.
7404 -- For the case of the standard gigi backend, this means that all
7405 -- checks are done in the front-end.
7407 -- However, in the case of specialized back-ends, notably the JVM
7408 -- backend for JGNAT, additional requirements and restrictions apply
7409 -- to unchecked conversion, and these are most conveniently performed
7410 -- in the specialized back-end.
7412 -- To accommodate this requirement, for such back ends, the following
7413 -- special node is generated recording an unchecked conversion that
7414 -- needs to be validated. The back end should post an appropriate
7415 -- error message if the unchecked conversion is invalid or warrants
7416 -- a special warning message.
7418 -- Source_Type and Target_Type point to the entities for the two
7419 -- types involved in the unchecked conversion instantiation that
7420 -- is to be validated.
7422 -- Sprint syntax: validate Unchecked_Conversion (source, target);
7424 -- N_Validate_Unchecked_Conversion
7425 -- Sloc points to instantiation (location for warning message)
7426 -- Source_Type (Node1-Sem)
7427 -- Target_Type (Node2-Sem)
7429 -- Note: in the case where a debug source file is generated, the Sloc
7430 -- for this node points to the VALIDATE keyword in the file output.
7436 -- Used as the contents of the Nkind field of the dummy Empty node
7437 -- and in some other situations to indicate an uninitialized value.
7440 -- Chars (Name1) is set to No_Name
7446 -- Used as the contents of the Nkind field of the dummy Error node.
7447 -- Has an Etype field, which gets set to Any_Type later on, to help
7448 -- error recovery (Error_Posted is also set in the Error node).
7451 -- Chars (Name1) is set to Error_Name
7452 -- Etype (Node5-Sem)
7454 --------------------------
7455 -- Node Type Definition --
7456 --------------------------
7458 -- The following is the definition of the Node_Kind type. As previously
7459 -- discussed, this is separated off to allow rearrangement of the order to
7460 -- facilitate definition of subtype ranges. The comments show the subtype
7461 -- classes which apply to each set of node kinds. The first entry in the
7462 -- comment characterizes the following list of nodes.
7467 -- N_Representation_Clause
7471 N_Enumeration_Representation_Clause,
7473 N_Record_Representation_Clause,
7475 -- N_Representation_Clause, N_Has_Chars
7477 N_Attribute_Definition_Clause,
7482 N_Pragma_Argument_Association,
7484 -- N_Has_Etype, N_Has_Chars
7486 -- Note: of course N_Error does not really have Etype or Chars fields,
7487 -- and any attempt to access these fields in N_Error will cause an
7488 -- error, but historically this always has been positioned so that an
7489 -- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
7490 -- Most likely this makes coding easier somewhere but still seems
7491 -- undesirable. To be investigated some time ???
7495 -- N_Entity, N_Has_Etype, N_Has_Chars
7497 N_Defining_Character_Literal,
7498 N_Defining_Identifier,
7499 N_Defining_Operator_Symbol,
7501 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
7505 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7506 -- N_Has_Chars, N_Has_Entity
7511 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
7512 -- N_Has_Chars, N_Has_Entity
7514 N_Character_Literal,
7516 -- N_Binary_Op, N_Op, N_Subexpr,
7517 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
7524 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
7525 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
7532 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7533 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7537 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7538 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
7547 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
7548 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
7553 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
7554 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
7560 N_Op_Shift_Right_Arithmetic,
7562 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
7563 -- N_Has_Chars, N_Has_Entity
7570 -- N_Subexpr, N_Has_Etype, N_Has_Entity
7572 N_Attribute_Reference,
7574 -- N_Subexpr, N_Has_Etype, N_Membership_Test
7579 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
7584 -- N_Subexpr, N_Has_Etype
7586 N_Conditional_Expression,
7587 N_Explicit_Dereference,
7588 N_Expression_With_Actions,
7590 N_Indexed_Component,
7593 N_Procedure_Call_Statement,
7594 N_Qualified_Expression,
7595 N_Quantified_Expression,
7597 -- N_Raise_xxx_Error, N_Subexpr, N_Has_Etype
7599 N_Raise_Constraint_Error,
7600 N_Raise_Program_Error,
7601 N_Raise_Storage_Error,
7603 -- N_Subexpr, N_Has_Etype
7608 N_Extension_Aggregate,
7612 N_Selected_Component,
7617 N_Unchecked_Expression,
7618 N_Unchecked_Type_Conversion,
7622 N_Subtype_Indication,
7626 N_Component_Declaration,
7627 N_Entry_Declaration,
7628 N_Expression_Function,
7629 N_Formal_Object_Declaration,
7630 N_Formal_Type_Declaration,
7631 N_Full_Type_Declaration,
7632 N_Incomplete_Type_Declaration,
7633 N_Iterator_Specification,
7634 N_Loop_Parameter_Specification,
7635 N_Object_Declaration,
7636 N_Protected_Type_Declaration,
7637 N_Private_Extension_Declaration,
7638 N_Private_Type_Declaration,
7639 N_Subtype_Declaration,
7641 -- N_Subprogram_Specification, N_Declaration
7643 N_Function_Specification,
7644 N_Procedure_Specification,
7646 -- N_Access_To_Subprogram_Definition
7648 N_Access_Function_Definition,
7649 N_Access_Procedure_Definition,
7651 -- N_Later_Decl_Item
7653 N_Task_Type_Declaration,
7655 -- N_Body_Stub, N_Later_Decl_Item
7657 N_Package_Body_Stub,
7658 N_Protected_Body_Stub,
7659 N_Subprogram_Body_Stub,
7662 -- N_Generic_Instantiation, N_Later_Decl_Item
7663 -- N_Subprogram_Instantiation
7665 N_Function_Instantiation,
7666 N_Procedure_Instantiation,
7668 -- N_Generic_Instantiation, N_Later_Decl_Item
7670 N_Package_Instantiation,
7672 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
7677 -- N_Later_Decl_Item, N_Proper_Body
7682 -- N_Later_Decl_Item
7684 N_Implicit_Label_Declaration,
7685 N_Package_Declaration,
7686 N_Single_Task_Declaration,
7687 N_Subprogram_Declaration,
7688 N_Use_Package_Clause,
7690 -- N_Generic_Declaration, N_Later_Decl_Item
7692 N_Generic_Package_Declaration,
7693 N_Generic_Subprogram_Declaration,
7695 -- N_Array_Type_Definition
7697 N_Constrained_Array_Definition,
7698 N_Unconstrained_Array_Definition,
7700 -- N_Renaming_Declaration
7702 N_Exception_Renaming_Declaration,
7703 N_Object_Renaming_Declaration,
7704 N_Package_Renaming_Declaration,
7705 N_Subprogram_Renaming_Declaration,
7707 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
7709 N_Generic_Function_Renaming_Declaration,
7710 N_Generic_Package_Renaming_Declaration,
7711 N_Generic_Procedure_Renaming_Declaration,
7713 -- N_Statement_Other_Than_Procedure_Call
7717 N_Assignment_Statement,
7718 N_Asynchronous_Select,
7722 N_Conditional_Entry_Call,
7724 -- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
7726 N_Delay_Relative_Statement,
7727 N_Delay_Until_Statement,
7729 -- N_Statement_Other_Than_Procedure_Call
7731 N_Entry_Call_Statement,
7737 N_Requeue_Statement,
7738 N_Return_Statement, -- renamed as N_Simple_Return_Statement below
7739 N_Extended_Return_Statement,
7743 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
7750 N_Accept_Alternative,
7751 N_Delay_Alternative,
7753 N_Entry_Body_Formal_Part,
7755 N_Terminate_Alternative,
7757 -- N_Formal_Subprogram_Declaration
7759 N_Formal_Abstract_Subprogram_Declaration,
7760 N_Formal_Concrete_Subprogram_Declaration,
7762 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
7764 N_Push_Constraint_Error_Label,
7765 N_Push_Program_Error_Label,
7766 N_Push_Storage_Error_Label,
7768 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
7770 N_Pop_Constraint_Error_Label,
7771 N_Pop_Program_Error_Label,
7772 N_Pop_Storage_Error_Label,
7776 N_SCIL_Dispatch_Table_Tag_Init,
7777 N_SCIL_Dispatching_Call,
7778 N_SCIL_Membership_Test,
7780 -- Other nodes (not part of any subtype class)
7783 N_Abstract_Subprogram_Declaration,
7784 N_Access_Definition,
7785 N_Access_To_Object_Definition,
7786 N_Aspect_Specification,
7787 N_Case_Expression_Alternative,
7788 N_Case_Statement_Alternative,
7790 N_Compilation_Unit_Aux,
7791 N_Component_Association,
7792 N_Component_Definition,
7795 N_Derived_Type_Definition,
7796 N_Decimal_Fixed_Point_Definition,
7797 N_Defining_Program_Unit_Name,
7800 N_Digits_Constraint,
7801 N_Discriminant_Association,
7802 N_Discriminant_Specification,
7803 N_Enumeration_Type_Definition,
7805 N_Entry_Call_Alternative,
7806 N_Entry_Index_Specification,
7807 N_Exception_Declaration,
7808 N_Exception_Handler,
7809 N_Floating_Point_Definition,
7810 N_Formal_Decimal_Fixed_Point_Definition,
7811 N_Formal_Derived_Type_Definition,
7812 N_Formal_Discrete_Type_Definition,
7813 N_Formal_Floating_Point_Definition,
7814 N_Formal_Modular_Type_Definition,
7815 N_Formal_Ordinary_Fixed_Point_Definition,
7816 N_Formal_Package_Declaration,
7817 N_Formal_Private_Type_Definition,
7818 N_Formal_Signed_Integer_Type_Definition,
7820 N_Generic_Association,
7821 N_Handled_Sequence_Of_Statements,
7822 N_Index_Or_Discriminant_Constraint,
7825 N_Modular_Type_Definition,
7826 N_Number_Declaration,
7827 N_Ordinary_Fixed_Point_Definition,
7829 N_Package_Specification,
7830 N_Parameter_Association,
7831 N_Parameter_Specification,
7833 N_Protected_Definition,
7835 N_Real_Range_Specification,
7836 N_Record_Definition,
7837 N_Signed_Integer_Type_Definition,
7838 N_Single_Protected_Declaration,
7841 N_Triggering_Alternative,
7843 N_Validate_Unchecked_Conversion,
7849 for Node_Kind'Size use 8;
7850 -- The data structures in Atree assume this!
7852 ----------------------------
7853 -- Node Class Definitions --
7854 ----------------------------
7856 subtype N_Access_To_Subprogram_Definition is Node_Kind range
7857 N_Access_Function_Definition ..
7858 N_Access_Procedure_Definition;
7860 subtype N_Array_Type_Definition is Node_Kind range
7861 N_Constrained_Array_Definition ..
7862 N_Unconstrained_Array_Definition;
7864 subtype N_Binary_Op is Node_Kind range
7866 N_Op_Shift_Right_Arithmetic;
7868 subtype N_Body_Stub is Node_Kind range
7869 N_Package_Body_Stub ..
7872 subtype N_Declaration is Node_Kind range
7873 N_Component_Declaration ..
7874 N_Procedure_Specification;
7875 -- Note: this includes all constructs normally thought of as declarations
7876 -- except those which are separately grouped as later declarations.
7878 subtype N_Delay_Statement is Node_Kind range
7879 N_Delay_Relative_Statement ..
7880 N_Delay_Until_Statement;
7882 subtype N_Direct_Name is Node_Kind range
7884 N_Character_Literal;
7886 subtype N_Entity is Node_Kind range
7887 N_Defining_Character_Literal ..
7888 N_Defining_Operator_Symbol;
7890 subtype N_Formal_Subprogram_Declaration is Node_Kind range
7891 N_Formal_Abstract_Subprogram_Declaration ..
7892 N_Formal_Concrete_Subprogram_Declaration;
7894 subtype N_Generic_Declaration is Node_Kind range
7895 N_Generic_Package_Declaration ..
7896 N_Generic_Subprogram_Declaration;
7898 subtype N_Generic_Instantiation is Node_Kind range
7899 N_Function_Instantiation ..
7900 N_Package_Instantiation;
7902 subtype N_Generic_Renaming_Declaration is Node_Kind range
7903 N_Generic_Function_Renaming_Declaration ..
7904 N_Generic_Procedure_Renaming_Declaration;
7906 subtype N_Has_Chars is Node_Kind range
7907 N_Attribute_Definition_Clause ..
7910 subtype N_Has_Entity is Node_Kind range
7912 N_Attribute_Reference;
7913 -- Nodes that have Entity fields
7914 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Aspect_Specification,
7915 -- or N_Attribute_Definition_Clause.
7917 subtype N_Has_Etype is Node_Kind range
7919 N_Subtype_Indication;
7921 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
7925 subtype N_Multiplying_Operator is Node_Kind range
7929 subtype N_Later_Decl_Item is Node_Kind range
7930 N_Task_Type_Declaration ..
7931 N_Generic_Subprogram_Declaration;
7932 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
7933 -- only those items which can appear as later declarative items. This also
7934 -- includes N_Implicit_Label_Declaration which is not specifically in the
7935 -- grammar but may appear as a valid later declarative items. It does NOT
7936 -- include N_Pragma which can also appear among later declarative items.
7937 -- It does however include N_Protected_Body, which is a bit peculiar, but
7938 -- harmless since this cannot appear in Ada 83 mode anyway.
7940 subtype N_Membership_Test is Node_Kind range
7944 subtype N_Op is Node_Kind range
7948 subtype N_Op_Boolean is Node_Kind range
7951 -- Binary operators which take operands of a boolean type, and yield
7952 -- a result of a boolean type.
7954 subtype N_Op_Compare is Node_Kind range
7958 subtype N_Op_Shift is Node_Kind range
7960 N_Op_Shift_Right_Arithmetic;
7962 subtype N_Proper_Body is Node_Kind range
7966 subtype N_Push_xxx_Label is Node_Kind range
7967 N_Push_Constraint_Error_Label ..
7968 N_Push_Storage_Error_Label;
7970 subtype N_Pop_xxx_Label is Node_Kind range
7971 N_Pop_Constraint_Error_Label ..
7972 N_Pop_Storage_Error_Label;
7974 subtype N_Push_Pop_xxx_Label is Node_Kind range
7975 N_Push_Constraint_Error_Label ..
7976 N_Pop_Storage_Error_Label;
7978 subtype N_Raise_xxx_Error is Node_Kind range
7979 N_Raise_Constraint_Error ..
7980 N_Raise_Storage_Error;
7982 subtype N_Renaming_Declaration is Node_Kind range
7983 N_Exception_Renaming_Declaration ..
7984 N_Generic_Procedure_Renaming_Declaration;
7986 subtype N_Representation_Clause is Node_Kind range
7988 N_Attribute_Definition_Clause;
7990 subtype N_Short_Circuit is Node_Kind range
7994 subtype N_SCIL_Node is Node_Kind range
7995 N_SCIL_Dispatch_Table_Tag_Init ..
7996 N_SCIL_Membership_Test;
7998 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
7999 N_Abort_Statement ..
8001 -- Note that this includes all statement types except for the cases of the
8002 -- N_Procedure_Call_Statement which is considered to be a subexpression
8003 -- (since overloading is possible, so it needs to go through the normal
8004 -- overloading resolution for expressions).
8006 subtype N_Subprogram_Instantiation is Node_Kind range
8007 N_Function_Instantiation ..
8008 N_Procedure_Instantiation;
8010 subtype N_Has_Condition is Node_Kind range
8012 N_Terminate_Alternative;
8013 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
8015 subtype N_Subexpr is Node_Kind range
8017 N_Unchecked_Type_Conversion;
8018 -- Nodes with expression fields
8020 subtype N_Subprogram_Specification is Node_Kind range
8021 N_Function_Specification ..
8022 N_Procedure_Specification;
8024 subtype N_Unary_Op is Node_Kind range
8028 subtype N_Unit_Body is Node_Kind range
8032 ---------------------------
8033 -- Node Access Functions --
8034 ---------------------------
8036 -- The following functions return the contents of the indicated field of
8037 -- the node referenced by the argument, which is a Node_Id. They provide
8038 -- logical access to fields in the node which could be accessed using the
8039 -- Atree.Unchecked_Access package, but the idea is always to use these
8040 -- higher level routines which preserve strong typing. In debug mode,
8041 -- these routines check that they are being applied to an appropriate
8042 -- node, as well as checking that the node is in range.
8044 function ABE_Is_Certain
8045 (N : Node_Id) return Boolean; -- Flag18
8047 function Abort_Present
8048 (N : Node_Id) return Boolean; -- Flag15
8050 function Abortable_Part
8051 (N : Node_Id) return Node_Id; -- Node2
8053 function Abstract_Present
8054 (N : Node_Id) return Boolean; -- Flag4
8056 function Accept_Handler_Records
8057 (N : Node_Id) return List_Id; -- List5
8059 function Accept_Statement
8060 (N : Node_Id) return Node_Id; -- Node2
8062 function Access_Definition
8063 (N : Node_Id) return Node_Id; -- Node3
8065 function Access_To_Subprogram_Definition
8066 (N : Node_Id) return Node_Id; -- Node3
8068 function Access_Types_To_Process
8069 (N : Node_Id) return Elist_Id; -- Elist2
8072 (N : Node_Id) return List_Id; -- List1
8074 function Activation_Chain_Entity
8075 (N : Node_Id) return Node_Id; -- Node3
8077 function Acts_As_Spec
8078 (N : Node_Id) return Boolean; -- Flag4
8080 function Actual_Designated_Subtype
8081 (N : Node_Id) return Node_Id; -- Node4
8083 function Address_Warning_Posted
8084 (N : Node_Id) return Boolean; -- Flag18
8086 function Aggregate_Bounds
8087 (N : Node_Id) return Node_Id; -- Node3
8089 function Aliased_Present
8090 (N : Node_Id) return Boolean; -- Flag4
8093 (N : Node_Id) return Boolean; -- Flag11
8095 function All_Present
8096 (N : Node_Id) return Boolean; -- Flag15
8098 function Alternatives
8099 (N : Node_Id) return List_Id; -- List4
8101 function Ancestor_Part
8102 (N : Node_Id) return Node_Id; -- Node3
8104 function Array_Aggregate
8105 (N : Node_Id) return Node_Id; -- Node3
8107 function Aspect_Rep_Item
8108 (N : Node_Id) return Node_Id; -- Node2
8110 function Assignment_OK
8111 (N : Node_Id) return Boolean; -- Flag15
8113 function Associated_Node
8114 (N : Node_Id) return Node_Id; -- Node4
8116 function At_End_Proc
8117 (N : Node_Id) return Node_Id; -- Node1
8119 function Attribute_Name
8120 (N : Node_Id) return Name_Id; -- Name2
8122 function Aux_Decls_Node
8123 (N : Node_Id) return Node_Id; -- Node5
8125 function Backwards_OK
8126 (N : Node_Id) return Boolean; -- Flag6
8128 function Bad_Is_Detected
8129 (N : Node_Id) return Boolean; -- Flag15
8132 (N : Node_Id) return Boolean; -- Flag5
8134 function Body_Required
8135 (N : Node_Id) return Boolean; -- Flag13
8137 function Body_To_Inline
8138 (N : Node_Id) return Node_Id; -- Node3
8140 function Box_Present
8141 (N : Node_Id) return Boolean; -- Flag15
8143 function Char_Literal_Value
8144 (N : Node_Id) return Uint; -- Uint2
8147 (N : Node_Id) return Name_Id; -- Name1
8149 function Check_Address_Alignment
8150 (N : Node_Id) return Boolean; -- Flag11
8152 function Choice_Parameter
8153 (N : Node_Id) return Node_Id; -- Node2
8156 (N : Node_Id) return List_Id; -- List1
8158 function Class_Present
8159 (N : Node_Id) return Boolean; -- Flag6
8161 function Comes_From_Extended_Return_Statement
8162 (N : Node_Id) return Boolean; -- Flag18
8164 function Compile_Time_Known_Aggregate
8165 (N : Node_Id) return Boolean; -- Flag18
8167 function Component_Associations
8168 (N : Node_Id) return List_Id; -- List2
8170 function Component_Clauses
8171 (N : Node_Id) return List_Id; -- List3
8173 function Component_Definition
8174 (N : Node_Id) return Node_Id; -- Node4
8176 function Component_Items
8177 (N : Node_Id) return List_Id; -- List3
8179 function Component_List
8180 (N : Node_Id) return Node_Id; -- Node1
8182 function Component_Name
8183 (N : Node_Id) return Node_Id; -- Node1
8185 function Componentwise_Assignment
8186 (N : Node_Id) return Boolean; -- Flag14
8189 (N : Node_Id) return Node_Id; -- Node1
8191 function Condition_Actions
8192 (N : Node_Id) return List_Id; -- List3
8194 function Config_Pragmas
8195 (N : Node_Id) return List_Id; -- List4
8197 function Constant_Present
8198 (N : Node_Id) return Boolean; -- Flag17
8201 (N : Node_Id) return Node_Id; -- Node3
8203 function Constraints
8204 (N : Node_Id) return List_Id; -- List1
8206 function Context_Installed
8207 (N : Node_Id) return Boolean; -- Flag13
8209 function Context_Pending
8210 (N : Node_Id) return Boolean; -- Flag16
8212 function Context_Items
8213 (N : Node_Id) return List_Id; -- List1
8215 function Controlling_Argument
8216 (N : Node_Id) return Node_Id; -- Node1
8218 function Conversion_OK
8219 (N : Node_Id) return Boolean; -- Flag14
8221 function Corresponding_Body
8222 (N : Node_Id) return Node_Id; -- Node5
8224 function Corresponding_Formal_Spec
8225 (N : Node_Id) return Node_Id; -- Node3
8227 function Corresponding_Generic_Association
8228 (N : Node_Id) return Node_Id; -- Node5
8230 function Corresponding_Integer_Value
8231 (N : Node_Id) return Uint; -- Uint4
8233 function Corresponding_Spec
8234 (N : Node_Id) return Node_Id; -- Node5
8236 function Corresponding_Stub
8237 (N : Node_Id) return Node_Id; -- Node3
8239 function Dcheck_Function
8240 (N : Node_Id) return Entity_Id; -- Node5
8242 function Declarations
8243 (N : Node_Id) return List_Id; -- List2
8245 function Default_Expression
8246 (N : Node_Id) return Node_Id; -- Node5
8248 function Default_Storage_Pool
8249 (N : Node_Id) return Node_Id; -- Node3
8251 function Default_Name
8252 (N : Node_Id) return Node_Id; -- Node2
8254 function Defining_Identifier
8255 (N : Node_Id) return Entity_Id; -- Node1
8257 function Defining_Unit_Name
8258 (N : Node_Id) return Node_Id; -- Node1
8260 function Delay_Alternative
8261 (N : Node_Id) return Node_Id; -- Node4
8263 function Delay_Statement
8264 (N : Node_Id) return Node_Id; -- Node2
8266 function Delta_Expression
8267 (N : Node_Id) return Node_Id; -- Node3
8269 function Digits_Expression
8270 (N : Node_Id) return Node_Id; -- Node2
8272 function Discr_Check_Funcs_Built
8273 (N : Node_Id) return Boolean; -- Flag11
8275 function Discrete_Choices
8276 (N : Node_Id) return List_Id; -- List4
8278 function Discrete_Range
8279 (N : Node_Id) return Node_Id; -- Node4
8281 function Discrete_Subtype_Definition
8282 (N : Node_Id) return Node_Id; -- Node4
8284 function Discrete_Subtype_Definitions
8285 (N : Node_Id) return List_Id; -- List2
8287 function Discriminant_Specifications
8288 (N : Node_Id) return List_Id; -- List4
8290 function Discriminant_Type
8291 (N : Node_Id) return Node_Id; -- Node5
8293 function Do_Accessibility_Check
8294 (N : Node_Id) return Boolean; -- Flag13
8296 function Do_Discriminant_Check
8297 (N : Node_Id) return Boolean; -- Flag13
8299 function Do_Division_Check
8300 (N : Node_Id) return Boolean; -- Flag13
8302 function Do_Length_Check
8303 (N : Node_Id) return Boolean; -- Flag4
8305 function Do_Overflow_Check
8306 (N : Node_Id) return Boolean; -- Flag17
8308 function Do_Range_Check
8309 (N : Node_Id) return Boolean; -- Flag9
8311 function Do_Storage_Check
8312 (N : Node_Id) return Boolean; -- Flag17
8314 function Do_Tag_Check
8315 (N : Node_Id) return Boolean; -- Flag13
8317 function Elaborate_All_Desirable
8318 (N : Node_Id) return Boolean; -- Flag9
8320 function Elaborate_All_Present
8321 (N : Node_Id) return Boolean; -- Flag14
8323 function Elaborate_Desirable
8324 (N : Node_Id) return Boolean; -- Flag11
8326 function Elaborate_Present
8327 (N : Node_Id) return Boolean; -- Flag4
8329 function Elaboration_Boolean
8330 (N : Node_Id) return Node_Id; -- Node2
8332 function Else_Actions
8333 (N : Node_Id) return List_Id; -- List3
8335 function Else_Statements
8336 (N : Node_Id) return List_Id; -- List4
8338 function Elsif_Parts
8339 (N : Node_Id) return List_Id; -- List3
8341 function Enclosing_Variant
8342 (N : Node_Id) return Node_Id; -- Node2
8345 (N : Node_Id) return Node_Id; -- Node4
8348 (N : Node_Id) return Uint; -- Uint5
8351 (N : Node_Id) return Node_Id; -- Node4
8353 function Entity_Or_Associated_Node
8354 (N : Node_Id) return Node_Id; -- Node4
8356 function Entry_Body_Formal_Part
8357 (N : Node_Id) return Node_Id; -- Node5
8359 function Entry_Call_Alternative
8360 (N : Node_Id) return Node_Id; -- Node1
8362 function Entry_Call_Statement
8363 (N : Node_Id) return Node_Id; -- Node1
8365 function Entry_Direct_Name
8366 (N : Node_Id) return Node_Id; -- Node1
8368 function Entry_Index
8369 (N : Node_Id) return Node_Id; -- Node5
8371 function Entry_Index_Specification
8372 (N : Node_Id) return Node_Id; -- Node4
8375 (N : Node_Id) return Node_Id; -- Node5
8377 function Exception_Choices
8378 (N : Node_Id) return List_Id; -- List4
8380 function Exception_Handlers
8381 (N : Node_Id) return List_Id; -- List5
8383 function Exception_Junk
8384 (N : Node_Id) return Boolean; -- Flag8
8386 function Exception_Label
8387 (N : Node_Id) return Node_Id; -- Node5
8389 function Explicit_Actual_Parameter
8390 (N : Node_Id) return Node_Id; -- Node3
8392 function Expansion_Delayed
8393 (N : Node_Id) return Boolean; -- Flag11
8395 function Explicit_Generic_Actual_Parameter
8396 (N : Node_Id) return Node_Id; -- Node1
8399 (N : Node_Id) return Node_Id; -- Node3
8401 function Expressions
8402 (N : Node_Id) return List_Id; -- List1
8405 (N : Node_Id) return Node_Id; -- Node3
8407 function First_Inlined_Subprogram
8408 (N : Node_Id) return Entity_Id; -- Node3
8411 (N : Node_Id) return Boolean; -- Flag5
8413 function First_Named_Actual
8414 (N : Node_Id) return Node_Id; -- Node4
8416 function First_Real_Statement
8417 (N : Node_Id) return Node_Id; -- Node2
8419 function First_Subtype_Link
8420 (N : Node_Id) return Entity_Id; -- Node5
8422 function Float_Truncate
8423 (N : Node_Id) return Boolean; -- Flag11
8425 function Formal_Type_Definition
8426 (N : Node_Id) return Node_Id; -- Node3
8428 function Forwards_OK
8429 (N : Node_Id) return Boolean; -- Flag5
8431 function From_Aspect_Specification
8432 (N : Node_Id) return Boolean; -- Flag13
8434 function From_At_End
8435 (N : Node_Id) return Boolean; -- Flag4
8437 function From_At_Mod
8438 (N : Node_Id) return Boolean; -- Flag4
8440 function From_Default
8441 (N : Node_Id) return Boolean; -- Flag6
8443 function From_Dynamic_Predicate
8444 (N : Node_Id) return Boolean; -- Flag7
8446 function From_Static_Predicate
8447 (N : Node_Id) return Boolean; -- Flag8
8449 function Generic_Associations
8450 (N : Node_Id) return List_Id; -- List3
8452 function Generic_Formal_Declarations
8453 (N : Node_Id) return List_Id; -- List2
8455 function Generic_Parent
8456 (N : Node_Id) return Node_Id; -- Node5
8458 function Generic_Parent_Type
8459 (N : Node_Id) return Node_Id; -- Node4
8461 function Handled_Statement_Sequence
8462 (N : Node_Id) return Node_Id; -- Node4
8464 function Handler_List_Entry
8465 (N : Node_Id) return Node_Id; -- Node2
8467 function Has_Created_Identifier
8468 (N : Node_Id) return Boolean; -- Flag15
8470 function Has_Dynamic_Length_Check
8471 (N : Node_Id) return Boolean; -- Flag10
8473 function Has_Dynamic_Range_Check
8474 (N : Node_Id) return Boolean; -- Flag12
8476 function Has_Init_Expression
8477 (N : Node_Id) return Boolean; -- Flag14
8479 function Has_Local_Raise
8480 (N : Node_Id) return Boolean; -- Flag8
8482 function Has_No_Elaboration_Code
8483 (N : Node_Id) return Boolean; -- Flag17
8485 function Has_Pragma_CPU
8486 (N : Node_Id) return Boolean; -- Flag14
8488 function Has_Pragma_Priority
8489 (N : Node_Id) return Boolean; -- Flag6
8491 function Has_Pragma_Suppress_All
8492 (N : Node_Id) return Boolean; -- Flag14
8494 function Has_Private_View
8495 (N : Node_Id) return Boolean; -- Flag11
8497 function Has_Relative_Deadline_Pragma
8498 (N : Node_Id) return Boolean; -- Flag9
8500 function Has_Self_Reference
8501 (N : Node_Id) return Boolean; -- Flag13
8503 function Has_Storage_Size_Pragma
8504 (N : Node_Id) return Boolean; -- Flag5
8506 function Has_Task_Info_Pragma
8507 (N : Node_Id) return Boolean; -- Flag7
8509 function Has_Task_Name_Pragma
8510 (N : Node_Id) return Boolean; -- Flag8
8512 function Has_Wide_Character
8513 (N : Node_Id) return Boolean; -- Flag11
8515 function Has_Wide_Wide_Character
8516 (N : Node_Id) return Boolean; -- Flag13
8518 function Hidden_By_Use_Clause
8519 (N : Node_Id) return Elist_Id; -- Elist4
8522 (N : Node_Id) return Node_Id; -- Node2
8525 (N : Node_Id) return Node_Id; -- Node1
8527 function Interface_List
8528 (N : Node_Id) return List_Id; -- List2
8530 function Interface_Present
8531 (N : Node_Id) return Boolean; -- Flag16
8533 function Implicit_With
8534 (N : Node_Id) return Boolean; -- Flag16
8536 function Import_Interface_Present
8537 (N : Node_Id) return Boolean; -- Flag16
8540 (N : Node_Id) return Boolean; -- Flag15
8542 function Includes_Infinities
8543 (N : Node_Id) return Boolean; -- Flag11
8545 function Inherited_Discriminant
8546 (N : Node_Id) return Boolean; -- Flag13
8548 function Instance_Spec
8549 (N : Node_Id) return Node_Id; -- Node5
8552 (N : Node_Id) return Uint; -- Uint3
8554 function Is_Accessibility_Actual
8555 (N : Node_Id) return Boolean; -- Flag13
8557 function Is_Asynchronous_Call_Block
8558 (N : Node_Id) return Boolean; -- Flag7
8560 function Is_Boolean_Aspect
8561 (N : Node_Id) return Boolean; -- Flag16
8563 function Is_Component_Left_Opnd
8564 (N : Node_Id) return Boolean; -- Flag13
8566 function Is_Component_Right_Opnd
8567 (N : Node_Id) return Boolean; -- Flag14
8569 function Is_Controlling_Actual
8570 (N : Node_Id) return Boolean; -- Flag16
8572 function Is_Delayed_Aspect
8573 (N : Node_Id) return Boolean; -- Flag14
8575 function Is_Dynamic_Coextension
8576 (N : Node_Id) return Boolean; -- Flag18
8579 (N : Node_Id) return Boolean; -- Flag13
8581 function Is_Entry_Barrier_Function
8582 (N : Node_Id) return Boolean; -- Flag8
8584 function Is_Expanded_Build_In_Place_Call
8585 (N : Node_Id) return Boolean; -- Flag11
8587 function Is_Folded_In_Parser
8588 (N : Node_Id) return Boolean; -- Flag4
8590 function Is_In_Discriminant_Check
8591 (N : Node_Id) return Boolean; -- Flag11
8593 function Is_Machine_Number
8594 (N : Node_Id) return Boolean; -- Flag11
8596 function Is_Null_Loop
8597 (N : Node_Id) return Boolean; -- Flag16
8599 function Is_Overloaded
8600 (N : Node_Id) return Boolean; -- Flag5
8602 function Is_Power_Of_2_For_Shift
8603 (N : Node_Id) return Boolean; -- Flag13
8605 function Is_Protected_Subprogram_Body
8606 (N : Node_Id) return Boolean; -- Flag7
8608 function Is_Static_Coextension
8609 (N : Node_Id) return Boolean; -- Flag14
8611 function Is_Static_Expression
8612 (N : Node_Id) return Boolean; -- Flag6
8614 function Is_Subprogram_Descriptor
8615 (N : Node_Id) return Boolean; -- Flag16
8617 function Is_Task_Allocation_Block
8618 (N : Node_Id) return Boolean; -- Flag6
8620 function Is_Task_Master
8621 (N : Node_Id) return Boolean; -- Flag5
8623 function Iteration_Scheme
8624 (N : Node_Id) return Node_Id; -- Node2
8626 function Iterator_Specification
8627 (N : Node_Id) return Node_Id; -- Node2
8630 (N : Node_Id) return Entity_Id; -- Node1
8632 function Kill_Range_Check
8633 (N : Node_Id) return Boolean; -- Flag11
8635 function Label_Construct
8636 (N : Node_Id) return Node_Id; -- Node2
8639 (N : Node_Id) return Node_Id; -- Node2
8642 (N : Node_Id) return Node_Id; -- Node4
8645 (N : Node_Id) return Boolean; -- Flag6
8647 function Library_Unit
8648 (N : Node_Id) return Node_Id; -- Node4
8650 function Limited_View_Installed
8651 (N : Node_Id) return Boolean; -- Flag18
8653 function Limited_Present
8654 (N : Node_Id) return Boolean; -- Flag17
8657 (N : Node_Id) return List_Id; -- List1
8659 function Local_Raise_Not_OK
8660 (N : Node_Id) return Boolean; -- Flag7
8662 function Local_Raise_Statements
8663 (N : Node_Id) return Elist_Id; -- Elist1
8665 function Loop_Actions
8666 (N : Node_Id) return List_Id; -- List2
8668 function Loop_Parameter_Specification
8669 (N : Node_Id) return Node_Id; -- Node4
8672 (N : Node_Id) return Node_Id; -- Node1
8675 (N : Node_Id) return Node_Id; -- Node2
8678 (N : Node_Id) return Boolean; -- Flag5
8680 function Must_Be_Byte_Aligned
8681 (N : Node_Id) return Boolean; -- Flag14
8683 function Must_Not_Freeze
8684 (N : Node_Id) return Boolean; -- Flag8
8686 function Must_Not_Override
8687 (N : Node_Id) return Boolean; -- Flag15
8689 function Must_Override
8690 (N : Node_Id) return Boolean; -- Flag14
8693 (N : Node_Id) return Node_Id; -- Node2
8696 (N : Node_Id) return List_Id; -- List2
8698 function Next_Entity
8699 (N : Node_Id) return Node_Id; -- Node2
8701 function Next_Exit_Statement
8702 (N : Node_Id) return Node_Id; -- Node3
8704 function Next_Implicit_With
8705 (N : Node_Id) return Node_Id; -- Node3
8707 function Next_Named_Actual
8708 (N : Node_Id) return Node_Id; -- Node4
8710 function Next_Pragma
8711 (N : Node_Id) return Node_Id; -- Node1
8713 function Next_Rep_Item
8714 (N : Node_Id) return Node_Id; -- Node5
8716 function Next_Use_Clause
8717 (N : Node_Id) return Node_Id; -- Node3
8719 function No_Ctrl_Actions
8720 (N : Node_Id) return Boolean; -- Flag7
8722 function No_Elaboration_Check
8723 (N : Node_Id) return Boolean; -- Flag14
8725 function No_Entities_Ref_In_Spec
8726 (N : Node_Id) return Boolean; -- Flag8
8728 function No_Initialization
8729 (N : Node_Id) return Boolean; -- Flag13
8731 function No_Truncation
8732 (N : Node_Id) return Boolean; -- Flag17
8734 function Null_Present
8735 (N : Node_Id) return Boolean; -- Flag13
8737 function Null_Exclusion_Present
8738 (N : Node_Id) return Boolean; -- Flag11
8740 function Null_Exclusion_In_Return_Present
8741 (N : Node_Id) return Boolean; -- Flag14
8743 function Null_Record_Present
8744 (N : Node_Id) return Boolean; -- Flag17
8746 function Object_Definition
8747 (N : Node_Id) return Node_Id; -- Node4
8750 (N : Node_Id) return Boolean; -- Flag16
8752 function Original_Discriminant
8753 (N : Node_Id) return Node_Id; -- Node2
8755 function Original_Entity
8756 (N : Node_Id) return Entity_Id; -- Node2
8758 function Others_Discrete_Choices
8759 (N : Node_Id) return List_Id; -- List1
8761 function Out_Present
8762 (N : Node_Id) return Boolean; -- Flag17
8764 function Parameter_Associations
8765 (N : Node_Id) return List_Id; -- List3
8767 function Parameter_List_Truncated
8768 (N : Node_Id) return Boolean; -- Flag17
8770 function Parameter_Specifications
8771 (N : Node_Id) return List_Id; -- List3
8773 function Parameter_Type
8774 (N : Node_Id) return Node_Id; -- Node2
8776 function Parent_Spec
8777 (N : Node_Id) return Node_Id; -- Node4
8780 (N : Node_Id) return Node_Id; -- Node2
8782 function Pragma_Argument_Associations
8783 (N : Node_Id) return List_Id; -- List2
8785 function Pragma_Identifier
8786 (N : Node_Id) return Node_Id; -- Node4
8788 function Pragmas_After
8789 (N : Node_Id) return List_Id; -- List5
8791 function Pragmas_Before
8792 (N : Node_Id) return List_Id; -- List4
8795 (N : Node_Id) return Node_Id; -- Node3
8797 function Present_Expr
8798 (N : Node_Id) return Uint; -- Uint3
8801 (N : Node_Id) return Boolean; -- Flag6
8803 function Print_In_Hex
8804 (N : Node_Id) return Boolean; -- Flag13
8806 function Private_Declarations
8807 (N : Node_Id) return List_Id; -- List3
8809 function Private_Present
8810 (N : Node_Id) return Boolean; -- Flag15
8812 function Procedure_To_Call
8813 (N : Node_Id) return Node_Id; -- Node2
8815 function Proper_Body
8816 (N : Node_Id) return Node_Id; -- Node1
8818 function Protected_Definition
8819 (N : Node_Id) return Node_Id; -- Node3
8821 function Protected_Present
8822 (N : Node_Id) return Boolean; -- Flag6
8824 function Raises_Constraint_Error
8825 (N : Node_Id) return Boolean; -- Flag7
8827 function Range_Constraint
8828 (N : Node_Id) return Node_Id; -- Node4
8830 function Range_Expression
8831 (N : Node_Id) return Node_Id; -- Node4
8833 function Real_Range_Specification
8834 (N : Node_Id) return Node_Id; -- Node4
8837 (N : Node_Id) return Ureal; -- Ureal3
8840 (N : Node_Id) return Uint; -- Uint3
8842 function Record_Extension_Part
8843 (N : Node_Id) return Node_Id; -- Node3
8845 function Redundant_Use
8846 (N : Node_Id) return Boolean; -- Flag13
8848 function Renaming_Exception
8849 (N : Node_Id) return Node_Id; -- Node2
8851 function Result_Definition
8852 (N : Node_Id) return Node_Id; -- Node4
8854 function Return_Object_Declarations
8855 (N : Node_Id) return List_Id; -- List3
8857 function Return_Statement_Entity
8858 (N : Node_Id) return Node_Id; -- Node5
8860 function Reverse_Present
8861 (N : Node_Id) return Boolean; -- Flag15
8864 (N : Node_Id) return Node_Id; -- Node3
8866 function Rounded_Result
8867 (N : Node_Id) return Boolean; -- Flag18
8869 function SCIL_Controlling_Tag
8870 (N : Node_Id) return Node_Id; -- Node5
8872 function SCIL_Entity
8873 (N : Node_Id) return Node_Id; -- Node4
8875 function SCIL_Tag_Value
8876 (N : Node_Id) return Node_Id; -- Node5
8878 function SCIL_Target_Prim
8879 (N : Node_Id) return Node_Id; -- Node2
8882 (N : Node_Id) return Node_Id; -- Node3
8884 function Select_Alternatives
8885 (N : Node_Id) return List_Id; -- List1
8887 function Selector_Name
8888 (N : Node_Id) return Node_Id; -- Node2
8890 function Selector_Names
8891 (N : Node_Id) return List_Id; -- List1
8893 function Shift_Count_OK
8894 (N : Node_Id) return Boolean; -- Flag4
8896 function Source_Type
8897 (N : Node_Id) return Entity_Id; -- Node1
8899 function Spec_PPC_List
8900 (N : Node_Id) return Node_Id; -- Node1
8902 function Spec_TC_List
8903 (N : Node_Id) return Node_Id; -- Node2
8905 function Specification
8906 (N : Node_Id) return Node_Id; -- Node1
8909 (N : Node_Id) return Boolean; -- Flag17
8912 (N : Node_Id) return List_Id; -- List3
8914 function Static_Processing_OK
8915 (N : Node_Id) return Boolean; -- Flag4
8917 function Storage_Pool
8918 (N : Node_Id) return Node_Id; -- Node1
8920 function Subpool_Handle_Name
8921 (N : Node_Id) return Node_Id; -- Node4
8924 (N : Node_Id) return String_Id; -- Str3
8926 function Subtype_Indication
8927 (N : Node_Id) return Node_Id; -- Node5
8929 function Subtype_Mark
8930 (N : Node_Id) return Node_Id; -- Node4
8932 function Subtype_Marks
8933 (N : Node_Id) return List_Id; -- List2
8935 function Suppress_Assignment_Checks
8936 (N : Node_Id) return Boolean; -- Flag18
8938 function Suppress_Loop_Warnings
8939 (N : Node_Id) return Boolean; -- Flag17
8941 function Synchronized_Present
8942 (N : Node_Id) return Boolean; -- Flag7
8944 function Tagged_Present
8945 (N : Node_Id) return Boolean; -- Flag15
8947 function Target_Type
8948 (N : Node_Id) return Entity_Id; -- Node2
8950 function Task_Definition
8951 (N : Node_Id) return Node_Id; -- Node3
8953 function Task_Present
8954 (N : Node_Id) return Boolean; -- Flag5
8956 function Then_Actions
8957 (N : Node_Id) return List_Id; -- List2
8959 function Then_Statements
8960 (N : Node_Id) return List_Id; -- List2
8962 function Treat_Fixed_As_Integer
8963 (N : Node_Id) return Boolean; -- Flag14
8965 function Triggering_Alternative
8966 (N : Node_Id) return Node_Id; -- Node1
8968 function Triggering_Statement
8969 (N : Node_Id) return Node_Id; -- Node1
8972 (N : Node_Id) return Elist_Id; -- Elist3
8974 function Type_Definition
8975 (N : Node_Id) return Node_Id; -- Node3
8978 (N : Node_Id) return Node_Id; -- Node2
8980 function Unknown_Discriminants_Present
8981 (N : Node_Id) return Boolean; -- Flag13
8983 function Unreferenced_In_Spec
8984 (N : Node_Id) return Boolean; -- Flag7
8986 function Variant_Part
8987 (N : Node_Id) return Node_Id; -- Node4
8990 (N : Node_Id) return List_Id; -- List1
8992 function Visible_Declarations
8993 (N : Node_Id) return List_Id; -- List2
8995 function Used_Operations
8996 (N : Node_Id) return Elist_Id; -- Elist5
8998 function Was_Originally_Stub
8999 (N : Node_Id) return Boolean; -- Flag13
9001 function Withed_Body
9002 (N : Node_Id) return Node_Id; -- Node1
9004 function Zero_Cost_Handling
9005 (N : Node_Id) return Boolean; -- Flag5
9007 -- End functions (note used by xsinfo utility program to end processing)
9009 ----------------------------
9010 -- Node Update Procedures --
9011 ----------------------------
9013 -- These are the corresponding node update routines, which again provide
9014 -- a high level logical access with type checking. In addition to setting
9015 -- the indicated field of the node N to the given Val, in the case of
9016 -- tree pointers (List1-4), the parent pointer of the Val node is set to
9017 -- point back to node N. This automates the setting of the parent pointer.
9019 procedure Set_ABE_Is_Certain
9020 (N : Node_Id; Val : Boolean := True); -- Flag18
9022 procedure Set_Abort_Present
9023 (N : Node_Id; Val : Boolean := True); -- Flag15
9025 procedure Set_Abortable_Part
9026 (N : Node_Id; Val : Node_Id); -- Node2
9028 procedure Set_Abstract_Present
9029 (N : Node_Id; Val : Boolean := True); -- Flag4
9031 procedure Set_Accept_Handler_Records
9032 (N : Node_Id; Val : List_Id); -- List5
9034 procedure Set_Accept_Statement
9035 (N : Node_Id; Val : Node_Id); -- Node2
9037 procedure Set_Access_Definition
9038 (N : Node_Id; Val : Node_Id); -- Node3
9040 procedure Set_Access_To_Subprogram_Definition
9041 (N : Node_Id; Val : Node_Id); -- Node3
9043 procedure Set_Access_Types_To_Process
9044 (N : Node_Id; Val : Elist_Id); -- Elist2
9046 procedure Set_Actions
9047 (N : Node_Id; Val : List_Id); -- List1
9049 procedure Set_Activation_Chain_Entity
9050 (N : Node_Id; Val : Node_Id); -- Node3
9052 procedure Set_Acts_As_Spec
9053 (N : Node_Id; Val : Boolean := True); -- Flag4
9055 procedure Set_Actual_Designated_Subtype
9056 (N : Node_Id; Val : Node_Id); -- Node4
9058 procedure Set_Address_Warning_Posted
9059 (N : Node_Id; Val : Boolean := True); -- Flag18
9061 procedure Set_Aggregate_Bounds
9062 (N : Node_Id; Val : Node_Id); -- Node3
9064 procedure Set_Aliased_Present
9065 (N : Node_Id; Val : Boolean := True); -- Flag4
9067 procedure Set_All_Others
9068 (N : Node_Id; Val : Boolean := True); -- Flag11
9070 procedure Set_All_Present
9071 (N : Node_Id; Val : Boolean := True); -- Flag15
9073 procedure Set_Alternatives
9074 (N : Node_Id; Val : List_Id); -- List4
9076 procedure Set_Ancestor_Part
9077 (N : Node_Id; Val : Node_Id); -- Node3
9079 procedure Set_Array_Aggregate
9080 (N : Node_Id; Val : Node_Id); -- Node3
9082 procedure Set_Aspect_Rep_Item
9083 (N : Node_Id; Val : Node_Id); -- Node2
9085 procedure Set_Assignment_OK
9086 (N : Node_Id; Val : Boolean := True); -- Flag15
9088 procedure Set_Associated_Node
9089 (N : Node_Id; Val : Node_Id); -- Node4
9091 procedure Set_Attribute_Name
9092 (N : Node_Id; Val : Name_Id); -- Name2
9094 procedure Set_At_End_Proc
9095 (N : Node_Id; Val : Node_Id); -- Node1
9097 procedure Set_Aux_Decls_Node
9098 (N : Node_Id; Val : Node_Id); -- Node5
9100 procedure Set_Backwards_OK
9101 (N : Node_Id; Val : Boolean := True); -- Flag6
9103 procedure Set_Bad_Is_Detected
9104 (N : Node_Id; Val : Boolean := True); -- Flag15
9106 procedure Set_Body_Required
9107 (N : Node_Id; Val : Boolean := True); -- Flag13
9109 procedure Set_Body_To_Inline
9110 (N : Node_Id; Val : Node_Id); -- Node3
9112 procedure Set_Box_Present
9113 (N : Node_Id; Val : Boolean := True); -- Flag15
9115 procedure Set_By_Ref
9116 (N : Node_Id; Val : Boolean := True); -- Flag5
9118 procedure Set_Char_Literal_Value
9119 (N : Node_Id; Val : Uint); -- Uint2
9122 (N : Node_Id; Val : Name_Id); -- Name1
9124 procedure Set_Check_Address_Alignment
9125 (N : Node_Id; Val : Boolean := True); -- Flag11
9127 procedure Set_Choice_Parameter
9128 (N : Node_Id; Val : Node_Id); -- Node2
9130 procedure Set_Choices
9131 (N : Node_Id; Val : List_Id); -- List1
9133 procedure Set_Class_Present
9134 (N : Node_Id; Val : Boolean := True); -- Flag6
9136 procedure Set_Comes_From_Extended_Return_Statement
9137 (N : Node_Id; Val : Boolean := True); -- Flag18
9139 procedure Set_Compile_Time_Known_Aggregate
9140 (N : Node_Id; Val : Boolean := True); -- Flag18
9142 procedure Set_Component_Associations
9143 (N : Node_Id; Val : List_Id); -- List2
9145 procedure Set_Component_Clauses
9146 (N : Node_Id; Val : List_Id); -- List3
9148 procedure Set_Component_Definition
9149 (N : Node_Id; Val : Node_Id); -- Node4
9151 procedure Set_Component_Items
9152 (N : Node_Id; Val : List_Id); -- List3
9154 procedure Set_Component_List
9155 (N : Node_Id; Val : Node_Id); -- Node1
9157 procedure Set_Component_Name
9158 (N : Node_Id; Val : Node_Id); -- Node1
9160 procedure Set_Componentwise_Assignment
9161 (N : Node_Id; Val : Boolean := True); -- Flag14
9163 procedure Set_Condition
9164 (N : Node_Id; Val : Node_Id); -- Node1
9166 procedure Set_Condition_Actions
9167 (N : Node_Id; Val : List_Id); -- List3
9169 procedure Set_Config_Pragmas
9170 (N : Node_Id; Val : List_Id); -- List4
9172 procedure Set_Constant_Present
9173 (N : Node_Id; Val : Boolean := True); -- Flag17
9175 procedure Set_Constraint
9176 (N : Node_Id; Val : Node_Id); -- Node3
9178 procedure Set_Constraints
9179 (N : Node_Id; Val : List_Id); -- List1
9181 procedure Set_Context_Installed
9182 (N : Node_Id; Val : Boolean := True); -- Flag13
9184 procedure Set_Context_Items
9185 (N : Node_Id; Val : List_Id); -- List1
9187 procedure Set_Context_Pending
9188 (N : Node_Id; Val : Boolean := True); -- Flag16
9190 procedure Set_Controlling_Argument
9191 (N : Node_Id; Val : Node_Id); -- Node1
9193 procedure Set_Conversion_OK
9194 (N : Node_Id; Val : Boolean := True); -- Flag14
9196 procedure Set_Corresponding_Body
9197 (N : Node_Id; Val : Node_Id); -- Node5
9199 procedure Set_Corresponding_Formal_Spec
9200 (N : Node_Id; Val : Node_Id); -- Node3
9202 procedure Set_Corresponding_Generic_Association
9203 (N : Node_Id; Val : Node_Id); -- Node5
9205 procedure Set_Corresponding_Integer_Value
9206 (N : Node_Id; Val : Uint); -- Uint4
9208 procedure Set_Corresponding_Spec
9209 (N : Node_Id; Val : Node_Id); -- Node5
9211 procedure Set_Corresponding_Stub
9212 (N : Node_Id; Val : Node_Id); -- Node3
9214 procedure Set_Dcheck_Function
9215 (N : Node_Id; Val : Entity_Id); -- Node5
9217 procedure Set_Declarations
9218 (N : Node_Id; Val : List_Id); -- List2
9220 procedure Set_Default_Expression
9221 (N : Node_Id; Val : Node_Id); -- Node5
9223 procedure Set_Default_Storage_Pool
9224 (N : Node_Id; Val : Node_Id); -- Node3
9226 procedure Set_Default_Name
9227 (N : Node_Id; Val : Node_Id); -- Node2
9229 procedure Set_Defining_Identifier
9230 (N : Node_Id; Val : Entity_Id); -- Node1
9232 procedure Set_Defining_Unit_Name
9233 (N : Node_Id; Val : Node_Id); -- Node1
9235 procedure Set_Delay_Alternative
9236 (N : Node_Id; Val : Node_Id); -- Node4
9238 procedure Set_Delay_Statement
9239 (N : Node_Id; Val : Node_Id); -- Node2
9241 procedure Set_Delta_Expression
9242 (N : Node_Id; Val : Node_Id); -- Node3
9244 procedure Set_Digits_Expression
9245 (N : Node_Id; Val : Node_Id); -- Node2
9247 procedure Set_Discr_Check_Funcs_Built
9248 (N : Node_Id; Val : Boolean := True); -- Flag11
9250 procedure Set_Discrete_Choices
9251 (N : Node_Id; Val : List_Id); -- List4
9253 procedure Set_Discrete_Range
9254 (N : Node_Id; Val : Node_Id); -- Node4
9256 procedure Set_Discrete_Subtype_Definition
9257 (N : Node_Id; Val : Node_Id); -- Node4
9259 procedure Set_Discrete_Subtype_Definitions
9260 (N : Node_Id; Val : List_Id); -- List2
9262 procedure Set_Discriminant_Specifications
9263 (N : Node_Id; Val : List_Id); -- List4
9265 procedure Set_Discriminant_Type
9266 (N : Node_Id; Val : Node_Id); -- Node5
9268 procedure Set_Do_Accessibility_Check
9269 (N : Node_Id; Val : Boolean := True); -- Flag13
9271 procedure Set_Do_Discriminant_Check
9272 (N : Node_Id; Val : Boolean := True); -- Flag13
9274 procedure Set_Do_Division_Check
9275 (N : Node_Id; Val : Boolean := True); -- Flag13
9277 procedure Set_Do_Length_Check
9278 (N : Node_Id; Val : Boolean := True); -- Flag4
9280 procedure Set_Do_Overflow_Check
9281 (N : Node_Id; Val : Boolean := True); -- Flag17
9283 procedure Set_Do_Range_Check
9284 (N : Node_Id; Val : Boolean := True); -- Flag9
9286 procedure Set_Do_Storage_Check
9287 (N : Node_Id; Val : Boolean := True); -- Flag17
9289 procedure Set_Do_Tag_Check
9290 (N : Node_Id; Val : Boolean := True); -- Flag13
9292 procedure Set_Elaborate_All_Desirable
9293 (N : Node_Id; Val : Boolean := True); -- Flag9
9295 procedure Set_Elaborate_All_Present
9296 (N : Node_Id; Val : Boolean := True); -- Flag14
9298 procedure Set_Elaborate_Desirable
9299 (N : Node_Id; Val : Boolean := True); -- Flag11
9301 procedure Set_Elaborate_Present
9302 (N : Node_Id; Val : Boolean := True); -- Flag4
9304 procedure Set_Elaboration_Boolean
9305 (N : Node_Id; Val : Node_Id); -- Node2
9307 procedure Set_Else_Actions
9308 (N : Node_Id; Val : List_Id); -- List3
9310 procedure Set_Else_Statements
9311 (N : Node_Id; Val : List_Id); -- List4
9313 procedure Set_Elsif_Parts
9314 (N : Node_Id; Val : List_Id); -- List3
9316 procedure Set_Enclosing_Variant
9317 (N : Node_Id; Val : Node_Id); -- Node2
9319 procedure Set_End_Label
9320 (N : Node_Id; Val : Node_Id); -- Node4
9322 procedure Set_End_Span
9323 (N : Node_Id; Val : Uint); -- Uint5
9325 procedure Set_Entity
9326 (N : Node_Id; Val : Node_Id); -- Node4
9328 procedure Set_Entry_Body_Formal_Part
9329 (N : Node_Id; Val : Node_Id); -- Node5
9331 procedure Set_Entry_Call_Alternative
9332 (N : Node_Id; Val : Node_Id); -- Node1
9334 procedure Set_Entry_Call_Statement
9335 (N : Node_Id; Val : Node_Id); -- Node1
9337 procedure Set_Entry_Direct_Name
9338 (N : Node_Id; Val : Node_Id); -- Node1
9340 procedure Set_Entry_Index
9341 (N : Node_Id; Val : Node_Id); -- Node5
9343 procedure Set_Entry_Index_Specification
9344 (N : Node_Id; Val : Node_Id); -- Node4
9347 (N : Node_Id; Val : Node_Id); -- Node5
9349 procedure Set_Exception_Choices
9350 (N : Node_Id; Val : List_Id); -- List4
9352 procedure Set_Exception_Handlers
9353 (N : Node_Id; Val : List_Id); -- List5
9355 procedure Set_Exception_Junk
9356 (N : Node_Id; Val : Boolean := True); -- Flag8
9358 procedure Set_Exception_Label
9359 (N : Node_Id; Val : Node_Id); -- Node5
9361 procedure Set_Expansion_Delayed
9362 (N : Node_Id; Val : Boolean := True); -- Flag11
9364 procedure Set_Explicit_Actual_Parameter
9365 (N : Node_Id; Val : Node_Id); -- Node3
9367 procedure Set_Explicit_Generic_Actual_Parameter
9368 (N : Node_Id; Val : Node_Id); -- Node1
9370 procedure Set_Expression
9371 (N : Node_Id; Val : Node_Id); -- Node3
9373 procedure Set_Expressions
9374 (N : Node_Id; Val : List_Id); -- List1
9376 procedure Set_First_Bit
9377 (N : Node_Id; Val : Node_Id); -- Node3
9379 procedure Set_First_Inlined_Subprogram
9380 (N : Node_Id; Val : Entity_Id); -- Node3
9382 procedure Set_First_Name
9383 (N : Node_Id; Val : Boolean := True); -- Flag5
9385 procedure Set_First_Named_Actual
9386 (N : Node_Id; Val : Node_Id); -- Node4
9388 procedure Set_First_Real_Statement
9389 (N : Node_Id; Val : Node_Id); -- Node2
9391 procedure Set_First_Subtype_Link
9392 (N : Node_Id; Val : Entity_Id); -- Node5
9394 procedure Set_Float_Truncate
9395 (N : Node_Id; Val : Boolean := True); -- Flag11
9397 procedure Set_Formal_Type_Definition
9398 (N : Node_Id; Val : Node_Id); -- Node3
9400 procedure Set_Forwards_OK
9401 (N : Node_Id; Val : Boolean := True); -- Flag5
9403 procedure Set_From_At_Mod
9404 (N : Node_Id; Val : Boolean := True); -- Flag4
9406 procedure Set_From_Aspect_Specification
9407 (N : Node_Id; Val : Boolean := True); -- Flag13
9409 procedure Set_From_At_End
9410 (N : Node_Id; Val : Boolean := True); -- Flag4
9412 procedure Set_From_Default
9413 (N : Node_Id; Val : Boolean := True); -- Flag6
9415 procedure Set_From_Dynamic_Predicate
9416 (N : Node_Id; Val : Boolean := True); -- Flag7
9418 procedure Set_From_Static_Predicate
9419 (N : Node_Id; Val : Boolean := True); -- Flag8
9421 procedure Set_Generic_Associations
9422 (N : Node_Id; Val : List_Id); -- List3
9424 procedure Set_Generic_Formal_Declarations
9425 (N : Node_Id; Val : List_Id); -- List2
9427 procedure Set_Generic_Parent
9428 (N : Node_Id; Val : Node_Id); -- Node5
9430 procedure Set_Generic_Parent_Type
9431 (N : Node_Id; Val : Node_Id); -- Node4
9433 procedure Set_Handled_Statement_Sequence
9434 (N : Node_Id; Val : Node_Id); -- Node4
9436 procedure Set_Handler_List_Entry
9437 (N : Node_Id; Val : Node_Id); -- Node2
9439 procedure Set_Has_Created_Identifier
9440 (N : Node_Id; Val : Boolean := True); -- Flag15
9442 procedure Set_Has_Dynamic_Length_Check
9443 (N : Node_Id; Val : Boolean := True); -- Flag10
9445 procedure Set_Has_Dynamic_Range_Check
9446 (N : Node_Id; Val : Boolean := True); -- Flag12
9448 procedure Set_Has_Init_Expression
9449 (N : Node_Id; Val : Boolean := True); -- Flag14
9451 procedure Set_Has_Local_Raise
9452 (N : Node_Id; Val : Boolean := True); -- Flag8
9454 procedure Set_Has_No_Elaboration_Code
9455 (N : Node_Id; Val : Boolean := True); -- Flag17
9457 procedure Set_Has_Pragma_CPU
9458 (N : Node_Id; Val : Boolean := True); -- Flag14
9460 procedure Set_Has_Pragma_Priority
9461 (N : Node_Id; Val : Boolean := True); -- Flag6
9463 procedure Set_Has_Pragma_Suppress_All
9464 (N : Node_Id; Val : Boolean := True); -- Flag14
9466 procedure Set_Has_Private_View
9467 (N : Node_Id; Val : Boolean := True); -- Flag11
9469 procedure Set_Has_Relative_Deadline_Pragma
9470 (N : Node_Id; Val : Boolean := True); -- Flag9
9472 procedure Set_Has_Self_Reference
9473 (N : Node_Id; Val : Boolean := True); -- Flag13
9475 procedure Set_Has_Storage_Size_Pragma
9476 (N : Node_Id; Val : Boolean := True); -- Flag5
9478 procedure Set_Has_Task_Info_Pragma
9479 (N : Node_Id; Val : Boolean := True); -- Flag7
9481 procedure Set_Has_Task_Name_Pragma
9482 (N : Node_Id; Val : Boolean := True); -- Flag8
9484 procedure Set_Has_Wide_Character
9485 (N : Node_Id; Val : Boolean := True); -- Flag11
9487 procedure Set_Has_Wide_Wide_Character
9488 (N : Node_Id; Val : Boolean := True); -- Flag13
9490 procedure Set_Hidden_By_Use_Clause
9491 (N : Node_Id; Val : Elist_Id); -- Elist4
9493 procedure Set_High_Bound
9494 (N : Node_Id; Val : Node_Id); -- Node2
9496 procedure Set_Identifier
9497 (N : Node_Id; Val : Node_Id); -- Node1
9499 procedure Set_Interface_List
9500 (N : Node_Id; Val : List_Id); -- List2
9502 procedure Set_Interface_Present
9503 (N : Node_Id; Val : Boolean := True); -- Flag16
9505 procedure Set_Implicit_With
9506 (N : Node_Id; Val : Boolean := True); -- Flag16
9508 procedure Set_Import_Interface_Present
9509 (N : Node_Id; Val : Boolean := True); -- Flag16
9511 procedure Set_In_Present
9512 (N : Node_Id; Val : Boolean := True); -- Flag15
9514 procedure Set_Includes_Infinities
9515 (N : Node_Id; Val : Boolean := True); -- Flag11
9517 procedure Set_Inherited_Discriminant
9518 (N : Node_Id; Val : Boolean := True); -- Flag13
9520 procedure Set_Instance_Spec
9521 (N : Node_Id; Val : Node_Id); -- Node5
9523 procedure Set_Intval
9524 (N : Node_Id; Val : Uint); -- Uint3
9526 procedure Set_Is_Accessibility_Actual
9527 (N : Node_Id; Val : Boolean := True); -- Flag13
9529 procedure Set_Is_Asynchronous_Call_Block
9530 (N : Node_Id; Val : Boolean := True); -- Flag7
9532 procedure Set_Is_Boolean_Aspect
9533 (N : Node_Id; Val : Boolean := True); -- Flag16
9535 procedure Set_Is_Component_Left_Opnd
9536 (N : Node_Id; Val : Boolean := True); -- Flag13
9538 procedure Set_Is_Component_Right_Opnd
9539 (N : Node_Id; Val : Boolean := True); -- Flag14
9541 procedure Set_Is_Controlling_Actual
9542 (N : Node_Id; Val : Boolean := True); -- Flag16
9544 procedure Set_Is_Delayed_Aspect
9545 (N : Node_Id; Val : Boolean := True); -- Flag14
9547 procedure Set_Is_Dynamic_Coextension
9548 (N : Node_Id; Val : Boolean := True); -- Flag18
9550 procedure Set_Is_Elsif
9551 (N : Node_Id; Val : Boolean := True); -- Flag13
9553 procedure Set_Is_Entry_Barrier_Function
9554 (N : Node_Id; Val : Boolean := True); -- Flag8
9556 procedure Set_Is_Expanded_Build_In_Place_Call
9557 (N : Node_Id; Val : Boolean := True); -- Flag11
9559 procedure Set_Is_Folded_In_Parser
9560 (N : Node_Id; Val : Boolean := True); -- Flag4
9562 procedure Set_Is_In_Discriminant_Check
9563 (N : Node_Id; Val : Boolean := True); -- Flag11
9565 procedure Set_Is_Machine_Number
9566 (N : Node_Id; Val : Boolean := True); -- Flag11
9568 procedure Set_Is_Null_Loop
9569 (N : Node_Id; Val : Boolean := True); -- Flag16
9571 procedure Set_Is_Overloaded
9572 (N : Node_Id; Val : Boolean := True); -- Flag5
9574 procedure Set_Is_Power_Of_2_For_Shift
9575 (N : Node_Id; Val : Boolean := True); -- Flag13
9577 procedure Set_Is_Protected_Subprogram_Body
9578 (N : Node_Id; Val : Boolean := True); -- Flag7
9580 procedure Set_Is_Static_Coextension
9581 (N : Node_Id; Val : Boolean := True); -- Flag14
9583 procedure Set_Is_Static_Expression
9584 (N : Node_Id; Val : Boolean := True); -- Flag6
9586 procedure Set_Is_Subprogram_Descriptor
9587 (N : Node_Id; Val : Boolean := True); -- Flag16
9589 procedure Set_Is_Task_Allocation_Block
9590 (N : Node_Id; Val : Boolean := True); -- Flag6
9592 procedure Set_Is_Task_Master
9593 (N : Node_Id; Val : Boolean := True); -- Flag5
9595 procedure Set_Iteration_Scheme
9596 (N : Node_Id; Val : Node_Id); -- Node2
9598 procedure Set_Iterator_Specification
9599 (N : Node_Id; Val : Node_Id); -- Node2
9602 (N : Node_Id; Val : Entity_Id); -- Node1
9604 procedure Set_Kill_Range_Check
9605 (N : Node_Id; Val : Boolean := True); -- Flag11
9607 procedure Set_Last_Bit
9608 (N : Node_Id; Val : Node_Id); -- Node4
9610 procedure Set_Last_Name
9611 (N : Node_Id; Val : Boolean := True); -- Flag6
9613 procedure Set_Library_Unit
9614 (N : Node_Id; Val : Node_Id); -- Node4
9616 procedure Set_Label_Construct
9617 (N : Node_Id; Val : Node_Id); -- Node2
9619 procedure Set_Left_Opnd
9620 (N : Node_Id; Val : Node_Id); -- Node2
9622 procedure Set_Limited_View_Installed
9623 (N : Node_Id; Val : Boolean := True); -- Flag18
9625 procedure Set_Limited_Present
9626 (N : Node_Id; Val : Boolean := True); -- Flag17
9628 procedure Set_Literals
9629 (N : Node_Id; Val : List_Id); -- List1
9631 procedure Set_Local_Raise_Not_OK
9632 (N : Node_Id; Val : Boolean := True); -- Flag7
9634 procedure Set_Local_Raise_Statements
9635 (N : Node_Id; Val : Elist_Id); -- Elist1
9637 procedure Set_Loop_Actions
9638 (N : Node_Id; Val : List_Id); -- List2
9640 procedure Set_Loop_Parameter_Specification
9641 (N : Node_Id; Val : Node_Id); -- Node4
9643 procedure Set_Low_Bound
9644 (N : Node_Id; Val : Node_Id); -- Node1
9646 procedure Set_Mod_Clause
9647 (N : Node_Id; Val : Node_Id); -- Node2
9649 procedure Set_More_Ids
9650 (N : Node_Id; Val : Boolean := True); -- Flag5
9652 procedure Set_Must_Be_Byte_Aligned
9653 (N : Node_Id; Val : Boolean := True); -- Flag14
9655 procedure Set_Must_Not_Freeze
9656 (N : Node_Id; Val : Boolean := True); -- Flag8
9658 procedure Set_Must_Not_Override
9659 (N : Node_Id; Val : Boolean := True); -- Flag15
9661 procedure Set_Must_Override
9662 (N : Node_Id; Val : Boolean := True); -- Flag14
9665 (N : Node_Id; Val : Node_Id); -- Node2
9668 (N : Node_Id; Val : List_Id); -- List2
9670 procedure Set_Next_Entity
9671 (N : Node_Id; Val : Node_Id); -- Node2
9673 procedure Set_Next_Exit_Statement
9674 (N : Node_Id; Val : Node_Id); -- Node3
9676 procedure Set_Next_Implicit_With
9677 (N : Node_Id; Val : Node_Id); -- Node3
9679 procedure Set_Next_Named_Actual
9680 (N : Node_Id; Val : Node_Id); -- Node4
9682 procedure Set_Next_Pragma
9683 (N : Node_Id; Val : Node_Id); -- Node1
9685 procedure Set_Next_Rep_Item
9686 (N : Node_Id; Val : Node_Id); -- Node5
9688 procedure Set_Next_Use_Clause
9689 (N : Node_Id; Val : Node_Id); -- Node3
9691 procedure Set_No_Ctrl_Actions
9692 (N : Node_Id; Val : Boolean := True); -- Flag7
9694 procedure Set_No_Elaboration_Check
9695 (N : Node_Id; Val : Boolean := True); -- Flag14
9697 procedure Set_No_Entities_Ref_In_Spec
9698 (N : Node_Id; Val : Boolean := True); -- Flag8
9700 procedure Set_No_Initialization
9701 (N : Node_Id; Val : Boolean := True); -- Flag13
9703 procedure Set_No_Truncation
9704 (N : Node_Id; Val : Boolean := True); -- Flag17
9706 procedure Set_Null_Present
9707 (N : Node_Id; Val : Boolean := True); -- Flag13
9709 procedure Set_Null_Exclusion_Present
9710 (N : Node_Id; Val : Boolean := True); -- Flag11
9712 procedure Set_Null_Exclusion_In_Return_Present
9713 (N : Node_Id; Val : Boolean := True); -- Flag14
9715 procedure Set_Null_Record_Present
9716 (N : Node_Id; Val : Boolean := True); -- Flag17
9718 procedure Set_Object_Definition
9719 (N : Node_Id; Val : Node_Id); -- Node4
9721 procedure Set_Of_Present
9722 (N : Node_Id; Val : Boolean := True); -- Flag16
9724 procedure Set_Original_Discriminant
9725 (N : Node_Id; Val : Node_Id); -- Node2
9727 procedure Set_Original_Entity
9728 (N : Node_Id; Val : Entity_Id); -- Node2
9730 procedure Set_Others_Discrete_Choices
9731 (N : Node_Id; Val : List_Id); -- List1
9733 procedure Set_Out_Present
9734 (N : Node_Id; Val : Boolean := True); -- Flag17
9736 procedure Set_Parameter_Associations
9737 (N : Node_Id; Val : List_Id); -- List3
9739 procedure Set_Parameter_List_Truncated
9740 (N : Node_Id; Val : Boolean := True); -- Flag17
9742 procedure Set_Parameter_Specifications
9743 (N : Node_Id; Val : List_Id); -- List3
9745 procedure Set_Parameter_Type
9746 (N : Node_Id; Val : Node_Id); -- Node2
9748 procedure Set_Parent_Spec
9749 (N : Node_Id; Val : Node_Id); -- Node4
9751 procedure Set_Position
9752 (N : Node_Id; Val : Node_Id); -- Node2
9754 procedure Set_Pragma_Argument_Associations
9755 (N : Node_Id; Val : List_Id); -- List2
9757 procedure Set_Pragma_Identifier
9758 (N : Node_Id; Val : Node_Id); -- Node4
9760 procedure Set_Pragmas_After
9761 (N : Node_Id; Val : List_Id); -- List5
9763 procedure Set_Pragmas_Before
9764 (N : Node_Id; Val : List_Id); -- List4
9766 procedure Set_Prefix
9767 (N : Node_Id; Val : Node_Id); -- Node3
9769 procedure Set_Present_Expr
9770 (N : Node_Id; Val : Uint); -- Uint3
9772 procedure Set_Prev_Ids
9773 (N : Node_Id; Val : Boolean := True); -- Flag6
9775 procedure Set_Print_In_Hex
9776 (N : Node_Id; Val : Boolean := True); -- Flag13
9778 procedure Set_Private_Declarations
9779 (N : Node_Id; Val : List_Id); -- List3
9781 procedure Set_Private_Present
9782 (N : Node_Id; Val : Boolean := True); -- Flag15
9784 procedure Set_Procedure_To_Call
9785 (N : Node_Id; Val : Node_Id); -- Node2
9787 procedure Set_Proper_Body
9788 (N : Node_Id; Val : Node_Id); -- Node1
9790 procedure Set_Protected_Definition
9791 (N : Node_Id; Val : Node_Id); -- Node3
9793 procedure Set_Protected_Present
9794 (N : Node_Id; Val : Boolean := True); -- Flag6
9796 procedure Set_Raises_Constraint_Error
9797 (N : Node_Id; Val : Boolean := True); -- Flag7
9799 procedure Set_Range_Constraint
9800 (N : Node_Id; Val : Node_Id); -- Node4
9802 procedure Set_Range_Expression
9803 (N : Node_Id; Val : Node_Id); -- Node4
9805 procedure Set_Real_Range_Specification
9806 (N : Node_Id; Val : Node_Id); -- Node4
9808 procedure Set_Realval
9809 (N : Node_Id; Val : Ureal); -- Ureal3
9811 procedure Set_Reason
9812 (N : Node_Id; Val : Uint); -- Uint3
9814 procedure Set_Record_Extension_Part
9815 (N : Node_Id; Val : Node_Id); -- Node3
9817 procedure Set_Redundant_Use
9818 (N : Node_Id; Val : Boolean := True); -- Flag13
9820 procedure Set_Renaming_Exception
9821 (N : Node_Id; Val : Node_Id); -- Node2
9823 procedure Set_Result_Definition
9824 (N : Node_Id; Val : Node_Id); -- Node4
9826 procedure Set_Return_Object_Declarations
9827 (N : Node_Id; Val : List_Id); -- List3
9829 procedure Set_Return_Statement_Entity
9830 (N : Node_Id; Val : Node_Id); -- Node5
9832 procedure Set_Reverse_Present
9833 (N : Node_Id; Val : Boolean := True); -- Flag15
9835 procedure Set_Right_Opnd
9836 (N : Node_Id; Val : Node_Id); -- Node3
9838 procedure Set_Rounded_Result
9839 (N : Node_Id; Val : Boolean := True); -- Flag18
9841 procedure Set_SCIL_Controlling_Tag
9842 (N : Node_Id; Val : Node_Id); -- Node5
9844 procedure Set_SCIL_Entity
9845 (N : Node_Id; Val : Node_Id); -- Node4
9847 procedure Set_SCIL_Tag_Value
9848 (N : Node_Id; Val : Node_Id); -- Node5
9850 procedure Set_SCIL_Target_Prim
9851 (N : Node_Id; Val : Node_Id); -- Node2
9854 (N : Node_Id; Val : Node_Id); -- Node3
9856 procedure Set_Select_Alternatives
9857 (N : Node_Id; Val : List_Id); -- List1
9859 procedure Set_Selector_Name
9860 (N : Node_Id; Val : Node_Id); -- Node2
9862 procedure Set_Selector_Names
9863 (N : Node_Id; Val : List_Id); -- List1
9865 procedure Set_Shift_Count_OK
9866 (N : Node_Id; Val : Boolean := True); -- Flag4
9868 procedure Set_Source_Type
9869 (N : Node_Id; Val : Entity_Id); -- Node1
9871 procedure Set_Spec_PPC_List
9872 (N : Node_Id; Val : Node_Id); -- Node1
9874 procedure Set_Spec_TC_List
9875 (N : Node_Id; Val : Node_Id); -- Node2
9877 procedure Set_Specification
9878 (N : Node_Id; Val : Node_Id); -- Node1
9880 procedure Set_Split_PPC
9881 (N : Node_Id; Val : Boolean); -- Flag17
9883 procedure Set_Statements
9884 (N : Node_Id; Val : List_Id); -- List3
9886 procedure Set_Static_Processing_OK
9887 (N : Node_Id; Val : Boolean); -- Flag4
9889 procedure Set_Storage_Pool
9890 (N : Node_Id; Val : Node_Id); -- Node1
9892 procedure Set_Subpool_Handle_Name
9893 (N : Node_Id; Val : Node_Id); -- Node4
9895 procedure Set_Strval
9896 (N : Node_Id; Val : String_Id); -- Str3
9898 procedure Set_Subtype_Indication
9899 (N : Node_Id; Val : Node_Id); -- Node5
9901 procedure Set_Subtype_Mark
9902 (N : Node_Id; Val : Node_Id); -- Node4
9904 procedure Set_Subtype_Marks
9905 (N : Node_Id; Val : List_Id); -- List2
9907 procedure Set_Suppress_Assignment_Checks
9908 (N : Node_Id; Val : Boolean := True); -- Flag18
9910 procedure Set_Suppress_Loop_Warnings
9911 (N : Node_Id; Val : Boolean := True); -- Flag17
9913 procedure Set_Synchronized_Present
9914 (N : Node_Id; Val : Boolean := True); -- Flag7
9916 procedure Set_Tagged_Present
9917 (N : Node_Id; Val : Boolean := True); -- Flag15
9919 procedure Set_Target_Type
9920 (N : Node_Id; Val : Entity_Id); -- Node2
9922 procedure Set_Task_Definition
9923 (N : Node_Id; Val : Node_Id); -- Node3
9925 procedure Set_Task_Present
9926 (N : Node_Id; Val : Boolean := True); -- Flag5
9928 procedure Set_Then_Actions
9929 (N : Node_Id; Val : List_Id); -- List2
9931 procedure Set_Then_Statements
9932 (N : Node_Id; Val : List_Id); -- List2
9934 procedure Set_Treat_Fixed_As_Integer
9935 (N : Node_Id; Val : Boolean := True); -- Flag14
9937 procedure Set_Triggering_Alternative
9938 (N : Node_Id; Val : Node_Id); -- Node1
9940 procedure Set_Triggering_Statement
9941 (N : Node_Id; Val : Node_Id); -- Node1
9943 procedure Set_TSS_Elist
9944 (N : Node_Id; Val : Elist_Id); -- Elist3
9946 procedure Set_Type_Definition
9947 (N : Node_Id; Val : Node_Id); -- Node3
9950 (N : Node_Id; Val : Node_Id); -- Node2
9952 procedure Set_Unknown_Discriminants_Present
9953 (N : Node_Id; Val : Boolean := True); -- Flag13
9955 procedure Set_Unreferenced_In_Spec
9956 (N : Node_Id; Val : Boolean := True); -- Flag7
9958 procedure Set_Variant_Part
9959 (N : Node_Id; Val : Node_Id); -- Node4
9961 procedure Set_Variants
9962 (N : Node_Id; Val : List_Id); -- List1
9964 procedure Set_Visible_Declarations
9965 (N : Node_Id; Val : List_Id); -- List2
9967 procedure Set_Used_Operations
9968 (N : Node_Id; Val : Elist_Id); -- Elist5
9970 procedure Set_Was_Originally_Stub
9971 (N : Node_Id; Val : Boolean := True); -- Flag13
9973 procedure Set_Withed_Body
9974 (N : Node_Id; Val : Node_Id); -- Node1
9976 procedure Set_Zero_Cost_Handling
9977 (N : Node_Id; Val : Boolean := True); -- Flag5
9979 -------------------------
9980 -- Iterator Procedures --
9981 -------------------------
9983 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
9985 procedure Next_Entity (N : in out Node_Id);
9986 procedure Next_Named_Actual (N : in out Node_Id);
9987 procedure Next_Rep_Item (N : in out Node_Id);
9988 procedure Next_Use_Clause (N : in out Node_Id);
9990 -------------------------------------------
9991 -- Miscellaneous Tree Access Subprograms --
9992 -------------------------------------------
9994 function End_Location (N : Node_Id) return Source_Ptr;
9995 -- N is an N_If_Statement or N_Case_Statement node, and this function
9996 -- returns the location of the IF token in the END IF sequence by
9997 -- translating the value of the End_Span field.
9999 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
10000 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
10001 -- the End_Span field to correspond to the given value S. In other words,
10002 -- End_Span is set to the difference between S and Sloc (N), the starting
10005 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
10006 -- Given an argument to a pragma Arg, this function returns the expression
10007 -- for the argument. This is Arg itself, or, in the case where Arg is a
10008 -- pragma argument association node, the expression from this node.
10010 --------------------------------
10011 -- Node_Kind Membership Tests --
10012 --------------------------------
10014 -- The following functions allow a convenient notation for testing whether
10015 -- a Node_Kind value matches any one of a list of possible values. In each
10016 -- case True is returned if the given T argument is equal to any of the V
10017 -- arguments. Note that there is a similar set of functions defined in
10018 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
10023 V2 : Node_Kind) return Boolean;
10029 V3 : Node_Kind) return Boolean;
10036 V4 : Node_Kind) return Boolean;
10044 V5 : Node_Kind) return Boolean;
10053 V6 : Node_Kind) return Boolean;
10063 V7 : Node_Kind) return Boolean;
10074 V8 : Node_Kind) return Boolean;
10086 V9 : Node_Kind) return Boolean;
10088 pragma Inline (Nkind_In);
10089 -- Inline all above functions
10091 -----------------------
10092 -- Utility Functions --
10093 -----------------------
10095 function Pragma_Name (N : Node_Id) return Name_Id;
10096 pragma Inline (Pragma_Name);
10097 -- Convenient function to obtain Chars field of Pragma_Identifier
10099 -----------------------------
10100 -- Syntactic Parent Tables --
10101 -----------------------------
10103 -- These tables show for each node, and for each of the five fields,
10104 -- whether the corresponding field is syntactic (True) or semantic (False).
10105 -- Unused entries are also set to False.
10107 subtype Field_Num is Natural range 1 .. 5;
10109 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
10111 -- Following entries can be built automatically from the sinfo sources
10112 -- using the makeisf utility (currently this program is in spitbol).
10115 (1 => True, -- Chars (Name1)
10116 2 => False, -- Original_Discriminant (Node2-Sem)
10117 3 => False, -- unused
10118 4 => False, -- Entity (Node4-Sem)
10119 5 => False), -- Etype (Node5-Sem)
10121 N_Integer_Literal =>
10122 (1 => False, -- unused
10123 2 => False, -- Original_Entity (Node2-Sem)
10124 3 => True, -- Intval (Uint3)
10125 4 => False, -- unused
10126 5 => False), -- Etype (Node5-Sem)
10129 (1 => False, -- unused
10130 2 => False, -- Original_Entity (Node2-Sem)
10131 3 => True, -- Realval (Ureal3)
10132 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
10133 5 => False), -- Etype (Node5-Sem)
10135 N_Character_Literal =>
10136 (1 => True, -- Chars (Name1)
10137 2 => True, -- Char_Literal_Value (Uint2)
10138 3 => False, -- unused
10139 4 => False, -- Entity (Node4-Sem)
10140 5 => False), -- Etype (Node5-Sem)
10142 N_String_Literal =>
10143 (1 => False, -- unused
10144 2 => False, -- unused
10145 3 => True, -- Strval (Str3)
10146 4 => False, -- unused
10147 5 => False), -- Etype (Node5-Sem)
10150 (1 => False, -- Next_Pragma (Node1-Sem)
10151 2 => True, -- Pragma_Argument_Associations (List2)
10152 3 => False, -- unused
10153 4 => True, -- Pragma_Identifier (Node4)
10154 5 => False), -- Next_Rep_Item (Node5-Sem)
10156 N_Pragma_Argument_Association =>
10157 (1 => True, -- Chars (Name1)
10158 2 => False, -- unused
10159 3 => True, -- Expression (Node3)
10160 4 => False, -- unused
10161 5 => False), -- unused
10163 N_Defining_Identifier =>
10164 (1 => True, -- Chars (Name1)
10165 2 => False, -- Next_Entity (Node2-Sem)
10166 3 => False, -- Scope (Node3-Sem)
10167 4 => False, -- unused
10168 5 => False), -- Etype (Node5-Sem)
10170 N_Full_Type_Declaration =>
10171 (1 => True, -- Defining_Identifier (Node1)
10172 2 => False, -- unused
10173 3 => True, -- Type_Definition (Node3)
10174 4 => True, -- Discriminant_Specifications (List4)
10175 5 => False), -- unused
10177 N_Subtype_Declaration =>
10178 (1 => True, -- Defining_Identifier (Node1)
10179 2 => False, -- unused
10180 3 => False, -- unused
10181 4 => False, -- Generic_Parent_Type (Node4-Sem)
10182 5 => True), -- Subtype_Indication (Node5)
10184 N_Subtype_Indication =>
10185 (1 => False, -- unused
10186 2 => False, -- unused
10187 3 => True, -- Constraint (Node3)
10188 4 => True, -- Subtype_Mark (Node4)
10189 5 => False), -- Etype (Node5-Sem)
10191 N_Object_Declaration =>
10192 (1 => True, -- Defining_Identifier (Node1)
10193 2 => False, -- Handler_List_Entry (Node2-Sem)
10194 3 => True, -- Expression (Node3)
10195 4 => True, -- Object_Definition (Node4)
10196 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10198 N_Number_Declaration =>
10199 (1 => True, -- Defining_Identifier (Node1)
10200 2 => False, -- unused
10201 3 => True, -- Expression (Node3)
10202 4 => False, -- unused
10203 5 => False), -- unused
10205 N_Derived_Type_Definition =>
10206 (1 => False, -- unused
10207 2 => True, -- Interface_List (List2)
10208 3 => True, -- Record_Extension_Part (Node3)
10209 4 => False, -- unused
10210 5 => True), -- Subtype_Indication (Node5)
10212 N_Range_Constraint =>
10213 (1 => False, -- unused
10214 2 => False, -- unused
10215 3 => False, -- unused
10216 4 => True, -- Range_Expression (Node4)
10217 5 => False), -- unused
10220 (1 => True, -- Low_Bound (Node1)
10221 2 => True, -- High_Bound (Node2)
10222 3 => False, -- unused
10223 4 => False, -- unused
10224 5 => False), -- Etype (Node5-Sem)
10226 N_Enumeration_Type_Definition =>
10227 (1 => True, -- Literals (List1)
10228 2 => False, -- unused
10229 3 => False, -- unused
10230 4 => True, -- End_Label (Node4)
10231 5 => False), -- unused
10233 N_Defining_Character_Literal =>
10234 (1 => True, -- Chars (Name1)
10235 2 => False, -- Next_Entity (Node2-Sem)
10236 3 => False, -- Scope (Node3-Sem)
10237 4 => False, -- unused
10238 5 => False), -- Etype (Node5-Sem)
10240 N_Signed_Integer_Type_Definition =>
10241 (1 => True, -- Low_Bound (Node1)
10242 2 => True, -- High_Bound (Node2)
10243 3 => False, -- unused
10244 4 => False, -- unused
10245 5 => False), -- unused
10247 N_Modular_Type_Definition =>
10248 (1 => False, -- unused
10249 2 => False, -- unused
10250 3 => True, -- Expression (Node3)
10251 4 => False, -- unused
10252 5 => False), -- unused
10254 N_Floating_Point_Definition =>
10255 (1 => False, -- unused
10256 2 => True, -- Digits_Expression (Node2)
10257 3 => False, -- unused
10258 4 => True, -- Real_Range_Specification (Node4)
10259 5 => False), -- unused
10261 N_Real_Range_Specification =>
10262 (1 => True, -- Low_Bound (Node1)
10263 2 => True, -- High_Bound (Node2)
10264 3 => False, -- unused
10265 4 => False, -- unused
10266 5 => False), -- unused
10268 N_Ordinary_Fixed_Point_Definition =>
10269 (1 => False, -- unused
10270 2 => False, -- unused
10271 3 => True, -- Delta_Expression (Node3)
10272 4 => True, -- Real_Range_Specification (Node4)
10273 5 => False), -- unused
10275 N_Decimal_Fixed_Point_Definition =>
10276 (1 => False, -- unused
10277 2 => True, -- Digits_Expression (Node2)
10278 3 => True, -- Delta_Expression (Node3)
10279 4 => True, -- Real_Range_Specification (Node4)
10280 5 => False), -- unused
10282 N_Digits_Constraint =>
10283 (1 => False, -- unused
10284 2 => True, -- Digits_Expression (Node2)
10285 3 => False, -- unused
10286 4 => True, -- Range_Constraint (Node4)
10287 5 => False), -- unused
10289 N_Unconstrained_Array_Definition =>
10290 (1 => False, -- unused
10291 2 => True, -- Subtype_Marks (List2)
10292 3 => False, -- unused
10293 4 => True, -- Component_Definition (Node4)
10294 5 => False), -- unused
10296 N_Constrained_Array_Definition =>
10297 (1 => False, -- unused
10298 2 => True, -- Discrete_Subtype_Definitions (List2)
10299 3 => False, -- unused
10300 4 => True, -- Component_Definition (Node4)
10301 5 => False), -- unused
10303 N_Component_Definition =>
10304 (1 => False, -- unused
10305 2 => False, -- unused
10306 3 => True, -- Access_Definition (Node3)
10307 4 => False, -- unused
10308 5 => True), -- Subtype_Indication (Node5)
10310 N_Discriminant_Specification =>
10311 (1 => True, -- Defining_Identifier (Node1)
10312 2 => False, -- unused
10313 3 => True, -- Expression (Node3)
10314 4 => False, -- unused
10315 5 => True), -- Discriminant_Type (Node5)
10317 N_Index_Or_Discriminant_Constraint =>
10318 (1 => True, -- Constraints (List1)
10319 2 => False, -- unused
10320 3 => False, -- unused
10321 4 => False, -- unused
10322 5 => False), -- unused
10324 N_Discriminant_Association =>
10325 (1 => True, -- Selector_Names (List1)
10326 2 => False, -- unused
10327 3 => True, -- Expression (Node3)
10328 4 => False, -- unused
10329 5 => False), -- unused
10331 N_Record_Definition =>
10332 (1 => True, -- Component_List (Node1)
10333 2 => True, -- Interface_List (List2)
10334 3 => False, -- unused
10335 4 => True, -- End_Label (Node4)
10336 5 => False), -- unused
10338 N_Component_List =>
10339 (1 => False, -- unused
10340 2 => False, -- unused
10341 3 => True, -- Component_Items (List3)
10342 4 => True, -- Variant_Part (Node4)
10343 5 => False), -- unused
10345 N_Component_Declaration =>
10346 (1 => True, -- Defining_Identifier (Node1)
10347 2 => False, -- unused
10348 3 => True, -- Expression (Node3)
10349 4 => True, -- Component_Definition (Node4)
10350 5 => False), -- unused
10353 (1 => True, -- Variants (List1)
10354 2 => True, -- Name (Node2)
10355 3 => False, -- unused
10356 4 => False, -- unused
10357 5 => False), -- unused
10360 (1 => True, -- Component_List (Node1)
10361 2 => False, -- Enclosing_Variant (Node2-Sem)
10362 3 => False, -- Present_Expr (Uint3-Sem)
10363 4 => True, -- Discrete_Choices (List4)
10364 5 => False), -- Dcheck_Function (Node5-Sem)
10367 (1 => False, -- Others_Discrete_Choices (List1-Sem)
10368 2 => False, -- unused
10369 3 => False, -- unused
10370 4 => False, -- unused
10371 5 => False), -- unused
10373 N_Access_To_Object_Definition =>
10374 (1 => False, -- unused
10375 2 => False, -- unused
10376 3 => False, -- unused
10377 4 => False, -- unused
10378 5 => True), -- Subtype_Indication (Node5)
10380 N_Access_Function_Definition =>
10381 (1 => False, -- unused
10382 2 => False, -- unused
10383 3 => True, -- Parameter_Specifications (List3)
10384 4 => True, -- Result_Definition (Node4)
10385 5 => False), -- unused
10387 N_Access_Procedure_Definition =>
10388 (1 => False, -- unused
10389 2 => False, -- unused
10390 3 => True, -- Parameter_Specifications (List3)
10391 4 => False, -- unused
10392 5 => False), -- unused
10394 N_Access_Definition =>
10395 (1 => False, -- unused
10396 2 => False, -- unused
10397 3 => True, -- Access_To_Subprogram_Definition (Node3)
10398 4 => True, -- Subtype_Mark (Node4)
10399 5 => False), -- unused
10401 N_Incomplete_Type_Declaration =>
10402 (1 => True, -- Defining_Identifier (Node1)
10403 2 => False, -- unused
10404 3 => False, -- unused
10405 4 => True, -- Discriminant_Specifications (List4)
10406 5 => False), -- unused
10408 N_Explicit_Dereference =>
10409 (1 => False, -- unused
10410 2 => False, -- unused
10411 3 => True, -- Prefix (Node3)
10412 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
10413 5 => False), -- Etype (Node5-Sem)
10415 N_Indexed_Component =>
10416 (1 => True, -- Expressions (List1)
10417 2 => False, -- unused
10418 3 => True, -- Prefix (Node3)
10419 4 => False, -- unused
10420 5 => False), -- Etype (Node5-Sem)
10423 (1 => False, -- unused
10424 2 => False, -- unused
10425 3 => True, -- Prefix (Node3)
10426 4 => True, -- Discrete_Range (Node4)
10427 5 => False), -- Etype (Node5-Sem)
10429 N_Selected_Component =>
10430 (1 => False, -- unused
10431 2 => True, -- Selector_Name (Node2)
10432 3 => True, -- Prefix (Node3)
10433 4 => False, -- unused
10434 5 => False), -- Etype (Node5-Sem)
10436 N_Attribute_Reference =>
10437 (1 => True, -- Expressions (List1)
10438 2 => True, -- Attribute_Name (Name2)
10439 3 => True, -- Prefix (Node3)
10440 4 => False, -- Entity (Node4-Sem)
10441 5 => False), -- Etype (Node5-Sem)
10444 (1 => True, -- Expressions (List1)
10445 2 => True, -- Component_Associations (List2)
10446 3 => False, -- Aggregate_Bounds (Node3-Sem)
10447 4 => False, -- unused
10448 5 => False), -- Etype (Node5-Sem)
10450 N_Component_Association =>
10451 (1 => True, -- Choices (List1)
10452 2 => False, -- Loop_Actions (List2-Sem)
10453 3 => True, -- Expression (Node3)
10454 4 => False, -- unused
10455 5 => False), -- unused
10457 N_Extension_Aggregate =>
10458 (1 => True, -- Expressions (List1)
10459 2 => True, -- Component_Associations (List2)
10460 3 => True, -- Ancestor_Part (Node3)
10461 4 => False, -- unused
10462 5 => False), -- Etype (Node5-Sem)
10465 (1 => False, -- unused
10466 2 => False, -- unused
10467 3 => False, -- unused
10468 4 => False, -- unused
10469 5 => False), -- Etype (Node5-Sem)
10472 (1 => False, -- Actions (List1-Sem)
10473 2 => True, -- Left_Opnd (Node2)
10474 3 => True, -- Right_Opnd (Node3)
10475 4 => False, -- unused
10476 5 => False), -- Etype (Node5-Sem)
10479 (1 => False, -- Actions (List1-Sem)
10480 2 => True, -- Left_Opnd (Node2)
10481 3 => True, -- Right_Opnd (Node3)
10482 4 => False, -- unused
10483 5 => False), -- Etype (Node5-Sem)
10486 (1 => False, -- unused
10487 2 => True, -- Left_Opnd (Node2)
10488 3 => True, -- Right_Opnd (Node3)
10489 4 => True, -- Alternatives (List4)
10490 5 => False), -- Etype (Node5-Sem)
10493 (1 => False, -- unused
10494 2 => True, -- Left_Opnd (Node2)
10495 3 => True, -- Right_Opnd (Node3)
10496 4 => True, -- Alternatives (List4)
10497 5 => False), -- Etype (Node5-Sem)
10500 (1 => True, -- Chars (Name1)
10501 2 => True, -- Left_Opnd (Node2)
10502 3 => True, -- Right_Opnd (Node3)
10503 4 => False, -- Entity (Node4-Sem)
10504 5 => False), -- Etype (Node5-Sem)
10507 (1 => True, -- Chars (Name1)
10508 2 => True, -- Left_Opnd (Node2)
10509 3 => True, -- Right_Opnd (Node3)
10510 4 => False, -- Entity (Node4-Sem)
10511 5 => False), -- Etype (Node5-Sem)
10514 (1 => True, -- Chars (Name1)
10515 2 => True, -- Left_Opnd (Node2)
10516 3 => True, -- Right_Opnd (Node3)
10517 4 => False, -- Entity (Node4-Sem)
10518 5 => False), -- Etype (Node5-Sem)
10521 (1 => True, -- Chars (Name1)
10522 2 => True, -- Left_Opnd (Node2)
10523 3 => True, -- Right_Opnd (Node3)
10524 4 => False, -- Entity (Node4-Sem)
10525 5 => False), -- Etype (Node5-Sem)
10528 (1 => True, -- Chars (Name1)
10529 2 => True, -- Left_Opnd (Node2)
10530 3 => True, -- Right_Opnd (Node3)
10531 4 => False, -- Entity (Node4-Sem)
10532 5 => False), -- Etype (Node5-Sem)
10535 (1 => True, -- Chars (Name1)
10536 2 => True, -- Left_Opnd (Node2)
10537 3 => True, -- Right_Opnd (Node3)
10538 4 => False, -- Entity (Node4-Sem)
10539 5 => False), -- Etype (Node5-Sem)
10542 (1 => True, -- Chars (Name1)
10543 2 => True, -- Left_Opnd (Node2)
10544 3 => True, -- Right_Opnd (Node3)
10545 4 => False, -- Entity (Node4-Sem)
10546 5 => False), -- Etype (Node5-Sem)
10549 (1 => True, -- Chars (Name1)
10550 2 => True, -- Left_Opnd (Node2)
10551 3 => True, -- Right_Opnd (Node3)
10552 4 => False, -- Entity (Node4-Sem)
10553 5 => False), -- Etype (Node5-Sem)
10556 (1 => True, -- Chars (Name1)
10557 2 => True, -- Left_Opnd (Node2)
10558 3 => True, -- Right_Opnd (Node3)
10559 4 => False, -- Entity (Node4-Sem)
10560 5 => False), -- Etype (Node5-Sem)
10563 (1 => True, -- Chars (Name1)
10564 2 => True, -- Left_Opnd (Node2)
10565 3 => True, -- Right_Opnd (Node3)
10566 4 => False, -- Entity (Node4-Sem)
10567 5 => False), -- Etype (Node5-Sem)
10570 (1 => True, -- Chars (Name1)
10571 2 => True, -- Left_Opnd (Node2)
10572 3 => True, -- Right_Opnd (Node3)
10573 4 => False, -- Entity (Node4-Sem)
10574 5 => False), -- Etype (Node5-Sem)
10577 (1 => True, -- Chars (Name1)
10578 2 => True, -- Left_Opnd (Node2)
10579 3 => True, -- Right_Opnd (Node3)
10580 4 => False, -- Entity (Node4-Sem)
10581 5 => False), -- Etype (Node5-Sem)
10584 (1 => True, -- Chars (Name1)
10585 2 => True, -- Left_Opnd (Node2)
10586 3 => True, -- Right_Opnd (Node3)
10587 4 => False, -- Entity (Node4-Sem)
10588 5 => False), -- Etype (Node5-Sem)
10591 (1 => True, -- Chars (Name1)
10592 2 => True, -- Left_Opnd (Node2)
10593 3 => True, -- Right_Opnd (Node3)
10594 4 => False, -- Entity (Node4-Sem)
10595 5 => False), -- Etype (Node5-Sem)
10598 (1 => True, -- Chars (Name1)
10599 2 => True, -- Left_Opnd (Node2)
10600 3 => True, -- Right_Opnd (Node3)
10601 4 => False, -- Entity (Node4-Sem)
10602 5 => False), -- Etype (Node5-Sem)
10605 (1 => True, -- Chars (Name1)
10606 2 => True, -- Left_Opnd (Node2)
10607 3 => True, -- Right_Opnd (Node3)
10608 4 => False, -- Entity (Node4-Sem)
10609 5 => False), -- Etype (Node5-Sem)
10612 (1 => True, -- Chars (Name1)
10613 2 => True, -- Left_Opnd (Node2)
10614 3 => True, -- Right_Opnd (Node3)
10615 4 => False, -- Entity (Node4-Sem)
10616 5 => False), -- Etype (Node5-Sem)
10619 (1 => True, -- Chars (Name1)
10620 2 => False, -- unused
10621 3 => True, -- Right_Opnd (Node3)
10622 4 => False, -- Entity (Node4-Sem)
10623 5 => False), -- Etype (Node5-Sem)
10626 (1 => True, -- Chars (Name1)
10627 2 => False, -- unused
10628 3 => True, -- Right_Opnd (Node3)
10629 4 => False, -- Entity (Node4-Sem)
10630 5 => False), -- Etype (Node5-Sem)
10633 (1 => True, -- Chars (Name1)
10634 2 => False, -- unused
10635 3 => True, -- Right_Opnd (Node3)
10636 4 => False, -- Entity (Node4-Sem)
10637 5 => False), -- Etype (Node5-Sem)
10640 (1 => True, -- Chars (Name1)
10641 2 => False, -- unused
10642 3 => True, -- Right_Opnd (Node3)
10643 4 => False, -- Entity (Node4-Sem)
10644 5 => False), -- Etype (Node5-Sem)
10646 N_Type_Conversion =>
10647 (1 => False, -- unused
10648 2 => False, -- unused
10649 3 => True, -- Expression (Node3)
10650 4 => True, -- Subtype_Mark (Node4)
10651 5 => False), -- Etype (Node5-Sem)
10653 N_Qualified_Expression =>
10654 (1 => False, -- unused
10655 2 => False, -- unused
10656 3 => True, -- Expression (Node3)
10657 4 => True, -- Subtype_Mark (Node4)
10658 5 => False), -- Etype (Node5-Sem)
10660 N_Quantified_Expression =>
10661 (1 => True, -- Condition (Node1)
10662 2 => True, -- Iterator_Specification
10663 3 => False, -- unused
10664 4 => True, -- Loop_Parameter_Specification (Node4)
10665 5 => False), -- Etype (Node5-Sem)
10668 (1 => False, -- Storage_Pool (Node1-Sem)
10669 2 => False, -- Procedure_To_Call (Node2-Sem)
10670 3 => True, -- Expression (Node3)
10671 4 => True, -- Subpool_Handle_Name (Node4)
10672 5 => False), -- Etype (Node5-Sem)
10674 N_Null_Statement =>
10675 (1 => False, -- unused
10676 2 => False, -- unused
10677 3 => False, -- unused
10678 4 => False, -- unused
10679 5 => False), -- unused
10682 (1 => True, -- Identifier (Node1)
10683 2 => False, -- unused
10684 3 => False, -- unused
10685 4 => False, -- unused
10686 5 => False), -- unused
10688 N_Assignment_Statement =>
10689 (1 => False, -- unused
10690 2 => True, -- Name (Node2)
10691 3 => True, -- Expression (Node3)
10692 4 => False, -- unused
10693 5 => False), -- unused
10696 (1 => True, -- Condition (Node1)
10697 2 => True, -- Then_Statements (List2)
10698 3 => True, -- Elsif_Parts (List3)
10699 4 => True, -- Else_Statements (List4)
10700 5 => True), -- End_Span (Uint5)
10703 (1 => True, -- Condition (Node1)
10704 2 => True, -- Then_Statements (List2)
10705 3 => False, -- Condition_Actions (List3-Sem)
10706 4 => False, -- unused
10707 5 => False), -- unused
10709 N_Case_Expression =>
10710 (1 => False, -- unused
10711 2 => False, -- unused
10712 3 => True, -- Expression (Node3)
10713 4 => True, -- Alternatives (List4)
10714 5 => False), -- unused
10716 N_Case_Expression_Alternative =>
10717 (1 => False, -- Actions (List1-Sem)
10718 2 => False, -- unused
10719 3 => True, -- Statements (List3)
10720 4 => True, -- Expression (Node4)
10721 5 => False), -- unused
10723 N_Case_Statement =>
10724 (1 => False, -- unused
10725 2 => False, -- unused
10726 3 => True, -- Expression (Node3)
10727 4 => True, -- Alternatives (List4)
10728 5 => True), -- End_Span (Uint5)
10730 N_Case_Statement_Alternative =>
10731 (1 => False, -- unused
10732 2 => False, -- unused
10733 3 => True, -- Statements (List3)
10734 4 => True, -- Discrete_Choices (List4)
10735 5 => False), -- unused
10737 N_Loop_Statement =>
10738 (1 => True, -- Identifier (Node1)
10739 2 => True, -- Iteration_Scheme (Node2)
10740 3 => True, -- Statements (List3)
10741 4 => True, -- End_Label (Node4)
10742 5 => False), -- unused
10744 N_Iteration_Scheme =>
10745 (1 => True, -- Condition (Node1)
10746 2 => True, -- Iterator_Specification (Node2)
10747 3 => False, -- Condition_Actions (List3-Sem)
10748 4 => True, -- Loop_Parameter_Specification (Node4)
10749 5 => False), -- unused
10751 N_Loop_Parameter_Specification =>
10752 (1 => True, -- Defining_Identifier (Node1)
10753 2 => False, -- unused
10754 3 => False, -- unused
10755 4 => True, -- Discrete_Subtype_Definition (Node4)
10756 5 => False), -- unused
10758 N_Iterator_Specification =>
10759 (1 => True, -- Defining_Identifier (Node1)
10760 2 => True, -- Name (Node2)
10761 3 => False, -- Unused
10762 4 => False, -- Unused
10763 5 => True), -- Subtype_Indication (Node5)
10765 N_Block_Statement =>
10766 (1 => True, -- Identifier (Node1)
10767 2 => True, -- Declarations (List2)
10768 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10769 4 => True, -- Handled_Statement_Sequence (Node4)
10770 5 => False), -- unused
10772 N_Exit_Statement =>
10773 (1 => True, -- Condition (Node1)
10774 2 => True, -- Name (Node2)
10775 3 => False, -- unused
10776 4 => False, -- unused
10777 5 => False), -- unused
10779 N_Goto_Statement =>
10780 (1 => False, -- unused
10781 2 => True, -- Name (Node2)
10782 3 => False, -- unused
10783 4 => False, -- unused
10784 5 => False), -- unused
10786 N_Subprogram_Declaration =>
10787 (1 => True, -- Specification (Node1)
10788 2 => False, -- unused
10789 3 => False, -- Body_To_Inline (Node3-Sem)
10790 4 => False, -- Parent_Spec (Node4-Sem)
10791 5 => False), -- Corresponding_Body (Node5-Sem)
10793 N_Abstract_Subprogram_Declaration =>
10794 (1 => True, -- Specification (Node1)
10795 2 => False, -- unused
10796 3 => False, -- unused
10797 4 => False, -- unused
10798 5 => False), -- unused
10800 N_Function_Specification =>
10801 (1 => True, -- Defining_Unit_Name (Node1)
10802 2 => False, -- Elaboration_Boolean (Node2-Sem)
10803 3 => True, -- Parameter_Specifications (List3)
10804 4 => True, -- Result_Definition (Node4)
10805 5 => False), -- Generic_Parent (Node5-Sem)
10807 N_Procedure_Specification =>
10808 (1 => True, -- Defining_Unit_Name (Node1)
10809 2 => False, -- Elaboration_Boolean (Node2-Sem)
10810 3 => True, -- Parameter_Specifications (List3)
10811 4 => False, -- unused
10812 5 => False), -- Generic_Parent (Node5-Sem)
10815 (1 => True, -- Identifier (Node1)
10816 2 => True, -- Name (Node2)
10817 3 => False, -- unused
10818 4 => False, -- unused
10819 5 => False), -- unused
10821 N_Defining_Program_Unit_Name =>
10822 (1 => True, -- Defining_Identifier (Node1)
10823 2 => True, -- Name (Node2)
10824 3 => False, -- unused
10825 4 => False, -- unused
10826 5 => False), -- unused
10828 N_Operator_Symbol =>
10829 (1 => True, -- Chars (Name1)
10830 2 => False, -- unused
10831 3 => True, -- Strval (Str3)
10832 4 => False, -- Entity (Node4-Sem)
10833 5 => False), -- Etype (Node5-Sem)
10835 N_Defining_Operator_Symbol =>
10836 (1 => True, -- Chars (Name1)
10837 2 => False, -- Next_Entity (Node2-Sem)
10838 3 => False, -- Scope (Node3-Sem)
10839 4 => False, -- unused
10840 5 => False), -- Etype (Node5-Sem)
10842 N_Parameter_Specification =>
10843 (1 => True, -- Defining_Identifier (Node1)
10844 2 => True, -- Parameter_Type (Node2)
10845 3 => True, -- Expression (Node3)
10846 4 => False, -- unused
10847 5 => False), -- Default_Expression (Node5-Sem)
10849 N_Subprogram_Body =>
10850 (1 => True, -- Specification (Node1)
10851 2 => True, -- Declarations (List2)
10852 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10853 4 => True, -- Handled_Statement_Sequence (Node4)
10854 5 => False), -- Corresponding_Spec (Node5-Sem)
10856 N_Expression_Function =>
10857 (1 => True, -- Specification (Node1)
10858 2 => False, -- unused
10859 3 => True, -- Expression (Node3)
10860 4 => False, -- unused
10861 5 => False), -- unused
10863 N_Procedure_Call_Statement =>
10864 (1 => False, -- Controlling_Argument (Node1-Sem)
10865 2 => True, -- Name (Node2)
10866 3 => True, -- Parameter_Associations (List3)
10867 4 => False, -- First_Named_Actual (Node4-Sem)
10868 5 => False), -- Etype (Node5-Sem)
10871 (1 => False, -- Controlling_Argument (Node1-Sem)
10872 2 => True, -- Name (Node2)
10873 3 => True, -- Parameter_Associations (List3)
10874 4 => False, -- First_Named_Actual (Node4-Sem)
10875 5 => False), -- Etype (Node5-Sem)
10877 N_Parameter_Association =>
10878 (1 => False, -- unused
10879 2 => True, -- Selector_Name (Node2)
10880 3 => True, -- Explicit_Actual_Parameter (Node3)
10881 4 => False, -- Next_Named_Actual (Node4-Sem)
10882 5 => False), -- unused
10884 N_Return_Statement =>
10885 (1 => False, -- Storage_Pool (Node1-Sem)
10886 2 => False, -- Procedure_To_Call (Node2-Sem)
10887 3 => True, -- Expression (Node3)
10888 4 => False, -- unused
10889 5 => False), -- Return_Statement_Entity (Node5-Sem)
10891 N_Extended_Return_Statement =>
10892 (1 => False, -- Storage_Pool (Node1-Sem)
10893 2 => False, -- Procedure_To_Call (Node2-Sem)
10894 3 => True, -- Return_Object_Declarations (List3)
10895 4 => True, -- Handled_Statement_Sequence (Node4)
10896 5 => False), -- Return_Statement_Entity (Node5-Sem)
10898 N_Package_Declaration =>
10899 (1 => True, -- Specification (Node1)
10900 2 => False, -- unused
10901 3 => False, -- Activation_Chain_Entity (Node3-Sem)
10902 4 => False, -- Parent_Spec (Node4-Sem)
10903 5 => False), -- Corresponding_Body (Node5-Sem)
10905 N_Package_Specification =>
10906 (1 => True, -- Defining_Unit_Name (Node1)
10907 2 => True, -- Visible_Declarations (List2)
10908 3 => True, -- Private_Declarations (List3)
10909 4 => True, -- End_Label (Node4)
10910 5 => False), -- Generic_Parent (Node5-Sem)
10913 (1 => True, -- Defining_Unit_Name (Node1)
10914 2 => True, -- Declarations (List2)
10915 3 => False, -- unused
10916 4 => True, -- Handled_Statement_Sequence (Node4)
10917 5 => False), -- Corresponding_Spec (Node5-Sem)
10919 N_Private_Type_Declaration =>
10920 (1 => True, -- Defining_Identifier (Node1)
10921 2 => False, -- unused
10922 3 => False, -- unused
10923 4 => True, -- Discriminant_Specifications (List4)
10924 5 => False), -- unused
10926 N_Private_Extension_Declaration =>
10927 (1 => True, -- Defining_Identifier (Node1)
10928 2 => True, -- Interface_List (List2)
10929 3 => False, -- unused
10930 4 => True, -- Discriminant_Specifications (List4)
10931 5 => True), -- Subtype_Indication (Node5)
10933 N_Use_Package_Clause =>
10934 (1 => False, -- unused
10935 2 => True, -- Names (List2)
10936 3 => False, -- Next_Use_Clause (Node3-Sem)
10937 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10938 5 => False), -- unused
10940 N_Use_Type_Clause =>
10941 (1 => False, -- unused
10942 2 => True, -- Subtype_Marks (List2)
10943 3 => False, -- Next_Use_Clause (Node3-Sem)
10944 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
10945 5 => False), -- unused
10947 N_Object_Renaming_Declaration =>
10948 (1 => True, -- Defining_Identifier (Node1)
10949 2 => True, -- Name (Node2)
10950 3 => True, -- Access_Definition (Node3)
10951 4 => True, -- Subtype_Mark (Node4)
10952 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10954 N_Exception_Renaming_Declaration =>
10955 (1 => True, -- Defining_Identifier (Node1)
10956 2 => True, -- Name (Node2)
10957 3 => False, -- unused
10958 4 => False, -- unused
10959 5 => False), -- unused
10961 N_Package_Renaming_Declaration =>
10962 (1 => True, -- Defining_Unit_Name (Node1)
10963 2 => True, -- Name (Node2)
10964 3 => False, -- unused
10965 4 => False, -- Parent_Spec (Node4-Sem)
10966 5 => False), -- unused
10968 N_Subprogram_Renaming_Declaration =>
10969 (1 => True, -- Specification (Node1)
10970 2 => True, -- Name (Node2)
10971 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
10972 4 => False, -- Parent_Spec (Node4-Sem)
10973 5 => False), -- Corresponding_Spec (Node5-Sem)
10975 N_Generic_Package_Renaming_Declaration =>
10976 (1 => True, -- Defining_Unit_Name (Node1)
10977 2 => True, -- Name (Node2)
10978 3 => False, -- unused
10979 4 => False, -- Parent_Spec (Node4-Sem)
10980 5 => False), -- unused
10982 N_Generic_Procedure_Renaming_Declaration =>
10983 (1 => True, -- Defining_Unit_Name (Node1)
10984 2 => True, -- Name (Node2)
10985 3 => False, -- unused
10986 4 => False, -- Parent_Spec (Node4-Sem)
10987 5 => False), -- unused
10989 N_Generic_Function_Renaming_Declaration =>
10990 (1 => True, -- Defining_Unit_Name (Node1)
10991 2 => True, -- Name (Node2)
10992 3 => False, -- unused
10993 4 => False, -- Parent_Spec (Node4-Sem)
10994 5 => False), -- unused
10996 N_Task_Type_Declaration =>
10997 (1 => True, -- Defining_Identifier (Node1)
10998 2 => True, -- Interface_List (List2)
10999 3 => True, -- Task_Definition (Node3)
11000 4 => True, -- Discriminant_Specifications (List4)
11001 5 => False), -- Corresponding_Body (Node5-Sem)
11003 N_Single_Task_Declaration =>
11004 (1 => True, -- Defining_Identifier (Node1)
11005 2 => True, -- Interface_List (List2)
11006 3 => True, -- Task_Definition (Node3)
11007 4 => False, -- unused
11008 5 => False), -- unused
11010 N_Task_Definition =>
11011 (1 => False, -- unused
11012 2 => True, -- Visible_Declarations (List2)
11013 3 => True, -- Private_Declarations (List3)
11014 4 => True, -- End_Label (Node4)
11015 5 => False), -- unused
11018 (1 => True, -- Defining_Identifier (Node1)
11019 2 => True, -- Declarations (List2)
11020 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11021 4 => True, -- Handled_Statement_Sequence (Node4)
11022 5 => False), -- Corresponding_Spec (Node5-Sem)
11024 N_Protected_Type_Declaration =>
11025 (1 => True, -- Defining_Identifier (Node1)
11026 2 => True, -- Interface_List (List2)
11027 3 => True, -- Protected_Definition (Node3)
11028 4 => True, -- Discriminant_Specifications (List4)
11029 5 => False), -- Corresponding_Body (Node5-Sem)
11031 N_Single_Protected_Declaration =>
11032 (1 => True, -- Defining_Identifier (Node1)
11033 2 => True, -- Interface_List (List2)
11034 3 => True, -- Protected_Definition (Node3)
11035 4 => False, -- unused
11036 5 => False), -- unused
11038 N_Protected_Definition =>
11039 (1 => False, -- unused
11040 2 => True, -- Visible_Declarations (List2)
11041 3 => True, -- Private_Declarations (List3)
11042 4 => True, -- End_Label (Node4)
11043 5 => False), -- unused
11045 N_Protected_Body =>
11046 (1 => True, -- Defining_Identifier (Node1)
11047 2 => True, -- Declarations (List2)
11048 3 => False, -- unused
11049 4 => True, -- End_Label (Node4)
11050 5 => False), -- Corresponding_Spec (Node5-Sem)
11052 N_Entry_Declaration =>
11053 (1 => True, -- Defining_Identifier (Node1)
11054 2 => False, -- unused
11055 3 => True, -- Parameter_Specifications (List3)
11056 4 => True, -- Discrete_Subtype_Definition (Node4)
11057 5 => False), -- Corresponding_Body (Node5-Sem)
11059 N_Accept_Statement =>
11060 (1 => True, -- Entry_Direct_Name (Node1)
11061 2 => True, -- Declarations (List2)
11062 3 => True, -- Parameter_Specifications (List3)
11063 4 => True, -- Handled_Statement_Sequence (Node4)
11064 5 => True), -- Entry_Index (Node5)
11067 (1 => True, -- Defining_Identifier (Node1)
11068 2 => True, -- Declarations (List2)
11069 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11070 4 => True, -- Handled_Statement_Sequence (Node4)
11071 5 => True), -- Entry_Body_Formal_Part (Node5)
11073 N_Entry_Body_Formal_Part =>
11074 (1 => True, -- Condition (Node1)
11075 2 => False, -- unused
11076 3 => True, -- Parameter_Specifications (List3)
11077 4 => True, -- Entry_Index_Specification (Node4)
11078 5 => False), -- unused
11080 N_Entry_Index_Specification =>
11081 (1 => True, -- Defining_Identifier (Node1)
11082 2 => False, -- unused
11083 3 => False, -- unused
11084 4 => True, -- Discrete_Subtype_Definition (Node4)
11085 5 => False), -- unused
11087 N_Entry_Call_Statement =>
11088 (1 => False, -- unused
11089 2 => True, -- Name (Node2)
11090 3 => True, -- Parameter_Associations (List3)
11091 4 => False, -- First_Named_Actual (Node4-Sem)
11092 5 => False), -- unused
11094 N_Requeue_Statement =>
11095 (1 => False, -- unused
11096 2 => True, -- Name (Node2)
11097 3 => False, -- unused
11098 4 => False, -- unused
11099 5 => False), -- unused
11101 N_Delay_Until_Statement =>
11102 (1 => False, -- unused
11103 2 => False, -- unused
11104 3 => True, -- Expression (Node3)
11105 4 => False, -- unused
11106 5 => False), -- unused
11108 N_Delay_Relative_Statement =>
11109 (1 => False, -- unused
11110 2 => False, -- unused
11111 3 => True, -- Expression (Node3)
11112 4 => False, -- unused
11113 5 => False), -- unused
11115 N_Selective_Accept =>
11116 (1 => True, -- Select_Alternatives (List1)
11117 2 => False, -- unused
11118 3 => False, -- unused
11119 4 => True, -- Else_Statements (List4)
11120 5 => False), -- unused
11122 N_Accept_Alternative =>
11123 (1 => True, -- Condition (Node1)
11124 2 => True, -- Accept_Statement (Node2)
11125 3 => True, -- Statements (List3)
11126 4 => True, -- Pragmas_Before (List4)
11127 5 => False), -- Accept_Handler_Records (List5-Sem)
11129 N_Delay_Alternative =>
11130 (1 => True, -- Condition (Node1)
11131 2 => True, -- Delay_Statement (Node2)
11132 3 => True, -- Statements (List3)
11133 4 => True, -- Pragmas_Before (List4)
11134 5 => False), -- unused
11136 N_Terminate_Alternative =>
11137 (1 => True, -- Condition (Node1)
11138 2 => False, -- unused
11139 3 => False, -- unused
11140 4 => True, -- Pragmas_Before (List4)
11141 5 => True), -- Pragmas_After (List5)
11143 N_Timed_Entry_Call =>
11144 (1 => True, -- Entry_Call_Alternative (Node1)
11145 2 => False, -- unused
11146 3 => False, -- unused
11147 4 => True, -- Delay_Alternative (Node4)
11148 5 => False), -- unused
11150 N_Entry_Call_Alternative =>
11151 (1 => True, -- Entry_Call_Statement (Node1)
11152 2 => False, -- unused
11153 3 => True, -- Statements (List3)
11154 4 => True, -- Pragmas_Before (List4)
11155 5 => False), -- unused
11157 N_Conditional_Entry_Call =>
11158 (1 => True, -- Entry_Call_Alternative (Node1)
11159 2 => False, -- unused
11160 3 => False, -- unused
11161 4 => True, -- Else_Statements (List4)
11162 5 => False), -- unused
11164 N_Asynchronous_Select =>
11165 (1 => True, -- Triggering_Alternative (Node1)
11166 2 => True, -- Abortable_Part (Node2)
11167 3 => False, -- unused
11168 4 => False, -- unused
11169 5 => False), -- unused
11171 N_Triggering_Alternative =>
11172 (1 => True, -- Triggering_Statement (Node1)
11173 2 => False, -- unused
11174 3 => True, -- Statements (List3)
11175 4 => True, -- Pragmas_Before (List4)
11176 5 => False), -- unused
11178 N_Abortable_Part =>
11179 (1 => False, -- unused
11180 2 => False, -- unused
11181 3 => True, -- Statements (List3)
11182 4 => False, -- unused
11183 5 => False), -- unused
11185 N_Abort_Statement =>
11186 (1 => False, -- unused
11187 2 => True, -- Names (List2)
11188 3 => False, -- unused
11189 4 => False, -- unused
11190 5 => False), -- unused
11192 N_Compilation_Unit =>
11193 (1 => True, -- Context_Items (List1)
11194 2 => True, -- Unit (Node2)
11195 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
11196 4 => False, -- Library_Unit (Node4-Sem)
11197 5 => True), -- Aux_Decls_Node (Node5)
11199 N_Compilation_Unit_Aux =>
11200 (1 => True, -- Actions (List1)
11201 2 => True, -- Declarations (List2)
11202 3 => False, -- Default_Storage_Pool (Node3)
11203 4 => True, -- Config_Pragmas (List4)
11204 5 => True), -- Pragmas_After (List5)
11207 (1 => False, -- unused
11208 2 => True, -- Name (Node2)
11209 3 => False, -- unused
11210 4 => False, -- Library_Unit (Node4-Sem)
11211 5 => False), -- Corresponding_Spec (Node5-Sem)
11213 N_Subprogram_Body_Stub =>
11214 (1 => True, -- Specification (Node1)
11215 2 => False, -- unused
11216 3 => False, -- unused
11217 4 => False, -- Library_Unit (Node4-Sem)
11218 5 => False), -- Corresponding_Body (Node5-Sem)
11220 N_Package_Body_Stub =>
11221 (1 => True, -- Defining_Identifier (Node1)
11222 2 => False, -- unused
11223 3 => False, -- unused
11224 4 => False, -- Library_Unit (Node4-Sem)
11225 5 => False), -- Corresponding_Body (Node5-Sem)
11227 N_Task_Body_Stub =>
11228 (1 => True, -- Defining_Identifier (Node1)
11229 2 => False, -- unused
11230 3 => False, -- unused
11231 4 => False, -- Library_Unit (Node4-Sem)
11232 5 => False), -- Corresponding_Body (Node5-Sem)
11234 N_Protected_Body_Stub =>
11235 (1 => True, -- Defining_Identifier (Node1)
11236 2 => False, -- unused
11237 3 => False, -- unused
11238 4 => False, -- Library_Unit (Node4-Sem)
11239 5 => False), -- Corresponding_Body (Node5-Sem)
11242 (1 => True, -- Proper_Body (Node1)
11243 2 => True, -- Name (Node2)
11244 3 => False, -- Corresponding_Stub (Node3-Sem)
11245 4 => False, -- unused
11246 5 => False), -- unused
11248 N_Exception_Declaration =>
11249 (1 => True, -- Defining_Identifier (Node1)
11250 2 => False, -- unused
11251 3 => False, -- Expression (Node3-Sem)
11252 4 => False, -- unused
11253 5 => False), -- unused
11255 N_Handled_Sequence_Of_Statements =>
11256 (1 => True, -- At_End_Proc (Node1)
11257 2 => False, -- First_Real_Statement (Node2-Sem)
11258 3 => True, -- Statements (List3)
11259 4 => True, -- End_Label (Node4)
11260 5 => True), -- Exception_Handlers (List5)
11262 N_Exception_Handler =>
11263 (1 => False, -- Local_Raise_Statements (Elist1)
11264 2 => True, -- Choice_Parameter (Node2)
11265 3 => True, -- Statements (List3)
11266 4 => True, -- Exception_Choices (List4)
11267 5 => False), -- Exception_Label (Node5)
11269 N_Raise_Statement =>
11270 (1 => False, -- unused
11271 2 => True, -- Name (Node2)
11272 3 => True, -- Expression (Node3)
11273 4 => False, -- unused
11274 5 => False), -- unused
11276 N_Generic_Subprogram_Declaration =>
11277 (1 => True, -- Specification (Node1)
11278 2 => True, -- Generic_Formal_Declarations (List2)
11279 3 => False, -- unused
11280 4 => False, -- Parent_Spec (Node4-Sem)
11281 5 => False), -- Corresponding_Body (Node5-Sem)
11283 N_Generic_Package_Declaration =>
11284 (1 => True, -- Specification (Node1)
11285 2 => True, -- Generic_Formal_Declarations (List2)
11286 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11287 4 => False, -- Parent_Spec (Node4-Sem)
11288 5 => False), -- Corresponding_Body (Node5-Sem)
11290 N_Package_Instantiation =>
11291 (1 => True, -- Defining_Unit_Name (Node1)
11292 2 => True, -- Name (Node2)
11293 3 => True, -- Generic_Associations (List3)
11294 4 => False, -- Parent_Spec (Node4-Sem)
11295 5 => False), -- Instance_Spec (Node5-Sem)
11297 N_Procedure_Instantiation =>
11298 (1 => True, -- Defining_Unit_Name (Node1)
11299 2 => True, -- Name (Node2)
11300 3 => True, -- Generic_Associations (List3)
11301 4 => False, -- Parent_Spec (Node4-Sem)
11302 5 => False), -- Instance_Spec (Node5-Sem)
11304 N_Function_Instantiation =>
11305 (1 => True, -- Defining_Unit_Name (Node1)
11306 2 => True, -- Name (Node2)
11307 3 => True, -- Generic_Associations (List3)
11308 4 => False, -- Parent_Spec (Node4-Sem)
11309 5 => False), -- Instance_Spec (Node5-Sem)
11311 N_Generic_Association =>
11312 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
11313 2 => True, -- Selector_Name (Node2)
11314 3 => False, -- unused
11315 4 => False, -- unused
11316 5 => False), -- unused
11318 N_Formal_Object_Declaration =>
11319 (1 => True, -- Defining_Identifier (Node1)
11320 2 => False, -- unused
11321 3 => True, -- Access_Definition (Node3)
11322 4 => True, -- Subtype_Mark (Node4)
11323 5 => True), -- Default_Expression (Node5)
11325 N_Formal_Type_Declaration =>
11326 (1 => True, -- Defining_Identifier (Node1)
11327 2 => False, -- unused
11328 3 => True, -- Formal_Type_Definition (Node3)
11329 4 => True, -- Discriminant_Specifications (List4)
11330 5 => False), -- unused
11332 N_Formal_Private_Type_Definition =>
11333 (1 => False, -- unused
11334 2 => False, -- unused
11335 3 => False, -- unused
11336 4 => False, -- unused
11337 5 => False), -- unused
11339 N_Formal_Derived_Type_Definition =>
11340 (1 => False, -- unused
11341 2 => True, -- Interface_List (List2)
11342 3 => False, -- unused
11343 4 => True, -- Subtype_Mark (Node4)
11344 5 => False), -- unused
11346 N_Formal_Discrete_Type_Definition =>
11347 (1 => False, -- unused
11348 2 => False, -- unused
11349 3 => False, -- unused
11350 4 => False, -- unused
11351 5 => False), -- unused
11353 N_Formal_Signed_Integer_Type_Definition =>
11354 (1 => False, -- unused
11355 2 => False, -- unused
11356 3 => False, -- unused
11357 4 => False, -- unused
11358 5 => False), -- unused
11360 N_Formal_Modular_Type_Definition =>
11361 (1 => False, -- unused
11362 2 => False, -- unused
11363 3 => False, -- unused
11364 4 => False, -- unused
11365 5 => False), -- unused
11367 N_Formal_Floating_Point_Definition =>
11368 (1 => False, -- unused
11369 2 => False, -- unused
11370 3 => False, -- unused
11371 4 => False, -- unused
11372 5 => False), -- unused
11374 N_Formal_Ordinary_Fixed_Point_Definition =>
11375 (1 => False, -- unused
11376 2 => False, -- unused
11377 3 => False, -- unused
11378 4 => False, -- unused
11379 5 => False), -- unused
11381 N_Formal_Decimal_Fixed_Point_Definition =>
11382 (1 => False, -- unused
11383 2 => False, -- unused
11384 3 => False, -- unused
11385 4 => False, -- unused
11386 5 => False), -- unused
11388 N_Formal_Concrete_Subprogram_Declaration =>
11389 (1 => True, -- Specification (Node1)
11390 2 => True, -- Default_Name (Node2)
11391 3 => False, -- unused
11392 4 => False, -- unused
11393 5 => False), -- unused
11395 N_Formal_Abstract_Subprogram_Declaration =>
11396 (1 => True, -- Specification (Node1)
11397 2 => True, -- Default_Name (Node2)
11398 3 => False, -- unused
11399 4 => False, -- unused
11400 5 => False), -- unused
11402 N_Formal_Package_Declaration =>
11403 (1 => True, -- Defining_Identifier (Node1)
11404 2 => True, -- Name (Node2)
11405 3 => True, -- Generic_Associations (List3)
11406 4 => False, -- unused
11407 5 => False), -- Instance_Spec (Node5-Sem)
11409 N_Attribute_Definition_Clause =>
11410 (1 => True, -- Chars (Name1)
11411 2 => True, -- Name (Node2)
11412 3 => True, -- Expression (Node3)
11413 4 => False, -- unused
11414 5 => False), -- Next_Rep_Item (Node5-Sem)
11416 N_Aspect_Specification =>
11417 (1 => True, -- Identifier (Node1)
11418 2 => False, -- Aspect_Rep_Item (Node2-Sem)
11419 3 => True, -- Expression (Node3)
11420 4 => False, -- Entity (Node4-Sem)
11421 5 => False), -- Next_Rep_Item (Node5-Sem)
11423 N_Enumeration_Representation_Clause =>
11424 (1 => True, -- Identifier (Node1)
11425 2 => False, -- unused
11426 3 => True, -- Array_Aggregate (Node3)
11427 4 => False, -- unused
11428 5 => False), -- Next_Rep_Item (Node5-Sem)
11430 N_Record_Representation_Clause =>
11431 (1 => True, -- Identifier (Node1)
11432 2 => True, -- Mod_Clause (Node2)
11433 3 => True, -- Component_Clauses (List3)
11434 4 => False, -- unused
11435 5 => False), -- Next_Rep_Item (Node5-Sem)
11437 N_Component_Clause =>
11438 (1 => True, -- Component_Name (Node1)
11439 2 => True, -- Position (Node2)
11440 3 => True, -- First_Bit (Node3)
11441 4 => True, -- Last_Bit (Node4)
11442 5 => False), -- unused
11444 N_Code_Statement =>
11445 (1 => False, -- unused
11446 2 => False, -- unused
11447 3 => True, -- Expression (Node3)
11448 4 => False, -- unused
11449 5 => False), -- unused
11451 N_Op_Rotate_Left =>
11452 (1 => True, -- Chars (Name1)
11453 2 => True, -- Left_Opnd (Node2)
11454 3 => True, -- Right_Opnd (Node3)
11455 4 => False, -- Entity (Node4-Sem)
11456 5 => False), -- Etype (Node5-Sem)
11458 N_Op_Rotate_Right =>
11459 (1 => True, -- Chars (Name1)
11460 2 => True, -- Left_Opnd (Node2)
11461 3 => True, -- Right_Opnd (Node3)
11462 4 => False, -- Entity (Node4-Sem)
11463 5 => False), -- Etype (Node5-Sem)
11466 (1 => True, -- Chars (Name1)
11467 2 => True, -- Left_Opnd (Node2)
11468 3 => True, -- Right_Opnd (Node3)
11469 4 => False, -- Entity (Node4-Sem)
11470 5 => False), -- Etype (Node5-Sem)
11472 N_Op_Shift_Right_Arithmetic =>
11473 (1 => True, -- Chars (Name1)
11474 2 => True, -- Left_Opnd (Node2)
11475 3 => True, -- Right_Opnd (Node3)
11476 4 => False, -- Entity (Node4-Sem)
11477 5 => False), -- Etype (Node5-Sem)
11479 N_Op_Shift_Right =>
11480 (1 => True, -- Chars (Name1)
11481 2 => True, -- Left_Opnd (Node2)
11482 3 => True, -- Right_Opnd (Node3)
11483 4 => False, -- Entity (Node4-Sem)
11484 5 => False), -- Etype (Node5-Sem)
11486 N_Delta_Constraint =>
11487 (1 => False, -- unused
11488 2 => False, -- unused
11489 3 => True, -- Delta_Expression (Node3)
11490 4 => True, -- Range_Constraint (Node4)
11491 5 => False), -- unused
11494 (1 => True, -- Identifier (Node1)
11495 2 => False, -- unused
11496 3 => True, -- Expression (Node3)
11497 4 => False, -- unused
11498 5 => False), -- unused
11501 (1 => False, -- unused
11502 2 => False, -- unused
11503 3 => True, -- Expression (Node3)
11504 4 => True, -- Pragmas_Before (List4)
11505 5 => False), -- unused
11507 N_Conditional_Expression =>
11508 (1 => True, -- Expressions (List1)
11509 2 => False, -- Then_Actions (List2-Sem)
11510 3 => False, -- Else_Actions (List3-Sem)
11511 4 => False, -- unused
11512 5 => False), -- Etype (Node5-Sem)
11515 (1 => False, -- Spec_PPC_List (Node1)
11516 2 => False, -- Spec_TC_List (Node2)
11517 3 => False, -- unused
11518 4 => False, -- unused
11519 5 => False), -- unused
11522 (1 => True, -- Chars (Name1)
11523 2 => True, -- Selector_Name (Node2)
11524 3 => True, -- Prefix (Node3)
11525 4 => False, -- Entity (Node4-Sem)
11526 5 => False), -- Etype (Node5-Sem)
11528 N_Expression_With_Actions =>
11529 (1 => True, -- Actions (List1)
11530 2 => False, -- unused
11531 3 => True, -- Expression (Node3)
11532 4 => False, -- unused
11533 5 => False), -- unused
11535 N_Free_Statement =>
11536 (1 => False, -- Storage_Pool (Node1-Sem)
11537 2 => False, -- Procedure_To_Call (Node2-Sem)
11538 3 => True, -- Expression (Node3)
11539 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11540 5 => False), -- unused
11543 (1 => True, -- Actions (List1)
11544 2 => False, -- Access_Types_To_Process (Elist2-Sem)
11545 3 => False, -- TSS_Elist (Elist3-Sem)
11546 4 => False, -- Entity (Node4-Sem)
11547 5 => False), -- First_Subtype_Link (Node5-Sem)
11549 N_Implicit_Label_Declaration =>
11550 (1 => True, -- Defining_Identifier (Node1)
11551 2 => False, -- Label_Construct (Node2-Sem)
11552 3 => False, -- unused
11553 4 => False, -- unused
11554 5 => False), -- unused
11556 N_Itype_Reference =>
11557 (1 => False, -- Itype (Node1-Sem)
11558 2 => False, -- unused
11559 3 => False, -- unused
11560 4 => False, -- unused
11561 5 => False), -- unused
11563 N_Raise_Constraint_Error =>
11564 (1 => True, -- Condition (Node1)
11565 2 => False, -- unused
11566 3 => True, -- Reason (Uint3)
11567 4 => False, -- unused
11568 5 => False), -- Etype (Node5-Sem)
11570 N_Raise_Program_Error =>
11571 (1 => True, -- Condition (Node1)
11572 2 => False, -- unused
11573 3 => True, -- Reason (Uint3)
11574 4 => False, -- unused
11575 5 => False), -- Etype (Node5-Sem)
11577 N_Raise_Storage_Error =>
11578 (1 => True, -- Condition (Node1)
11579 2 => False, -- unused
11580 3 => True, -- Reason (Uint3)
11581 4 => False, -- unused
11582 5 => False), -- Etype (Node5-Sem)
11584 N_Push_Constraint_Error_Label =>
11585 (1 => False, -- unused
11586 2 => False, -- unused
11587 3 => False, -- unused
11588 4 => False, -- unused
11589 5 => False), -- unused
11591 N_Push_Program_Error_Label =>
11592 (1 => False, -- Exception_Label
11593 2 => False, -- unused
11594 3 => False, -- unused
11595 4 => False, -- unused
11596 5 => False), -- Exception_Label
11598 N_Push_Storage_Error_Label =>
11599 (1 => False, -- Exception_Label
11600 2 => False, -- unused
11601 3 => False, -- unused
11602 4 => False, -- unused
11603 5 => False), -- Exception_Label
11605 N_Pop_Constraint_Error_Label =>
11606 (1 => False, -- unused
11607 2 => False, -- unused
11608 3 => False, -- unused
11609 4 => False, -- unused
11610 5 => False), -- unused
11612 N_Pop_Program_Error_Label =>
11613 (1 => False, -- unused
11614 2 => False, -- unused
11615 3 => False, -- unused
11616 4 => False, -- unused
11617 5 => False), -- unused
11619 N_Pop_Storage_Error_Label =>
11620 (1 => False, -- unused
11621 2 => False, -- unused
11622 3 => False, -- unused
11623 4 => False, -- unused
11624 5 => False), -- unused
11627 (1 => False, -- unused
11628 2 => False, -- unused
11629 3 => True, -- Prefix (Node3)
11630 4 => False, -- unused
11631 5 => False), -- Etype (Node5-Sem)
11633 N_Subprogram_Info =>
11634 (1 => True, -- Identifier (Node1)
11635 2 => False, -- unused
11636 3 => False, -- unused
11637 4 => False, -- unused
11638 5 => False), -- Etype (Node5-Sem)
11640 N_Unchecked_Expression =>
11641 (1 => False, -- unused
11642 2 => False, -- unused
11643 3 => True, -- Expression (Node3)
11644 4 => False, -- unused
11645 5 => False), -- Etype (Node5-Sem)
11647 N_Unchecked_Type_Conversion =>
11648 (1 => False, -- unused
11649 2 => False, -- unused
11650 3 => True, -- Expression (Node3)
11651 4 => True, -- Subtype_Mark (Node4)
11652 5 => False), -- Etype (Node5-Sem)
11654 N_Validate_Unchecked_Conversion =>
11655 (1 => False, -- Source_Type (Node1-Sem)
11656 2 => False, -- Target_Type (Node2-Sem)
11657 3 => False, -- unused
11658 4 => False, -- unused
11659 5 => False), -- unused
11661 -- Entries for SCIL nodes
11663 N_SCIL_Dispatch_Table_Tag_Init =>
11664 (1 => False, -- unused
11665 2 => False, -- unused
11666 3 => False, -- unused
11667 4 => False, -- SCIL_Entity (Node4-Sem)
11668 5 => False), -- unused
11670 N_SCIL_Dispatching_Call =>
11671 (1 => False, -- unused
11672 2 => False, -- SCIL_Target_Prim (Node2-Sem)
11673 3 => False, -- unused
11674 4 => False, -- SCIL_Entity (Node4-Sem)
11675 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
11677 N_SCIL_Membership_Test =>
11678 (1 => False, -- unused
11679 2 => False, -- unused
11680 3 => False, -- unused
11681 4 => False, -- SCIL_Entity (Node4-Sem)
11682 5 => False), -- SCIL_Tag_Value (Node5-Sem)
11684 -- Entries for Empty, Error and Unused. Even thought these have a Chars
11685 -- field for debugging purposes, they are not really syntactic fields, so
11686 -- we mark all fields as unused.
11689 (1 => False, -- unused
11690 2 => False, -- unused
11691 3 => False, -- unused
11692 4 => False, -- unused
11693 5 => False), -- unused
11696 (1 => False, -- unused
11697 2 => False, -- unused
11698 3 => False, -- unused
11699 4 => False, -- unused
11700 5 => False), -- unused
11702 N_Unused_At_Start =>
11703 (1 => False, -- unused
11704 2 => False, -- unused
11705 3 => False, -- unused
11706 4 => False, -- unused
11707 5 => False), -- unused
11710 (1 => False, -- unused
11711 2 => False, -- unused
11712 3 => False, -- unused
11713 4 => False, -- unused
11714 5 => False)); -- unused
11716 --------------------
11717 -- Inline Pragmas --
11718 --------------------
11720 pragma Inline (ABE_Is_Certain);
11721 pragma Inline (Abort_Present);
11722 pragma Inline (Abortable_Part);
11723 pragma Inline (Abstract_Present);
11724 pragma Inline (Accept_Handler_Records);
11725 pragma Inline (Accept_Statement);
11726 pragma Inline (Access_Definition);
11727 pragma Inline (Access_To_Subprogram_Definition);
11728 pragma Inline (Access_Types_To_Process);
11729 pragma Inline (Actions);
11730 pragma Inline (Activation_Chain_Entity);
11731 pragma Inline (Acts_As_Spec);
11732 pragma Inline (Actual_Designated_Subtype);
11733 pragma Inline (Address_Warning_Posted);
11734 pragma Inline (Aggregate_Bounds);
11735 pragma Inline (Aliased_Present);
11736 pragma Inline (All_Others);
11737 pragma Inline (All_Present);
11738 pragma Inline (Alternatives);
11739 pragma Inline (Ancestor_Part);
11740 pragma Inline (Array_Aggregate);
11741 pragma Inline (Aspect_Rep_Item);
11742 pragma Inline (Assignment_OK);
11743 pragma Inline (Associated_Node);
11744 pragma Inline (At_End_Proc);
11745 pragma Inline (Attribute_Name);
11746 pragma Inline (Aux_Decls_Node);
11747 pragma Inline (Backwards_OK);
11748 pragma Inline (Bad_Is_Detected);
11749 pragma Inline (Body_To_Inline);
11750 pragma Inline (Body_Required);
11751 pragma Inline (By_Ref);
11752 pragma Inline (Box_Present);
11753 pragma Inline (Char_Literal_Value);
11754 pragma Inline (Chars);
11755 pragma Inline (Check_Address_Alignment);
11756 pragma Inline (Choice_Parameter);
11757 pragma Inline (Choices);
11758 pragma Inline (Class_Present);
11759 pragma Inline (Comes_From_Extended_Return_Statement);
11760 pragma Inline (Compile_Time_Known_Aggregate);
11761 pragma Inline (Component_Associations);
11762 pragma Inline (Component_Clauses);
11763 pragma Inline (Component_Definition);
11764 pragma Inline (Component_Items);
11765 pragma Inline (Component_List);
11766 pragma Inline (Component_Name);
11767 pragma Inline (Componentwise_Assignment);
11768 pragma Inline (Condition);
11769 pragma Inline (Condition_Actions);
11770 pragma Inline (Config_Pragmas);
11771 pragma Inline (Constant_Present);
11772 pragma Inline (Constraint);
11773 pragma Inline (Constraints);
11774 pragma Inline (Context_Installed);
11775 pragma Inline (Context_Items);
11776 pragma Inline (Context_Pending);
11777 pragma Inline (Controlling_Argument);
11778 pragma Inline (Conversion_OK);
11779 pragma Inline (Corresponding_Body);
11780 pragma Inline (Corresponding_Formal_Spec);
11781 pragma Inline (Corresponding_Generic_Association);
11782 pragma Inline (Corresponding_Integer_Value);
11783 pragma Inline (Corresponding_Spec);
11784 pragma Inline (Corresponding_Stub);
11785 pragma Inline (Dcheck_Function);
11786 pragma Inline (Declarations);
11787 pragma Inline (Default_Expression);
11788 pragma Inline (Default_Storage_Pool);
11789 pragma Inline (Default_Name);
11790 pragma Inline (Defining_Identifier);
11791 pragma Inline (Defining_Unit_Name);
11792 pragma Inline (Delay_Alternative);
11793 pragma Inline (Delay_Statement);
11794 pragma Inline (Delta_Expression);
11795 pragma Inline (Digits_Expression);
11796 pragma Inline (Discr_Check_Funcs_Built);
11797 pragma Inline (Discrete_Choices);
11798 pragma Inline (Discrete_Range);
11799 pragma Inline (Discrete_Subtype_Definition);
11800 pragma Inline (Discrete_Subtype_Definitions);
11801 pragma Inline (Discriminant_Specifications);
11802 pragma Inline (Discriminant_Type);
11803 pragma Inline (Do_Accessibility_Check);
11804 pragma Inline (Do_Discriminant_Check);
11805 pragma Inline (Do_Length_Check);
11806 pragma Inline (Do_Division_Check);
11807 pragma Inline (Do_Overflow_Check);
11808 pragma Inline (Do_Range_Check);
11809 pragma Inline (Do_Storage_Check);
11810 pragma Inline (Do_Tag_Check);
11811 pragma Inline (Elaborate_Present);
11812 pragma Inline (Elaborate_All_Desirable);
11813 pragma Inline (Elaborate_All_Present);
11814 pragma Inline (Elaborate_Desirable);
11815 pragma Inline (Elaboration_Boolean);
11816 pragma Inline (Else_Actions);
11817 pragma Inline (Else_Statements);
11818 pragma Inline (Elsif_Parts);
11819 pragma Inline (Enclosing_Variant);
11820 pragma Inline (End_Label);
11821 pragma Inline (End_Span);
11822 pragma Inline (Entity);
11823 pragma Inline (Entity_Or_Associated_Node);
11824 pragma Inline (Entry_Body_Formal_Part);
11825 pragma Inline (Entry_Call_Alternative);
11826 pragma Inline (Entry_Call_Statement);
11827 pragma Inline (Entry_Direct_Name);
11828 pragma Inline (Entry_Index);
11829 pragma Inline (Entry_Index_Specification);
11830 pragma Inline (Etype);
11831 pragma Inline (Exception_Choices);
11832 pragma Inline (Exception_Handlers);
11833 pragma Inline (Exception_Junk);
11834 pragma Inline (Exception_Label);
11835 pragma Inline (Expansion_Delayed);
11836 pragma Inline (Explicit_Actual_Parameter);
11837 pragma Inline (Explicit_Generic_Actual_Parameter);
11838 pragma Inline (Expression);
11839 pragma Inline (Expressions);
11840 pragma Inline (First_Bit);
11841 pragma Inline (First_Inlined_Subprogram);
11842 pragma Inline (First_Name);
11843 pragma Inline (First_Named_Actual);
11844 pragma Inline (First_Real_Statement);
11845 pragma Inline (First_Subtype_Link);
11846 pragma Inline (Float_Truncate);
11847 pragma Inline (Formal_Type_Definition);
11848 pragma Inline (Forwards_OK);
11849 pragma Inline (From_Aspect_Specification);
11850 pragma Inline (From_At_End);
11851 pragma Inline (From_At_Mod);
11852 pragma Inline (From_Default);
11853 pragma Inline (From_Dynamic_Predicate);
11854 pragma Inline (From_Static_Predicate);
11855 pragma Inline (Generic_Associations);
11856 pragma Inline (Generic_Formal_Declarations);
11857 pragma Inline (Generic_Parent);
11858 pragma Inline (Generic_Parent_Type);
11859 pragma Inline (Handled_Statement_Sequence);
11860 pragma Inline (Handler_List_Entry);
11861 pragma Inline (Has_Created_Identifier);
11862 pragma Inline (Has_Dynamic_Length_Check);
11863 pragma Inline (Has_Dynamic_Range_Check);
11864 pragma Inline (Has_Init_Expression);
11865 pragma Inline (Has_Local_Raise);
11866 pragma Inline (Has_Self_Reference);
11867 pragma Inline (Has_No_Elaboration_Code);
11868 pragma Inline (Has_Pragma_CPU);
11869 pragma Inline (Has_Pragma_Priority);
11870 pragma Inline (Has_Pragma_Suppress_All);
11871 pragma Inline (Has_Private_View);
11872 pragma Inline (Has_Relative_Deadline_Pragma);
11873 pragma Inline (Has_Storage_Size_Pragma);
11874 pragma Inline (Has_Task_Info_Pragma);
11875 pragma Inline (Has_Task_Name_Pragma);
11876 pragma Inline (Has_Wide_Character);
11877 pragma Inline (Has_Wide_Wide_Character);
11878 pragma Inline (Hidden_By_Use_Clause);
11879 pragma Inline (High_Bound);
11880 pragma Inline (Identifier);
11881 pragma Inline (Implicit_With);
11882 pragma Inline (Interface_List);
11883 pragma Inline (Interface_Present);
11884 pragma Inline (Includes_Infinities);
11885 pragma Inline (Import_Interface_Present);
11886 pragma Inline (In_Present);
11887 pragma Inline (Inherited_Discriminant);
11888 pragma Inline (Instance_Spec);
11889 pragma Inline (Intval);
11890 pragma Inline (Iterator_Specification);
11891 pragma Inline (Is_Accessibility_Actual);
11892 pragma Inline (Is_Asynchronous_Call_Block);
11893 pragma Inline (Is_Boolean_Aspect);
11894 pragma Inline (Is_Component_Left_Opnd);
11895 pragma Inline (Is_Component_Right_Opnd);
11896 pragma Inline (Is_Controlling_Actual);
11897 pragma Inline (Is_Delayed_Aspect);
11898 pragma Inline (Is_Dynamic_Coextension);
11899 pragma Inline (Is_Elsif);
11900 pragma Inline (Is_Entry_Barrier_Function);
11901 pragma Inline (Is_Expanded_Build_In_Place_Call);
11902 pragma Inline (Is_Folded_In_Parser);
11903 pragma Inline (Is_In_Discriminant_Check);
11904 pragma Inline (Is_Machine_Number);
11905 pragma Inline (Is_Null_Loop);
11906 pragma Inline (Is_Overloaded);
11907 pragma Inline (Is_Power_Of_2_For_Shift);
11908 pragma Inline (Is_Protected_Subprogram_Body);
11909 pragma Inline (Is_Static_Coextension);
11910 pragma Inline (Is_Static_Expression);
11911 pragma Inline (Is_Subprogram_Descriptor);
11912 pragma Inline (Is_Task_Allocation_Block);
11913 pragma Inline (Is_Task_Master);
11914 pragma Inline (Iteration_Scheme);
11915 pragma Inline (Itype);
11916 pragma Inline (Kill_Range_Check);
11917 pragma Inline (Last_Bit);
11918 pragma Inline (Last_Name);
11919 pragma Inline (Library_Unit);
11920 pragma Inline (Label_Construct);
11921 pragma Inline (Left_Opnd);
11922 pragma Inline (Limited_View_Installed);
11923 pragma Inline (Limited_Present);
11924 pragma Inline (Literals);
11925 pragma Inline (Local_Raise_Not_OK);
11926 pragma Inline (Local_Raise_Statements);
11927 pragma Inline (Loop_Actions);
11928 pragma Inline (Loop_Parameter_Specification);
11929 pragma Inline (Low_Bound);
11930 pragma Inline (Mod_Clause);
11931 pragma Inline (More_Ids);
11932 pragma Inline (Must_Be_Byte_Aligned);
11933 pragma Inline (Must_Not_Freeze);
11934 pragma Inline (Must_Not_Override);
11935 pragma Inline (Must_Override);
11936 pragma Inline (Name);
11937 pragma Inline (Names);
11938 pragma Inline (Next_Entity);
11939 pragma Inline (Next_Exit_Statement);
11940 pragma Inline (Next_Implicit_With);
11941 pragma Inline (Next_Named_Actual);
11942 pragma Inline (Next_Pragma);
11943 pragma Inline (Next_Rep_Item);
11944 pragma Inline (Next_Use_Clause);
11945 pragma Inline (No_Ctrl_Actions);
11946 pragma Inline (No_Elaboration_Check);
11947 pragma Inline (No_Entities_Ref_In_Spec);
11948 pragma Inline (No_Initialization);
11949 pragma Inline (No_Truncation);
11950 pragma Inline (Null_Present);
11951 pragma Inline (Null_Exclusion_Present);
11952 pragma Inline (Null_Exclusion_In_Return_Present);
11953 pragma Inline (Null_Record_Present);
11954 pragma Inline (Object_Definition);
11955 pragma Inline (Of_Present);
11956 pragma Inline (Original_Discriminant);
11957 pragma Inline (Original_Entity);
11958 pragma Inline (Others_Discrete_Choices);
11959 pragma Inline (Out_Present);
11960 pragma Inline (Parameter_Associations);
11961 pragma Inline (Parameter_Specifications);
11962 pragma Inline (Parameter_List_Truncated);
11963 pragma Inline (Parameter_Type);
11964 pragma Inline (Parent_Spec);
11965 pragma Inline (Position);
11966 pragma Inline (Pragma_Argument_Associations);
11967 pragma Inline (Pragma_Identifier);
11968 pragma Inline (Pragmas_After);
11969 pragma Inline (Pragmas_Before);
11970 pragma Inline (Prefix);
11971 pragma Inline (Present_Expr);
11972 pragma Inline (Prev_Ids);
11973 pragma Inline (Print_In_Hex);
11974 pragma Inline (Private_Declarations);
11975 pragma Inline (Private_Present);
11976 pragma Inline (Procedure_To_Call);
11977 pragma Inline (Proper_Body);
11978 pragma Inline (Protected_Definition);
11979 pragma Inline (Protected_Present);
11980 pragma Inline (Raises_Constraint_Error);
11981 pragma Inline (Range_Constraint);
11982 pragma Inline (Range_Expression);
11983 pragma Inline (Real_Range_Specification);
11984 pragma Inline (Realval);
11985 pragma Inline (Reason);
11986 pragma Inline (Record_Extension_Part);
11987 pragma Inline (Redundant_Use);
11988 pragma Inline (Renaming_Exception);
11989 pragma Inline (Result_Definition);
11990 pragma Inline (Return_Object_Declarations);
11991 pragma Inline (Return_Statement_Entity);
11992 pragma Inline (Reverse_Present);
11993 pragma Inline (Right_Opnd);
11994 pragma Inline (Rounded_Result);
11995 pragma Inline (SCIL_Controlling_Tag);
11996 pragma Inline (SCIL_Entity);
11997 pragma Inline (SCIL_Tag_Value);
11998 pragma Inline (SCIL_Target_Prim);
11999 pragma Inline (Scope);
12000 pragma Inline (Select_Alternatives);
12001 pragma Inline (Selector_Name);
12002 pragma Inline (Selector_Names);
12003 pragma Inline (Shift_Count_OK);
12004 pragma Inline (Source_Type);
12005 pragma Inline (Spec_PPC_List);
12006 pragma Inline (Spec_TC_List);
12007 pragma Inline (Specification);
12008 pragma Inline (Split_PPC);
12009 pragma Inline (Statements);
12010 pragma Inline (Static_Processing_OK);
12011 pragma Inline (Storage_Pool);
12012 pragma Inline (Subpool_Handle_Name);
12013 pragma Inline (Strval);
12014 pragma Inline (Subtype_Indication);
12015 pragma Inline (Subtype_Mark);
12016 pragma Inline (Subtype_Marks);
12017 pragma Inline (Suppress_Assignment_Checks);
12018 pragma Inline (Suppress_Loop_Warnings);
12019 pragma Inline (Synchronized_Present);
12020 pragma Inline (Tagged_Present);
12021 pragma Inline (Target_Type);
12022 pragma Inline (Task_Definition);
12023 pragma Inline (Task_Present);
12024 pragma Inline (Then_Actions);
12025 pragma Inline (Then_Statements);
12026 pragma Inline (Triggering_Alternative);
12027 pragma Inline (Triggering_Statement);
12028 pragma Inline (Treat_Fixed_As_Integer);
12029 pragma Inline (TSS_Elist);
12030 pragma Inline (Type_Definition);
12031 pragma Inline (Unit);
12032 pragma Inline (Unknown_Discriminants_Present);
12033 pragma Inline (Unreferenced_In_Spec);
12034 pragma Inline (Variant_Part);
12035 pragma Inline (Variants);
12036 pragma Inline (Visible_Declarations);
12037 pragma Inline (Used_Operations);
12038 pragma Inline (Was_Originally_Stub);
12039 pragma Inline (Withed_Body);
12040 pragma Inline (Zero_Cost_Handling);
12042 pragma Inline (Set_ABE_Is_Certain);
12043 pragma Inline (Set_Abort_Present);
12044 pragma Inline (Set_Abortable_Part);
12045 pragma Inline (Set_Abstract_Present);
12046 pragma Inline (Set_Accept_Handler_Records);
12047 pragma Inline (Set_Accept_Statement);
12048 pragma Inline (Set_Access_Definition);
12049 pragma Inline (Set_Access_To_Subprogram_Definition);
12050 pragma Inline (Set_Access_Types_To_Process);
12051 pragma Inline (Set_Actions);
12052 pragma Inline (Set_Activation_Chain_Entity);
12053 pragma Inline (Set_Acts_As_Spec);
12054 pragma Inline (Set_Actual_Designated_Subtype);
12055 pragma Inline (Set_Address_Warning_Posted);
12056 pragma Inline (Set_Aggregate_Bounds);
12057 pragma Inline (Set_Aliased_Present);
12058 pragma Inline (Set_All_Others);
12059 pragma Inline (Set_All_Present);
12060 pragma Inline (Set_Alternatives);
12061 pragma Inline (Set_Ancestor_Part);
12062 pragma Inline (Set_Array_Aggregate);
12063 pragma Inline (Set_Aspect_Rep_Item);
12064 pragma Inline (Set_Assignment_OK);
12065 pragma Inline (Set_Associated_Node);
12066 pragma Inline (Set_At_End_Proc);
12067 pragma Inline (Set_Attribute_Name);
12068 pragma Inline (Set_Aux_Decls_Node);
12069 pragma Inline (Set_Backwards_OK);
12070 pragma Inline (Set_Bad_Is_Detected);
12071 pragma Inline (Set_Body_To_Inline);
12072 pragma Inline (Set_Body_Required);
12073 pragma Inline (Set_By_Ref);
12074 pragma Inline (Set_Box_Present);
12075 pragma Inline (Set_Char_Literal_Value);
12076 pragma Inline (Set_Chars);
12077 pragma Inline (Set_Check_Address_Alignment);
12078 pragma Inline (Set_Choice_Parameter);
12079 pragma Inline (Set_Choices);
12080 pragma Inline (Set_Class_Present);
12081 pragma Inline (Set_Comes_From_Extended_Return_Statement);
12082 pragma Inline (Set_Compile_Time_Known_Aggregate);
12083 pragma Inline (Set_Component_Associations);
12084 pragma Inline (Set_Component_Clauses);
12085 pragma Inline (Set_Component_Definition);
12086 pragma Inline (Set_Component_Items);
12087 pragma Inline (Set_Component_List);
12088 pragma Inline (Set_Component_Name);
12089 pragma Inline (Set_Componentwise_Assignment);
12090 pragma Inline (Set_Condition);
12091 pragma Inline (Set_Condition_Actions);
12092 pragma Inline (Set_Config_Pragmas);
12093 pragma Inline (Set_Constant_Present);
12094 pragma Inline (Set_Constraint);
12095 pragma Inline (Set_Constraints);
12096 pragma Inline (Set_Context_Installed);
12097 pragma Inline (Set_Context_Items);
12098 pragma Inline (Set_Context_Pending);
12099 pragma Inline (Set_Controlling_Argument);
12100 pragma Inline (Set_Conversion_OK);
12101 pragma Inline (Set_Corresponding_Body);
12102 pragma Inline (Set_Corresponding_Formal_Spec);
12103 pragma Inline (Set_Corresponding_Generic_Association);
12104 pragma Inline (Set_Corresponding_Integer_Value);
12105 pragma Inline (Set_Corresponding_Spec);
12106 pragma Inline (Set_Corresponding_Stub);
12107 pragma Inline (Set_Dcheck_Function);
12108 pragma Inline (Set_Declarations);
12109 pragma Inline (Set_Default_Expression);
12110 pragma Inline (Set_Default_Storage_Pool);
12111 pragma Inline (Set_Default_Name);
12112 pragma Inline (Set_Defining_Identifier);
12113 pragma Inline (Set_Defining_Unit_Name);
12114 pragma Inline (Set_Delay_Alternative);
12115 pragma Inline (Set_Delay_Statement);
12116 pragma Inline (Set_Delta_Expression);
12117 pragma Inline (Set_Digits_Expression);
12118 pragma Inline (Set_Discr_Check_Funcs_Built);
12119 pragma Inline (Set_Discrete_Choices);
12120 pragma Inline (Set_Discrete_Range);
12121 pragma Inline (Set_Discrete_Subtype_Definition);
12122 pragma Inline (Set_Discrete_Subtype_Definitions);
12123 pragma Inline (Set_Discriminant_Specifications);
12124 pragma Inline (Set_Discriminant_Type);
12125 pragma Inline (Set_Do_Accessibility_Check);
12126 pragma Inline (Set_Do_Discriminant_Check);
12127 pragma Inline (Set_Do_Length_Check);
12128 pragma Inline (Set_Do_Division_Check);
12129 pragma Inline (Set_Do_Overflow_Check);
12130 pragma Inline (Set_Do_Range_Check);
12131 pragma Inline (Set_Do_Storage_Check);
12132 pragma Inline (Set_Do_Tag_Check);
12133 pragma Inline (Set_Elaborate_Present);
12134 pragma Inline (Set_Elaborate_All_Desirable);
12135 pragma Inline (Set_Elaborate_All_Present);
12136 pragma Inline (Set_Elaborate_Desirable);
12137 pragma Inline (Set_Elaboration_Boolean);
12138 pragma Inline (Set_Else_Actions);
12139 pragma Inline (Set_Else_Statements);
12140 pragma Inline (Set_Elsif_Parts);
12141 pragma Inline (Set_Enclosing_Variant);
12142 pragma Inline (Set_End_Label);
12143 pragma Inline (Set_End_Span);
12144 pragma Inline (Set_Entity);
12145 pragma Inline (Set_Entry_Body_Formal_Part);
12146 pragma Inline (Set_Entry_Call_Alternative);
12147 pragma Inline (Set_Entry_Call_Statement);
12148 pragma Inline (Set_Entry_Direct_Name);
12149 pragma Inline (Set_Entry_Index);
12150 pragma Inline (Set_Entry_Index_Specification);
12151 pragma Inline (Set_Etype);
12152 pragma Inline (Set_Exception_Choices);
12153 pragma Inline (Set_Exception_Handlers);
12154 pragma Inline (Set_Exception_Junk);
12155 pragma Inline (Set_Exception_Label);
12156 pragma Inline (Set_Expansion_Delayed);
12157 pragma Inline (Set_Explicit_Actual_Parameter);
12158 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
12159 pragma Inline (Set_Expression);
12160 pragma Inline (Set_Expressions);
12161 pragma Inline (Set_First_Bit);
12162 pragma Inline (Set_First_Inlined_Subprogram);
12163 pragma Inline (Set_First_Name);
12164 pragma Inline (Set_First_Named_Actual);
12165 pragma Inline (Set_First_Real_Statement);
12166 pragma Inline (Set_First_Subtype_Link);
12167 pragma Inline (Set_Float_Truncate);
12168 pragma Inline (Set_Formal_Type_Definition);
12169 pragma Inline (Set_Forwards_OK);
12170 pragma Inline (Set_From_Aspect_Specification);
12171 pragma Inline (Set_From_At_End);
12172 pragma Inline (Set_From_At_Mod);
12173 pragma Inline (Set_From_Default);
12174 pragma Inline (Set_From_Dynamic_Predicate);
12175 pragma Inline (Set_From_Static_Predicate);
12176 pragma Inline (Set_Generic_Associations);
12177 pragma Inline (Set_Generic_Formal_Declarations);
12178 pragma Inline (Set_Generic_Parent);
12179 pragma Inline (Set_Generic_Parent_Type);
12180 pragma Inline (Set_Handled_Statement_Sequence);
12181 pragma Inline (Set_Handler_List_Entry);
12182 pragma Inline (Set_Has_Created_Identifier);
12183 pragma Inline (Set_Has_Dynamic_Length_Check);
12184 pragma Inline (Set_Has_Init_Expression);
12185 pragma Inline (Set_Has_Local_Raise);
12186 pragma Inline (Set_Has_Dynamic_Range_Check);
12187 pragma Inline (Set_Has_No_Elaboration_Code);
12188 pragma Inline (Set_Has_Pragma_CPU);
12189 pragma Inline (Set_Has_Pragma_Priority);
12190 pragma Inline (Set_Has_Pragma_Suppress_All);
12191 pragma Inline (Set_Has_Private_View);
12192 pragma Inline (Set_Has_Relative_Deadline_Pragma);
12193 pragma Inline (Set_Has_Storage_Size_Pragma);
12194 pragma Inline (Set_Has_Task_Info_Pragma);
12195 pragma Inline (Set_Has_Task_Name_Pragma);
12196 pragma Inline (Set_Has_Wide_Character);
12197 pragma Inline (Set_Has_Wide_Wide_Character);
12198 pragma Inline (Set_Hidden_By_Use_Clause);
12199 pragma Inline (Set_High_Bound);
12200 pragma Inline (Set_Identifier);
12201 pragma Inline (Set_Implicit_With);
12202 pragma Inline (Set_Includes_Infinities);
12203 pragma Inline (Set_Interface_List);
12204 pragma Inline (Set_Interface_Present);
12205 pragma Inline (Set_Import_Interface_Present);
12206 pragma Inline (Set_In_Present);
12207 pragma Inline (Set_Inherited_Discriminant);
12208 pragma Inline (Set_Instance_Spec);
12209 pragma Inline (Set_Intval);
12210 pragma Inline (Set_Iterator_Specification);
12211 pragma Inline (Set_Is_Accessibility_Actual);
12212 pragma Inline (Set_Is_Asynchronous_Call_Block);
12213 pragma Inline (Set_Is_Boolean_Aspect);
12214 pragma Inline (Set_Is_Component_Left_Opnd);
12215 pragma Inline (Set_Is_Component_Right_Opnd);
12216 pragma Inline (Set_Is_Controlling_Actual);
12217 pragma Inline (Set_Is_Delayed_Aspect);
12218 pragma Inline (Set_Is_Dynamic_Coextension);
12219 pragma Inline (Set_Is_Elsif);
12220 pragma Inline (Set_Is_Entry_Barrier_Function);
12221 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
12222 pragma Inline (Set_Is_Folded_In_Parser);
12223 pragma Inline (Set_Is_In_Discriminant_Check);
12224 pragma Inline (Set_Is_Machine_Number);
12225 pragma Inline (Set_Is_Null_Loop);
12226 pragma Inline (Set_Is_Overloaded);
12227 pragma Inline (Set_Is_Power_Of_2_For_Shift);
12228 pragma Inline (Set_Is_Protected_Subprogram_Body);
12229 pragma Inline (Set_Has_Self_Reference);
12230 pragma Inline (Set_Is_Static_Coextension);
12231 pragma Inline (Set_Is_Static_Expression);
12232 pragma Inline (Set_Is_Subprogram_Descriptor);
12233 pragma Inline (Set_Is_Task_Allocation_Block);
12234 pragma Inline (Set_Is_Task_Master);
12235 pragma Inline (Set_Iteration_Scheme);
12236 pragma Inline (Set_Itype);
12237 pragma Inline (Set_Kill_Range_Check);
12238 pragma Inline (Set_Last_Bit);
12239 pragma Inline (Set_Last_Name);
12240 pragma Inline (Set_Library_Unit);
12241 pragma Inline (Set_Label_Construct);
12242 pragma Inline (Set_Left_Opnd);
12243 pragma Inline (Set_Limited_View_Installed);
12244 pragma Inline (Set_Limited_Present);
12245 pragma Inline (Set_Literals);
12246 pragma Inline (Set_Local_Raise_Not_OK);
12247 pragma Inline (Set_Local_Raise_Statements);
12248 pragma Inline (Set_Loop_Actions);
12249 pragma Inline (Set_Loop_Parameter_Specification);
12250 pragma Inline (Set_Low_Bound);
12251 pragma Inline (Set_Mod_Clause);
12252 pragma Inline (Set_More_Ids);
12253 pragma Inline (Set_Must_Be_Byte_Aligned);
12254 pragma Inline (Set_Must_Not_Freeze);
12255 pragma Inline (Set_Must_Not_Override);
12256 pragma Inline (Set_Must_Override);
12257 pragma Inline (Set_Name);
12258 pragma Inline (Set_Names);
12259 pragma Inline (Set_Next_Entity);
12260 pragma Inline (Set_Next_Exit_Statement);
12261 pragma Inline (Set_Next_Implicit_With);
12262 pragma Inline (Set_Next_Named_Actual);
12263 pragma Inline (Set_Next_Pragma);
12264 pragma Inline (Set_Next_Rep_Item);
12265 pragma Inline (Set_Next_Use_Clause);
12266 pragma Inline (Set_No_Ctrl_Actions);
12267 pragma Inline (Set_No_Elaboration_Check);
12268 pragma Inline (Set_No_Entities_Ref_In_Spec);
12269 pragma Inline (Set_No_Initialization);
12270 pragma Inline (Set_No_Truncation);
12271 pragma Inline (Set_Null_Present);
12272 pragma Inline (Set_Null_Exclusion_Present);
12273 pragma Inline (Set_Null_Exclusion_In_Return_Present);
12274 pragma Inline (Set_Null_Record_Present);
12275 pragma Inline (Set_Object_Definition);
12276 pragma Inline (Set_Of_Present);
12277 pragma Inline (Set_Original_Discriminant);
12278 pragma Inline (Set_Original_Entity);
12279 pragma Inline (Set_Others_Discrete_Choices);
12280 pragma Inline (Set_Out_Present);
12281 pragma Inline (Set_Parameter_Associations);
12282 pragma Inline (Set_Parameter_Specifications);
12283 pragma Inline (Set_Parameter_List_Truncated);
12284 pragma Inline (Set_Parameter_Type);
12285 pragma Inline (Set_Parent_Spec);
12286 pragma Inline (Set_Position);
12287 pragma Inline (Set_Pragma_Argument_Associations);
12288 pragma Inline (Set_Pragma_Identifier);
12289 pragma Inline (Set_Pragmas_After);
12290 pragma Inline (Set_Pragmas_Before);
12291 pragma Inline (Set_Prefix);
12292 pragma Inline (Set_Present_Expr);
12293 pragma Inline (Set_Prev_Ids);
12294 pragma Inline (Set_Print_In_Hex);
12295 pragma Inline (Set_Private_Declarations);
12296 pragma Inline (Set_Private_Present);
12297 pragma Inline (Set_Procedure_To_Call);
12298 pragma Inline (Set_Proper_Body);
12299 pragma Inline (Set_Protected_Definition);
12300 pragma Inline (Set_Protected_Present);
12301 pragma Inline (Set_Raises_Constraint_Error);
12302 pragma Inline (Set_Range_Constraint);
12303 pragma Inline (Set_Range_Expression);
12304 pragma Inline (Set_Real_Range_Specification);
12305 pragma Inline (Set_Realval);
12306 pragma Inline (Set_Reason);
12307 pragma Inline (Set_Record_Extension_Part);
12308 pragma Inline (Set_Redundant_Use);
12309 pragma Inline (Set_Renaming_Exception);
12310 pragma Inline (Set_Result_Definition);
12311 pragma Inline (Set_Return_Object_Declarations);
12312 pragma Inline (Set_Reverse_Present);
12313 pragma Inline (Set_Right_Opnd);
12314 pragma Inline (Set_Rounded_Result);
12315 pragma Inline (Set_SCIL_Controlling_Tag);
12316 pragma Inline (Set_SCIL_Entity);
12317 pragma Inline (Set_SCIL_Tag_Value);
12318 pragma Inline (Set_SCIL_Target_Prim);
12319 pragma Inline (Set_Scope);
12320 pragma Inline (Set_Select_Alternatives);
12321 pragma Inline (Set_Selector_Name);
12322 pragma Inline (Set_Selector_Names);
12323 pragma Inline (Set_Shift_Count_OK);
12324 pragma Inline (Set_Source_Type);
12325 pragma Inline (Set_Spec_PPC_List);
12326 pragma Inline (Set_Spec_TC_List);
12327 pragma Inline (Set_Specification);
12328 pragma Inline (Set_Split_PPC);
12329 pragma Inline (Set_Statements);
12330 pragma Inline (Set_Static_Processing_OK);
12331 pragma Inline (Set_Storage_Pool);
12332 pragma Inline (Set_Subpool_Handle_Name);
12333 pragma Inline (Set_Strval);
12334 pragma Inline (Set_Subtype_Indication);
12335 pragma Inline (Set_Subtype_Mark);
12336 pragma Inline (Set_Subtype_Marks);
12337 pragma Inline (Set_Suppress_Assignment_Checks);
12338 pragma Inline (Set_Suppress_Loop_Warnings);
12339 pragma Inline (Set_Synchronized_Present);
12340 pragma Inline (Set_Tagged_Present);
12341 pragma Inline (Set_Target_Type);
12342 pragma Inline (Set_Task_Definition);
12343 pragma Inline (Set_Task_Present);
12344 pragma Inline (Set_Then_Actions);
12345 pragma Inline (Set_Then_Statements);
12346 pragma Inline (Set_Triggering_Alternative);
12347 pragma Inline (Set_Triggering_Statement);
12348 pragma Inline (Set_Treat_Fixed_As_Integer);
12349 pragma Inline (Set_TSS_Elist);
12350 pragma Inline (Set_Type_Definition);
12351 pragma Inline (Set_Unit);
12352 pragma Inline (Set_Unknown_Discriminants_Present);
12353 pragma Inline (Set_Unreferenced_In_Spec);
12354 pragma Inline (Set_Variant_Part);
12355 pragma Inline (Set_Variants);
12356 pragma Inline (Set_Visible_Declarations);
12357 pragma Inline (Set_Used_Operations);
12358 pragma Inline (Set_Was_Originally_Stub);
12359 pragma Inline (Set_Withed_Body);
12360 pragma Inline (Set_Zero_Cost_Handling);
12366 -- These synonyms are to aid in transition, they should eventually be
12367 -- removed when all remaining references to the obsolete name are gone.
12369 N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
12370 -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
12371 -- should refer to N_Simple_Return_Statement.
12373 N_Parameterized_Expression : constant Node_Kind := N_Expression_Function;
12374 -- Old name for expression functions (used during Ada 2012 transition)