1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2014, 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 -- Add an entry in Is_Syntactic_Field
90 -- In the body (sinfo), add entries to the access functions for all
91 -- its fields (except standard expression fields) to include the new
92 -- node in the checks.
93 -- Add an appropriate section to the case statement in sprint.adb
94 -- Add an appropriate section to the case statement in sem.adb
95 -- Add an appropriate section to the case statement in exp_util.adb
96 -- (Insert_Actions procedure)
97 -- For a subexpression, add an appropriate section to the case
98 -- statement in sem_eval.adb
99 -- For a subexpression, add an appropriate section to the case
100 -- statement in sem_res.adb
102 -- All back ends must be made aware of the new node kind.
104 -- Finally, four utility programs must be run:
106 -- (Optional.) Run CSinfo to check that you have made the changes
107 -- consistently. It checks most of the rules given above. This utility
108 -- reads sinfo.ads and sinfo.adb and generates a report to standard
109 -- output. This step is optional because XSinfo runs CSinfo.
111 -- Run XSinfo to create sinfo.h, the corresponding C header. This
112 -- utility reads sinfo.ads and generates sinfo.h. Note that it does
113 -- not need to read sinfo.adb, since the contents of the body are
114 -- algorithmically determinable from the spec.
116 -- Run XTreeprs to create treeprs.ads, an updated version of the module
117 -- that is used to drive the tree print routine. This utility reads (but
118 -- does not modify) treeprs.adt, the template that provides the basic
119 -- structure of the file, and then fills in the data from the comments
122 -- Run XNmake to create nmake.ads and nmake.adb, the package body and
123 -- spec of the Nmake package which contains functions for constructing
126 -- The above steps are done automatically by the build scripts when you do
129 -- Note: sometime we could write a utility that actually generated the body
130 -- of sinfo from the spec instead of simply checking it, since, as noted
131 -- above, the contents of the body can be determined from the spec.
133 --------------------------------
134 -- Implicit Nodes in the Tree --
135 --------------------------------
137 -- Generally the structure of the tree very closely follows the grammar as
138 -- defined in the RM. However, certain nodes are omitted to save space and
139 -- simplify semantic processing. Two general classes of such omitted nodes
142 -- If the only possibilities for a non-terminal are one or more other
143 -- non-terminals (i.e. the rule is a "skinny" rule), then usually the
144 -- corresponding node is omitted from the tree, and the target construct
145 -- appears directly. For example, a real type definition is either
146 -- floating point definition or a fixed point definition. No explicit node
147 -- appears for real type definition. Instead either the floating point
148 -- definition or fixed point definition appears directly.
150 -- If a non-terminal corresponds to a list of some other non-terminal
151 -- (possibly with separating punctuation), then usually it is omitted from
152 -- the tree, and a list of components appears instead. For example,
153 -- sequence of statements does not appear explicitly in the tree. Instead
154 -- a list of statements appears directly.
156 -- Some additional cases of omitted nodes occur and are documented
157 -- individually. In particular, many nodes are omitted in the tree
158 -- generated for an expression.
160 -------------------------------------------
161 -- Handling of Defining Identifier Lists --
162 -------------------------------------------
164 -- In several declarative forms in the syntax, lists of defining
165 -- identifiers appear (object declarations, component declarations, number
166 -- declarations etc.)
168 -- The semantics of such statements are equivalent to a series of identical
169 -- declarations of single defining identifiers (except that conformance
170 -- checks require the same grouping of identifiers in the parameter case).
172 -- To simplify semantic processing, the parser breaks down such multiple
173 -- declaration cases into sequences of single declarations, duplicating
174 -- type and initialization information as required. The flags More_Ids and
175 -- Prev_Ids are used to record the original form of the source in the case
176 -- where the original source used a list of names, More_Ids being set on
177 -- all but the last name and Prev_Ids being set on all but the first name.
178 -- These flags are used to reconstruct the original source (e.g. in the
179 -- Sprint package), and also are included in the conformance checks, but
180 -- otherwise have no semantic significance.
182 -- Note: the reason that we use More_Ids and Prev_Ids rather than
183 -- First_Name and Last_Name flags is so that the flags are off in the
184 -- normal one identifier case, which minimizes tree print output.
186 -----------------------
187 -- Use of Node Lists --
188 -----------------------
190 -- With a few exceptions, if a construction of the form {non-terminal}
191 -- appears in the tree, lists are used in the corresponding tree node (see
192 -- package Nlists for handling of node lists). In this case a field of the
193 -- parent node points to a list of nodes for the non-terminal. The field
194 -- name for such fields has a plural name which always ends in "s". For
195 -- example, a case statement has a field Alternatives pointing to list of
196 -- case statement alternative nodes.
198 -- Only fields pointing to lists have names ending in "s", so generally the
199 -- structure is strongly typed, fields not ending in s point to single
200 -- nodes, and fields ending in s point to lists.
202 -- The following example shows how a traversal of a list is written. We
203 -- suppose here that Stmt points to a N_Case_Statement node which has a
204 -- list field called Alternatives:
206 -- Alt := First (Alternatives (Stmt));
207 -- while Present (Alt) loop
209 -- -- processing for case statement alternative Alt
211 -- Alt := Next (Alt);
214 -- The Present function tests for Empty, which in this case signals the end
215 -- of the list. First returns Empty immediately if the list is empty.
216 -- Present is defined in Atree, First and Next are defined in Nlists.
218 -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
219 -- contexts, which is handled as described in the previous section, and
220 -- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
221 -- using the First_Name and Last_Name flags, as further detailed in the
222 -- description of the N_With_Clause node.
228 -- Pragmas can appear in many different context, but are not included in
229 -- the grammar. Still they must appear in the tree, so they can be properly
232 -- Two approaches are used. In some cases, an extra field is defined in an
233 -- appropriate node that contains a list of pragmas appearing in the
234 -- expected context. For example pragmas can appear before an
235 -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
236 -- appear in the Pragmas_Before field of the N_Accept_Alternative node.
238 -- The other approach is to simply allow pragmas to appear in syntactic
239 -- lists where the grammar (of course) does not include the possibility.
240 -- For example, the Variants field of an N_Variant_Part node points to a
241 -- list that can contain both N_Pragma and N_Variant nodes.
243 -- To make processing easier in the latter case, the Nlists package
244 -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
245 -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
246 -- ignoring all pragmas.
248 -- In the case of the variants list, we can either write:
250 -- Variant := First (Variants (N));
251 -- while Present (Variant) loop
253 -- Variant := Next (Variant);
258 -- Variant := First_Non_Pragma (Variants (N));
259 -- while Present (Variant) loop
261 -- Variant := Next_Non_Pragma (Variant);
264 -- In the first form of the loop, Variant can either be an N_Pragma or an
265 -- N_Variant node. In the second form, Variant can only be N_Variant since
266 -- all pragmas are skipped.
268 ---------------------
269 -- Optional Fields --
270 ---------------------
272 -- Fields which correspond to a section of the syntax enclosed in square
273 -- brackets are generally omitted (and the corresponding field set to Empty
274 -- for a node, or No_List for a list). The documentation of such fields
275 -- notes these cases. One exception to this rule occurs in the case of
276 -- possibly empty statement sequences (such as the sequence of statements
277 -- in an entry call alternative). Such cases appear in the syntax rules as
278 -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
279 -- statement sequences always contain an empty list (not No_List) if no
280 -- statements are present.
282 -- Note: the utility program that constructs the body and spec of the Nmake
283 -- package relies on the format of the comments to determine if a field
284 -- should have a default value in the corresponding make routine. The rule
285 -- is that if the first line of the description of the field contains the
286 -- string "(set to xxx if", then a default value of xxx is provided for
287 -- this field in the corresponding Make_yyy routine.
289 -----------------------------------
290 -- Note on Body/Spec Terminology --
291 -----------------------------------
293 -- In informal discussions about Ada, it is customary to refer to package
294 -- and subprogram specs and bodies. However, this is not technically
295 -- correct, what is normally referred to as a spec or specification is in
296 -- fact a package declaration or subprogram declaration. We are careful in
297 -- GNAT to use the correct terminology and in particular, the full word
298 -- specification is never used as an incorrect substitute for declaration.
299 -- The structure and terminology used in the tree also reflects the grammar
300 -- and thus uses declaration and specification in the technically correct
303 -- However, there are contexts in which the informal terminology is useful.
304 -- We have the word "body" to refer to the Interp_Etype declared by the
305 -- declaration of a unit body, and in some contexts we need similar term to
306 -- refer to the entity declared by the package or subprogram declaration,
307 -- and simply using declaration can be confusing since the body also has a
310 -- An example of such a context is the link between the package body and
311 -- its declaration. With_Declaration is confusing, since the package body
312 -- itself is a declaration.
314 -- To deal with this problem, we reserve the informal term Spec, i.e. the
315 -- popular abbreviation used in this context, to refer to the entity
316 -- declared by the package or subprogram declaration. So in the above
317 -- example case, the field in the body is called With_Spec.
319 -- Another important context for the use of the word Spec is in error
320 -- messages, where a hyper-correct use of declaration would be confusing to
321 -- a typical Ada programmer, and even for an expert programmer can cause
322 -- confusion since the body has a declaration as well.
326 -- Declaration always refers to the syntactic entity that is called
327 -- a declaration. In particular, subprogram declaration
328 -- and package declaration are used to describe the
329 -- syntactic entity that includes the semicolon.
331 -- Specification always refers to the syntactic entity that is called
332 -- a specification. In particular, the terms procedure
333 -- specification, function specification, package
334 -- specification, subprogram specification always refer
335 -- to the syntactic entity that has no semicolon.
337 -- Spec is an informal term, used to refer to the entity
338 -- that is declared by a task declaration, protected
339 -- declaration, generic declaration, subprogram
340 -- declaration or package declaration.
342 -- This convention is followed throughout the GNAT documentation
343 -- both internal and external, and in all error message text.
345 ------------------------
346 -- Internal Use Nodes --
347 ------------------------
349 -- These are Node_Kind settings used in the internal implementation which
350 -- are not logically part of the specification.
353 -- Completely unused entry at the start of the enumeration type. This
354 -- is inserted so that no legitimate value is zero, which helps to get
355 -- better debugging behavior, since zero is a likely uninitialized value).
358 -- Completely unused entry at the end of the enumeration type. This is
359 -- handy so that arrays with Node_Kind as the index type have an extra
360 -- entry at the end (see for example the use of the Pchar_Pos_Array in
361 -- Treepr, where the extra entry provides the limit value when dealing with
362 -- the last used entry in the array).
364 -----------------------------------------
365 -- Note on the settings of Sloc fields --
366 -----------------------------------------
368 -- The Sloc field of nodes that come from the source is set by the parser.
369 -- For internal nodes, and nodes generated during expansion the Sloc is
370 -- usually set in the call to the constructor for the node. In general the
371 -- Sloc value chosen for an internal node is the Sloc of the source node
372 -- whose processing is responsible for the expansion. For example, the Sloc
373 -- of an inherited primitive operation is the Sloc of the corresponding
374 -- derived type declaration.
376 -- For the nodes of a generic instantiation, the Sloc value is encoded to
377 -- represent both the original Sloc in the generic unit, and the Sloc of
378 -- the instantiation itself. See Sinput.ads for details.
380 -- Subprogram instances create two callable entities: one is the visible
381 -- subprogram instance, and the other is an anonymous subprogram nested
382 -- within a wrapper package that contains the renamings for the actuals.
383 -- Both of these entities have the Sloc of the defining entity in the
384 -- instantiation node. This simplifies some ASIS queries.
386 -----------------------
387 -- Field Definitions --
388 -----------------------
390 -- In the following node definitions, all fields, both syntactic and
391 -- semantic, are documented. The one exception is in the case of entities
392 -- (defining identifiers, character literals and operator symbols), where
393 -- the usage of the fields depends on the entity kind. Entity fields are
394 -- fully documented in the separate package Einfo.
396 -- In the node definitions, three common sets of fields are abbreviated to
397 -- save both space in the documentation, and also space in the string
398 -- (defined in Tree_Print_Strings) used to print trees. The following
399 -- abbreviations are used:
401 -- Note: the utility program that creates the Treeprs spec (in the file
402 -- xtreeprs.adb) knows about the special fields here, so it must be
403 -- modified if any change is made to these fields.
405 -- "plus fields for binary operator"
406 -- Chars (Name1) Name_Id for the operator
407 -- Left_Opnd (Node2) left operand expression
408 -- Right_Opnd (Node3) right operand expression
409 -- Entity (Node4-Sem) defining entity for operator
410 -- Associated_Node (Node4-Sem) for generic processing
411 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
412 -- Has_Private_View (Flag11-Sem) set in generic units.
414 -- "plus fields for unary operator"
415 -- Chars (Name1) Name_Id for the operator
416 -- Right_Opnd (Node3) right operand expression
417 -- Entity (Node4-Sem) defining entity for operator
418 -- Associated_Node (Node4-Sem) for generic processing
419 -- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
420 -- Has_Private_View (Flag11-Sem) set in generic units.
422 -- "plus fields for expression"
423 -- Paren_Count number of parentheses levels
424 -- Etype (Node5-Sem) type of the expression
425 -- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
426 -- Is_Static_Expression (Flag6-Sem) set for static expression
427 -- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
428 -- Must_Not_Freeze (Flag8-Sem) set if must not freeze
429 -- Do_Range_Check (Flag9-Sem) set if a range check needed
430 -- Has_Dynamic_Length_Check (Flag10-Sem) set if length check inserted
431 -- Has_Dynamic_Range_Check (Flag12-Sem) set if range check inserted
432 -- Assignment_OK (Flag15-Sem) set if modification is OK
433 -- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
435 -- Note: see under (EXPRESSION) for further details on the use of
436 -- the Paren_Count field to record the number of parentheses levels.
438 -- Node_Kind is the type used in the Nkind field to indicate the node kind.
439 -- The actual definition of this type is given later (the reason for this
440 -- is that we want the descriptions ordered by logical chapter in the RM,
441 -- but the type definition is reordered to facilitate the definition of
442 -- some subtype ranges. The individual descriptions of the nodes show how
443 -- the various fields are used in each node kind, as well as providing
444 -- logical names for the fields. Functions and procedures are provided for
445 -- accessing and setting these fields using these logical names.
447 -----------------------
448 -- Gigi Restrictions --
449 -----------------------
451 -- The tree passed to Gigi is more restricted than the general tree form.
452 -- For example, as a result of expansion, most of the tasking nodes can
453 -- never appear. For each node to which either a complete or partial
454 -- restriction applies, a note entitled "Gigi restriction" appears which
455 -- documents the restriction.
457 -- Note that most of these restrictions apply only to trees generated when
458 -- code is being generated, since they involved expander actions that
465 -- When a file is compiled in ASIS mode (-gnatct), expansion is skipped,
466 -- and the analysis must generate a tree in a form that meets all ASIS
469 -- ASIS must be able to recover the original tree that corresponds to the
470 -- source. It relies heavily on Original_Node for this purpose, which as
471 -- described in Atree, records the history when a node is rewritten. ASIS
472 -- uses Original_Node to recover the original node before the Rewrite.
474 -- At least in ASIS mode (not really important in non-ASIS mode), when
475 -- N1 is rewritten as N2:
477 -- The subtree rooted by the original node N1 should be fully decorated,
478 -- i.e. all semantic fields noted in sinfo.ads should be set properly
479 -- and any referenced entities should be complete (with exceptions for
480 -- representation information, noted below).
482 -- For all the direct descendants of N1 (original node) their Parent
483 -- links should point not to N1, but to N2 (rewriting node).
485 -- The Parent links of rewritten nodes (N1 in this example) are set in
486 -- some cases (to point to the rewritten parent), but in other cases
487 -- they are set to Empty. This needs sorting out ??? It would be much
488 -- cleaner if they could always be set in the original node ???
490 -- There are a few cases when ASIS has to use not the original, but the
491 -- rewritten tree structures. This happens when because of some important
492 -- technical reasons it is impossible or very hard to have the original
493 -- structure properly decorated by semantic information, and the rewritten
494 -- structure fully reproduces the original source. Below is the (incomplete
495 -- for the moment???) list of such exceptions:
497 -- Generic specifications and generic bodies
498 -- Function calls that use prefixed notation (Operand.Operation [(...)])
500 -- Representation Information
502 -- For the purposes of the data description annex, the representation
503 -- information for source declared entities must be complete in the
506 -- This requires that the front end call the back end (gigi/gcc) in
507 -- a special "back annotate only" mode to obtain information on layout
508 -- from the back end.
510 -- For the purposes of this special "back annotate only" mode, the
511 -- requirements that would normally need to be met to generate code
512 -- are relaxed as follows:
514 -- Anonymous types need not have full representation information (e.g.
515 -- sizes need not be set for types where the front end would normally
516 -- set the sizes), since anonymous types can be ignored in this mode.
518 -- In this mode, gigi will see at least fragments of a fully annotated
519 -- unexpanded tree. This means that it will encounter nodes it does
520 -- not normally handle (such as stubs, task bodies etc). It should
521 -- simply ignore these nodes, since they are not relevant to the task
522 -- of back annotating representation information.
528 -- When a file is compiled in GNATprove mode (-gnatd.F), a very light
529 -- expansion is performed and the analysis must generate a tree in a
530 -- form that meets additional requirements.
532 -- This light expansion does two transformations of the tree that cannot
533 -- be postponed till after semantic analysis:
535 -- 1. Replace object renamings by renamed object. This requires the
536 -- introduction of temporaries at the point of the renaming, which
537 -- must be properly analyzed.
539 -- 2. Fully qualify entity names. This is needed to generate suitable
540 -- local effects and call-graphs in ALI files, with the completely
541 -- qualified names (in particular the suffix to distinguish homonyms).
543 -- The tree after this light expansion should be fully analyzed
544 -- semantically, which sometimes requires the insertion of semantic
545 -- pre-analysis, for example for subprogram contracts and pragma
546 -- check/assert. In particular, all expression must have their proper type,
547 -- and semantic links should be set between tree nodes (partial to full
548 -- view, etc.) Some kinds of nodes should be either absent, or can be
549 -- ignored by the formal verification backend:
551 -- N_Object_Renaming_Declaration: can be ignored safely
552 -- N_Expression_Function: absent (rewritten)
553 -- N_Expression_With_Actions: absent (not generated)
555 -- SPARK cross-references are generated from the regular cross-references
556 -- (used for browsing and code understanding) and additional references
557 -- collected during semantic analysis, in particular on all dereferences.
558 -- These SPARK cross-references are output in a separate section of ALI
559 -- files, as described in spark_xrefs.adb. They are the basis for the
560 -- computation of data dependences in GNATprove. This implies that all
561 -- cross-references should be generated in this mode, even those that would
562 -- not make sense from a user point-of-view, and that cross-references that
563 -- do not lead to data dependences for subprograms can be safely ignored.
565 -- In addition pragma Debug statements are removed from the tree (rewritten
566 -- to NULL stmt), since they should be ignored in formal verification.
568 -- An error is also issued for missing subunits, similar to the warning
569 -- issued when generating code, to avoid formal verification of a partial
572 -----------------------
573 -- Check Flag Fields --
574 -----------------------
576 -- The following flag fields appear in expression nodes:
582 -- These three flags are always set by the front end during semantic
583 -- analysis, on expression nodes that may trigger the corresponding
584 -- check. The front end then inserts or not the check during expansion. In
585 -- particular, these flags should also be correctly set in ASIS mode and
588 -- Note: the expander always takes care of the Do_Range check case,
589 -- so this flag will never be set in the expanded tree passed to the
590 -- back end code generator.
592 -- Note that this accounts for all nodes that trigger the corresponding
593 -- checks, except for range checks on subtype_indications, which may be
594 -- required to check that a range_constraint is compatible with the given
595 -- subtype (RM 3.2.2(11)).
597 -- The following flag fields appear in various nodes:
599 -- Do_Accessibility_Check
600 -- Do_Discriminant_Check
605 -- These flags are used in some specific cases by the front end, either
606 -- during semantic analysis or during expansion, and cannot be expected
607 -- to be set on all nodes that trigger the corresponding check.
609 ------------------------
610 -- Common Flag Fields --
611 ------------------------
613 -- The following flag fields appear in all nodes:
616 -- This flag is used to indicate that a node (and all its children have
617 -- been analyzed. It is used to avoid reanalysis of a node that has
618 -- already been analyzed, both for efficiency and functional correctness
622 -- This flag is set if the node comes directly from an explicit construct
623 -- in the source. It is normally on for any nodes built by the scanner or
624 -- parser from the source program, with the exception that in a few cases
625 -- the parser adds nodes to normalize the representation (in particular
626 -- a null statement is added to a package body if there is no begin/end
627 -- initialization section.
629 -- Most nodes inserted by the analyzer or expander are not considered
630 -- as coming from source, so the flag is off for such nodes. In a few
631 -- cases, the expander constructs nodes closely equivalent to nodes
632 -- from the source program (e.g. the allocator built for build-in-place
633 -- case), and the Comes_From_Source flag is deliberately set.
636 -- This flag is used to avoid multiple error messages being posted on or
637 -- referring to the same node. This flag is set if an error message
638 -- refers to a node or is posted on its source location, and has the
639 -- effect of inhibiting further messages involving this same node.
641 -----------------------
642 -- Modify_Tree_For_C --
643 -----------------------
645 -- If the flag Opt.Modify_Tree_For_C is set True, then the tree is modified
646 -- in ways that help match the semantics better with C, easing the task of
647 -- interfacing to C code generators (other than GCC, where the work is done
648 -- in gigi, and there is no point in changing that), and also making life
649 -- easier for Cprint in generating C source code.
651 -- The current modifications implemented are as follows:
653 -- N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic nodes
654 -- are eliminated from the tree (since these operations do not exist in
655 -- C), and the operations are rewritten in terms of logical shifts and
656 -- other logical operations that do exist in C. See Exp_Ch4 expansion
657 -- routines for these operators for details of the transformations made.
659 -- The right operand of N_Op_Shift_Right and N_Op_Shift_Left is always
660 -- less than the word size (since other values are not well-defined in
661 -- C). This is done using an explicit test if necessary.
663 -- Min and Max attributes are expanded into equivalent if expressions,
664 -- dealing properly with side effect issues.
666 -- Mod for signed integer types is expanded into equivalent expressions
667 -- using Rem (which is % in C) and other C-available operators.
669 -- The Actions list of an Expression_With_Actions node does not contain
670 -- any declarations,(so that DO X, .. Y IN Z becomes (X, .. Y, Z) in C).
672 ------------------------------------
673 -- Description of Semantic Fields --
674 ------------------------------------
676 -- The meaning of the syntactic fields is generally clear from their names
677 -- without any further description, since the names are chosen to
678 -- correspond very closely to the syntax in the reference manual. This
679 -- section describes the usage of the semantic fields, which are used to
680 -- contain additional information determined during semantic analysis.
682 -- ABE_Is_Certain (Flag18-Sem)
683 -- This flag is set in an instantiation node or a call node is determined
684 -- to be sure to raise an ABE. This is used to trigger special handling
685 -- of such cases, particularly in the instantiation case where we avoid
686 -- instantiating the body if this flag is set. This flag is also present
687 -- in an N_Formal_Package_Declaration_Node since formal package
688 -- declarations are treated like instantiations, but it is always set to
689 -- False in this context.
691 -- Accept_Handler_Records (List5-Sem)
692 -- This field is present only in an N_Accept_Alternative node. It is used
693 -- to temporarily hold the exception handler records from an accept
694 -- statement in a selective accept. These exception handlers will
695 -- eventually be placed in the Handler_Records list of the procedure
696 -- built for this accept (see Expand_N_Selective_Accept procedure in
697 -- Exp_Ch9 for further details).
699 -- Access_Types_To_Process (Elist2-Sem)
700 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
701 -- Contains the list of access types which may require specific treatment
702 -- when the nature of the type completion is completely known. An example
703 -- of such treatment is the generation of the associated_final_chain.
705 -- Actions (List1-Sem)
706 -- This field contains a sequence of actions that are associated with the
707 -- node holding the field. See the individual node types for details of
708 -- how this field is used, as well as the description of the specific use
709 -- for a particular node type.
711 -- Activation_Chain_Entity (Node3-Sem)
712 -- This is used in tree nodes representing task activators (blocks,
713 -- subprogram bodies, package declarations, and task bodies). It is
714 -- initially Empty, and then gets set to point to the entity for the
715 -- declared Activation_Chain variable when the first task is declared.
716 -- When tasks are declared in the corresponding declarative region this
717 -- entity is located by name (its name is always _Chain) and the declared
718 -- tasks are added to the chain. Note that N_Extended_Return_Statement
719 -- does not have this attribute, although it does have an activation
720 -- chain. This chain is used to store the tasks temporarily, and is not
721 -- used for activating them. On successful completion of the return
722 -- statement, the tasks are moved to the caller's chain, and the caller
725 -- Acts_As_Spec (Flag4-Sem)
726 -- A flag set in the N_Subprogram_Body node for a subprogram body which
727 -- is acting as its own spec, except in the case of a library level
728 -- subprogram, in which case the flag is set on the parent compilation
729 -- unit node instead.
731 -- Actual_Designated_Subtype (Node4-Sem)
732 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
733 -- needs to known the dynamic constrained subtype of the designated
734 -- object, this attribute is set to that type. This is done for
735 -- N_Free_Statements for access-to-classwide types and access to
736 -- unconstrained packed array types, and for N_Explicit_Dereference when
737 -- the designated type is an unconstrained packed array and the
738 -- dereference is the prefix of a 'Size attribute reference.
740 -- Address_Warning_Posted (Flag18-Sem)
741 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
742 -- posted a warning for the address clause regarding size or alignment
743 -- issues. Used to inhibit multiple redundant messages.
745 -- Aggregate_Bounds (Node3-Sem)
746 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
747 -- known at compile time, this field points to an N_Range node with those
748 -- bounds. Otherwise Empty.
750 -- All_Others (Flag11-Sem)
751 -- Present in an N_Others_Choice node. This flag is set for an others
752 -- exception where all exceptions are to be caught, even those that are
753 -- not normally handled (in particular the tasking abort signal). This
754 -- is used for translation of the at end handler into a normal exception
757 -- Aspect_Rep_Item (Node2-Sem)
758 -- Present in N_Aspect_Specification nodes. Points to the corresponding
759 -- pragma/attribute definition node used to process the aspect.
761 -- Assignment_OK (Flag15-Sem)
762 -- This flag is set in a subexpression node for an object, indicating
763 -- that the associated object can be modified, even if this would not
764 -- normally be permissible (either by direct assignment, or by being
765 -- passed as an out or in-out parameter). This is used by the expander
766 -- for a number of purposes, including initialization of constants and
767 -- limited type objects (such as tasks), setting discriminant fields,
768 -- setting tag values, etc. N_Object_Declaration nodes also have this
769 -- flag defined. Here it is used to indicate that an initialization
770 -- expression is valid, even where it would normally not be allowed
771 -- (e.g. where the type involved is limited).
773 -- Associated_Node (Node4-Sem)
774 -- Present in nodes that can denote an entity: identifiers, character
775 -- literals, operator symbols, expanded names, operator nodes, and
776 -- attribute reference nodes (all these nodes have an Entity field).
777 -- This field is also present in N_Aggregate, N_Selected_Component, and
778 -- N_Extension_Aggregate nodes. This field is used in generic processing
779 -- to create links between the generic template and the generic copy.
780 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
781 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
782 -- the normal function of Entity is not required at the point where the
783 -- Associated_Node is set. Note also, that in generic templates, this
784 -- means that the Entity field does not necessarily point to an Entity.
785 -- Since the back end is expected to ignore generic templates, this is
788 -- Atomic_Sync_Required (Flag14-Sem)
789 -- This flag is set on a node for which atomic synchronization is
790 -- required for the corresponding reference or modification.
792 -- At_End_Proc (Node1)
793 -- This field is present in an N_Handled_Sequence_Of_Statements node.
794 -- It contains an identifier reference for the cleanup procedure to be
795 -- called. See description of this node for further details.
797 -- Backwards_OK (Flag6-Sem)
798 -- A flag present in the N_Assignment_Statement node. It is used only
799 -- if the type being assigned is an array type, and is set if analysis
800 -- determines that it is definitely safe to do the copy backwards, i.e.
801 -- starting at the highest addressed element. This is the case if either
802 -- the operands do not overlap, or they may overlap, but if they do,
803 -- then the left operand is at a higher address than the right operand.
805 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
806 -- means that the front end could not determine that either direction is
807 -- definitely safe, and a runtime check may be required if the backend
808 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
809 -- set, it means that the front end can assure no overlap of operands.
811 -- Body_To_Inline (Node3-Sem)
812 -- present in subprogram declarations. Denotes analyzed but unexpanded
813 -- body of subprogram, to be used when inlining calls. Present when the
814 -- subprogram has an Inline pragma and inlining is enabled. If the
815 -- declaration is completed by a renaming_as_body, and the renamed en-
816 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
817 -- which is used directly in later calls to the original subprogram.
819 -- Body_Required (Flag13-Sem)
820 -- A flag that appears in the N_Compilation_Unit node indicating that
821 -- the corresponding unit requires a body. For the package case, this
822 -- indicates that a completion is required. In Ada 95, if the flag is not
823 -- set for the package case, then a body may not be present. In Ada 83,
824 -- if the flag is not set for the package case, then body is optional.
825 -- For a subprogram declaration, the flag is set except in the case where
826 -- a pragma Import or Interface applies, in which case no body is
827 -- permitted (in Ada 83 or Ada 95).
829 -- By_Ref (Flag5-Sem)
830 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
831 -- this flag is set when the returned expression is already allocated on
832 -- the secondary stack and thus the result is passed by reference rather
833 -- than copied another time.
835 -- Cleanup_Actions (List5-Sem)
836 -- Present in block statements created for transient blocks, contains
837 -- additional cleanup actions carried over from the transient scope.
839 -- Check_Address_Alignment (Flag11-Sem)
840 -- A flag present in N_Attribute_Definition clause for a 'Address
841 -- attribute definition. This flag is set if a dynamic check should be
842 -- generated at the freeze point for the entity to which this address
843 -- clause applies. The reason that we need this flag is that we want to
844 -- check for range checks being suppressed at the point where the
845 -- attribute definition clause is given, rather than testing this at the
848 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
849 -- Present in N_Simple_Return_Statement nodes. True if this node was
850 -- constructed as part of the N_Extended_Return_Statement expansion.
852 -- Compile_Time_Known_Aggregate (Flag18-Sem)
853 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
854 -- evaluated at compile time without raising constraint error. Such
855 -- aggregates can be passed as is the back end without any expansion.
856 -- See Exp_Aggr for specific conditions under which this flag gets set.
858 -- Componentwise_Assignment (Flag14-Sem)
859 -- Present in N_Assignment_Statement nodes. Set for a record assignment
860 -- where all that needs doing is to expand it into component-by-component
861 -- assignments. This is used internally for the case of tagged types with
862 -- rep clauses, where we need to avoid recursion (we don't want to try to
863 -- generate a call to the primitive operation, because this is the case
864 -- where we are compiling the primitive operation). Note that when we are
865 -- expanding component assignments in this case, we never assign the _tag
866 -- field, but we recursively assign components of the parent type.
868 -- Condition_Actions (List3-Sem)
869 -- This field appears in else-if nodes and in the iteration scheme node
870 -- for while loops. This field is only used during semantic processing to
871 -- temporarily hold actions inserted into the tree. In the tree passed
872 -- to gigi, the condition actions field is always set to No_List. For
873 -- details on how this field is used, see the routine Insert_Actions in
874 -- package Exp_Util, and also the expansion routines for the relevant
877 -- Context_Pending (Flag16-Sem)
878 -- This field appears in Compilation_Unit nodes, to indicate that the
879 -- context of the unit is being compiled. Used to detect circularities
880 -- that are not otherwise detected by the loading mechanism. Such
881 -- circularities can occur in the presence of limited and non-limited
882 -- with_clauses that mention the same units.
884 -- Controlling_Argument (Node1-Sem)
885 -- This field is set in procedure and function call nodes if the call
886 -- is a dispatching call (it is Empty for a non-dispatching call). It
887 -- indicates the source of the call's controlling tag. For procedure
888 -- calls, the Controlling_Argument is one of the actuals. For function
889 -- that has a dispatching result, it is an entity in the context of the
890 -- call that can provide a tag, or else it is the tag of the root type
891 -- of the class. It can also specify a tag directly rather than being a
892 -- tagged object. The latter is needed by the implementations of AI-239
895 -- Conversion_OK (Flag14-Sem)
896 -- A flag set on type conversion nodes to indicate that the conversion
897 -- is to be considered as being valid, even though it is the case that
898 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
899 -- Fixed_Value and Integer_Value, for internal conversions done for
900 -- fixed-point operations, and for certain conversions for calls to
901 -- initialization procedures. If Conversion_OK is set, then Etype must be
902 -- set (the analyzer assumes that Etype has been set). For the case of
903 -- fixed-point operands, it also indicates that the conversion is to be
904 -- direct conversion of the underlying integer result, with no regard to
905 -- the small operand.
907 -- Convert_To_Return_False (Flag13-Sem)
908 -- Present in N_Raise_Expression nodes that appear in the body of the
909 -- special predicateM function used to test a predicate in the context
910 -- of a membership test, where raise expression results in returning a
911 -- value of False rather than raising an exception.
913 -- Corresponding_Aspect (Node3-Sem)
914 -- Present in N_Pragma node. Used to point back to the source aspect from
915 -- the corresponding pragma. This field is Empty for source pragmas.
917 -- Corresponding_Body (Node5-Sem)
918 -- This field is set in subprogram declarations, package declarations,
919 -- entry declarations of protected types, and in generic units. It points
920 -- to the defining entity for the corresponding body (NOT the node for
923 -- Corresponding_Formal_Spec (Node3-Sem)
924 -- This field is set in subprogram renaming declarations, where it points
925 -- to the defining entity for a formal subprogram in the case where the
926 -- renaming corresponds to a generic formal subprogram association in an
927 -- instantiation. The field is Empty if the renaming does not correspond
928 -- to such a formal association.
930 -- Corresponding_Generic_Association (Node5-Sem)
931 -- This field is defined for object declarations and object renaming
932 -- declarations. It is set for the declarations within an instance that
933 -- map generic formals to their actuals. If set, the field points to
934 -- a generic_association which is the original parent of the expression
935 -- or name appearing in the declaration. This simplifies ASIS queries.
937 -- Corresponding_Integer_Value (Uint4-Sem)
938 -- This field is set in real literals of fixed-point types (it is not
939 -- used for floating-point types). It contains the integer value used
940 -- to represent the fixed-point value. It is also set on the universal
941 -- real literals used to represent bounds of fixed-point base types
942 -- and their first named subtypes.
944 -- Corresponding_Spec (Node5-Sem)
945 -- This field is set in subprogram, package, task, and protected body
946 -- nodes, where it points to the defining entity in the corresponding
947 -- spec. The attribute is also set in N_With_Clause nodes where it points
948 -- to the defining entity for the with'ed spec, and in a subprogram
949 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
950 -- if there is no corresponding spec, as in the case of a subprogram body
951 -- that serves as its own spec.
953 -- In Ada 2012, Corresponding_Spec is set on expression functions that
954 -- complete a subprogram declaration.
956 -- Corresponding_Spec_Of_Stub (Node2-Sem)
957 -- This field is present in subprogram, package, task and protected body
958 -- stubs where it points to the corresponding spec of the stub. Due to
959 -- clashes in the structure of nodes, we cannot use Corresponding_Spec.
961 -- Corresponding_Stub (Node3-Sem)
962 -- This field is present in an N_Subunit node. It holds the node in
963 -- the parent unit that is the stub declaration for the subunit. It is
964 -- set when analysis of the stub forces loading of the proper body. If
965 -- expansion of the proper body creates new declarative nodes, they are
966 -- inserted at the point of the corresponding_stub.
968 -- Dcheck_Function (Node5-Sem)
969 -- This field is present in an N_Variant node, It references the entity
970 -- for the discriminant checking function for the variant.
972 -- Default_Expression (Node5-Sem)
973 -- This field is Empty if there is no default expression. If there is a
974 -- simple default expression (one with no side effects), then this field
975 -- simply contains a copy of the Expression field (both point to the tree
976 -- for the default expression). Default_Expression is used for
977 -- conformance checking.
979 -- Default_Storage_Pool (Node3-Sem)
980 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
981 -- copy of Opt.Default_Pool at the end of the compilation unit. See
982 -- package Opt for details. This is used for inheriting the
983 -- Default_Storage_Pool in child units.
985 -- Discr_Check_Funcs_Built (Flag11-Sem)
986 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
987 -- discriminant checking functions are constructed. The purpose is to
988 -- avoid attempting to set these functions more than once.
990 -- Do_Accessibility_Check (Flag13-Sem)
991 -- This flag is set on N_Parameter_Specification nodes to indicate
992 -- that an accessibility check is required for the parameter. It is
993 -- not yet decided who takes care of this check (TBD ???).
995 -- Do_Discriminant_Check (Flag1-Sem)
996 -- This flag is set on N_Selected_Component nodes to indicate that a
997 -- discriminant check is required using the discriminant check routine
998 -- associated with the selector. The actual check is generated by the
999 -- expander when processing selected components. In the case of
1000 -- Unchecked_Union, the flag is also set, but no discriminant check
1001 -- routine is associated with the selector, and the expander does not
1002 -- generate a check. This flag is also present in assignment statements
1003 -- (and set if the assignment requires a discriminant check), and in type
1004 -- conversion nodes (and set if the conversion requires a check).
1006 -- Do_Division_Check (Flag13-Sem)
1007 -- This flag is set on a division operator (/ mod rem) to indicate
1008 -- that a zero divide check is required. The actual check is dealt
1009 -- with by the backend (all the front end does is to set the flag).
1011 -- Do_Length_Check (Flag4-Sem)
1012 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
1013 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
1014 -- is required. It is not determined who deals with this flag (???).
1016 -- Do_Overflow_Check (Flag17-Sem)
1017 -- This flag is set on an operator where an overflow check is required on
1018 -- the operation. The actual check is dealt with by the backend (all the
1019 -- front end does is to set the flag). The other cases where this flag is
1020 -- used is on a Type_Conversion node and for attribute reference nodes.
1021 -- For a type conversion, it means that the conversion is from one base
1022 -- type to another, and the value may not fit in the target base type.
1023 -- See also the description of Do_Range_Check for this case. The only
1024 -- attribute references which use this flag are Pred and Succ, where it
1025 -- means that the result should be checked for going outside the base
1026 -- range. Note that this flag is not set for modular types. This flag is
1027 -- also set on if and case expression nodes if we are operating in either
1028 -- MINIMIZED or ELIMINATED overflow checking mode (to make sure that we
1029 -- properly process overflow checking for dependent expressions).
1031 -- Do_Range_Check (Flag9-Sem)
1032 -- This flag is set on an expression which appears in a context where a
1033 -- range check is required. The target type is clear from the context.
1034 -- The contexts in which this flag can appear are the following:
1036 -- Right side of an assignment. In this case the target type is
1037 -- taken from the left side of the assignment, which is referenced
1038 -- by the Name of the N_Assignment_Statement node.
1040 -- Subscript expressions in an indexed component. In this case the
1041 -- target type is determined from the type of the array, which is
1042 -- referenced by the Prefix of the N_Indexed_Component node.
1044 -- Argument expression for a parameter, appearing either directly in
1045 -- the Parameter_Associations list of a call or as the Expression of an
1046 -- N_Parameter_Association node that appears in this list. In either
1047 -- case, the check is against the type of the formal. Note that the
1048 -- flag is relevant only in IN and IN OUT parameters, and will be
1049 -- ignored for OUT parameters, where no check is required in the call,
1050 -- and if a check is required on the return, it is generated explicitly
1051 -- with a type conversion.
1053 -- Initialization expression for the initial value in an object
1054 -- declaration. In this case the Do_Range_Check flag is set on
1055 -- the initialization expression, and the check is against the
1056 -- range of the type of the object being declared.
1058 -- The expression of a type conversion. In this case the range check is
1059 -- against the target type of the conversion. See also the use of
1060 -- Do_Overflow_Check on a type conversion. The distinction is that the
1061 -- overflow check protects against a value that is outside the range of
1062 -- the target base type, whereas a range check checks that the
1063 -- resulting value (which is a value of the base type of the target
1064 -- type), satisfies the range constraint of the target type.
1066 -- Note: when a range check is required in contexts other than those
1067 -- listed above (e.g. in a return statement), an additional type
1068 -- conversion node is introduced to represent the required check.
1070 -- A special case arises for the arguments of the Pred/Succ attributes.
1071 -- Here the range check needed is against First + 1 .. Last (Pred) or
1072 -- First .. Last - 1 (Succ) of the corresponding base type. Essentially
1073 -- these checks are what would be performed within the implicit body of
1074 -- the functions that correspond to these attributes. In these cases,
1075 -- the Do_Range check flag is set on the argument to the attribute
1076 -- function, and the back end must special case the appropriate range
1077 -- to check against.
1079 -- Do_Storage_Check (Flag17-Sem)
1080 -- This flag is set in an N_Allocator node to indicate that a storage
1081 -- check is required for the allocation, or in an N_Subprogram_Body node
1082 -- to indicate that a stack check is required in the subprogram prolog.
1083 -- The N_Allocator case is handled by the routine that expands the call
1084 -- to the runtime routine. The N_Subprogram_Body case is handled by the
1085 -- backend, and all the semantics does is set the flag.
1087 -- Do_Tag_Check (Flag13-Sem)
1088 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
1089 -- N_Procedure_Call_Statement, N_Type_Conversion,
1090 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
1091 -- node to indicate that the tag check can be suppressed. It is not
1092 -- yet decided how this flag is used (TBD ???).
1094 -- Elaborate_Present (Flag4-Sem)
1095 -- This flag is set in the N_With_Clause node to indicate that pragma
1096 -- Elaborate pragma appears for the with'ed units.
1098 -- Elaborate_All_Desirable (Flag9-Sem)
1099 -- This flag is set in the N_With_Clause mode to indicate that the static
1100 -- elaboration processing has determined that an Elaborate_All pragma is
1101 -- desirable for correct elaboration for this unit.
1103 -- Elaborate_All_Present (Flag14-Sem)
1104 -- This flag is set in the N_With_Clause node to indicate that a
1105 -- pragma Elaborate_All pragma appears for the with'ed units.
1107 -- Elaborate_Desirable (Flag11-Sem)
1108 -- This flag is set in the N_With_Clause mode to indicate that the static
1109 -- elaboration processing has determined that an Elaborate pragma is
1110 -- desirable for correct elaboration for this unit.
1112 -- Elaboration_Boolean (Node2-Sem)
1113 -- This field is present in function and procedure specification nodes.
1114 -- If set, it points to the entity for a Boolean flag that must be tested
1115 -- for certain calls to check for access before elaboration. See body of
1116 -- Sem_Elab for further details. This field is Empty if no elaboration
1117 -- boolean is required.
1119 -- Else_Actions (List3-Sem)
1120 -- This field is present in if expression nodes. During code
1121 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1122 -- actions at an appropriate place in the tree to get elaborated at the
1123 -- right time. For if expressions, we have to be sure that the actions
1124 -- for the Else branch are only elaborated if the condition is False.
1125 -- The Else_Actions field is used as a temporary parking place for
1126 -- these actions. The final tree is always rewritten to eliminate the
1127 -- need for this field, so in the tree passed to Gigi, this field is
1128 -- always set to No_List.
1130 -- Enclosing_Variant (Node2-Sem)
1131 -- This field is present in the N_Variant node and identifies the Node_Id
1132 -- corresponding to the immediately enclosing variant when the variant is
1133 -- nested, and N_Empty otherwise. Set during semantic processing of the
1134 -- variant part of a record type.
1136 -- Entity (Node4-Sem)
1137 -- Appears in all direct names (identifiers, character literals, and
1138 -- operator symbols), as well as expanded names, and attributes that
1139 -- denote entities, such as 'Class. Points to entity for corresponding
1140 -- defining occurrence. Set after name resolution. For identifiers in a
1141 -- WITH list, the corresponding defining occurrence is in a separately
1142 -- compiled file, and Entity must be set by the library Load procedure.
1144 -- Note: During name resolution, the value in Entity may be temporarily
1145 -- incorrect (e.g. during overload resolution, Entity is initially set to
1146 -- the first possible correct interpretation, and then later modified if
1147 -- necessary to contain the correct value after resolution).
1149 -- Note: This field overlaps Associated_Node, which is used during
1150 -- generic processing (see Sem_Ch12 for details). Note also that in
1151 -- generic templates, this means that the Entity field does not always
1152 -- point to an Entity. Since the back end is expected to ignore generic
1153 -- templates, this is harmless.
1155 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
1156 -- It is used only for stream attributes definition clauses. In this
1157 -- case, it denotes a (possibly dummy) subprogram entity that is declared
1158 -- conceptually at the point of the clause. Thus the visibility of the
1159 -- attribute definition clause (in the sense of 8.3(23) as amended by
1160 -- AI-195) can be checked by testing the visibility of that subprogram.
1162 -- Note: Normally the Entity field of an identifier points to the entity
1163 -- for the corresponding defining identifier, and hence the Chars field
1164 -- of an identifier will match the Chars field of the entity. However,
1165 -- there is no requirement that these match, and there are obscure cases
1166 -- of generated code where they do not match.
1168 -- Note: Ada 2012 aspect specifications require additional links between
1169 -- identifiers and various attributes. These attributes can be of
1170 -- arbitrary types, and the entity field of identifiers that denote
1171 -- aspects must be used to store arbitrary expressions for later semantic
1172 -- checks. See section on aspect specifications for details.
1174 -- Entity_Or_Associated_Node (Node4-Sem)
1175 -- A synonym for both Entity and Associated_Node. Used by convention in
1176 -- the code when referencing this field in cases where it is not known
1177 -- whether the field contains an Entity or an Associated_Node.
1179 -- Etype (Node5-Sem)
1180 -- Appears in all expression nodes, all direct names, and all entities.
1181 -- Points to the entity for the related type. Set after type resolution.
1182 -- Normally this is the actual subtype of the expression. However, in
1183 -- certain contexts such as the right side of an assignment, subscripts,
1184 -- arguments to calls, returned value in a function, initial value etc.
1185 -- it is the desired target type. In the event that this is different
1186 -- from the actual type, the Do_Range_Check flag will be set if a range
1187 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
1188 -- points to an essentially arbitrary choice from the possible set of
1191 -- Exception_Junk (Flag8-Sem)
1192 -- This flag is set in a various nodes appearing in a statement sequence
1193 -- to indicate that the corresponding node is an artifact of the
1194 -- generated code for exception handling, and should be ignored when
1195 -- analyzing the control flow of the relevant sequence of statements
1196 -- (e.g. to check that it does not end with a bad return statement).
1198 -- Exception_Label (Node5-Sem)
1199 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1200 -- to be used for transforming the corresponding exception into a goto,
1201 -- or contains Empty, if this exception is not to be transformed. Also
1202 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1203 -- that there may be a local raise for the handler, so that expansion
1204 -- to allow a goto is required (and this field contains the label for
1205 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1207 -- Expansion_Delayed (Flag11-Sem)
1208 -- Set on aggregates and extension aggregates that need a top-down rather
1209 -- than bottom-up expansion. Typically aggregate expansion happens bottom
1210 -- up. For nested aggregates the expansion is delayed until the enclosing
1211 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1212 -- delay it we set this flag. This is done to avoid creating a temporary
1213 -- for each level of a nested aggregates, and also to prevent the
1214 -- premature generation of constraint checks. This is also a requirement
1215 -- if we want to generate the proper attachment to the internal
1216 -- finalization lists (for record with controlled components). Top down
1217 -- expansion of aggregates is also used for in-place array aggregate
1218 -- assignment or initialization. When the full context is known, the
1219 -- target of the assignment or initialization is used to generate the
1220 -- left-hand side of individual assignment to each sub-component.
1222 -- First_Inlined_Subprogram (Node3-Sem)
1223 -- Present in the N_Compilation_Unit node for the main program. Points
1224 -- to a chain of entities for subprograms that are to be inlined. The
1225 -- Next_Inlined_Subprogram field of these entities is used as a link
1226 -- pointer with Empty marking the end of the list. This field is Empty
1227 -- if there are no inlined subprograms or inlining is not active.
1229 -- First_Named_Actual (Node4-Sem)
1230 -- Present in procedure call statement and function call nodes, and also
1231 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1232 -- named parameter where parameters are ordered by declaration order (as
1233 -- opposed to the actual order in the call which may be different due to
1234 -- named associations). Note: this field points to the explicit actual
1235 -- parameter itself, not the N_Parameter_Association node (its parent).
1237 -- First_Real_Statement (Node2-Sem)
1238 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1239 -- Empty. Used only when declarations are moved into the statement part
1240 -- of a construct as a result of wrapping an AT END handler that is
1241 -- required to cover the declarations. In this case, this field is used
1242 -- to remember the location in the statements list of the first real
1243 -- statement, i.e. the statement that used to be first in the statement
1244 -- list before the declarations were prepended.
1246 -- First_Subtype_Link (Node5-Sem)
1247 -- Present in N_Freeze_Entity node for an anonymous base type that is
1248 -- implicitly created by the declaration of a first subtype. It points
1249 -- to the entity for the first subtype.
1251 -- Float_Truncate (Flag11-Sem)
1252 -- A flag present in type conversion nodes. This is used for float to
1253 -- integer conversions where truncation is required rather than rounding.
1254 -- Note that Gigi does not handle type conversions from real to integer
1255 -- with rounding (see Expand_N_Type_Conversion).
1257 -- Forwards_OK (Flag5-Sem)
1258 -- A flag present in the N_Assignment_Statement node. It is used only
1259 -- if the type being assigned is an array type, and is set if analysis
1260 -- determines that it is definitely safe to do the copy forwards, i.e.
1261 -- starting at the lowest addressed element. This is the case if either
1262 -- the operands do not overlap, or they may overlap, but if they do,
1263 -- then the left operand is at a lower address than the right operand.
1265 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1266 -- means that the front end could not determine that either direction is
1267 -- definitely safe, and a runtime check may be required if the backend
1268 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1269 -- set, it means that the front end can assure no overlap of operands.
1271 -- From_Aspect_Specification (Flag13-Sem)
1272 -- Processing of aspect specifications typically results in insertion in
1273 -- the tree of corresponding pragma or attribute definition clause nodes.
1274 -- These generated nodes have the From_Aspect_Specification flag set to
1275 -- indicate that they came from aspect specifications originally.
1277 -- From_At_End (Flag4-Sem)
1278 -- This flag is set on an N_Raise_Statement node if it corresponds to
1279 -- the reraise statement generated as the last statement of an AT END
1280 -- handler when SJLJ exception handling is active. It is used to stop
1281 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1282 -- because if the restriction is set, the reraise is not generated.
1284 -- From_At_Mod (Flag4-Sem)
1285 -- This flag is set on the attribute definition clause node that is
1286 -- generated by a transformation of an at mod phrase in a record
1287 -- representation clause. This is used to give slightly different (Ada 83
1288 -- compatible) semantics to such a clause, namely it is used to specify a
1289 -- minimum acceptable alignment for the base type and all subtypes. In
1290 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1291 -- must be a multiple of the given value, and the representation clause
1292 -- is considered to be type specific instead of subtype specific.
1294 -- From_Conditional_Expression (Flag1-Sem)
1295 -- This flag is set on if and case statements generated by the expansion
1296 -- of if and case expressions respectively. The flag is used to suppress
1297 -- any finalization of controlled objects found within these statements.
1299 -- From_Default (Flag6-Sem)
1300 -- This flag is set on the subprogram renaming declaration created in an
1301 -- instance for a formal subprogram, when the formal is declared with a
1302 -- box, and there is no explicit actual. If the flag is present, the
1303 -- declaration is treated as an implicit reference to the formal in the
1306 -- Generalized_Indexing (Node4-Sem)
1307 -- Present in N_Indexed_Component nodes. Set for Indexed_Component nodes
1308 -- that are Ada 2012 container indexing operations. The value of the
1309 -- attribute is a function call (possibly dereferenced) that corresponds
1310 -- to the proper expansion of the source indexing operation. Before
1311 -- expansion, the source node is rewritten as the resolved generalized
1312 -- indexing. In ASIS mode, the expansion does not take place, so that
1313 -- the source is preserved and properly annotated with types.
1315 -- Generic_Parent (Node5-Sem)
1316 -- Generic_Parent is defined on declaration nodes that are instances. The
1317 -- value of Generic_Parent is the generic entity from which the instance
1318 -- is obtained. Generic_Parent is also defined for the renaming
1319 -- declarations and object declarations created for the actuals in an
1320 -- instantiation. The generic parent of such a declaration is the
1321 -- corresponding generic association in the Instantiation node.
1323 -- Generic_Parent_Type (Node4-Sem)
1324 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1325 -- actuals of formal private and derived types. Within the instance, the
1326 -- operations on the actual are those inherited from the parent. For a
1327 -- formal private type, the parent type is the generic type itself. The
1328 -- Generic_Parent_Type is also used in an instance to determine whether a
1329 -- private operation overrides an inherited one.
1331 -- Handler_List_Entry (Node2-Sem)
1332 -- This field is present in N_Object_Declaration nodes. It is set only
1333 -- for the Handler_Record entry generated for an exception in zero cost
1334 -- exception handling mode. It references the corresponding item in the
1335 -- handler list, and is used to delete this entry if the corresponding
1336 -- handler is deleted during optimization. For further details on why
1337 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1339 -- Has_Dereference_Action (Flag13-Sem)
1340 -- This flag is present in N_Explicit_Dereference nodes. It is set to
1341 -- indicate that the expansion has aready produced a call to primitive
1342 -- Dereference of a System.Checked_Pools.Checked_Pool implementation.
1343 -- Such dereference actions are produced for debugging purposes.
1345 -- Has_Dynamic_Length_Check (Flag10-Sem)
1346 -- This flag is present in all expression nodes. It is set to indicate
1347 -- that one of the routines in unit Checks has generated a length check
1348 -- action which has been inserted at the flagged node. This is used to
1349 -- avoid the generation of duplicate checks.
1351 -- Has_Dynamic_Range_Check (Flag12-Sem)
1352 -- This flag is present in N_Subtype_Declaration nodes and on all
1353 -- expression nodes. It is set to indicate that one of the routines in
1354 -- unit Checks has generated a range check action which has been inserted
1355 -- at the flagged node. This is used to avoid the generation of duplicate
1356 -- checks. Why does this occur on N_Subtype_Declaration nodes, what does
1357 -- it mean in that context???
1359 -- Has_Local_Raise (Flag8-Sem)
1360 -- Present in exception handler nodes. Set if the handler can be entered
1361 -- via a local raise that gets transformed to a goto statement. This will
1362 -- always be set if Local_Raise_Statements is non-empty, but can also be
1363 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
1364 -- nodes requiring generation of back end checks.
1366 -- Has_No_Elaboration_Code (Flag17-Sem)
1367 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1368 -- or not elaboration code is present for this unit. It is initially set
1369 -- true for subprogram specs and bodies and for all generic units and
1370 -- false for non-generic package specs and bodies. Gigi may set the flag
1371 -- in the non-generic package case if it determines that no elaboration
1372 -- code is generated. Note that this flag is not related to the
1373 -- Is_Preelaborated status, there can be preelaborated packages that
1374 -- generate elaboration code, and non-preelaborated packages which do
1375 -- not generate elaboration code.
1377 -- Has_Pragma_Suppress_All (Flag14-Sem)
1378 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1379 -- pragma appears anywhere in the unit. This accommodates the rather
1380 -- strange placement rules of other compilers (DEC permits it at the
1381 -- end of a unit, and Rational allows it as a program unit pragma). We
1382 -- allow it anywhere at all, and consider it equivalent to a pragma
1383 -- Suppress (All_Checks) appearing at the start of the configuration
1384 -- pragmas for the unit.
1386 -- Has_Private_View (Flag11-Sem)
1387 -- A flag present in generic nodes that have an entity, to indicate that
1388 -- the node has a private type. Used to exchange private and full
1389 -- declarations if the visibility at instantiation is different from the
1390 -- visibility at generic definition.
1392 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1393 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1394 -- flag the presence of a pragma Relative_Deadline.
1396 -- Has_Self_Reference (Flag13-Sem)
1397 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1398 -- of the expressions contains an access attribute reference to the
1399 -- enclosing type. Such a self-reference can only appear in default-
1400 -- initialized aggregate for a record type.
1402 -- Has_SP_Choice (Flag15-Sem)
1403 -- Present in all nodes containing a Discrete_Choices field (N_Variant,
1404 -- N_Case_Expression_Alternative, N_Case_Statement_Alternative). Set to
1405 -- True if the Discrete_Choices list has at least one occurrence of a
1406 -- statically predicated subtype.
1408 -- Has_Storage_Size_Pragma (Flag5-Sem)
1409 -- A flag present in an N_Task_Definition node to flag the presence of a
1410 -- Storage_Size pragma.
1412 -- Has_Wide_Character (Flag11-Sem)
1413 -- Present in string literals, set if any wide character (i.e. character
1414 -- code outside the Character range but within Wide_Character range)
1415 -- appears in the string. Used to implement pragma preference rules.
1417 -- Has_Wide_Wide_Character (Flag13-Sem)
1418 -- Present in string literals, set if any wide character (i.e. character
1419 -- code outside the Wide_Character range) appears in the string. Used to
1420 -- implement pragma preference rules.
1422 -- Header_Size_Added (Flag11-Sem)
1423 -- Present in N_Attribute_Reference nodes, set only for attribute
1424 -- Max_Size_In_Storage_Elements. The flag indicates that the size of the
1425 -- hidden list header used by the runtime finalization support has been
1426 -- added to the size of the prefix. The flag also prevents the infinite
1427 -- expansion of the same attribute in the said context.
1429 -- Hidden_By_Use_Clause (Elist4-Sem)
1430 -- An entity list present in use clauses that appear within
1431 -- instantiations. For the resolution of local entities, entities
1432 -- introduced by these use clauses have priority over global ones, and
1433 -- outer entities must be explicitly hidden/restored on exit.
1435 -- Implicit_With (Flag16-Sem)
1436 -- This flag is set in the N_With_Clause node that is implicitly
1437 -- generated for runtime units that are loaded by the expander, and also
1438 -- for package System, if it is loaded implicitly by a use of the
1439 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1442 -- Implicit_With_From_Instantiation (Flag12-Sem)
1443 -- Set in N_With_Clause nodes from generic instantiations.
1445 -- Import_Interface_Present (Flag16-Sem)
1446 -- This flag is set in an Interface or Import pragma if a matching
1447 -- pragma of the other kind is also present. This is used to avoid
1448 -- generating some unwanted error messages.
1450 -- Includes_Infinities (Flag11-Sem)
1451 -- This flag is present in N_Range nodes. It is set for the range of
1452 -- unconstrained float types defined in Standard, which include not only
1453 -- the given range of values, but also legitimately can include infinite
1454 -- values. This flag is false for any float type for which an explicit
1455 -- range is given by the programmer, even if that range is identical to
1456 -- the range for Float.
1458 -- Incomplete_View (Node2-Sem)
1459 -- Present in full type declarations that are completions of incomplete
1460 -- type declarations. Denotes the corresponding incomplete type
1461 -- declaration. Used to simplify the retrieval of primitive operations
1462 -- that may be declared between the partial and the full view of an
1465 -- Inherited_Discriminant (Flag13-Sem)
1466 -- This flag is present in N_Component_Association nodes. It indicates
1467 -- that a given component association in an extension aggregate is the
1468 -- value obtained from a constraint on an ancestor. Used to prevent
1469 -- double expansion when the aggregate has expansion delayed.
1471 -- Instance_Spec (Node5-Sem)
1472 -- This field is present in generic instantiation nodes, and also in
1473 -- formal package declaration nodes (formal package declarations are
1474 -- treated in a manner very similar to package instantiations). It points
1475 -- to the node for the spec of the instance, inserted as part of the
1476 -- semantic processing for instantiations in Sem_Ch12.
1478 -- Is_Accessibility_Actual (Flag13-Sem)
1479 -- Present in N_Parameter_Association nodes. True if the parameter is
1480 -- an extra actual that carries the accessibility level of the actual
1481 -- for an access parameter, in a function that dispatches on result and
1482 -- is called in a dispatching context. Used to prevent a formal/actual
1483 -- mismatch when the call is rewritten as a dispatching call.
1485 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1486 -- A flag set in a Block_Statement node to indicate that it is the
1487 -- expansion of an asynchronous entry call. Such a block needs cleanup
1488 -- handler to assure that the call is cancelled.
1490 -- Is_Boolean_Aspect (Flag16-Sem)
1491 -- Present in N_Aspect_Specification node. Set if the aspect is for a
1492 -- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1494 -- Is_Checked (Flag11-Sem)
1495 -- Present in N_Aspect_Specification and N_Pragma nodes. Set for an
1496 -- assertion aspect or pragma, or check pragma for an assertion, that
1497 -- is to be checked at run time. If either Is_Checked or Is_Ignored
1498 -- is set (they cannot both be set), then this means that the status of
1499 -- the pragma has been checked at the appropriate point and should not
1500 -- be further modified (in some cases these flags are copied when a
1501 -- pragma is rewritten).
1503 -- Is_Component_Left_Opnd (Flag13-Sem)
1504 -- Is_Component_Right_Opnd (Flag14-Sem)
1505 -- Present in concatenation nodes, to indicate that the corresponding
1506 -- operand is of the component type of the result. Used in resolving
1507 -- concatenation nodes in instances.
1509 -- Is_Delayed_Aspect (Flag14-Sem)
1510 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1511 -- come from aspect specifications, where the evaluation of the aspect
1512 -- must be delayed to the freeze point. This flag is also set True in
1513 -- the corresponding N_Aspect_Specification node.
1515 -- Is_Controlling_Actual (Flag16-Sem)
1516 -- This flag is set on in an expression that is a controlling argument in
1517 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1518 -- details of its use.
1520 -- Is_Disabled (Flag15-Sem)
1521 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1522 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1523 -- a Debug_Policy pragma that resulted in totally disabling the flagged
1524 -- aspect or policy as a result of using the GNAT-defined policy DISABLE.
1525 -- If this flag is set, the aspect or policy is not analyzed for semantic
1526 -- correctness, so any expressions etc will not be marked as analyzed.
1528 -- Is_Dynamic_Coextension (Flag18-Sem)
1529 -- Present in allocator nodes, to indicate that this is an allocator
1530 -- for an access discriminant of a dynamically allocated object. The
1531 -- coextension must be deallocated and finalized at the same time as
1532 -- the enclosing object.
1534 -- Is_Entry_Barrier_Function (Flag8-Sem)
1535 -- This flag is set in an N_Subprogram_Body node which is the expansion
1536 -- of an entry barrier from a protected entry body. It is used for the
1537 -- circuitry checking for incorrect use of Current_Task.
1539 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1540 -- This flag is set in an N_Function_Call node to indicate that the extra
1541 -- actuals to support a build-in-place style of call have been added to
1544 -- Is_Finalization_Wrapper (Flag9-Sem);
1545 -- This flag is present in N_Block_Statement nodes. It is set when the
1546 -- block acts as a wrapper of a handled construct which has controlled
1547 -- objects. The wrapper prevents interference between exception handlers
1548 -- and At_End handlers.
1550 -- Is_Ignored (Flag9-Sem)
1551 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1552 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1553 -- a Debug_Policy pragma that specified a policy of IGNORE, DISABLE, or
1554 -- OFF, for the pragma/aspect. If there was a Policy pragma specifying
1555 -- a Policy of ON or CHECK, then this flag is reset. If no Policy pragma
1556 -- gives a policy for the aspect or pragma, then there are two cases. For
1557 -- an assertion aspect or pragma (one of the assertion kinds allowed in
1558 -- an Assertion_Policy pragma), then Is_Ignored is set if assertions are
1559 -- ignored because of the absence of a -gnata switch. For any other
1560 -- aspects or pragmas, the flag is off. If this flag is set, the
1561 -- aspect/pragma is fully analyzed and checked for other syntactic
1562 -- and semantic errors, but it does not have any semantic effect.
1564 -- Is_In_Discriminant_Check (Flag11-Sem)
1565 -- This flag is present in a selected component, and is used to indicate
1566 -- that the reference occurs within a discriminant check. The
1567 -- significance is that optimizations based on assuming that the
1568 -- discriminant check has a correct value cannot be performed in this
1569 -- case (or the discriminant check may be optimized away).
1571 -- Is_Machine_Number (Flag11-Sem)
1572 -- This flag is set in an N_Real_Literal node to indicate that the value
1573 -- is a machine number. This avoids some unnecessary cases of converting
1574 -- real literals to machine numbers.
1576 -- Is_Null_Loop (Flag16-Sem)
1577 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1578 -- can be determined to be null at compile time. This is used to remove
1579 -- the loop entirely at expansion time.
1581 -- Is_Overloaded (Flag5-Sem)
1582 -- A flag present in all expression nodes. Used temporarily during
1583 -- overloading determination. The setting of this flag is not relevant
1584 -- once overloading analysis is complete.
1586 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1587 -- A flag present only in N_Op_Expon nodes. It is set when the
1588 -- exponentiation is of the form 2 ** N, where the type of N is an
1589 -- unsigned integral subtype whose size does not exceed the size of
1590 -- Standard_Integer (i.e. a type that can be safely converted to
1591 -- Natural), and the exponentiation appears as the right operand of an
1592 -- integer multiplication or an integer division where the dividend is
1593 -- unsigned. It is also required that overflow checking is off for both
1594 -- the exponentiation and the multiply/divide node. If this set of
1595 -- conditions holds, and the flag is set, then the division or
1596 -- multiplication can be (and is) converted to a shift.
1598 -- Is_Prefixed_Call (Flag17-Sem)
1599 -- This flag is set in a selected component within a generic unit, if
1600 -- it resolves to a prefixed call to a primitive operation. The flag
1601 -- is used to prevent accidental overloadings in an instance, when a
1602 -- primitive operation and a private record component may be homographs.
1604 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1605 -- A flag set in a Subprogram_Body block to indicate that it is the
1606 -- implementation of a protected subprogram. Such a body needs cleanup
1607 -- handler to make sure that the associated protected object is unlocked
1608 -- when the subprogram completes.
1610 -- Is_Static_Coextension (Flag14-Sem)
1611 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1612 -- of an object allocated on the stack rather than the heap.
1614 -- Is_Static_Expression (Flag6-Sem)
1615 -- Indicates that an expression is a static expression according to the
1616 -- rules in (RM 4.9). Note that it is possible for this flag to be set
1617 -- when Raises_Constraint_Error is also set. In practice almost all cases
1618 -- where a static expression is required do not allow an expression which
1619 -- raises Constraint_Error, so almost always, callers should call the
1620 -- Is_Ok_Static_Exprression routine instead of testing this flag. See
1621 -- spec of package Sem_Eval for full details on the use of this flag.
1623 -- Is_Subprogram_Descriptor (Flag16-Sem)
1624 -- Present in N_Object_Declaration, and set only for the object
1625 -- declaration generated for a subprogram descriptor in fast exception
1626 -- mode. See Exp_Ch11 for details of use.
1628 -- Is_Task_Allocation_Block (Flag6-Sem)
1629 -- A flag set in a Block_Statement node to indicate that it is the
1630 -- expansion of a task allocator, or the allocator of an object
1631 -- containing tasks. Such a block requires a cleanup handler to call
1632 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1633 -- allocated but not activated when the allocator completes abnormally.
1635 -- Is_Task_Master (Flag5-Sem)
1636 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1637 -- indicate that the construct is a task master (i.e. has declared tasks
1638 -- or declares an access to a task type).
1640 -- Itype (Node1-Sem)
1641 -- Used in N_Itype_Reference node to reference an itype for which it is
1642 -- important to ensure that it is defined. See description of this node
1643 -- for further details.
1645 -- Kill_Range_Check (Flag11-Sem)
1646 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1647 -- result should not be subjected to range checks. This is used for the
1648 -- implementation of Normalize_Scalars.
1650 -- Label_Construct (Node2-Sem)
1651 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1652 -- N_Block_Statement or N_Loop_Statement node to which the label
1653 -- declaration applies. This attribute is used both in the compiler and
1654 -- in the implementation of ASIS queries. The field is left empty for the
1655 -- special labels generated as part of expanding raise statements with a
1656 -- local exception handler.
1658 -- Library_Unit (Node4-Sem)
1659 -- In a stub node, Library_Unit points to the compilation unit node of
1660 -- the corresponding subunit.
1662 -- In a with clause node, Library_Unit points to the spec of the with'ed
1665 -- In a compilation unit node, the usage depends on the unit type:
1667 -- For a library unit body, Library_Unit points to the compilation unit
1668 -- node of the corresponding spec, unless it's a subprogram body with
1669 -- Acts_As_Spec set, in which case it points to itself.
1671 -- For a spec, Library_Unit points to the compilation unit node of the
1672 -- corresponding body, if present. The body will be present if the spec
1673 -- is or contains generics that we needed to instantiate. Similarly, the
1674 -- body will be present if we needed it for inlining purposes. Thus, if
1675 -- we have a spec/body pair, both of which are present, they point to
1676 -- each other via Library_Unit.
1678 -- For a subunit, Library_Unit points to the compilation unit node of
1681 -- Note that this field is not used to hold the parent pointer for child
1682 -- unit (which might in any case need to use it for some other purpose as
1683 -- described above). Instead for a child unit, implicit with's are
1684 -- generated for all parents.
1686 -- Local_Raise_Statements (Elist1)
1687 -- This field is present in exception handler nodes. It is set to
1688 -- No_Elist in the normal case. If there is at least one raise statement
1689 -- which can potentially be handled as a local raise, then this field
1690 -- points to a list of raise nodes, which are calls to a routine to raise
1691 -- an exception. These are raise nodes which can be optimized into gotos
1692 -- if the handler turns out to meet the conditions which permit this
1693 -- transformation. Note that this does NOT include instances of the
1694 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1695 -- handled by the back end (using the N_Push/N_Pop mechanism).
1697 -- Loop_Actions (List2-Sem)
1698 -- A list present in Component_Association nodes in array aggregates.
1699 -- Used to collect actions that must be executed within the loop because
1700 -- they may need to be evaluated anew each time through.
1702 -- Limited_View_Installed (Flag18-Sem)
1703 -- Present in With_Clauses and in package specifications. If set on
1704 -- with_clause, it indicates that this clause has created the current
1705 -- limited view of the designated package. On a package specification, it
1706 -- indicates that the limited view has already been created because the
1707 -- package is mentioned in a limited_with_clause in the closure of the
1708 -- unit being compiled.
1710 -- Local_Raise_Not_OK (Flag7-Sem)
1711 -- Present in N_Exception_Handler nodes. Set if the handler contains
1712 -- a construct (reraise statement, or call to subprogram in package
1713 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1714 -- for a local raise (one that could otherwise be converted to a goto).
1716 -- Must_Be_Byte_Aligned (Flag14-Sem)
1717 -- This flag is present in N_Attribute_Reference nodes. It can be set
1718 -- only for the Address and Unrestricted_Access attributes. If set it
1719 -- means that the object for which the address/access is given must be on
1720 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1721 -- of the object is to be made before taking the address (this copy is in
1722 -- the current scope on the stack frame). This is used for certain cases
1723 -- of code generated by the expander that passes parameters by address.
1725 -- The reason the copy is not made by the front end is that the back end
1726 -- has more information about type layout and may be able to (but is not
1727 -- guaranteed to) prevent making unnecessary copies.
1729 -- Must_Not_Freeze (Flag8-Sem)
1730 -- A flag present in all expression nodes. Normally expressions cause
1731 -- freezing as described in the RM. If this flag is set, then this is
1732 -- inhibited. This is used by the analyzer and expander to label nodes
1733 -- that are created by semantic analysis or expansion and which must not
1734 -- cause freezing even though they normally would. This flag is also
1735 -- present in an N_Subtype_Indication node, since we also use these in
1736 -- calls to Freeze_Expression.
1738 -- Next_Entity (Node2-Sem)
1739 -- Present in defining identifiers, defining character literals and
1740 -- defining operator symbols (i.e. in all entities). The entities of a
1741 -- scope are chained, and this field is used as the forward pointer for
1742 -- this list. See Einfo for further details.
1744 -- Next_Exit_Statement (Node3-Sem)
1745 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
1746 -- chained (in reverse order of appearance) from the First_Exit_Statement
1747 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
1748 -- the next entry on this chain (Empty = end of list).
1750 -- Next_Implicit_With (Node3-Sem)
1751 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1752 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1753 -- to prevent multiple with_clauses for the same unit in a given context.
1754 -- A postorder traversal of the tree whose nodes are units and whose
1755 -- links are with_clauses defines the order in which CodePeer must
1756 -- examine a compiled unit and its full context. This ordering ensures
1757 -- that any subprogram call is examined after the subprogram declaration
1760 -- Next_Named_Actual (Node4-Sem)
1761 -- Present in parameter association nodes. Set during semantic analysis
1762 -- to point to the next named parameter, where parameters are ordered by
1763 -- declaration order (as opposed to the actual order in the call, which
1764 -- may be different due to named associations). Not that this field
1765 -- points to the explicit actual parameter itself, not to the
1766 -- N_Parameter_Association node (its parent).
1768 -- Next_Pragma (Node1-Sem)
1769 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1770 -- nodes. Currently used for two purposes:
1772 -- Create a list of linked Check_Policy pragmas. The head of this list
1773 -- is stored in Opt.Check_Policy_List (which has further details).
1775 -- Used by processing for Pre/Postcondition pragmas to store a list of
1776 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1779 -- Used by processing for pragma SPARK_Mode to store multiple pragmas
1780 -- the apply to the same construct. These are visible/private mode for
1781 -- a package spec and declarative/statement mode for package body.
1783 -- Next_Rep_Item (Node5-Sem)
1784 -- Present in pragma nodes, attribute definition nodes, enumeration rep
1785 -- clauses, record rep clauses, aspect specification nodes. Used to link
1786 -- representation items that apply to an entity. See full description of
1787 -- First_Rep_Item field in Einfo for further details.
1789 -- Next_Use_Clause (Node3-Sem)
1790 -- While use clauses are active during semantic processing, they are
1791 -- chained from the scope stack entry, using Next_Use_Clause as a link
1792 -- pointer, with Empty marking the end of the list. The head pointer is
1793 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1794 -- processing (i.e. when Gigi sees the tree, the contents of this field
1795 -- is undefined and should not be read).
1797 -- No_Ctrl_Actions (Flag7-Sem)
1798 -- Present in N_Assignment_Statement to indicate that no Finalize nor
1799 -- Adjust should take place on this assignment even though the RHS is
1800 -- controlled. Also indicates that the primitive _assign should not be
1801 -- used for a tagged assignment. This is used in init procs and aggregate
1802 -- expansions where the generated assignments are initializations, not
1803 -- real assignments.
1805 -- No_Elaboration_Check (Flag14-Sem)
1806 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1807 -- that no elaboration check is needed on the call, because it appears in
1808 -- the context of a local Suppress pragma. This is used on calls within
1809 -- task bodies, where the actual elaboration checks are applied after
1810 -- analysis, when the local scope stack is not present.
1812 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1813 -- Present in N_With_Clause nodes. Set if the with clause is on the
1814 -- package or subprogram spec where the main unit is the corresponding
1815 -- body, and no entities of the with'ed unit are referenced by the spec
1816 -- (an entity may still be referenced in the body, so this flag is used
1817 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1820 -- No_Initialization (Flag13-Sem)
1821 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1822 -- object must not be initialized (by Initialize or call to an init
1823 -- proc). This is needed for controlled aggregates. When the Object
1824 -- declaration has an expression, this flag means that this expression
1825 -- should not be taken into account (needed for in place initialization
1826 -- with aggregates, and for object with an address clause, which are
1827 -- initialized with an assignment at freeze time).
1829 -- No_Minimize_Eliminate (Flag17-Sem)
1830 -- This flag is present in membership operator nodes (N_In/N_Not_In).
1831 -- It is used to indicate that processing for extended overflow checking
1832 -- modes is not required (this is used to prevent infinite recursion).
1834 -- No_Truncation (Flag17-Sem)
1835 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1836 -- only if the RM_Size of the source is greater than the RM_Size of the
1837 -- target for scalar operands. Normally in such a case we truncate some
1838 -- higher order bits of the source, and then sign/zero extend the result
1839 -- to form the output value. But if this flag is set, then we do not do
1840 -- any truncation, so for example, if an 8 bit input is converted to 5
1841 -- bit result which is in fact stored in 8 bits, then the high order
1842 -- three bits of the target result will be copied from the source. This
1843 -- is used for properly setting out of range values for use by pragmas
1844 -- Initialize_Scalars and Normalize_Scalars.
1846 -- Non_Aliased_Prefix (Flag18-Sem)
1847 -- Present in N_Attribute_Reference nodes. Set only for the case of an
1848 -- Unrestricted_Access reference whose prefix is non-aliased, which is
1849 -- the case that is permitted for Unrestricted_Access except when the
1850 -- expected type is a thin pointer to unconstrained array. This flag is
1851 -- to assist in detecting this illegal use of Unrestricted_Access.
1853 -- Null_Excluding_Subtype (Flag16)
1854 -- Present in N_Access_To_Object_Definition. Indicates that the subtype
1855 -- indication carries a null-exclusion indicator, which is distinct from
1856 -- the null-exclusion indicator that may precede the access keyword.
1858 -- Original_Discriminant (Node2-Sem)
1859 -- Present in identifiers. Used in references to discriminants that
1860 -- appear in generic units. Because the names of the discriminants may be
1861 -- different in an instance, we use this field to recover the position of
1862 -- the discriminant in the original type, and replace it with the
1863 -- discriminant at the same position in the instantiated type.
1865 -- Original_Entity (Node2-Sem)
1866 -- Present in numeric literals. Used to denote the named number that has
1867 -- been constant-folded into the given literal. If literal is from
1868 -- source, or the result of some other constant-folding operation, then
1869 -- Original_Entity is empty. This field is needed to handle properly
1870 -- named numbers in generic units, where the Associated_Node field
1871 -- interferes with the Entity field, making it impossible to preserve the
1872 -- original entity at the point of instantiation (ASIS problem).
1874 -- Others_Discrete_Choices (List1-Sem)
1875 -- When a case statement or variant is analyzed, the semantic checks
1876 -- determine the actual list of choices that correspond to an others
1877 -- choice. This list is materialized for later use by the expander and
1878 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1879 -- this materialized list of choices, which is in standard format for a
1880 -- list of discrete choices, except that of course it cannot contain an
1881 -- N_Others_Choice entry.
1883 -- Parameter_List_Truncated (Flag17-Sem)
1884 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1885 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated
1886 -- as a result of a First_Optional_Parameter specification in one of the
1887 -- pragmas Import_Function, Import_Procedure, or Import_Valued_Procedure.
1888 -- The truncation is done by the expander by removing trailing parameters
1889 -- from the argument list, in accordance with the set of rules allowing
1890 -- such parameter removal. In particular, parameters can be removed
1891 -- working from the end of the parameter list backwards up to and
1892 -- including the entry designated by First_Optional_Parameter in the
1893 -- Import pragma. Parameters can be removed if they are implicit and the
1894 -- default value is known at compile time value, including the use of
1895 -- the Null_Parameter attribute, or if explicit parameter values are
1896 -- present that match the corresponding defaults.
1898 -- Parent_Spec (Node4-Sem)
1899 -- For a library unit that is a child unit spec (package or subprogram
1900 -- declaration, generic declaration or instantiation, or library level
1901 -- rename, this field points to the compilation unit node for the parent
1902 -- package specification. This field is Empty for library bodies (the
1903 -- parent spec in this case can be found from the corresponding spec).
1905 -- Premature_Use (Node5-Sem)
1906 -- Present in N_Incomplete_Type_Declaration node. Used for improved
1907 -- error diagnostics: if there is a premature usage of an incomplete
1908 -- type, a subsequently generated error message indicates the position
1909 -- of its full declaration.
1911 -- Present_Expr (Uint3-Sem)
1912 -- Present in an N_Variant node. This has a meaningful value only after
1913 -- Gigi has back annotated the tree with representation information. At
1914 -- this point, it contains a reference to a gcc expression that depends
1915 -- on the values of one or more discriminants. Give a set of discriminant
1916 -- values, this expression evaluates to False (zero) if variant is not
1917 -- present, and True (non-zero) if it is present. See unit Repinfo for
1918 -- further details on gigi back annotation. This field is used during
1919 -- ASIS processing (data decomposition annex) to determine if a field is
1922 -- Print_In_Hex (Flag13-Sem)
1923 -- Set on an N_Integer_Literal node to indicate that the value should be
1924 -- printed in hexadecimal in the sprint listing. Has no effect on
1925 -- legality or semantics of program, only on the displayed output. This
1926 -- is used to clarify output from the packed array cases.
1928 -- Procedure_To_Call (Node2-Sem)
1929 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1930 -- and N_Extended_Return_Statement nodes. References the entity for the
1931 -- declaration of the procedure to be called to accomplish the required
1932 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1933 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1934 -- allocating the return value), and for the Deallocate procedure in the
1935 -- case of N_Free_Statement.
1937 -- Raises_Constraint_Error (Flag7-Sem)
1938 -- Set on an expression whose evaluation will definitely fail constraint
1939 -- error check. In the case of static expressions, this flag must be set
1940 -- accurately (and if it is set, the expression is typically illegal
1941 -- unless it appears as a non-elaborated branch of a short-circuit form).
1942 -- For a non-static expression, this flag may be set whenever an
1943 -- expression (e.g. an aggregate) is known to raise constraint error. If
1944 -- set, the expression definitely will raise CE if elaborated at runtime.
1945 -- If not set, the expression may or may not raise CE. In other words, on
1946 -- static expressions, the flag is set accurately, on non-static
1947 -- expressions it is set conservatively.
1949 -- Redundant_Use (Flag13-Sem)
1950 -- Present in nodes that can appear as an operand in a use clause or use
1951 -- type clause (identifiers, expanded names, attribute references). Set
1952 -- to indicate that a use is redundant (and therefore need not be undone
1955 -- Renaming_Exception (Node2-Sem)
1956 -- Present in N_Exception_Declaration node. Used to point back to the
1957 -- exception renaming for an exception declared within a subprogram.
1958 -- What happens is that an exception declared in a subprogram is moved
1959 -- to the library level with a unique name, and the original exception
1960 -- becomes a renaming. This link from the library level exception to the
1961 -- renaming declaration allows registering of the proper exception name.
1963 -- Return_Statement_Entity (Node5-Sem)
1964 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1965 -- Points to an E_Return_Statement representing the return statement.
1967 -- Return_Object_Declarations (List3)
1968 -- Present in N_Extended_Return_Statement. Points to a list initially
1969 -- containing a single N_Object_Declaration representing the return
1970 -- object. We use a list (instead of just a pointer to the object decl)
1971 -- because Analyze wants to insert extra actions on this list.
1973 -- Rounded_Result (Flag18-Sem)
1974 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1975 -- Used in the fixed-point cases to indicate that the result must be
1976 -- rounded as a result of the use of the 'Round attribute. Also used for
1977 -- integer N_Op_Divide nodes to indicate that the result should be
1978 -- rounded to the nearest integer (breaking ties away from zero), rather
1979 -- than truncated towards zero as usual. These rounded integer operations
1980 -- are the result of expansion of rounded fixed-point divide, conversion
1981 -- and multiplication operations.
1983 -- SCIL_Entity (Node4-Sem)
1984 -- Present in SCIL nodes. References the specific tagged type associated
1985 -- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
1986 -- the controlling type of the call; for an N_SCIL_Membership_Test node
1987 -- generated as part of testing membership in T'Class, this is T; for an
1988 -- N_SCIL_Dispatch_Table_Tag_Init node, this is the type being declared).
1990 -- SCIL_Controlling_Tag (Node5-Sem)
1991 -- Present in N_SCIL_Dispatching_Call nodes. References the controlling
1992 -- tag of a dispatching call. This is usually an N_Selected_Component
1993 -- node (for a _tag component), but may be an N_Object_Declaration or
1994 -- N_Parameter_Specification node in some cases (e.g., for a call to
1995 -- a classwide streaming operation or a call to an instance of
1996 -- Ada.Tags.Generic_Dispatching_Constructor).
1998 -- SCIL_Tag_Value (Node5-Sem)
1999 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
2000 -- of the value that is being tested.
2002 -- SCIL_Target_Prim (Node2-Sem)
2003 -- Present in N_SCIL_Dispatching_Call nodes. References the primitive
2004 -- operation named (statically) in a dispatching call.
2006 -- Scope (Node3-Sem)
2007 -- Present in defining identifiers, defining character literals and
2008 -- defining operator symbols (i.e. in all entities). The entities of a
2009 -- scope all use this field to reference the corresponding scope entity.
2010 -- See Einfo for further details.
2012 -- Shift_Count_OK (Flag4-Sem)
2013 -- A flag present in shift nodes to indicate that the shift count is
2014 -- known to be in range, i.e. is in the range from zero to word length
2015 -- minus one. If this flag is not set, then the shift count may be
2016 -- outside this range, i.e. larger than the word length, and the code
2017 -- must ensure that such shift counts give the appropriate result.
2019 -- Source_Type (Node1-Sem)
2020 -- Used in an N_Validate_Unchecked_Conversion node to point to the
2021 -- source type entity for the unchecked conversion instantiation
2022 -- which gigi must do size validation for.
2024 -- Split_PPC (Flag17)
2025 -- When a Pre or Post aspect specification is processed, it is broken
2026 -- into AND THEN sections. The left most section has Split_PPC set to
2027 -- False, indicating that it is the original specification (e.g. for
2028 -- posting errors). For other sections, Split_PPC is set to True.
2029 -- This flag is set in both the N_Aspect_Specification node itself,
2030 -- and in the pragma which is generated from this node.
2032 -- Storage_Pool (Node1-Sem)
2033 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2034 -- and N_Extended_Return_Statement nodes. References the entity for the
2035 -- storage pool to be used for the allocate or free call or for the
2036 -- allocation of the returned value from function. Empty indicates that
2037 -- the global default pool is to be used. Note that in the case
2038 -- of a return statement, this field is set only if the function returns
2039 -- value of a type whose size is not known at compile time on the
2042 -- Suppress_Assignment_Checks (Flag18-Sem)
2043 -- Used in generated N_Assignment_Statement nodes to suppress predicate
2044 -- and range checks in cases where the generated code knows that the
2045 -- value being assigned is in range and satisfies any predicate. Also
2046 -- can be set in N_Object_Declaration nodes, to similarly suppress any
2047 -- checks on the initializing value.
2049 -- Suppress_Loop_Warnings (Flag17-Sem)
2050 -- Used in N_Loop_Statement node to indicate that warnings within the
2051 -- body of the loop should be suppressed. This is set when the range
2052 -- of a FOR loop is known to be null, or is probably null (loop would
2053 -- only execute if invalid values are present).
2055 -- Target_Type (Node2-Sem)
2056 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
2057 -- type entity for the unchecked conversion instantiation which gigi must
2058 -- do size validation for.
2060 -- Then_Actions (List3-Sem)
2061 -- This field is present in if expression nodes. During code expansion
2062 -- we use the Insert_Actions procedure (in Exp_Util) to insert actions
2063 -- at an appropriate place in the tree to get elaborated at the right
2064 -- time. For if expressions, we have to be sure that the actions for
2065 -- for the Then branch are only elaborated if the condition is True.
2066 -- The Then_Actions field is used as a temporary parking place for
2067 -- these actions. The final tree is always rewritten to eliminate the
2068 -- need for this field, so in the tree passed to Gigi, this field is
2069 -- always set to No_List.
2071 -- Treat_Fixed_As_Integer (Flag14-Sem)
2072 -- This flag appears in operator nodes for divide, multiply, mod and rem
2073 -- on fixed-point operands. It indicates that the operands are to be
2074 -- treated as integer values, ignoring small values. This flag is only
2075 -- set as a result of expansion of fixed-point operations. Typically a
2076 -- fixed-point multiplication in the source generates subsidiary
2077 -- multiplication and division operations that work with the underlying
2078 -- integer values and have this flag set. Note that this flag is not
2079 -- needed on other arithmetic operations (add, neg, subtract etc.) since
2080 -- in these cases it is always the case that fixed is treated as integer.
2081 -- The Etype field MUST be set if this flag is set. The analyzer knows to
2082 -- leave such nodes alone, and whoever makes them must set the correct
2085 -- TSS_Elist (Elist3-Sem)
2086 -- Present in N_Freeze_Entity nodes. Holds an element list containing
2087 -- entries for each TSS (type support subprogram) associated with the
2088 -- frozen type. The elements of the list are the entities for the
2089 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
2090 -- if there are no type support subprograms for the type or if the freeze
2091 -- node is not for a type.
2093 -- Uneval_Old_Accept (Flag13-Sem)
2094 -- Present in N_Aspect_Specification nodes. Set if Opt.Uneval_Old is set
2095 -- to 'A' (accept) at the point where the aspect specification node is
2096 -- encountered. It is this setting that is relevant, rather than the
2097 -- setting at the point where a contract is finally analyzed after the
2098 -- usual delay till the freeze point.
2100 -- Uneval_Old_Warn (Flag18-Sem)
2101 -- Present in N_Aspect_Specification nodes. Set if Opt.Uneval_Old is set
2102 -- to 'W' (warn) at the point where the aspect specification node is
2103 -- encountered. It is this setting that is relevant, rather than the
2104 -- setting at the point where a contract is finally analyzed after the
2105 -- usual delay till the freeze point. If neither Uneval_Old_Accept nor
2106 -- Uneval_Old_Warn is set, then the default Error mode applies.
2108 -- Unreferenced_In_Spec (Flag7-Sem)
2109 -- Present in N_With_Clause nodes. Set if the with clause is on the
2110 -- package or subprogram spec where the main unit is the corresponding
2111 -- body, and is not referenced by the spec (it may still be referenced by
2112 -- the body, so this flag is used to generate the proper message (see
2113 -- Sem_Util.Check_Unused_Withs for details)
2115 -- Uninitialized_Variable (Node3-Sem)
2116 -- Present in N_Formal_Private_Type_Definition and in N_Private_
2117 -- Extension_Declarations. Indicates that a variable in a generic unit
2118 -- whose type is a formal private or derived type is read without being
2119 -- initialized. Used to warn if the corresponding actual type is not
2120 -- a fully initialized type.
2122 -- Used_Operations (Elist5-Sem)
2123 -- Present in N_Use_Type_Clause nodes. Holds the list of operations that
2124 -- are made potentially use-visible by the clause. Simplifies processing
2125 -- on exit from the scope of the use_type_clause, in particular in the
2126 -- case of Use_All_Type, when those operations several scopes.
2128 -- Was_Originally_Stub (Flag13-Sem)
2129 -- This flag is set in the node for a proper body that replaces stub.
2130 -- During the analysis procedure, stubs in some situations get rewritten
2131 -- by the corresponding bodies, and we set this flag to remember that
2132 -- this happened. Note that it is not good enough to rely on the use of
2133 -- Original_Node here because of the case of nested instantiations where
2134 -- the substituted node can be copied.
2136 -- Withed_Body (Node1-Sem)
2137 -- Present in N_With_Clause nodes. Set if the unit in whose context
2138 -- the with_clause appears instantiates a generic contained in the
2139 -- library unit of the with_clause and as a result loads its body.
2140 -- Used for a more precise unit traversal for CodePeer.
2142 --------------------------------------------------
2143 -- Note on Use of End_Label and End_Span Fields --
2144 --------------------------------------------------
2146 -- Several constructs have end lines:
2148 -- Loop Statement end loop [loop_IDENTIFIER];
2149 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
2150 -- Task Definition end [task_IDENTIFIER]
2151 -- Protected Definition end [protected_IDENTIFIER]
2152 -- Protected Body end [protected_IDENTIFIER]
2154 -- Block Statement end [block_IDENTIFIER];
2155 -- Subprogram Body end [DESIGNATOR];
2156 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
2157 -- Task Body end [task_IDENTIFIER];
2158 -- Accept Statement end [entry_IDENTIFIER]];
2159 -- Entry Body end [entry_IDENTIFIER];
2161 -- If Statement end if;
2162 -- Case Statement end case;
2164 -- Record Definition end record;
2165 -- Enumeration Definition );
2167 -- The End_Label and End_Span fields are used to mark the locations of
2168 -- these lines, and also keep track of the label in the case where a label
2171 -- For the first group above, the End_Label field of the corresponding node
2172 -- is used to point to the label identifier. In the case where there is no
2173 -- label in the source, the parser supplies a dummy identifier (with
2174 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
2175 -- marks the location of the token following the END token.
2177 -- For the second group, the use of End_Label is similar, but the End_Label
2178 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
2179 -- simply because in some cases there is no room in the parent node.
2181 -- For the third group, there is never any label, and instead of using
2182 -- End_Label, we use the End_Span field which gives the location of the
2183 -- token following END, relative to the starting Sloc of the construct,
2184 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
2185 -- following the End_Label.
2187 -- The record definition case is handled specially, we treat it as though
2188 -- it required an optional label which is never present, and so the parser
2189 -- always builds a dummy identifier with Comes From Source set False. The
2190 -- reason we do this, rather than using End_Span in this case, is that we
2191 -- want to generate a cross-ref entry for the end of a record, since it
2192 -- represents a scope for name declaration purposes.
2194 -- The enumeration definition case is handled in an exactly similar manner,
2195 -- building a dummy identifier to get a cross-reference.
2197 -- Note: the reason we store the difference as a Uint, instead of storing
2198 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
2199 -- distinguished from other types of values, and we count on all general
2200 -- use fields being self describing. To make things easier for clients,
2201 -- note that we provide function End_Location, and procedure
2202 -- Set_End_Location to allow access to the logical value (which is the
2203 -- Source_Ptr value for the end token).
2205 ---------------------
2206 -- Syntactic Nodes --
2207 ---------------------
2209 ---------------------
2210 -- 2.3 Identifier --
2211 ---------------------
2213 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
2214 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
2216 -- An IDENTIFIER shall not be a reserved word
2218 -- In the Ada grammar identifiers are the bottom level tokens which have
2219 -- very few semantics. Actual program identifiers are direct names. If
2220 -- we were being 100% honest with the grammar, then we would have a node
2221 -- called N_Direct_Name which would point to an identifier. However,
2222 -- that's too many extra nodes, so we just use the N_Identifier node
2223 -- directly as a direct name, and it contains the expression fields and
2224 -- Entity field that correspond to its use as a direct name. In those
2225 -- few cases where identifiers appear in contexts where they are not
2226 -- direct names (pragmas, pragma argument associations, attribute
2227 -- references and attribute definition clauses), the Chars field of the
2228 -- node contains the Name_Id for the identifier name.
2230 -- Note: in GNAT, a reserved word can be treated as an identifier in two
2231 -- cases. First, an incorrect use of a reserved word as an identifier is
2232 -- diagnosed and then treated as a normal identifier. Second, an
2233 -- attribute designator of the form of a reserved word (access, delta,
2234 -- digits, range) is treated as an identifier.
2236 -- Note: The set of letters that is permitted in an identifier depends
2237 -- on the character set in use. See package Csets for full details.
2240 -- Sloc points to identifier
2241 -- Chars (Name1) contains the Name_Id for the identifier
2242 -- Entity (Node4-Sem)
2243 -- Associated_Node (Node4-Sem)
2244 -- Original_Discriminant (Node2-Sem)
2245 -- Redundant_Use (Flag13-Sem)
2246 -- Atomic_Sync_Required (Flag14-Sem)
2247 -- Has_Private_View (Flag11-Sem) (set in generic units)
2248 -- plus fields for expression
2250 --------------------------
2251 -- 2.4 Numeric Literal --
2252 --------------------------
2254 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
2256 ----------------------------
2257 -- 2.4.1 Decimal Literal --
2258 ----------------------------
2260 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
2262 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
2264 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
2266 -- Decimal literals appear in the tree as either integer literal nodes
2267 -- or real literal nodes, depending on whether a period is present.
2269 -- Note: literal nodes appear as a result of direct use of literals
2270 -- in the source program, and also as the result of evaluating
2271 -- expressions at compile time. In the latter case, it is possible
2272 -- to construct real literals that have no syntactic representation
2273 -- using the standard literal format. Such literals are listed by
2274 -- Sprint using the notation [numerator / denominator].
2276 -- Note: the value of an integer literal node created by the front end
2277 -- is never outside the range of values of the base type. However, it
2278 -- can be the case that the created value is outside the range of the
2279 -- particular subtype. This happens in the case of integer overflows
2280 -- with checks suppressed.
2282 -- N_Integer_Literal
2283 -- Sloc points to literal
2284 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2285 -- has been constant-folded into its literal value.
2286 -- Intval (Uint3) contains integer value of literal
2287 -- plus fields for expression
2288 -- Print_In_Hex (Flag13-Sem)
2291 -- Sloc points to literal
2292 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2293 -- has been constant-folded into its literal value.
2294 -- Realval (Ureal3) contains real value of literal
2295 -- Corresponding_Integer_Value (Uint4-Sem)
2296 -- Is_Machine_Number (Flag11-Sem)
2297 -- plus fields for expression
2299 --------------------------
2300 -- 2.4.2 Based Literal --
2301 --------------------------
2303 -- BASED_LITERAL ::=
2304 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
2308 -- BASED_NUMERAL ::=
2309 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
2311 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
2313 -- Based literals appear in the tree as either integer literal nodes
2314 -- or real literal nodes, depending on whether a period is present.
2316 ----------------------------
2317 -- 2.5 Character Literal --
2318 ----------------------------
2320 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
2322 -- N_Character_Literal
2323 -- Sloc points to literal
2324 -- Chars (Name1) contains the Name_Id for the identifier
2325 -- Char_Literal_Value (Uint2) contains the literal value
2326 -- Entity (Node4-Sem)
2327 -- Associated_Node (Node4-Sem)
2328 -- Has_Private_View (Flag11-Sem) set in generic units.
2329 -- plus fields for expression
2331 -- Note: the Entity field will be missing (set to Empty) for character
2332 -- literals whose type is Standard.Wide_Character or Standard.Character
2333 -- or a type derived from one of these two. In this case the character
2334 -- literal stands for its own coding. The reason we take this irregular
2335 -- short cut is to avoid the need to build lots of junk defining
2336 -- character literal nodes.
2338 -------------------------
2339 -- 2.6 String Literal --
2340 -------------------------
2342 -- STRING LITERAL ::= "{STRING_ELEMENT}"
2344 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
2345 -- single GRAPHIC_CHARACTER other than a quotation mark.
2347 -- Is_Folded_In_Parser is True if the parser created this literal by
2348 -- folding a sequence of "&" operators. For example, if the source code
2349 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2350 -- is set. This flag is needed because the parser doesn't know about
2351 -- visibility, so the folded result might be wrong, and semantic
2352 -- analysis needs to check for that.
2355 -- Sloc points to literal
2356 -- Strval (Str3) contains Id of string value
2357 -- Has_Wide_Character (Flag11-Sem)
2358 -- Has_Wide_Wide_Character (Flag13-Sem)
2359 -- Is_Folded_In_Parser (Flag4)
2360 -- plus fields for expression
2366 -- A COMMENT starts with two adjacent hyphens and extends up to the
2367 -- end of the line. A COMMENT may appear on any line of a program.
2369 -- Comments are skipped by the scanner and do not appear in the tree.
2370 -- It is possible to reconstruct the position of comments with respect
2371 -- to the elements of the tree by using the source position (Sloc)
2372 -- pointers that appear in every tree node.
2378 -- PRAGMA ::= pragma IDENTIFIER
2379 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2381 -- Note that a pragma may appear in the tree anywhere a declaration
2382 -- or a statement may appear, as well as in some other situations
2383 -- which are explicitly documented.
2386 -- Sloc points to PRAGMA
2387 -- Next_Pragma (Node1-Sem)
2388 -- Pragma_Argument_Associations (List2) (set to No_List if none)
2389 -- Corresponding_Aspect (Node3-Sem) (set to Empty if not present)
2390 -- Pragma_Identifier (Node4)
2391 -- Next_Rep_Item (Node5-Sem)
2392 -- Class_Present (Flag6) set if from Aspect with 'Class
2393 -- From_Aspect_Specification (Flag13-Sem)
2394 -- Is_Delayed_Aspect (Flag14-Sem)
2395 -- Is_Disabled (Flag15-Sem)
2396 -- Is_Ignored (Flag9-Sem)
2397 -- Is_Checked (Flag11-Sem)
2398 -- Import_Interface_Present (Flag16-Sem)
2399 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2401 -- Note: we should have a section on what pragmas are passed on to
2402 -- the back end to be processed. This section should note that pragma
2403 -- Psect_Object is always converted to Common_Object, but there are
2404 -- undoubtedly many other similar notes required ???
2406 -- Note: a utility function Pragma_Name may be applied to pragma nodes
2407 -- to conveniently obtain the Chars field of the Pragma_Identifier.
2409 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2410 -- aspect name, as does the Pragma_Identifier. In this case if the
2411 -- pragma has a local name argument (such as pragma Inline), it is
2412 -- resolved to point to the specific entity affected by the pragma.
2414 --------------------------------------
2415 -- 2.8 Pragma Argument Association --
2416 --------------------------------------
2418 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2419 -- [pragma_argument_IDENTIFIER =>] NAME
2420 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2422 -- In Ada 2012, there are two more possibilities:
2424 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2425 -- [pragma_argument_ASPECT_MARK =>] NAME
2426 -- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
2428 -- where the interesting allowed cases (which do not fit the syntax of
2429 -- the first alternative above) are
2431 -- ASPECT_MARK => Pre'Class |
2433 -- Type_Invariant'Class |
2436 -- We allow this special usage in all Ada modes, but it would be a
2437 -- pain to allow these aspects to pervade the pragma syntax, and the
2438 -- representation of pragma nodes internally. So what we do is to
2439 -- replace these ASPECT_MARK forms with identifiers whose name is one
2440 -- of the special internal names _Pre, _Post or _Type_Invariant.
2442 -- We do a similar replacement of these Aspect_Mark forms in the
2443 -- Expression of a pragma argument association for the cases of
2444 -- the first arguments of any Check pragmas and Check_Policy pragmas
2446 -- N_Pragma_Argument_Association
2447 -- Sloc points to first token in association
2448 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2449 -- Expression (Node3)
2451 ------------------------
2452 -- 2.9 Reserved Word --
2453 ------------------------
2455 -- Reserved words are parsed by the scanner, and returned as the
2456 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2458 ----------------------------
2459 -- 3.1 Basic Declaration --
2460 ----------------------------
2462 -- BASIC_DECLARATION ::=
2463 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2464 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2465 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2466 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2467 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2468 -- | GENERIC_INSTANTIATION
2470 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2471 -- see further description in section on semantic nodes.
2473 -- Also, in the tree that is constructed, a pragma may appear
2474 -- anywhere that a declaration may appear.
2476 ------------------------------
2477 -- 3.1 Defining Identifier --
2478 ------------------------------
2480 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2482 -- A defining identifier is an entity, which has additional fields
2483 -- depending on the setting of the Ekind field. These additional
2484 -- fields are defined (and access subprograms declared) in package
2487 -- Note: N_Defining_Identifier is an extended node whose fields are
2488 -- deliberate layed out to match the layout of fields in an ordinary
2489 -- N_Identifier node allowing for easy alteration of an identifier
2490 -- node into a defining identifier node. For details, see procedure
2491 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2493 -- N_Defining_Identifier
2494 -- Sloc points to identifier
2495 -- Chars (Name1) contains the Name_Id for the identifier
2496 -- Next_Entity (Node2-Sem)
2497 -- Scope (Node3-Sem)
2498 -- Etype (Node5-Sem)
2500 -----------------------------
2501 -- 3.2.1 Type Declaration --
2502 -----------------------------
2504 -- TYPE_DECLARATION ::=
2505 -- FULL_TYPE_DECLARATION
2506 -- | INCOMPLETE_TYPE_DECLARATION
2507 -- | PRIVATE_TYPE_DECLARATION
2508 -- | PRIVATE_EXTENSION_DECLARATION
2510 ----------------------------------
2511 -- 3.2.1 Full Type Declaration --
2512 ----------------------------------
2514 -- FULL_TYPE_DECLARATION ::=
2515 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2516 -- is TYPE_DEFINITION
2517 -- [ASPECT_SPECIFICATIONS];
2518 -- | TASK_TYPE_DECLARATION
2519 -- | PROTECTED_TYPE_DECLARATION
2521 -- The full type declaration node is used only for the first case. The
2522 -- second case (concurrent type declaration), is represented directly
2523 -- by a task type declaration or a protected type declaration.
2525 -- N_Full_Type_Declaration
2526 -- Sloc points to TYPE
2527 -- Defining_Identifier (Node1)
2528 -- Incomplete_View (Node2-Sem)
2529 -- Discriminant_Specifications (List4) (set to No_List if none)
2530 -- Type_Definition (Node3)
2531 -- Discr_Check_Funcs_Built (Flag11-Sem)
2533 ----------------------------
2534 -- 3.2.1 Type Definition --
2535 ----------------------------
2537 -- TYPE_DEFINITION ::=
2538 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2539 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2540 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2541 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2543 --------------------------------
2544 -- 3.2.2 Subtype Declaration --
2545 --------------------------------
2547 -- SUBTYPE_DECLARATION ::=
2548 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
2549 -- [ASPECT_SPECIFICATIONS];
2551 -- The subtype indication field is set to Empty for subtypes
2552 -- declared in package Standard (Positive, Natural).
2554 -- N_Subtype_Declaration
2555 -- Sloc points to SUBTYPE
2556 -- Defining_Identifier (Node1)
2557 -- Null_Exclusion_Present (Flag11)
2558 -- Subtype_Indication (Node5)
2559 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2560 -- Exception_Junk (Flag8-Sem)
2561 -- Has_Dynamic_Range_Check (Flag12-Sem)
2563 -------------------------------
2564 -- 3.2.2 Subtype Indication --
2565 -------------------------------
2567 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2569 -- Note: if no constraint is present, the subtype indication appears
2570 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2571 -- node is used only if a constraint is present.
2573 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2574 -- with the null-exclusion part (see AI-231), we had to introduce a new
2575 -- attribute in all the parents of subtype_indication nodes to indicate
2576 -- if the null-exclusion is present.
2578 -- Note: the reason that this node has expression fields is that a
2579 -- subtype indication can appear as an operand of a membership test.
2581 -- N_Subtype_Indication
2582 -- Sloc points to first token of subtype mark
2583 -- Subtype_Mark (Node4)
2584 -- Constraint (Node3)
2585 -- Etype (Node5-Sem)
2586 -- Must_Not_Freeze (Flag8-Sem)
2588 -- Note: Depending on context, the Etype is either the entity of the
2589 -- Subtype_Mark field, or it is an itype constructed to reify the
2590 -- subtype indication. In particular, such itypes are created for a
2591 -- subtype indication that appears in an array type declaration. This
2592 -- simplifies constraint checking in indexed components.
2594 -- For subtype indications that appear in scalar type and subtype
2595 -- declarations, the Etype is the entity of the subtype mark.
2597 -------------------------
2598 -- 3.2.2 Subtype Mark --
2599 -------------------------
2601 -- SUBTYPE_MARK ::= subtype_NAME
2603 -----------------------
2604 -- 3.2.2 Constraint --
2605 -----------------------
2607 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2609 ------------------------------
2610 -- 3.2.2 Scalar Constraint --
2611 ------------------------------
2613 -- SCALAR_CONSTRAINT ::=
2614 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2616 ---------------------------------
2617 -- 3.2.2 Composite Constraint --
2618 ---------------------------------
2620 -- COMPOSITE_CONSTRAINT ::=
2621 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2623 -------------------------------
2624 -- 3.3.1 Object Declaration --
2625 -------------------------------
2627 -- OBJECT_DECLARATION ::=
2628 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2629 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2630 -- [ASPECT_SPECIFICATIONS];
2631 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2632 -- ACCESS_DEFINITION [:= EXPRESSION]
2633 -- [ASPECT_SPECIFICATIONS];
2634 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2635 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2636 -- [ASPECT_SPECIFICATIONS];
2637 -- | SINGLE_TASK_DECLARATION
2638 -- | SINGLE_PROTECTED_DECLARATION
2640 -- Note: aliased is not permitted in Ada 83 mode
2642 -- The N_Object_Declaration node is only for the first two cases.
2643 -- Single task declaration is handled by P_Task (9.1)
2644 -- Single protected declaration is handled by P_protected (9.5)
2646 -- Although the syntax allows multiple identifiers in the list, the
2647 -- semantics is as though successive declarations were given with
2648 -- identical type definition and expression components. To simplify
2649 -- semantic processing, the parser represents a multiple declaration
2650 -- case as a sequence of single declarations, using the More_Ids and
2651 -- Prev_Ids flags to preserve the original source form as described
2652 -- in the section on "Handling of Defining Identifier Lists".
2654 -- The flag Has_Init_Expression is set if an initializing expression
2655 -- is present. Normally it is set if and only if Expression contains
2656 -- a non-empty value, but there is an exception to this. When the
2657 -- initializing expression is an aggregate which requires explicit
2658 -- assignments, the Expression field gets set to Empty, but this flag
2659 -- is still set, so we don't forget we had an initializing expression.
2661 -- Note: if a range check is required for the initialization
2662 -- expression then the Do_Range_Check flag is set in the Expression,
2663 -- with the check being done against the type given by the object
2664 -- definition, which is also the Etype of the defining identifier.
2666 -- Note: the contents of the Expression field must be ignored (i.e.
2667 -- treated as though it were Empty) if No_Initialization is set True.
2669 -- Note: the back end places some restrictions on the form of the
2670 -- Expression field. If the object being declared is Atomic, then
2671 -- the Expression may not have the form of an aggregate (since this
2672 -- might cause the back end to generate separate assignments). In this
2673 -- case the front end must generate an extra temporary and initialize
2674 -- this temporary as required (the temporary itself is not atomic).
2676 -- Note: there is not node kind for object definition. Instead, the
2677 -- corresponding field holds a subtype indication, an array type
2678 -- definition, or (Ada 2005, AI-406) an access definition.
2680 -- N_Object_Declaration
2681 -- Sloc points to first identifier
2682 -- Defining_Identifier (Node1)
2683 -- Aliased_Present (Flag4)
2684 -- Constant_Present (Flag17) set if CONSTANT appears
2685 -- Null_Exclusion_Present (Flag11)
2686 -- Object_Definition (Node4) subtype indic./array type def./access def.
2687 -- Expression (Node3) (set to Empty if not present)
2688 -- Handler_List_Entry (Node2-Sem)
2689 -- Corresponding_Generic_Association (Node5-Sem)
2690 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2691 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2692 -- No_Initialization (Flag13-Sem)
2693 -- Assignment_OK (Flag15-Sem)
2694 -- Exception_Junk (Flag8-Sem)
2695 -- Is_Subprogram_Descriptor (Flag16-Sem)
2696 -- Has_Init_Expression (Flag14)
2697 -- Suppress_Assignment_Checks (Flag18-Sem)
2699 -------------------------------------
2700 -- 3.3.1 Defining Identifier List --
2701 -------------------------------------
2703 -- DEFINING_IDENTIFIER_LIST ::=
2704 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2706 -------------------------------
2707 -- 3.3.2 Number Declaration --
2708 -------------------------------
2710 -- NUMBER_DECLARATION ::=
2711 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2713 -- Although the syntax allows multiple identifiers in the list, the
2714 -- semantics is as though successive declarations were given with
2715 -- identical expressions. To simplify semantic processing, the parser
2716 -- represents a multiple declaration case as a sequence of single
2717 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2718 -- the original source form as described in the section on "Handling
2719 -- of Defining Identifier Lists".
2721 -- N_Number_Declaration
2722 -- Sloc points to first identifier
2723 -- Defining_Identifier (Node1)
2724 -- Expression (Node3)
2725 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2726 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2728 ----------------------------------
2729 -- 3.4 Derived Type Definition --
2730 ----------------------------------
2732 -- DERIVED_TYPE_DEFINITION ::=
2733 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2734 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2736 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2739 -- Note: a record extension part is required if ABSTRACT is present
2741 -- N_Derived_Type_Definition
2742 -- Sloc points to NEW
2743 -- Abstract_Present (Flag4)
2744 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2745 -- Subtype_Indication (Node5)
2746 -- Record_Extension_Part (Node3) (set to Empty if not present)
2747 -- Limited_Present (Flag17)
2748 -- Task_Present (Flag5) set in task interfaces
2749 -- Protected_Present (Flag6) set in protected interfaces
2750 -- Synchronized_Present (Flag7) set in interfaces
2751 -- Interface_List (List2) (set to No_List if none)
2752 -- Interface_Present (Flag16) set in abstract interfaces
2754 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2755 -- Interface_List, and Interface_Present are used for abstract
2756 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2758 ---------------------------
2759 -- 3.5 Range Constraint --
2760 ---------------------------
2762 -- RANGE_CONSTRAINT ::= range RANGE
2764 -- N_Range_Constraint
2765 -- Sloc points to RANGE
2766 -- Range_Expression (Node4)
2773 -- RANGE_ATTRIBUTE_REFERENCE
2774 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2776 -- Note: the case of a range given as a range attribute reference
2777 -- appears directly in the tree as an attribute reference.
2779 -- Note: the field name for a reference to a range is Range_Expression
2780 -- rather than Range, because range is a reserved keyword in Ada.
2782 -- Note: the reason that this node has expression fields is that a
2783 -- range can appear as an operand of a membership test. The Etype
2784 -- field is the type of the range (we do NOT construct an implicit
2785 -- subtype to represent the range exactly).
2788 -- Sloc points to ..
2789 -- Low_Bound (Node1)
2790 -- High_Bound (Node2)
2791 -- Includes_Infinities (Flag11)
2792 -- plus fields for expression
2794 -- Note: if the range appears in a context, such as a subtype
2795 -- declaration, where range checks are required on one or both of
2796 -- the expression fields, then type conversion nodes are inserted
2797 -- to represent the required checks.
2799 ----------------------------------------
2800 -- 3.5.1 Enumeration Type Definition --
2801 ----------------------------------------
2803 -- ENUMERATION_TYPE_DEFINITION ::=
2804 -- (ENUMERATION_LITERAL_SPECIFICATION
2805 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2807 -- Note: the Literals field in the node described below is null for
2808 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2809 -- which special processing handles these types as special cases.
2811 -- N_Enumeration_Type_Definition
2812 -- Sloc points to left parenthesis
2813 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2814 -- End_Label (Node4) (set to Empty if internally generated record)
2816 ----------------------------------------------
2817 -- 3.5.1 Enumeration Literal Specification --
2818 ----------------------------------------------
2820 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2821 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2823 ---------------------------------------
2824 -- 3.5.1 Defining Character Literal --
2825 ---------------------------------------
2827 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2829 -- A defining character literal is an entity, which has additional
2830 -- fields depending on the setting of the Ekind field. These
2831 -- additional fields are defined (and access subprograms declared)
2832 -- in package Einfo.
2834 -- Note: N_Defining_Character_Literal is an extended node whose fields
2835 -- are deliberate layed out to match the layout of fields in an ordinary
2836 -- N_Character_Literal node allowing for easy alteration of a character
2837 -- literal node into a defining character literal node. For details, see
2838 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2840 -- N_Defining_Character_Literal
2841 -- Sloc points to literal
2842 -- Chars (Name1) contains the Name_Id for the identifier
2843 -- Next_Entity (Node2-Sem)
2844 -- Scope (Node3-Sem)
2845 -- Etype (Node5-Sem)
2847 ------------------------------------
2848 -- 3.5.4 Integer Type Definition --
2849 ------------------------------------
2851 -- Note: there is an error in this rule in the latest version of the
2852 -- grammar, so we have retained the old rule pending clarification.
2854 -- INTEGER_TYPE_DEFINITION ::=
2855 -- SIGNED_INTEGER_TYPE_DEFINITION
2856 -- | MODULAR_TYPE_DEFINITION
2858 -------------------------------------------
2859 -- 3.5.4 Signed Integer Type Definition --
2860 -------------------------------------------
2862 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2863 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2865 -- Note: the Low_Bound and High_Bound fields are set to Empty
2866 -- for integer types defined in package Standard.
2868 -- N_Signed_Integer_Type_Definition
2869 -- Sloc points to RANGE
2870 -- Low_Bound (Node1)
2871 -- High_Bound (Node2)
2873 ------------------------------------
2874 -- 3.5.4 Modular Type Definition --
2875 ------------------------------------
2877 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2879 -- N_Modular_Type_Definition
2880 -- Sloc points to MOD
2881 -- Expression (Node3)
2883 ---------------------------------
2884 -- 3.5.6 Real Type Definition --
2885 ---------------------------------
2887 -- REAL_TYPE_DEFINITION ::=
2888 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2890 --------------------------------------
2891 -- 3.5.7 Floating Point Definition --
2892 --------------------------------------
2894 -- FLOATING_POINT_DEFINITION ::=
2895 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2897 -- Note: The Digits_Expression and Real_Range_Specifications fields
2898 -- are set to Empty for floating-point types declared in Standard.
2900 -- N_Floating_Point_Definition
2901 -- Sloc points to DIGITS
2902 -- Digits_Expression (Node2)
2903 -- Real_Range_Specification (Node4) (set to Empty if not present)
2905 -------------------------------------
2906 -- 3.5.7 Real Range Specification --
2907 -------------------------------------
2909 -- REAL_RANGE_SPECIFICATION ::=
2910 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2912 -- N_Real_Range_Specification
2913 -- Sloc points to RANGE
2914 -- Low_Bound (Node1)
2915 -- High_Bound (Node2)
2917 -----------------------------------
2918 -- 3.5.9 Fixed Point Definition --
2919 -----------------------------------
2921 -- FIXED_POINT_DEFINITION ::=
2922 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2924 --------------------------------------------
2925 -- 3.5.9 Ordinary Fixed Point Definition --
2926 --------------------------------------------
2928 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2929 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2931 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2933 -- N_Ordinary_Fixed_Point_Definition
2934 -- Sloc points to DELTA
2935 -- Delta_Expression (Node3)
2936 -- Real_Range_Specification (Node4)
2938 -------------------------------------------
2939 -- 3.5.9 Decimal Fixed Point Definition --
2940 -------------------------------------------
2942 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2943 -- delta static_EXPRESSION
2944 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2946 -- Note: decimal types are not permitted in Ada 83 mode
2948 -- N_Decimal_Fixed_Point_Definition
2949 -- Sloc points to DELTA
2950 -- Delta_Expression (Node3)
2951 -- Digits_Expression (Node2)
2952 -- Real_Range_Specification (Node4) (set to Empty if not present)
2954 ------------------------------
2955 -- 3.5.9 Digits Constraint --
2956 ------------------------------
2958 -- DIGITS_CONSTRAINT ::=
2959 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2961 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2962 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2964 -- N_Digits_Constraint
2965 -- Sloc points to DIGITS
2966 -- Digits_Expression (Node2)
2967 -- Range_Constraint (Node4) (set to Empty if not present)
2969 --------------------------------
2970 -- 3.6 Array Type Definition --
2971 --------------------------------
2973 -- ARRAY_TYPE_DEFINITION ::=
2974 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2976 -----------------------------------------
2977 -- 3.6 Unconstrained Array Definition --
2978 -----------------------------------------
2980 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2981 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2982 -- COMPONENT_DEFINITION
2984 -- Note: dimensionality of array is indicated by number of entries in
2985 -- the Subtype_Marks list, which has one entry for each dimension.
2987 -- N_Unconstrained_Array_Definition
2988 -- Sloc points to ARRAY
2989 -- Subtype_Marks (List2)
2990 -- Component_Definition (Node4)
2992 -----------------------------------
2993 -- 3.6 Index Subtype Definition --
2994 -----------------------------------
2996 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
2998 -- There is no explicit node in the tree for an index subtype
2999 -- definition since the N_Unconstrained_Array_Definition node
3000 -- incorporates the type marks which appear in this context.
3002 ---------------------------------------
3003 -- 3.6 Constrained Array Definition --
3004 ---------------------------------------
3006 -- CONSTRAINED_ARRAY_DEFINITION ::=
3007 -- array (DISCRETE_SUBTYPE_DEFINITION
3008 -- {, DISCRETE_SUBTYPE_DEFINITION})
3009 -- of COMPONENT_DEFINITION
3011 -- Note: dimensionality of array is indicated by number of entries
3012 -- in the Discrete_Subtype_Definitions list, which has one entry
3013 -- for each dimension.
3015 -- N_Constrained_Array_Definition
3016 -- Sloc points to ARRAY
3017 -- Discrete_Subtype_Definitions (List2)
3018 -- Component_Definition (Node4)
3020 -- Note: although the language allows the full syntax for discrete
3021 -- subtype definitions (i.e. a discrete subtype indication or a range),
3022 -- in the generated tree, we always rewrite these as N_Range nodes.
3024 --------------------------------------
3025 -- 3.6 Discrete Subtype Definition --
3026 --------------------------------------
3028 -- DISCRETE_SUBTYPE_DEFINITION ::=
3029 -- discrete_SUBTYPE_INDICATION | RANGE
3031 -------------------------------
3032 -- 3.6 Component Definition --
3033 -------------------------------
3035 -- COMPONENT_DEFINITION ::=
3036 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
3038 -- Note: although the syntax does not permit a component definition to
3039 -- be an anonymous array (and the parser will diagnose such an attempt
3040 -- with an appropriate message), it is possible for anonymous arrays
3041 -- to appear as component definitions. The semantics and back end handle
3042 -- this case properly, and the expander in fact generates such cases.
3043 -- Access_Definition is an optional field that gives support to
3044 -- Ada 2005 (AI-230). The parser generates nodes that have either the
3045 -- Subtype_Indication field or else the Access_Definition field.
3047 -- N_Component_Definition
3048 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
3049 -- Aliased_Present (Flag4)
3050 -- Null_Exclusion_Present (Flag11)
3051 -- Subtype_Indication (Node5) (set to Empty if not present)
3052 -- Access_Definition (Node3) (set to Empty if not present)
3054 -----------------------------
3055 -- 3.6.1 Index Constraint --
3056 -----------------------------
3058 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
3060 -- It is not in general possible to distinguish between discriminant
3061 -- constraints and index constraints at parse time, since a simple
3062 -- name could be either the subtype mark of a discrete range, or an
3063 -- expression in a discriminant association with no name. Either
3064 -- entry appears simply as the name, and the semantic parse must
3065 -- distinguish between the two cases. Thus we use a common tree
3066 -- node format for both of these constraint types.
3068 -- See Discriminant_Constraint for format of node
3070 ---------------------------
3071 -- 3.6.1 Discrete Range --
3072 ---------------------------
3074 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
3076 ----------------------------
3077 -- 3.7 Discriminant Part --
3078 ----------------------------
3080 -- DISCRIMINANT_PART ::=
3081 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
3083 ------------------------------------
3084 -- 3.7 Unknown Discriminant Part --
3085 ------------------------------------
3087 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
3089 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
3091 -- There is no explicit node in the tree for an unknown discriminant
3092 -- part. Instead the Unknown_Discriminants_Present flag is set in the
3095 ----------------------------------
3096 -- 3.7 Known Discriminant Part --
3097 ----------------------------------
3099 -- KNOWN_DISCRIMINANT_PART ::=
3100 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
3102 -------------------------------------
3103 -- 3.7 Discriminant Specification --
3104 -------------------------------------
3106 -- DISCRIMINANT_SPECIFICATION ::=
3107 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
3108 -- [:= DEFAULT_EXPRESSION]
3109 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
3110 -- [:= DEFAULT_EXPRESSION]
3112 -- Although the syntax allows multiple identifiers in the list, the
3113 -- semantics is as though successive specifications were given with
3114 -- identical type definition and expression components. To simplify
3115 -- semantic processing, the parser represents a multiple declaration
3116 -- case as a sequence of single specifications, using the More_Ids and
3117 -- Prev_Ids flags to preserve the original source form as described
3118 -- in the section on "Handling of Defining Identifier Lists".
3120 -- N_Discriminant_Specification
3121 -- Sloc points to first identifier
3122 -- Defining_Identifier (Node1)
3123 -- Null_Exclusion_Present (Flag11)
3124 -- Discriminant_Type (Node5) subtype mark or access parameter definition
3125 -- Expression (Node3) (set to Empty if no default expression)
3126 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3127 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3129 -----------------------------
3130 -- 3.7 Default Expression --
3131 -----------------------------
3133 -- DEFAULT_EXPRESSION ::= EXPRESSION
3135 ------------------------------------
3136 -- 3.7.1 Discriminant Constraint --
3137 ------------------------------------
3139 -- DISCRIMINANT_CONSTRAINT ::=
3140 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
3142 -- It is not in general possible to distinguish between discriminant
3143 -- constraints and index constraints at parse time, since a simple
3144 -- name could be either the subtype mark of a discrete range, or an
3145 -- expression in a discriminant association with no name. Either
3146 -- entry appears simply as the name, and the semantic parse must
3147 -- distinguish between the two cases. Thus we use a common tree
3148 -- node format for both of these constraint types.
3150 -- N_Index_Or_Discriminant_Constraint
3151 -- Sloc points to left paren
3152 -- Constraints (List1) points to list of discrete ranges or
3153 -- discriminant associations
3155 -------------------------------------
3156 -- 3.7.1 Discriminant Association --
3157 -------------------------------------
3159 -- DISCRIMINANT_ASSOCIATION ::=
3160 -- [discriminant_SELECTOR_NAME
3161 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
3163 -- Note: a discriminant association that has no selector name list
3164 -- appears directly as an expression in the tree.
3166 -- N_Discriminant_Association
3167 -- Sloc points to first token of discriminant association
3168 -- Selector_Names (List1) (always non-empty, since if no selector
3169 -- names are present, this node is not used, see comment above)
3170 -- Expression (Node3)
3172 ---------------------------------
3173 -- 3.8 Record Type Definition --
3174 ---------------------------------
3176 -- RECORD_TYPE_DEFINITION ::=
3177 -- [[abstract] tagged] [limited] RECORD_DEFINITION
3179 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
3181 -- There is no explicit node in the tree for a record type definition.
3182 -- Instead the flags for Tagged_Present and Limited_Present appear in
3183 -- the N_Record_Definition node for a record definition appearing in
3184 -- the context of a record type definition.
3186 ----------------------------
3187 -- 3.8 Record Definition --
3188 ----------------------------
3190 -- RECORD_DEFINITION ::=
3196 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
3197 -- flags appear only for a record definition appearing in a record
3200 -- Note: the NULL RECORD case is not permitted in Ada 83
3202 -- N_Record_Definition
3203 -- Sloc points to RECORD or NULL
3204 -- End_Label (Node4) (set to Empty if internally generated record)
3205 -- Abstract_Present (Flag4)
3206 -- Tagged_Present (Flag15)
3207 -- Limited_Present (Flag17)
3208 -- Component_List (Node1) empty in null record case
3209 -- Null_Present (Flag13) set in null record case
3210 -- Task_Present (Flag5) set in task interfaces
3211 -- Protected_Present (Flag6) set in protected interfaces
3212 -- Synchronized_Present (Flag7) set in interfaces
3213 -- Interface_Present (Flag16) set in abstract interfaces
3214 -- Interface_List (List2) (set to No_List if none)
3216 -- Note: Task_Present, Protected_Present, Synchronized _Present,
3217 -- Interface_List and Interface_Present are used for abstract
3218 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
3220 -------------------------
3221 -- 3.8 Component List --
3222 -------------------------
3224 -- COMPONENT_LIST ::=
3225 -- COMPONENT_ITEM {COMPONENT_ITEM}
3226 -- | {COMPONENT_ITEM} VARIANT_PART
3230 -- Sloc points to first token of component list
3231 -- Component_Items (List3)
3232 -- Variant_Part (Node4) (set to Empty if no variant part)
3233 -- Null_Present (Flag13)
3235 -------------------------
3236 -- 3.8 Component Item --
3237 -------------------------
3239 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
3241 -- Note: A component item can also be a pragma, and in the tree
3242 -- that is obtained after semantic processing, a component item
3243 -- can be an N_Null node resulting from a non-recognized pragma.
3245 --------------------------------
3246 -- 3.8 Component Declaration --
3247 --------------------------------
3249 -- COMPONENT_DECLARATION ::=
3250 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
3251 -- [:= DEFAULT_EXPRESSION]
3252 -- [ASPECT_SPECIFICATIONS];
3254 -- Note: although the syntax does not permit a component definition to
3255 -- be an anonymous array (and the parser will diagnose such an attempt
3256 -- with an appropriate message), it is possible for anonymous arrays
3257 -- to appear as component definitions. The semantics and back end handle
3258 -- this case properly, and the expander in fact generates such cases.
3260 -- Although the syntax allows multiple identifiers in the list, the
3261 -- semantics is as though successive declarations were given with the
3262 -- same component definition and expression components. To simplify
3263 -- semantic processing, the parser represents a multiple declaration
3264 -- case as a sequence of single declarations, using the More_Ids and
3265 -- Prev_Ids flags to preserve the original source form as described
3266 -- in the section on "Handling of Defining Identifier Lists".
3268 -- N_Component_Declaration
3269 -- Sloc points to first identifier
3270 -- Defining_Identifier (Node1)
3271 -- Component_Definition (Node4)
3272 -- Expression (Node3) (set to Empty if no default expression)
3273 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3274 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3276 -------------------------
3277 -- 3.8.1 Variant Part --
3278 -------------------------
3281 -- case discriminant_DIRECT_NAME is
3282 -- VARIANT {VARIANT}
3285 -- Note: the variants list can contain pragmas as well as variants.
3286 -- In a properly formed program there is at least one variant.
3289 -- Sloc points to CASE
3293 --------------------
3295 --------------------
3298 -- when DISCRETE_CHOICE_LIST =>
3302 -- Sloc points to WHEN
3303 -- Discrete_Choices (List4)
3304 -- Component_List (Node1)
3305 -- Enclosing_Variant (Node2-Sem)
3306 -- Present_Expr (Uint3-Sem)
3307 -- Dcheck_Function (Node5-Sem)
3308 -- Has_SP_Choice (Flag15-Sem)
3310 -- Note: in the list of Discrete_Choices, the tree passed to the back
3311 -- end does not have choice entries corresponding to names of statically
3312 -- predicated subtypes. Such entries are always expanded out to the list
3313 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
3314 -- mode also has this expansion, but done with a proper Rewrite call on
3315 -- the N_Variant node so that ASIS can properly retrieve the original.
3317 ---------------------------------
3318 -- 3.8.1 Discrete Choice List --
3319 ---------------------------------
3321 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
3323 ----------------------------
3324 -- 3.8.1 Discrete Choice --
3325 ----------------------------
3327 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
3329 -- Note: in Ada 83 mode, the expression must be a simple expression
3331 -- The only choice that appears explicitly is the OTHERS choice, as
3332 -- defined here. Other cases of discrete choice (expression and
3333 -- discrete range) appear directly. This production is also used
3334 -- for the OTHERS possibility of an exception choice.
3336 -- Note: in accordance with the syntax, the parser does not check that
3337 -- OTHERS appears at the end on its own in a choice list context. This
3338 -- is a semantic check.
3341 -- Sloc points to OTHERS
3342 -- Others_Discrete_Choices (List1-Sem)
3343 -- All_Others (Flag11-Sem)
3345 ----------------------------------
3346 -- 3.9.1 Record Extension Part --
3347 ----------------------------------
3349 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
3351 -- Note: record extension parts are not permitted in Ada 83 mode
3353 --------------------------------------
3354 -- 3.9.4 Interface Type Definition --
3355 --------------------------------------
3357 -- INTERFACE_TYPE_DEFINITION ::=
3358 -- [limited | task | protected | synchronized]
3359 -- interface [interface_list]
3361 -- Note: Interfaces are implemented with N_Record_Definition and
3362 -- N_Derived_Type_Definition nodes because most of the support
3363 -- for the analysis of abstract types has been reused to
3364 -- analyze abstract interfaces.
3366 ----------------------------------
3367 -- 3.10 Access Type Definition --
3368 ----------------------------------
3370 -- ACCESS_TYPE_DEFINITION ::=
3371 -- ACCESS_TO_OBJECT_DEFINITION
3372 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3374 --------------------------
3375 -- 3.10 Null Exclusion --
3376 --------------------------
3378 -- NULL_EXCLUSION ::= not null
3380 ---------------------------------------
3381 -- 3.10 Access To Object Definition --
3382 ---------------------------------------
3384 -- ACCESS_TO_OBJECT_DEFINITION ::=
3385 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3386 -- SUBTYPE_INDICATION
3388 -- N_Access_To_Object_Definition
3389 -- Sloc points to ACCESS
3390 -- All_Present (Flag15)
3391 -- Null_Exclusion_Present (Flag11)
3392 -- Null_Excluding_Subtype (Flag16)
3393 -- Subtype_Indication (Node5)
3394 -- Constant_Present (Flag17)
3396 -----------------------------------
3397 -- 3.10 General Access Modifier --
3398 -----------------------------------
3400 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3402 -- Note: general access modifiers are not permitted in Ada 83 mode
3404 -- There is no explicit node in the tree for general access modifier.
3405 -- Instead the All_Present or Constant_Present flags are set in the
3408 -------------------------------------------
3409 -- 3.10 Access To Subprogram Definition --
3410 -------------------------------------------
3412 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3413 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3414 -- | [NULL_EXCLUSION] access [protected] function
3415 -- PARAMETER_AND_RESULT_PROFILE
3417 -- Note: access to subprograms are not permitted in Ada 83 mode
3419 -- N_Access_Function_Definition
3420 -- Sloc points to ACCESS
3421 -- Null_Exclusion_Present (Flag11)
3422 -- Null_Exclusion_In_Return_Present (Flag14)
3423 -- Protected_Present (Flag6)
3424 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3425 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3427 -- N_Access_Procedure_Definition
3428 -- Sloc points to ACCESS
3429 -- Null_Exclusion_Present (Flag11)
3430 -- Protected_Present (Flag6)
3431 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3433 -----------------------------
3434 -- 3.10 Access Definition --
3435 -----------------------------
3437 -- ACCESS_DEFINITION ::=
3438 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3439 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3441 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3443 -- N_Access_Definition
3444 -- Sloc points to ACCESS
3445 -- Null_Exclusion_Present (Flag11)
3446 -- All_Present (Flag15)
3447 -- Constant_Present (Flag17)
3448 -- Subtype_Mark (Node4)
3449 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3451 -----------------------------------------
3452 -- 3.10.1 Incomplete Type Declaration --
3453 -----------------------------------------
3455 -- INCOMPLETE_TYPE_DECLARATION ::=
3456 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3458 -- N_Incomplete_Type_Declaration
3459 -- Sloc points to TYPE
3460 -- Defining_Identifier (Node1)
3461 -- Discriminant_Specifications (List4) (set to No_List if no
3462 -- discriminant part, or if the discriminant part is an
3463 -- unknown discriminant part)
3464 -- Premature_Use (Node5-Sem) used for improved diagnostics.
3465 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3466 -- Tagged_Present (Flag15)
3468 ----------------------------
3469 -- 3.11 Declarative Part --
3470 ----------------------------
3472 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3474 -- Note: although the parser enforces the syntactic requirement that
3475 -- a declarative part can contain only declarations, the semantic
3476 -- processing may add statements to the list of actions in a
3477 -- declarative part, so the code generator should be prepared
3478 -- to accept a statement in this position.
3480 ----------------------------
3481 -- 3.11 Declarative Item --
3482 ----------------------------
3484 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3486 ----------------------------------
3487 -- 3.11 Basic Declarative Item --
3488 ----------------------------------
3490 -- BASIC_DECLARATIVE_ITEM ::=
3491 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3497 -- BODY ::= PROPER_BODY | BODY_STUB
3499 -----------------------
3500 -- 3.11 Proper Body --
3501 -----------------------
3504 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3511 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3512 -- | INDEXED_COMPONENT | SLICE
3513 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3514 -- | TYPE_CONVERSION | FUNCTION_CALL
3515 -- | CHARACTER_LITERAL
3517 ----------------------
3518 -- 4.1 Direct Name --
3519 ----------------------
3521 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3527 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3529 -------------------------------
3530 -- 4.1 Explicit Dereference --
3531 -------------------------------
3533 -- EXPLICIT_DEREFERENCE ::= NAME . all
3535 -- N_Explicit_Dereference
3536 -- Sloc points to ALL
3538 -- Actual_Designated_Subtype (Node4-Sem)
3539 -- Atomic_Sync_Required (Flag14-Sem)
3540 -- Has_Dereference_Action (Flag13-Sem)
3541 -- plus fields for expression
3543 -------------------------------
3544 -- 4.1 Implicit Dereference --
3545 -------------------------------
3547 -- IMPLICIT_DEREFERENCE ::= NAME
3549 ------------------------------
3550 -- 4.1.1 Indexed Component --
3551 ------------------------------
3553 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3555 -- Note: the parser may generate this node in some situations where it
3556 -- should be a function call. The semantic pass must correct this
3557 -- misidentification (which is inevitable at the parser level).
3559 -- N_Indexed_Component
3560 -- Sloc contains a copy of the Sloc value of the Prefix
3562 -- Expressions (List1)
3563 -- Generalized_Indexing (Node4-Sem)
3564 -- Atomic_Sync_Required (Flag14-Sem)
3565 -- plus fields for expression
3567 -- Note: if any of the subscripts requires a range check, then the
3568 -- Do_Range_Check flag is set on the corresponding expression, with
3569 -- the index type being determined from the type of the Prefix, which
3570 -- references the array being indexed.
3572 -- Note: in a fully analyzed and expanded indexed component node, and
3573 -- hence in any such node that gigi sees, if the prefix is an access
3574 -- type, then an explicit dereference operation has been inserted.
3580 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3582 -- Note: an implicit subtype is created to describe the resulting
3583 -- type, so that the bounds of this type are the bounds of the slice.
3586 -- Sloc points to first token of prefix
3588 -- Discrete_Range (Node4)
3589 -- plus fields for expression
3591 -------------------------------
3592 -- 4.1.3 Selected Component --
3593 -------------------------------
3595 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3597 -- Note: selected components that are semantically expanded names get
3598 -- changed during semantic processing into the separate N_Expanded_Name
3599 -- node. See description of this node in the section on semantic nodes.
3601 -- N_Selected_Component
3602 -- Sloc points to period
3604 -- Selector_Name (Node2)
3605 -- Associated_Node (Node4-Sem)
3606 -- Do_Discriminant_Check (Flag1-Sem)
3607 -- Is_In_Discriminant_Check (Flag11-Sem)
3608 -- Is_Prefixed_Call (Flag17-Sem)
3609 -- Atomic_Sync_Required (Flag14-Sem)
3610 -- plus fields for expression
3612 --------------------------
3613 -- 4.1.3 Selector Name --
3614 --------------------------
3616 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3618 --------------------------------
3619 -- 4.1.4 Attribute Reference --
3620 --------------------------------
3622 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3624 -- Note: the syntax is quite ambiguous at this point. Consider:
3626 -- A'Length (X) X is part of the attribute designator
3627 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3628 -- A'Class (X) X is the expression of a type conversion
3630 -- It would be possible for the parser to distinguish these cases
3631 -- by looking at the attribute identifier. However, that would mean
3632 -- more work in introducing new implementation defined attributes,
3633 -- and also it would mean that special processing for attributes
3634 -- would be scattered around, instead of being centralized in the
3635 -- semantic routine that handles an N_Attribute_Reference node.
3636 -- Consequently, the parser in all the above cases stores the
3637 -- expression (X in these examples) as a single element list in
3638 -- in the Expressions field of the N_Attribute_Reference node.
3640 -- Similarly, for attributes like Max which take two arguments,
3641 -- we store the two arguments as a two element list in the
3642 -- Expressions field. Of course it is clear at parse time that
3643 -- this case is really a function call with an attribute as the
3644 -- prefix, but it turns out to be convenient to handle the two
3645 -- argument case in a similar manner to the one argument case,
3646 -- and indeed in general the parser will accept any number of
3647 -- expressions in this position and store them as a list in the
3648 -- attribute reference node. This allows for future addition of
3649 -- attributes that take more than two arguments.
3651 -- Note: named associates are not permitted in function calls where
3652 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3653 -- to skip the normal subprogram argument processing.
3655 -- Note: for the attributes whose designators are technically keywords,
3656 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3657 -- the corresponding name, even though no identifier is involved.
3659 -- Note: the generated code may contain stream attributes applied to
3660 -- limited types for which no stream routines exist officially. In such
3661 -- case, the result is to use the stream attribute for the underlying
3662 -- full type, or in the case of a protected type, the components
3663 -- (including any discriminants) are merely streamed in order.
3665 -- See Exp_Attr for a complete description of which attributes are
3666 -- passed onto Gigi, and which are handled entirely by the front end.
3668 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3669 -- a non-standard enumeration type or a nonzero/zero semantics
3670 -- boolean type, so the value is simply the stored representation.
3672 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3673 -- references a subprogram that is a renaming, then the front end must
3674 -- rewrite the attribute to refer directly to the renamed entity.
3676 -- Note: syntactically the prefix of an attribute reference must be a
3677 -- name, and this (somewhat artificial) requirement is enforced by the
3678 -- parser. However, for many attributes, such as 'Valid, it is quite
3679 -- reasonable to apply the attribute to any value, and hence to any
3680 -- expression. Internally in the tree, the prefix is an expression which
3681 -- does not have to be a name, and this is handled fine by the semantic
3682 -- analysis and expansion, and back ends. This arises for the case of
3683 -- attribute references built by the expander (e.g. 'Valid for the case
3684 -- of an implicit validity check).
3686 -- Note: In generated code, the Address and Unrestricted_Access
3687 -- attributes can be applied to any expression, and the meaning is
3688 -- to create an object containing the value (the object is in the
3689 -- current stack frame), and pass the address of this value. If the
3690 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3691 -- is taken must be on a byte (storage unit) boundary, and if it is
3692 -- not (or may not be), then the generated code must create a copy
3693 -- that is byte aligned, and pass the address of this copy.
3695 -- N_Attribute_Reference
3696 -- Sloc points to apostrophe
3697 -- Prefix (Node3) (general expression, see note above)
3698 -- Attribute_Name (Name2) identifier name from attribute designator
3699 -- Expressions (List1) (set to No_List if no associated expressions)
3700 -- Entity (Node4-Sem) used if the attribute yields a type
3701 -- Associated_Node (Node4-Sem)
3702 -- Do_Overflow_Check (Flag17-Sem)
3703 -- Header_Size_Added (Flag11-Sem)
3704 -- Must_Be_Byte_Aligned (Flag14-Sem)
3705 -- Non_Aliased_Prefix (Flag18-Sem)
3706 -- Redundant_Use (Flag13-Sem)
3708 -- plus fields for expression
3710 -- Note: in Modify_Tree_For_C mode, Max and Min attributes are expanded
3711 -- into equivalent if expressions, properly taking care of side effects.
3713 ---------------------------------
3714 -- 4.1.4 Attribute Designator --
3715 ---------------------------------
3717 -- ATTRIBUTE_DESIGNATOR ::=
3718 -- IDENTIFIER [(static_EXPRESSION)]
3719 -- | access | delta | digits
3721 -- There is no explicit node in the tree for an attribute designator.
3722 -- Instead the Attribute_Name and Expressions fields of the parent
3723 -- node (N_Attribute_Reference node) hold the information.
3725 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3726 -- designator, then they are treated as identifiers internally
3727 -- rather than the keywords of the same name.
3729 --------------------------------------
3730 -- 4.1.4 Range Attribute Reference --
3731 --------------------------------------
3733 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3735 -- A range attribute reference is represented in the tree using the
3736 -- normal N_Attribute_Reference node.
3738 ---------------------------------------
3739 -- 4.1.4 Range Attribute Designator --
3740 ---------------------------------------
3742 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3744 -- A range attribute designator is represented in the tree using the
3745 -- normal N_Attribute_Reference node.
3747 --------------------
3749 --------------------
3752 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3754 -----------------------------
3755 -- 4.3.1 Record Aggregate --
3756 -----------------------------
3758 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3761 -- Sloc points to left parenthesis
3762 -- Expressions (List1) (set to No_List if none or null record case)
3763 -- Component_Associations (List2) (set to No_List if none)
3764 -- Null_Record_Present (Flag17)
3765 -- Aggregate_Bounds (Node3-Sem)
3766 -- Associated_Node (Node4-Sem)
3767 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3768 -- Expansion_Delayed (Flag11-Sem)
3769 -- Has_Self_Reference (Flag13-Sem)
3770 -- plus fields for expression
3772 -- Note: this structure is used for both record and array aggregates
3773 -- since the two cases are not separable by the parser. The parser
3774 -- makes no attempt to enforce consistency here, so it is up to the
3775 -- semantic phase to make sure that the aggregate is consistent (i.e.
3776 -- that it is not a "half-and-half" case that mixes record and array
3777 -- syntax. In particular, for a record aggregate, the expressions
3778 -- field will be set if there are positional associations.
3780 -- Note: N_Aggregate is not used for all aggregates; in particular,
3781 -- there is a separate node kind for extension aggregates.
3783 -- Note: gigi/gcc can handle array aggregates correctly providing that
3784 -- they are entirely positional, and the array subtype involved has a
3785 -- known at compile time length and is not bit packed, or a convention
3786 -- Fortran array with more than one dimension. If these conditions
3787 -- are not met, then the front end must translate the aggregate into
3788 -- an appropriate set of assignments into a temporary.
3790 -- Note: for the record aggregate case, gigi/gcc can handle most cases
3791 -- of record aggregates, including those for packed, and rep-claused
3792 -- records, and also variant records, providing that there are no
3793 -- variable length fields whose size is not known at compile time,
3794 -- and providing that the aggregate is presented in fully named form.
3796 -- The other situation in which array aggregates and record aggregates
3797 -- cannot be passed to the back end is if assignment to one or more
3798 -- components itself needs expansion, e.g. in the case of an assignment
3799 -- of an object of a controlled type. In such cases, the front end
3800 -- must expand the aggregate to a series of assignments, and apply
3801 -- the required expansion to the individual assignment statements.
3803 ----------------------------------------------
3804 -- 4.3.1 Record Component Association List --
3805 ----------------------------------------------
3807 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3808 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3811 -- There is no explicit node in the tree for a record component
3812 -- association list. Instead the Null_Record_Present flag is set in
3813 -- the parent node for the NULL RECORD case.
3815 ------------------------------------------------------
3816 -- 4.3.1 Record Component Association (also 4.3.3) --
3817 ------------------------------------------------------
3819 -- RECORD_COMPONENT_ASSOCIATION ::=
3820 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3822 -- N_Component_Association
3823 -- Sloc points to first selector name
3825 -- Loop_Actions (List2-Sem)
3826 -- Expression (Node3) (empty if Box_Present)
3827 -- Box_Present (Flag15)
3828 -- Inherited_Discriminant (Flag13)
3830 -- Note: this structure is used for both record component associations
3831 -- and array component associations, since the two cases aren't always
3832 -- separable by the parser. The choices list may represent either a
3833 -- list of selector names in the record aggregate case, or a list of
3834 -- discrete choices in the array aggregate case or an N_Others_Choice
3835 -- node (which appears as a singleton list). Box_Present gives support
3836 -- to Ada 2005 (AI-287).
3838 ----------------------------------
3839 -- 4.3.1 Component Choice List --
3840 ----------------------------------
3842 -- COMPONENT_CHOICE_LIST ::=
3843 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3846 -- The entries of a component choice list appear in the Choices list of
3847 -- the associated N_Component_Association, as either selector names, or
3848 -- as an N_Others_Choice node.
3850 --------------------------------
3851 -- 4.3.2 Extension Aggregate --
3852 --------------------------------
3854 -- EXTENSION_AGGREGATE ::=
3855 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3857 -- Note: extension aggregates are not permitted in Ada 83 mode
3859 -- N_Extension_Aggregate
3860 -- Sloc points to left parenthesis
3861 -- Ancestor_Part (Node3)
3862 -- Associated_Node (Node4-Sem)
3863 -- Expressions (List1) (set to No_List if none or null record case)
3864 -- Component_Associations (List2) (set to No_List if none)
3865 -- Null_Record_Present (Flag17)
3866 -- Expansion_Delayed (Flag11-Sem)
3867 -- Has_Self_Reference (Flag13-Sem)
3868 -- plus fields for expression
3870 --------------------------
3871 -- 4.3.2 Ancestor Part --
3872 --------------------------
3874 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3876 ----------------------------
3877 -- 4.3.3 Array Aggregate --
3878 ----------------------------
3880 -- ARRAY_AGGREGATE ::=
3881 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3883 ---------------------------------------
3884 -- 4.3.3 Positional Array Aggregate --
3885 ---------------------------------------
3887 -- POSITIONAL_ARRAY_AGGREGATE ::=
3888 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3889 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3891 -- See Record_Aggregate (4.3.1) for node structure
3893 ----------------------------------
3894 -- 4.3.3 Named Array Aggregate --
3895 ----------------------------------
3897 -- NAMED_ARRAY_AGGREGATE ::=
3898 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3900 -- See Record_Aggregate (4.3.1) for node structure
3902 ----------------------------------------
3903 -- 4.3.3 Array Component Association --
3904 ----------------------------------------
3906 -- ARRAY_COMPONENT_ASSOCIATION ::=
3907 -- DISCRETE_CHOICE_LIST => EXPRESSION
3909 -- See Record_Component_Association (4.3.1) for node structure
3911 --------------------------------------------------
3912 -- 4.4 Expression/Relation/Term/Factor/Primary --
3913 --------------------------------------------------
3916 -- RELATION {LOGICAL_OPERATOR RELATION}
3918 -- CHOICE_EXPRESSION ::=
3919 -- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
3921 -- CHOICE_RELATION ::=
3922 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3925 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
3926 -- | RAISE_EXPRESSION
3928 -- MEMBERSHIP_CHOICE_LIST ::=
3929 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
3931 -- MEMBERSHIP_CHOICE ::=
3932 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
3934 -- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
3936 -- SIMPLE_EXPRESSION ::=
3937 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3939 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3941 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3943 -- No nodes are generated for any of these constructs. Instead, the
3944 -- node for the operator appears directly. When we refer to an
3945 -- expression in this description, we mean any of the possible
3946 -- constituent components of an expression (e.g. identifier is
3947 -- an example of an expression).
3949 -- Note: the above syntax is that Ada 2012 syntax which restricts
3950 -- choice relations to simple expressions to avoid ambiguities in
3951 -- some contexts with set membership notation. It has been decided
3952 -- that in retrospect, the Ada 95 change allowing general expressions
3953 -- in this context was a mistake, so we have reverted to the above
3954 -- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
3955 -- expressions was there in Ada 83 from the start).
3962 -- NUMERIC_LITERAL | null
3963 -- | STRING_LITERAL | AGGREGATE
3964 -- | NAME | QUALIFIED_EXPRESSION
3965 -- | ALLOCATOR | (EXPRESSION)
3967 -- Usually there is no explicit node in the tree for primary. Instead
3968 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3969 -- exceptions. First, there is an explicit node for a null primary.
3972 -- Sloc points to NULL
3973 -- plus fields for expression
3975 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3976 -- that the parser keep track of which subexpressions are enclosed
3977 -- in parentheses, and how many levels of parentheses are used. This
3978 -- information is required for optimization purposes, and also for
3979 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3980 -- conform with ((((1)))) in the body).
3982 -- The parentheses are recorded by keeping a Paren_Count field in every
3983 -- subexpression node (it is actually present in all nodes, but only
3984 -- used in subexpression nodes). This count records the number of
3985 -- levels of parentheses. If the number of levels in the source exceeds
3986 -- the maximum accommodated by this count, then the count is simply left
3987 -- at the maximum value. This means that there are some pathological
3988 -- cases of failure to detect conformance failures (e.g. an expression
3989 -- with 500 levels of parens will conform with one with 501 levels),
3990 -- but we do not need to lose sleep over this.
3992 -- Historical note: in versions of GNAT prior to 1.75, there was a node
3993 -- type N_Parenthesized_Expression used to accurately record unlimited
3994 -- numbers of levels of parentheses. However, it turned out to be a
3995 -- real nuisance to have to take into account the possible presence of
3996 -- this node during semantic analysis, since basically parentheses have
3997 -- zero relevance to semantic analysis.
3999 -- Note: the level of parentheses always present in things like
4000 -- aggregates does not count, only the parentheses in the primary
4001 -- (EXPRESSION) affect the setting of the Paren_Count field.
4003 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
4004 -- treated as though it were Empty) if No_Initialization is set True.
4006 --------------------------------------
4007 -- 4.5 Short Circuit Control Forms --
4008 --------------------------------------
4011 -- RELATION {and then RELATION} | RELATION {or else RELATION}
4013 -- Gigi restriction: For both these control forms, the operand and
4014 -- result types are always Standard.Boolean. The expander inserts the
4015 -- required conversion operations where needed to ensure this is the
4019 -- Sloc points to AND of AND THEN
4020 -- Left_Opnd (Node2)
4021 -- Right_Opnd (Node3)
4022 -- Actions (List1-Sem)
4023 -- plus fields for expression
4026 -- Sloc points to OR of OR ELSE
4027 -- Left_Opnd (Node2)
4028 -- Right_Opnd (Node3)
4029 -- Actions (List1-Sem)
4030 -- plus fields for expression
4032 -- Note: The Actions field is used to hold actions associated with
4033 -- the right hand operand. These have to be treated specially since
4034 -- they are not unconditionally executed. See Insert_Actions for a
4035 -- more detailed description of how these actions are handled.
4037 ---------------------------
4038 -- 4.5 Membership Tests --
4039 ---------------------------
4042 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4044 -- MEMBERSHIP_CHOICE_LIST ::=
4045 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4047 -- MEMBERSHIP_CHOICE ::=
4048 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4050 -- Note: although the grammar above allows only a range or a subtype
4051 -- mark, the parser in fact will accept any simple expression in place
4052 -- of a subtype mark. This means that the semantic analyzer must be able
4053 -- to deal with, and diagnose a simple expression other than a name for
4054 -- the right operand. This simplifies error recovery in the parser.
4056 -- The Alternatives field below is present only if there is more than
4057 -- one Membership_Choice present (which is legitimate only in Ada 2012
4058 -- mode) in which case Right_Opnd is Empty, and Alternatives contains
4059 -- the list of choices. In the tree passed to the back end, Alternatives
4060 -- is always No_List, and Right_Opnd is set (i.e. the expansion circuit
4061 -- expands out the complex set membership case using simple membership
4062 -- and equality operations).
4064 -- Should we rename Alternatives here to Membership_Choices ???
4067 -- Sloc points to IN
4068 -- Left_Opnd (Node2)
4069 -- Right_Opnd (Node3)
4070 -- Alternatives (List4) (set to No_List if only one set alternative)
4071 -- No_Minimize_Eliminate (Flag17)
4072 -- plus fields for expression
4075 -- Sloc points to NOT of NOT IN
4076 -- Left_Opnd (Node2)
4077 -- Right_Opnd (Node3)
4078 -- Alternatives (List4) (set to No_List if only one set alternative)
4079 -- No_Minimize_Eliminate (Flag17)
4080 -- plus fields for expression
4082 --------------------
4084 --------------------
4086 -- LOGICAL_OPERATOR ::= and | or | xor
4088 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
4090 -- BINARY_ADDING_OPERATOR ::= + | - | &
4092 -- UNARY_ADDING_OPERATOR ::= + | -
4094 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
4096 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
4098 -- Sprint syntax if Treat_Fixed_As_Integer is set:
4105 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
4106 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
4107 -- All handling of smalls for multiplication and division is handled
4108 -- by the front end (mod and rem result only from expansion). Gigi
4109 -- thus never needs to worry about small values (for other operators
4110 -- operating on fixed-point, e.g. addition, the small value does not
4111 -- have any semantic effect anyway, these are always integer operations.
4113 -- Gigi restriction: For all operators taking Boolean operands, the
4114 -- type is always Standard.Boolean. The expander inserts the required
4115 -- conversion operations where needed to ensure this is the case.
4118 -- Sloc points to AND
4119 -- Do_Length_Check (Flag4-Sem)
4120 -- plus fields for binary operator
4121 -- plus fields for expression
4124 -- Sloc points to OR
4125 -- Do_Length_Check (Flag4-Sem)
4126 -- plus fields for binary operator
4127 -- plus fields for expression
4130 -- Sloc points to XOR
4131 -- Do_Length_Check (Flag4-Sem)
4132 -- plus fields for binary operator
4133 -- plus fields for expression
4137 -- plus fields for binary operator
4138 -- plus fields for expression
4141 -- Sloc points to /=
4142 -- plus fields for binary operator
4143 -- plus fields for expression
4147 -- plus fields for binary operator
4148 -- plus fields for expression
4151 -- Sloc points to <=
4152 -- plus fields for binary operator
4153 -- plus fields for expression
4157 -- plus fields for binary operator
4158 -- plus fields for expression
4161 -- Sloc points to >=
4162 -- plus fields for binary operator
4163 -- plus fields for expression
4166 -- Sloc points to + (binary)
4167 -- plus fields for binary operator
4168 -- plus fields for expression
4171 -- Sloc points to - (binary)
4172 -- plus fields for binary operator
4173 -- plus fields for expression
4177 -- Is_Component_Left_Opnd (Flag13-Sem)
4178 -- Is_Component_Right_Opnd (Flag14-Sem)
4179 -- plus fields for binary operator
4180 -- plus fields for expression
4184 -- Treat_Fixed_As_Integer (Flag14-Sem)
4185 -- Rounded_Result (Flag18-Sem)
4186 -- plus fields for binary operator
4187 -- plus fields for expression
4191 -- Treat_Fixed_As_Integer (Flag14-Sem)
4192 -- Do_Division_Check (Flag13-Sem)
4193 -- Rounded_Result (Flag18-Sem)
4194 -- plus fields for binary operator
4195 -- plus fields for expression
4198 -- Sloc points to MOD
4199 -- Treat_Fixed_As_Integer (Flag14-Sem)
4200 -- Do_Division_Check (Flag13-Sem)
4201 -- plus fields for binary operator
4202 -- plus fields for expression
4205 -- Sloc points to REM
4206 -- Treat_Fixed_As_Integer (Flag14-Sem)
4207 -- Do_Division_Check (Flag13-Sem)
4208 -- plus fields for binary operator
4209 -- plus fields for expression
4212 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
4213 -- Sloc points to **
4214 -- plus fields for binary operator
4215 -- plus fields for expression
4218 -- Sloc points to + (unary)
4219 -- plus fields for unary operator
4220 -- plus fields for expression
4223 -- Sloc points to - (unary)
4224 -- plus fields for unary operator
4225 -- plus fields for expression
4228 -- Sloc points to ABS
4229 -- plus fields for unary operator
4230 -- plus fields for expression
4233 -- Sloc points to NOT
4234 -- plus fields for unary operator
4235 -- plus fields for expression
4237 -- See also shift operators in section B.2
4239 -- Note on fixed-point operations passed to Gigi: For adding operators,
4240 -- the semantics is to treat these simply as integer operations, with
4241 -- the small values being ignored (the bounds are already stored in
4242 -- units of small, so that constraint checking works as usual). For the
4243 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
4244 -- point operands if the Treat_Fixed_As_Integer flag is set and will
4245 -- thus treat these nodes in identical manner, ignoring small values.
4247 -- Note on overflow handling: When the overflow checking mode is set to
4248 -- MINIMIZED or ELIMINATED, nodes for signed arithmetic operations may
4249 -- be modified to use a larger type for the operands and result. In
4250 -- the case where the computed range exceeds that of Long_Long_Integer,
4251 -- and we are running in ELIMINATED mode, the operator node will be
4252 -- changed to be a call to the appropriate routine in System.Bignums.
4254 -- Note: In Modify_Tree_For_C mode, we do not generate an N_Op_Mod node
4255 -- for signed integer types (since there is no equivalent operator in
4256 -- C). Instead we rewrite such an operation in terms of REM (which is
4257 -- % in C) and other C-available operators.
4259 ------------------------------------
4260 -- 4.5.7 Conditional Expressions --
4261 ------------------------------------
4263 -- CONDITIONAL_EXPRESSION ::= IF_EXPRESSION | CASE_EXPRESSION
4265 --------------------------
4266 -- 4.5.7 If Expression --
4267 ----------------------------
4269 -- IF_EXPRESSION ::=
4270 -- if CONDITION then DEPENDENT_EXPRESSION
4271 -- {elsif CONDITION then DEPENDENT_EXPRESSION}
4272 -- [else DEPENDENT_EXPRESSION]
4274 -- DEPENDENT_EXPRESSION ::= EXPRESSION
4276 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
4277 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
4278 -- the Is_Elsif flag is set on the inner if expression.
4281 -- Sloc points to IF or ELSIF keyword
4282 -- Expressions (List1)
4283 -- Then_Actions (List2-Sem)
4284 -- Else_Actions (List3-Sem)
4285 -- Is_Elsif (Flag13) (set if comes from ELSIF)
4286 -- Do_Overflow_Check (Flag17-Sem)
4287 -- plus fields for expression
4289 -- Expressions here is a three-element list, whose first element is the
4290 -- condition, the second element is the dependent expression after THEN
4291 -- and the third element is the dependent expression after the ELSE
4292 -- (explicitly set to True if missing).
4294 -- Note: the Then_Actions and Else_Actions fields are always set to
4295 -- No_List in the tree passed to Gigi. These fields are used only
4296 -- for temporary processing purposes in the expander. Even though they
4297 -- are semantic fields, their parent pointers are set because analysis
4298 -- of actions nodes in those lists may generate additional actions that
4299 -- need to know their insertion point (for example for the creation of
4300 -- transient scopes).
4302 ----------------------------
4303 -- 4.5.7 Case Expression --
4304 ----------------------------
4306 -- CASE_EXPRESSION ::=
4307 -- case SELECTING_EXPRESSION is
4308 -- CASE_EXPRESSION_ALTERNATIVE
4309 -- {,CASE_EXPRESSION_ALTERNATIVE}
4311 -- Note that the Alternatives cannot include pragmas (this contrasts
4312 -- with the situation of case statements where pragmas are allowed).
4314 -- N_Case_Expression
4315 -- Sloc points to CASE
4316 -- Expression (Node3) (the selecting expression)
4317 -- Alternatives (List4) (the case expression alternatives)
4318 -- Do_Overflow_Check (Flag17-Sem)
4320 ----------------------------------------
4321 -- 4.5.7 Case Expression Alternative --
4322 ----------------------------------------
4324 -- CASE_EXPRESSION_ALTERNATIVE ::=
4325 -- when DISCRETE_CHOICE_LIST =>
4326 -- DEPENDENT_EXPRESSION
4328 -- N_Case_Expression_Alternative
4329 -- Sloc points to WHEN
4331 -- Discrete_Choices (List4)
4332 -- Expression (Node3)
4333 -- Has_SP_Choice (Flag15-Sem)
4335 -- Note: The Actions field temporarily holds any actions associated with
4336 -- evaluation of the Expression. During expansion of the case expression
4337 -- these actions are wrapped into an N_Expressions_With_Actions node
4338 -- replacing the original expression.
4340 -- Note: this node never appears in the tree passed to the back end,
4341 -- since the expander converts case expressions into case statements.
4343 ---------------------------------
4344 -- 4.5.9 Quantified Expression --
4345 ---------------------------------
4347 -- QUANTIFIED_EXPRESSION ::=
4348 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
4349 -- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
4351 -- QUANTIFIER ::= all | some
4353 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4354 -- is present at a time, in which case the other one is empty.
4356 -- N_Quantified_Expression
4357 -- Sloc points to FOR
4358 -- Iterator_Specification (Node2)
4359 -- Loop_Parameter_Specification (Node4)
4360 -- Condition (Node1)
4361 -- All_Present (Flag15)
4363 --------------------------
4364 -- 4.6 Type Conversion --
4365 --------------------------
4367 -- TYPE_CONVERSION ::=
4368 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
4370 -- In the (NAME) case, the name is stored as the expression
4372 -- Note: the parser never generates a type conversion node, since it
4373 -- looks like an indexed component which is generated by preference.
4374 -- The semantic pass must correct this misidentification.
4376 -- Gigi handles conversions that involve no change in the root type,
4377 -- and also all conversions from integer to floating-point types.
4378 -- Conversions from floating-point to integer are only handled in
4379 -- the case where Float_Truncate flag set. Other conversions from
4380 -- floating-point to integer (involving rounding) and all conversions
4381 -- involving fixed-point types are handled by the expander.
4383 -- Sprint syntax if Float_Truncate set: X^(Y)
4384 -- Sprint syntax if Conversion_OK set X?(Y)
4385 -- Sprint syntax if both flags set X?^(Y)
4387 -- Note: If either the operand or result type is fixed-point, Gigi will
4388 -- only see a type conversion node with Conversion_OK set. The front end
4389 -- takes care of all handling of small's for fixed-point conversions.
4391 -- N_Type_Conversion
4392 -- Sloc points to first token of subtype mark
4393 -- Subtype_Mark (Node4)
4394 -- Expression (Node3)
4395 -- Do_Discriminant_Check (Flag1-Sem)
4396 -- Do_Length_Check (Flag4-Sem)
4397 -- Float_Truncate (Flag11-Sem)
4398 -- Do_Tag_Check (Flag13-Sem)
4399 -- Conversion_OK (Flag14-Sem)
4400 -- Do_Overflow_Check (Flag17-Sem)
4401 -- Rounded_Result (Flag18-Sem)
4402 -- plus fields for expression
4404 -- Note: if a range check is required, then the Do_Range_Check flag
4405 -- is set in the Expression with the check being done against the
4406 -- target type range (after the base type conversion, if any).
4408 -------------------------------
4409 -- 4.7 Qualified Expression --
4410 -------------------------------
4412 -- QUALIFIED_EXPRESSION ::=
4413 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
4415 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
4416 -- the expression, so the Expression field of this node always points
4417 -- to a parenthesized expression in this case (i.e. Paren_Count will
4418 -- always be non-zero for the referenced expression if it is not an
4421 -- N_Qualified_Expression
4422 -- Sloc points to apostrophe
4423 -- Subtype_Mark (Node4)
4424 -- Expression (Node3) expression or aggregate
4425 -- plus fields for expression
4427 --------------------
4429 --------------------
4432 -- new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
4433 -- | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
4435 -- SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
4437 -- Sprint syntax (when storage pool present)
4438 -- new xxx (storage_pool = pool)
4440 -- new (subpool) xxx (storage_pool = pool)
4443 -- Sloc points to NEW
4444 -- Expression (Node3) subtype indication or qualified expression
4445 -- Subpool_Handle_Name (Node4) (set to Empty if not present)
4446 -- Storage_Pool (Node1-Sem)
4447 -- Procedure_To_Call (Node2-Sem)
4448 -- Null_Exclusion_Present (Flag11)
4449 -- No_Initialization (Flag13-Sem)
4450 -- Is_Static_Coextension (Flag14-Sem)
4451 -- Do_Storage_Check (Flag17-Sem)
4452 -- Is_Dynamic_Coextension (Flag18-Sem)
4453 -- plus fields for expression
4455 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
4456 -- This flag has a special function in conjunction with the restriction
4457 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
4458 -- is not set. This means that if a source allocator is replaced with
4459 -- a constructed allocator, the Comes_From_Source flag should be copied
4460 -- to the newly created allocator.
4462 ---------------------------------
4463 -- 5.1 Sequence Of Statements --
4464 ---------------------------------
4466 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
4468 -- Note: Although the parser will not accept a declaration as a
4469 -- statement, the semantic analyzer may insert declarations (e.g.
4470 -- declarations of implicit types needed for execution of other
4471 -- statements) into a sequence of statements, so the code generator
4472 -- should be prepared to accept a declaration where a statement is
4473 -- expected. Note also that pragmas can appear as statements.
4475 --------------------
4477 --------------------
4480 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
4482 -- There is no explicit node in the tree for a statement. Instead, the
4483 -- individual statement appears directly. Labels are treated as a
4484 -- kind of statement, i.e. they are linked into a statement list at
4485 -- the point they appear, so the labeled statement appears following
4486 -- the label or labels in the statement list.
4488 ---------------------------
4489 -- 5.1 Simple Statement --
4490 ---------------------------
4492 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
4493 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
4494 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
4495 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
4496 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
4497 -- | ABORT_STATEMENT | RAISE_STATEMENT
4500 -----------------------------
4501 -- 5.1 Compound Statement --
4502 -----------------------------
4504 -- COMPOUND_STATEMENT ::=
4505 -- IF_STATEMENT | CASE_STATEMENT
4506 -- | LOOP_STATEMENT | BLOCK_STATEMENT
4507 -- | EXTENDED_RETURN_STATEMENT
4508 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
4510 -------------------------
4511 -- 5.1 Null Statement --
4512 -------------------------
4514 -- NULL_STATEMENT ::= null;
4517 -- Sloc points to NULL
4523 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4525 -- Note that the occurrence of a label is not a defining identifier,
4526 -- but rather a referencing occurrence. The defining occurrence is
4527 -- in the implicit label declaration which occurs in the innermost
4531 -- Sloc points to <<
4532 -- Identifier (Node1) direct name of statement identifier
4533 -- Exception_Junk (Flag8-Sem)
4535 -- Note: Before Ada 2012, a label is always followed by a statement,
4536 -- and this is true in the tree even in Ada 2012 mode (the parser
4537 -- inserts a null statement marked with Comes_From_Source False).
4539 -------------------------------
4540 -- 5.1 Statement Identifier --
4541 -------------------------------
4543 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
4545 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4546 -- (not an OPERATOR_SYMBOL)
4548 -------------------------------
4549 -- 5.2 Assignment Statement --
4550 -------------------------------
4552 -- ASSIGNMENT_STATEMENT ::=
4553 -- variable_NAME := EXPRESSION;
4555 -- N_Assignment_Statement
4556 -- Sloc points to :=
4558 -- Expression (Node3)
4559 -- Do_Discriminant_Check (Flag1-Sem)
4560 -- Do_Tag_Check (Flag13-Sem)
4561 -- Do_Length_Check (Flag4-Sem)
4562 -- Forwards_OK (Flag5-Sem)
4563 -- Backwards_OK (Flag6-Sem)
4564 -- No_Ctrl_Actions (Flag7-Sem)
4565 -- Componentwise_Assignment (Flag14-Sem)
4566 -- Suppress_Assignment_Checks (Flag18-Sem)
4568 -- Note: if a range check is required, then the Do_Range_Check flag
4569 -- is set in the Expression (right hand side), with the check being
4570 -- done against the type of the Name (left hand side).
4572 -- Note: the back end places some restrictions on the form of the
4573 -- Expression field. If the object being assigned to is Atomic, then
4574 -- the Expression may not have the form of an aggregate (since this
4575 -- might cause the back end to generate separate assignments). In this
4576 -- case the front end must generate an extra temporary and initialize
4577 -- this temporary as required (the temporary itself is not atomic).
4579 -----------------------
4580 -- 5.3 If Statement --
4581 -----------------------
4584 -- if CONDITION then
4585 -- SEQUENCE_OF_STATEMENTS
4586 -- {elsif CONDITION then
4587 -- SEQUENCE_OF_STATEMENTS}
4589 -- SEQUENCE_OF_STATEMENTS]
4592 -- Gigi restriction: This expander ensures that the type of the
4593 -- Condition fields is always Standard.Boolean, even if the type
4594 -- in the source is some non-standard boolean type.
4597 -- Sloc points to IF
4598 -- Condition (Node1)
4599 -- Then_Statements (List2)
4600 -- Elsif_Parts (List3) (set to No_List if none present)
4601 -- Else_Statements (List4) (set to No_List if no else part present)
4602 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4603 -- From_Conditional_Expression (Flag1-Sem)
4606 -- Sloc points to ELSIF
4607 -- Condition (Node1)
4608 -- Then_Statements (List2)
4609 -- Condition_Actions (List3-Sem)
4611 --------------------
4613 --------------------
4615 -- CONDITION ::= boolean_EXPRESSION
4617 -------------------------
4618 -- 5.4 Case Statement --
4619 -------------------------
4621 -- CASE_STATEMENT ::=
4622 -- case EXPRESSION is
4623 -- CASE_STATEMENT_ALTERNATIVE
4624 -- {CASE_STATEMENT_ALTERNATIVE}
4627 -- Note: the Alternatives can contain pragmas. These only occur at
4628 -- the start of the list, since any pragmas occurring after the first
4629 -- alternative are absorbed into the corresponding statement sequence.
4632 -- Sloc points to CASE
4633 -- Expression (Node3)
4634 -- Alternatives (List4)
4635 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4636 -- From_Conditional_Expression (Flag1-Sem)
4638 -- Note: Before Ada 2012, a pragma in a statement sequence is always
4639 -- followed by a statement, and this is true in the tree even in Ada
4640 -- 2012 mode (the parser inserts a null statement marked with the flag
4641 -- Comes_From_Source False).
4643 -------------------------------------
4644 -- 5.4 Case Statement Alternative --
4645 -------------------------------------
4647 -- CASE_STATEMENT_ALTERNATIVE ::=
4648 -- when DISCRETE_CHOICE_LIST =>
4649 -- SEQUENCE_OF_STATEMENTS
4651 -- N_Case_Statement_Alternative
4652 -- Sloc points to WHEN
4653 -- Discrete_Choices (List4)
4654 -- Statements (List3)
4655 -- Has_SP_Choice (Flag15-Sem)
4657 -- Note: in the list of Discrete_Choices, the tree passed to the back
4658 -- end does not have choice entries corresponding to names of statically
4659 -- predicated subtypes. Such entries are always expanded out to the list
4660 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
4661 -- mode does not have this expansion, and has the original choices.
4663 -------------------------
4664 -- 5.5 Loop Statement --
4665 -------------------------
4667 -- LOOP_STATEMENT ::=
4668 -- [loop_STATEMENT_IDENTIFIER :]
4669 -- [ITERATION_SCHEME] loop
4670 -- SEQUENCE_OF_STATEMENTS
4671 -- end loop [loop_IDENTIFIER];
4673 -- Note: The occurrence of a loop label is not a defining identifier
4674 -- but rather a referencing occurrence. The defining occurrence is in
4675 -- the implicit label declaration which occurs in the innermost
4678 -- Note: there is always a loop statement identifier present in the
4679 -- tree, even if none was given in the source. In the case where no loop
4680 -- identifier is given in the source, the parser creates a name of the
4681 -- form _Loop_n, where n is a decimal integer (the two underlines ensure
4682 -- that the loop names created in this manner do not conflict with any
4683 -- user defined identifiers), and the flag Has_Created_Identifier is set
4684 -- to True. The only exception to the rule that all loop statement nodes
4685 -- have identifiers occurs for loops constructed by the expander, and
4686 -- the semantic analyzer will create and supply dummy loop identifiers
4690 -- Sloc points to LOOP
4691 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4692 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4693 -- Statements (List3)
4694 -- End_Label (Node4)
4695 -- Has_Created_Identifier (Flag15)
4696 -- Is_Null_Loop (Flag16)
4697 -- Suppress_Loop_Warnings (Flag17)
4699 -- Note: the parser fills in the Identifier field if there is an
4700 -- explicit loop identifier. Otherwise the parser leaves this field
4701 -- set to Empty, and then the semantic processing for a loop statement
4702 -- creates an identifier, setting the Has_Created_Identifier flag to
4703 -- True. So after semantic analysis, the Identifier is always set,
4704 -- referencing an identifier whose entity has an Ekind of E_Loop.
4706 ---------------------------
4707 -- 5.5 Iteration Scheme --
4708 ---------------------------
4710 -- ITERATION_SCHEME ::=
4712 -- | for LOOP_PARAMETER_SPECIFICATION
4713 -- | for ITERATOR_SPECIFICATION
4715 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4716 -- is present at a time, in which case the other one is empty. Both are
4717 -- empty in the case of a WHILE loop.
4719 -- Gigi restriction: The expander ensures that the type of the Condition
4720 -- field is always Standard.Boolean, even if the type in the source is
4721 -- some non-standard boolean type.
4723 -- N_Iteration_Scheme
4724 -- Sloc points to WHILE or FOR
4725 -- Condition (Node1) (set to Empty if FOR case)
4726 -- Condition_Actions (List3-Sem)
4727 -- Iterator_Specification (Node2) (set to Empty if WHILE case)
4728 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4730 ---------------------------------------
4731 -- 5.5 Loop Parameter Specification --
4732 ---------------------------------------
4734 -- LOOP_PARAMETER_SPECIFICATION ::=
4735 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4737 -- N_Loop_Parameter_Specification
4738 -- Sloc points to first identifier
4739 -- Defining_Identifier (Node1)
4740 -- Reverse_Present (Flag15)
4741 -- Discrete_Subtype_Definition (Node4)
4743 -----------------------------------
4744 -- 5.5.1 Iterator Specification --
4745 -----------------------------------
4747 -- ITERATOR_SPECIFICATION ::=
4748 -- DEFINING_IDENTIFIER in [reverse] NAME
4749 -- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
4751 -- N_Iterator_Specification
4752 -- Sloc points to defining identifier
4753 -- Defining_Identifier (Node1)
4755 -- Reverse_Present (Flag15)
4756 -- Of_Present (Flag16)
4757 -- Subtype_Indication (Node5)
4759 -- Note: The Of_Present flag distinguishes the two forms
4761 --------------------------
4762 -- 5.6 Block Statement --
4763 --------------------------
4765 -- BLOCK_STATEMENT ::=
4766 -- [block_STATEMENT_IDENTIFIER:]
4768 -- DECLARATIVE_PART]
4770 -- HANDLED_SEQUENCE_OF_STATEMENTS
4771 -- end [block_IDENTIFIER];
4773 -- Note that the occurrence of a block identifier is not a defining
4774 -- identifier, but rather a referencing occurrence. The defining
4775 -- occurrence is an E_Block entity declared by the implicit label
4776 -- declaration which occurs in the innermost enclosing block statement
4777 -- or body; the block identifier denotes that E_Block.
4779 -- For block statements that come from source code, there is always a
4780 -- block statement identifier present in the tree, denoting an E_Block.
4781 -- In the case where no block identifier is given in the source,
4782 -- the parser creates a name of the form B_n, where n is a decimal
4783 -- integer, and the flag Has_Created_Identifier is set to True. Blocks
4784 -- constructed by the expander usually have no identifier, and no
4785 -- corresponding entity.
4787 -- Note: the block statement created for an extended return statement
4788 -- has an entity, and this entity is an E_Return_Statement, rather than
4789 -- the usual E_Block.
4791 -- Note: Exception_Junk is set for the wrapping blocks created during
4792 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4794 -- Note: from a control flow viewpoint, a block statement defines an
4795 -- extended basic block, i.e. the entry of the block dominates every
4796 -- statement in the sequence. When generating new statements with
4797 -- exception handlers in the expander at the end of a sequence that
4798 -- comes from source code, it can be necessary to wrap them all in a
4799 -- block statement in order to expose the implicit control flow to
4800 -- gigi and thus prevent it from issuing bogus control flow warnings.
4802 -- N_Block_Statement
4803 -- Sloc points to DECLARE or BEGIN
4804 -- Identifier (Node1) block direct name (set to Empty if not present)
4805 -- Declarations (List2) (set to No_List if no DECLARE part)
4806 -- Handled_Statement_Sequence (Node4)
4807 -- Cleanup_Actions (List5-Sem)
4808 -- Is_Task_Master (Flag5-Sem)
4809 -- Activation_Chain_Entity (Node3-Sem)
4810 -- Has_Created_Identifier (Flag15)
4811 -- Is_Task_Allocation_Block (Flag6)
4812 -- Is_Asynchronous_Call_Block (Flag7)
4813 -- Exception_Junk (Flag8-Sem)
4814 -- Is_Finalization_Wrapper (Flag9-Sem)
4816 -------------------------
4817 -- 5.7 Exit Statement --
4818 -------------------------
4820 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4822 -- Gigi restriction: The expander ensures that the type of the Condition
4823 -- field is always Standard.Boolean, even if the type in the source is
4824 -- some non-standard boolean type.
4827 -- Sloc points to EXIT
4828 -- Name (Node2) (set to Empty if no loop name present)
4829 -- Condition (Node1) (set to Empty if no WHEN part present)
4830 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
4832 -------------------------
4833 -- 5.9 Goto Statement --
4834 -------------------------
4836 -- GOTO_STATEMENT ::= goto label_NAME;
4839 -- Sloc points to GOTO
4841 -- Exception_Junk (Flag8-Sem)
4843 ---------------------------------
4844 -- 6.1 Subprogram Declaration --
4845 ---------------------------------
4847 -- SUBPROGRAM_DECLARATION ::=
4848 -- SUBPROGRAM_SPECIFICATION
4849 -- [ASPECT_SPECIFICATIONS];
4851 -- N_Subprogram_Declaration
4852 -- Sloc points to FUNCTION or PROCEDURE
4853 -- Specification (Node1)
4854 -- Body_To_Inline (Node3-Sem)
4855 -- Corresponding_Body (Node5-Sem)
4856 -- Parent_Spec (Node4-Sem)
4858 ------------------------------------------
4859 -- 6.1 Abstract Subprogram Declaration --
4860 ------------------------------------------
4862 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4863 -- SUBPROGRAM_SPECIFICATION is abstract
4864 -- [ASPECT_SPECIFICATIONS];
4866 -- N_Abstract_Subprogram_Declaration
4867 -- Sloc points to ABSTRACT
4868 -- Specification (Node1)
4870 -----------------------------------
4871 -- 6.1 Subprogram Specification --
4872 -----------------------------------
4874 -- SUBPROGRAM_SPECIFICATION ::=
4875 -- [[not] overriding]
4876 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4877 -- | [[not] overriding]
4878 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4880 -- Note: there are no separate nodes for the profiles, instead the
4881 -- information appears directly in the following nodes.
4883 -- N_Function_Specification
4884 -- Sloc points to FUNCTION
4885 -- Defining_Unit_Name (Node1) (the designator)
4886 -- Elaboration_Boolean (Node2-Sem)
4887 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4888 -- Null_Exclusion_Present (Flag11)
4889 -- Result_Definition (Node4) for result subtype
4890 -- Generic_Parent (Node5-Sem)
4891 -- Must_Override (Flag14) set if overriding indicator present
4892 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4894 -- N_Procedure_Specification
4895 -- Sloc points to PROCEDURE
4896 -- Defining_Unit_Name (Node1)
4897 -- Elaboration_Boolean (Node2-Sem)
4898 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4899 -- Generic_Parent (Node5-Sem)
4900 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4901 -- Must_Override (Flag14) set if overriding indicator present
4902 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4904 -- Note: overriding indicator is an Ada 2005 feature
4906 ---------------------
4907 -- 6.1 Designator --
4908 ---------------------
4911 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4913 -- Designators that are simply identifiers or operator symbols appear
4914 -- directly in the tree in this form. The following node is used only
4915 -- in the case where the designator has a parent unit name component.
4918 -- Sloc points to period
4919 -- Name (Node2) holds the parent unit name
4920 -- Identifier (Node1)
4922 -- Note: Name is always non-Empty, since this node is only used for the
4923 -- case where a parent library unit package name is present.
4925 -- Note that the identifier can also be an operator symbol here
4927 ------------------------------
4928 -- 6.1 Defining Designator --
4929 ------------------------------
4931 -- DEFINING_DESIGNATOR ::=
4932 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4934 -------------------------------------
4935 -- 6.1 Defining Program Unit Name --
4936 -------------------------------------
4938 -- DEFINING_PROGRAM_UNIT_NAME ::=
4939 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4941 -- The parent unit name is present only in the case of a child unit name
4942 -- (permissible only for Ada 95 for a library level unit, i.e. a unit
4943 -- at scope level one). If no such name is present, the defining program
4944 -- unit name is represented simply as the defining identifier. In the
4945 -- child unit case, the following node is used to represent the child
4948 -- N_Defining_Program_Unit_Name
4949 -- Sloc points to period
4950 -- Name (Node2) holds the parent unit name
4951 -- Defining_Identifier (Node1)
4953 -- Note: Name is always non-Empty, since this node is only used for the
4954 -- case where a parent unit name is present.
4956 --------------------------
4957 -- 6.1 Operator Symbol --
4958 --------------------------
4960 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4962 -- Note: the fields of the N_Operator_Symbol node are laid out to match
4963 -- the corresponding fields of an N_Character_Literal node. This allows
4964 -- easy conversion of the operator symbol node into a character literal
4965 -- node in the case where a string constant of the form of an operator
4966 -- symbol is scanned out as such, but turns out semantically to be a
4967 -- string literal that is not an operator. For details see Sinfo.CN.
4968 -- Change_Operator_Symbol_To_String_Literal.
4970 -- N_Operator_Symbol
4971 -- Sloc points to literal
4972 -- Chars (Name1) contains the Name_Id for the operator symbol
4973 -- Strval (Str3) Id of string value. This is used if the operator
4974 -- symbol turns out to be a normal string after all.
4975 -- Entity (Node4-Sem)
4976 -- Associated_Node (Node4-Sem)
4977 -- Has_Private_View (Flag11-Sem) set in generic units.
4978 -- Etype (Node5-Sem)
4980 -- Note: the Strval field may be set to No_String for generated
4981 -- operator symbols that are known not to be string literals
4984 -----------------------------------
4985 -- 6.1 Defining Operator Symbol --
4986 -----------------------------------
4988 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
4990 -- A defining operator symbol is an entity, which has additional
4991 -- fields depending on the setting of the Ekind field. These
4992 -- additional fields are defined (and access subprograms declared)
4993 -- in package Einfo.
4995 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
4996 -- are deliberately layed out to match the layout of fields in an
4997 -- ordinary N_Operator_Symbol node allowing for easy alteration of
4998 -- an operator symbol node into a defining operator symbol node.
4999 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
5000 -- for further details.
5002 -- N_Defining_Operator_Symbol
5003 -- Sloc points to literal
5004 -- Chars (Name1) contains the Name_Id for the operator symbol
5005 -- Next_Entity (Node2-Sem)
5006 -- Scope (Node3-Sem)
5007 -- Etype (Node5-Sem)
5009 ----------------------------
5010 -- 6.1 Parameter Profile --
5011 ----------------------------
5013 -- PARAMETER_PROFILE ::= [FORMAL_PART]
5015 ---------------------------------------
5016 -- 6.1 Parameter and Result Profile --
5017 ---------------------------------------
5019 -- PARAMETER_AND_RESULT_PROFILE ::=
5020 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
5021 -- | [FORMAL_PART] return ACCESS_DEFINITION
5023 -- There is no explicit node in the tree for a parameter and result
5024 -- profile. Instead the information appears directly in the parent.
5026 ----------------------
5027 -- 6.1 Formal Part --
5028 ----------------------
5031 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
5033 ----------------------------------
5034 -- 6.1 Parameter Specification --
5035 ----------------------------------
5037 -- PARAMETER_SPECIFICATION ::=
5038 -- DEFINING_IDENTIFIER_LIST : [ALIASED] MODE [NULL_EXCLUSION]
5039 -- SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
5040 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
5041 -- [:= DEFAULT_EXPRESSION]
5043 -- Although the syntax allows multiple identifiers in the list, the
5044 -- semantics is as though successive specifications were given with
5045 -- identical type definition and expression components. To simplify
5046 -- semantic processing, the parser represents a multiple declaration
5047 -- case as a sequence of single Specifications, using the More_Ids and
5048 -- Prev_Ids flags to preserve the original source form as described
5049 -- in the section on "Handling of Defining Identifier Lists".
5051 -- ALIASED can only be present in Ada 2012 mode
5053 -- N_Parameter_Specification
5054 -- Sloc points to first identifier
5055 -- Defining_Identifier (Node1)
5056 -- Aliased_Present (Flag4)
5057 -- In_Present (Flag15)
5058 -- Out_Present (Flag17)
5059 -- Null_Exclusion_Present (Flag11)
5060 -- Parameter_Type (Node2) subtype mark or access definition
5061 -- Expression (Node3) (set to Empty if no default expression present)
5062 -- Do_Accessibility_Check (Flag13-Sem)
5063 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5064 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5065 -- Default_Expression (Node5-Sem)
5071 -- MODE ::= [in] | in out | out
5073 -- There is no explicit node in the tree for the Mode. Instead the
5074 -- In_Present and Out_Present flags are set in the parent node to
5075 -- record the presence of keywords specifying the mode.
5077 --------------------------
5078 -- 6.3 Subprogram Body --
5079 --------------------------
5081 -- SUBPROGRAM_BODY ::=
5082 -- SUBPROGRAM_SPECIFICATION [ASPECT_SPECIFICATIONS] is
5085 -- HANDLED_SEQUENCE_OF_STATEMENTS
5086 -- end [DESIGNATOR];
5088 -- N_Subprogram_Body
5089 -- Sloc points to FUNCTION or PROCEDURE
5090 -- Specification (Node1)
5091 -- Declarations (List2)
5092 -- Handled_Statement_Sequence (Node4)
5093 -- Activation_Chain_Entity (Node3-Sem)
5094 -- Corresponding_Spec (Node5-Sem)
5095 -- Acts_As_Spec (Flag4-Sem)
5096 -- Bad_Is_Detected (Flag15) used only by parser
5097 -- Do_Storage_Check (Flag17-Sem)
5098 -- Is_Protected_Subprogram_Body (Flag7-Sem)
5099 -- Is_Entry_Barrier_Function (Flag8-Sem)
5100 -- Is_Task_Master (Flag5-Sem)
5101 -- Was_Originally_Stub (Flag13-Sem)
5102 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5104 -------------------------
5105 -- Expression Function --
5106 -------------------------
5108 -- This is an Ada 2012 extension, we put it here for now, to be labeled
5109 -- and put in its proper section when we know exactly where that is.
5111 -- EXPRESSION_FUNCTION ::=
5112 -- FUNCTION SPECIFICATION IS (EXPRESSION)
5113 -- [ASPECT_SPECIFICATIONS];
5115 -- N_Expression_Function
5116 -- Sloc points to FUNCTION
5117 -- Specification (Node1)
5118 -- Expression (Node3)
5119 -- Corresponding_Spec (Node5-Sem)
5121 -----------------------------------
5122 -- 6.4 Procedure Call Statement --
5123 -----------------------------------
5125 -- PROCEDURE_CALL_STATEMENT ::=
5126 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
5128 -- Note: the reason that a procedure call has expression fields is that
5129 -- it semantically resembles an expression, e.g. overloading is allowed
5130 -- and a type is concocted for semantic processing purposes. Certain of
5131 -- these fields, such as Parens are not relevant, but it is easier to
5132 -- just supply all of them together.
5134 -- N_Procedure_Call_Statement
5135 -- Sloc points to first token of name or prefix
5136 -- Name (Node2) stores name or prefix
5137 -- Parameter_Associations (List3) (set to No_List if no
5138 -- actual parameter part)
5139 -- First_Named_Actual (Node4-Sem)
5140 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5141 -- Do_Tag_Check (Flag13-Sem)
5142 -- No_Elaboration_Check (Flag14-Sem)
5143 -- Parameter_List_Truncated (Flag17-Sem)
5144 -- ABE_Is_Certain (Flag18-Sem)
5145 -- plus fields for expression
5147 -- If any IN parameter requires a range check, then the corresponding
5148 -- argument expression has the Do_Range_Check flag set, and the range
5149 -- check is done against the formal type. Note that this argument
5150 -- expression may appear directly in the Parameter_Associations list,
5151 -- or may be a descendent of an N_Parameter_Association node that
5152 -- appears in this list.
5154 ------------------------
5155 -- 6.4 Function Call --
5156 ------------------------
5158 -- FUNCTION_CALL ::=
5159 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
5161 -- Note: the parser may generate an indexed component node or simply
5162 -- a name node instead of a function call node. The semantic pass must
5163 -- correct this misidentification.
5166 -- Sloc points to first token of name or prefix
5167 -- Name (Node2) stores name or prefix
5168 -- Parameter_Associations (List3) (set to No_List if no
5169 -- actual parameter part)
5170 -- First_Named_Actual (Node4-Sem)
5171 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5172 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
5173 -- Do_Tag_Check (Flag13-Sem)
5174 -- No_Elaboration_Check (Flag14-Sem)
5175 -- Parameter_List_Truncated (Flag17-Sem)
5176 -- ABE_Is_Certain (Flag18-Sem)
5177 -- plus fields for expression
5179 --------------------------------
5180 -- 6.4 Actual Parameter Part --
5181 --------------------------------
5183 -- ACTUAL_PARAMETER_PART ::=
5184 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
5186 --------------------------------
5187 -- 6.4 Parameter Association --
5188 --------------------------------
5190 -- PARAMETER_ASSOCIATION ::=
5191 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
5193 -- Note: the N_Parameter_Association node is built only if a formal
5194 -- parameter selector name is present, otherwise the parameter
5195 -- association appears in the tree simply as the node for the
5196 -- explicit actual parameter.
5198 -- N_Parameter_Association
5199 -- Sloc points to formal parameter
5200 -- Selector_Name (Node2) (always non-Empty)
5201 -- Explicit_Actual_Parameter (Node3)
5202 -- Next_Named_Actual (Node4-Sem)
5203 -- Is_Accessibility_Actual (Flag13-Sem)
5205 ---------------------------
5206 -- 6.4 Actual Parameter --
5207 ---------------------------
5209 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
5211 ---------------------------
5212 -- 6.5 Return Statement --
5213 ---------------------------
5215 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
5217 -- EXTENDED_RETURN_STATEMENT ::=
5218 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5219 -- [:= EXPRESSION] [do
5220 -- HANDLED_SEQUENCE_OF_STATEMENTS
5223 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
5225 -- The term "return statement" is defined in 6.5 to mean either a
5226 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT. We avoid
5227 -- the use of this term, since it used to mean someting else in earlier
5230 -- N_Simple_Return_Statement
5231 -- Sloc points to RETURN
5232 -- Return_Statement_Entity (Node5-Sem)
5233 -- Expression (Node3) (set to Empty if no expression present)
5234 -- Storage_Pool (Node1-Sem)
5235 -- Procedure_To_Call (Node2-Sem)
5236 -- Do_Tag_Check (Flag13-Sem)
5237 -- By_Ref (Flag5-Sem)
5238 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
5240 -- Note: Return_Statement_Entity points to an E_Return_Statement
5242 -- If a range check is required, then Do_Range_Check is set on the
5243 -- Expression. The check is against the return subtype of the function.
5245 -- N_Extended_Return_Statement
5246 -- Sloc points to RETURN
5247 -- Return_Statement_Entity (Node5-Sem)
5248 -- Return_Object_Declarations (List3)
5249 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
5250 -- Storage_Pool (Node1-Sem)
5251 -- Procedure_To_Call (Node2-Sem)
5252 -- Do_Tag_Check (Flag13-Sem)
5253 -- By_Ref (Flag5-Sem)
5255 -- Note: Return_Statement_Entity points to an E_Return_Statement.
5257 -- Note that Return_Object_Declarations is a list containing the
5258 -- N_Object_Declaration -- see comment on this field above.
5260 -- The declared object will have Is_Return_Object = True.
5262 -- There is no such syntactic category as return_object_declaration
5263 -- in the RM. Return_Object_Declarations represents this portion of
5264 -- the syntax for EXTENDED_RETURN_STATEMENT:
5265 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5268 -- There are two entities associated with an extended_return_statement:
5269 -- the Return_Statement_Entity represents the statement itself,
5270 -- and the Defining_Identifier of the Object_Declaration in
5271 -- Return_Object_Declarations represents the object being
5272 -- returned. N_Simple_Return_Statement has only the former.
5274 ------------------------------
5275 -- 7.1 Package Declaration --
5276 ------------------------------
5278 -- PACKAGE_DECLARATION ::=
5279 -- PACKAGE_SPECIFICATION;
5281 -- Note: the activation chain entity for a package spec is used for
5282 -- all tasks declared in the package spec, or in the package body.
5284 -- N_Package_Declaration
5285 -- Sloc points to PACKAGE
5286 -- Specification (Node1)
5287 -- Corresponding_Body (Node5-Sem)
5288 -- Parent_Spec (Node4-Sem)
5289 -- Activation_Chain_Entity (Node3-Sem)
5291 --------------------------------
5292 -- 7.1 Package Specification --
5293 --------------------------------
5295 -- PACKAGE_SPECIFICATION ::=
5296 -- package DEFINING_PROGRAM_UNIT_NAME
5297 -- [ASPECT_SPECIFICATIONS]
5299 -- {BASIC_DECLARATIVE_ITEM}
5301 -- {BASIC_DECLARATIVE_ITEM}]
5302 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
5304 -- N_Package_Specification
5305 -- Sloc points to PACKAGE
5306 -- Defining_Unit_Name (Node1)
5307 -- Visible_Declarations (List2)
5308 -- Private_Declarations (List3) (set to No_List if no private
5310 -- End_Label (Node4)
5311 -- Generic_Parent (Node5-Sem)
5312 -- Limited_View_Installed (Flag18-Sem)
5314 -----------------------
5315 -- 7.1 Package Body --
5316 -----------------------
5319 -- package body DEFINING_PROGRAM_UNIT_NAME
5320 -- [ASPECT_SPECIFICATIONS]
5324 -- HANDLED_SEQUENCE_OF_STATEMENTS]
5325 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
5328 -- Sloc points to PACKAGE
5329 -- Defining_Unit_Name (Node1)
5330 -- Declarations (List2)
5331 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
5332 -- Corresponding_Spec (Node5-Sem)
5333 -- Was_Originally_Stub (Flag13-Sem)
5335 -- Note: if a source level package does not contain a handled sequence
5336 -- of statements, then the parser supplies a dummy one with a null
5337 -- sequence of statements. Comes_From_Source will be False in this
5338 -- constructed sequence. The reason we need this is for the End_Label
5339 -- field in the HSS.
5341 -----------------------------------
5342 -- 7.4 Private Type Declaration --
5343 -----------------------------------
5345 -- PRIVATE_TYPE_DECLARATION ::=
5346 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5347 -- is [[abstract] tagged] [limited] private
5348 -- [ASPECT_SPECIFICATIONS];
5350 -- Note: TAGGED is not permitted in Ada 83 mode
5352 -- N_Private_Type_Declaration
5353 -- Sloc points to TYPE
5354 -- Defining_Identifier (Node1)
5355 -- Discriminant_Specifications (List4) (set to No_List if no
5356 -- discriminant part)
5357 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5358 -- Abstract_Present (Flag4)
5359 -- Tagged_Present (Flag15)
5360 -- Limited_Present (Flag17)
5362 ----------------------------------------
5363 -- 7.4 Private Extension Declaration --
5364 ----------------------------------------
5366 -- PRIVATE_EXTENSION_DECLARATION ::=
5367 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
5368 -- [abstract] [limited | synchronized]
5369 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
5370 -- with private [ASPECT_SPECIFICATIONS];
5372 -- Note: LIMITED, and private extension declarations are not allowed
5375 -- N_Private_Extension_Declaration
5376 -- Sloc points to TYPE
5377 -- Defining_Identifier (Node1)
5378 -- Uninitialized_Variable (Node3-Sem)
5379 -- Discriminant_Specifications (List4) (set to No_List if no
5380 -- discriminant part)
5381 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5382 -- Abstract_Present (Flag4)
5383 -- Limited_Present (Flag17)
5384 -- Synchronized_Present (Flag7)
5385 -- Subtype_Indication (Node5)
5386 -- Interface_List (List2) (set to No_List if none)
5388 ---------------------
5389 -- 8.4 Use Clause --
5390 ---------------------
5392 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
5394 -----------------------------
5395 -- 8.4 Use Package Clause --
5396 -----------------------------
5398 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
5400 -- N_Use_Package_Clause
5401 -- Sloc points to USE
5403 -- Next_Use_Clause (Node3-Sem)
5404 -- Hidden_By_Use_Clause (Elist4-Sem)
5406 --------------------------
5407 -- 8.4 Use Type Clause --
5408 --------------------------
5410 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
5412 -- Note: use type clause is not permitted in Ada 83 mode
5414 -- Note: the ALL keyword can appear only in Ada 2012 mode
5416 -- N_Use_Type_Clause
5417 -- Sloc points to USE
5418 -- Subtype_Marks (List2)
5419 -- Next_Use_Clause (Node3-Sem)
5420 -- Hidden_By_Use_Clause (Elist4-Sem)
5421 -- Used_Operations (Elist5-Sem)
5422 -- All_Present (Flag15)
5424 -------------------------------
5425 -- 8.5 Renaming Declaration --
5426 -------------------------------
5428 -- RENAMING_DECLARATION ::=
5429 -- OBJECT_RENAMING_DECLARATION
5430 -- | EXCEPTION_RENAMING_DECLARATION
5431 -- | PACKAGE_RENAMING_DECLARATION
5432 -- | SUBPROGRAM_RENAMING_DECLARATION
5433 -- | GENERIC_RENAMING_DECLARATION
5435 --------------------------------------
5436 -- 8.5 Object Renaming Declaration --
5437 --------------------------------------
5439 -- OBJECT_RENAMING_DECLARATION ::=
5440 -- DEFINING_IDENTIFIER :
5441 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME
5442 -- [ASPECT_SPECIFICATIONS];
5443 -- | DEFINING_IDENTIFIER :
5444 -- ACCESS_DEFINITION renames object_NAME
5445 -- [ASPECT_SPECIFICATIONS];
5447 -- Note: Access_Definition is an optional field that gives support to
5448 -- Ada 2005 (AI-230). The parser generates nodes that have either the
5449 -- Subtype_Indication field or else the Access_Definition field.
5451 -- N_Object_Renaming_Declaration
5452 -- Sloc points to first identifier
5453 -- Defining_Identifier (Node1)
5454 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5455 -- Subtype_Mark (Node4) (set to Empty if not present)
5456 -- Access_Definition (Node3) (set to Empty if not present)
5458 -- Corresponding_Generic_Association (Node5-Sem)
5460 -----------------------------------------
5461 -- 8.5 Exception Renaming Declaration --
5462 -----------------------------------------
5464 -- EXCEPTION_RENAMING_DECLARATION ::=
5465 -- DEFINING_IDENTIFIER : exception renames exception_NAME
5466 -- [ASPECT_SPECIFICATIONS];
5468 -- N_Exception_Renaming_Declaration
5469 -- Sloc points to first identifier
5470 -- Defining_Identifier (Node1)
5473 ---------------------------------------
5474 -- 8.5 Package Renaming Declaration --
5475 ---------------------------------------
5477 -- PACKAGE_RENAMING_DECLARATION ::=
5478 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME
5479 -- [ASPECT_SPECIFICATIONS];
5481 -- N_Package_Renaming_Declaration
5482 -- Sloc points to PACKAGE
5483 -- Defining_Unit_Name (Node1)
5485 -- Parent_Spec (Node4-Sem)
5487 ------------------------------------------
5488 -- 8.5 Subprogram Renaming Declaration --
5489 ------------------------------------------
5491 -- SUBPROGRAM_RENAMING_DECLARATION ::=
5492 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME
5493 -- [ASPECT_SPECIFICATIONS];
5495 -- N_Subprogram_Renaming_Declaration
5496 -- Sloc points to RENAMES
5497 -- Specification (Node1)
5499 -- Parent_Spec (Node4-Sem)
5500 -- Corresponding_Spec (Node5-Sem)
5501 -- Corresponding_Formal_Spec (Node3-Sem)
5502 -- From_Default (Flag6-Sem)
5504 -----------------------------------------
5505 -- 8.5.5 Generic Renaming Declaration --
5506 -----------------------------------------
5508 -- GENERIC_RENAMING_DECLARATION ::=
5509 -- generic package DEFINING_PROGRAM_UNIT_NAME
5510 -- renames generic_package_NAME
5511 -- [ASPECT_SPECIFICATIONS];
5512 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
5513 -- renames generic_procedure_NAME
5514 -- [ASPECT_SPECIFICATIONS];
5515 -- | generic function DEFINING_PROGRAM_UNIT_NAME
5516 -- renames generic_function_NAME
5517 -- [ASPECT_SPECIFICATIONS];
5519 -- N_Generic_Package_Renaming_Declaration
5520 -- Sloc points to GENERIC
5521 -- Defining_Unit_Name (Node1)
5523 -- Parent_Spec (Node4-Sem)
5525 -- N_Generic_Procedure_Renaming_Declaration
5526 -- Sloc points to GENERIC
5527 -- Defining_Unit_Name (Node1)
5529 -- Parent_Spec (Node4-Sem)
5531 -- N_Generic_Function_Renaming_Declaration
5532 -- Sloc points to GENERIC
5533 -- Defining_Unit_Name (Node1)
5535 -- Parent_Spec (Node4-Sem)
5537 --------------------------------
5538 -- 9.1 Task Type Declaration --
5539 --------------------------------
5541 -- TASK_TYPE_DECLARATION ::=
5542 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5543 -- [ASPECT_SPECIFICATIONS]
5544 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5546 -- N_Task_Type_Declaration
5547 -- Sloc points to TASK
5548 -- Defining_Identifier (Node1)
5549 -- Discriminant_Specifications (List4) (set to No_List if no
5550 -- discriminant part)
5551 -- Interface_List (List2) (set to No_List if none)
5552 -- Task_Definition (Node3) (set to Empty if not present)
5553 -- Corresponding_Body (Node5-Sem)
5555 ----------------------------------
5556 -- 9.1 Single Task Declaration --
5557 ----------------------------------
5559 -- SINGLE_TASK_DECLARATION ::=
5560 -- task DEFINING_IDENTIFIER
5561 -- [ASPECT_SPECIFICATIONS]
5562 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5564 -- N_Single_Task_Declaration
5565 -- Sloc points to TASK
5566 -- Defining_Identifier (Node1)
5567 -- Interface_List (List2) (set to No_List if none)
5568 -- Task_Definition (Node3) (set to Empty if not present)
5570 --------------------------
5571 -- 9.1 Task Definition --
5572 --------------------------
5574 -- TASK_DEFINITION ::=
5578 -- end [task_IDENTIFIER]
5580 -- Note: as a result of semantic analysis, the list of task items can
5581 -- include implicit type declarations resulting from entry families.
5583 -- N_Task_Definition
5584 -- Sloc points to first token of task definition
5585 -- Visible_Declarations (List2)
5586 -- Private_Declarations (List3) (set to No_List if no private part)
5587 -- End_Label (Node4)
5588 -- Has_Storage_Size_Pragma (Flag5-Sem)
5589 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5591 --------------------
5593 --------------------
5595 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5597 --------------------
5599 --------------------
5602 -- task body task_DEFINING_IDENTIFIER
5603 -- [ASPECT_SPECIFICATIONS]
5607 -- HANDLED_SEQUENCE_OF_STATEMENTS
5608 -- end [task_IDENTIFIER];
5610 -- Gigi restriction: This node never appears
5613 -- Sloc points to TASK
5614 -- Defining_Identifier (Node1)
5615 -- Declarations (List2)
5616 -- Handled_Statement_Sequence (Node4)
5617 -- Is_Task_Master (Flag5-Sem)
5618 -- Activation_Chain_Entity (Node3-Sem)
5619 -- Corresponding_Spec (Node5-Sem)
5620 -- Was_Originally_Stub (Flag13-Sem)
5622 -------------------------------------
5623 -- 9.4 Protected Type Declaration --
5624 -------------------------------------
5626 -- PROTECTED_TYPE_DECLARATION ::=
5627 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5628 -- [ASPECT_SPECIFICATIONS]
5629 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5631 -- Note: protected type declarations are not permitted in Ada 83 mode
5633 -- N_Protected_Type_Declaration
5634 -- Sloc points to PROTECTED
5635 -- Defining_Identifier (Node1)
5636 -- Discriminant_Specifications (List4) (set to No_List if no
5637 -- discriminant part)
5638 -- Interface_List (List2) (set to No_List if none)
5639 -- Protected_Definition (Node3)
5640 -- Corresponding_Body (Node5-Sem)
5642 ---------------------------------------
5643 -- 9.4 Single Protected Declaration --
5644 ---------------------------------------
5646 -- SINGLE_PROTECTED_DECLARATION ::=
5647 -- protected DEFINING_IDENTIFIER
5648 -- [ASPECT_SPECIFICATIONS]
5649 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5651 -- Note: single protected declarations are not allowed in Ada 83 mode
5653 -- N_Single_Protected_Declaration
5654 -- Sloc points to PROTECTED
5655 -- Defining_Identifier (Node1)
5656 -- Interface_List (List2) (set to No_List if none)
5657 -- Protected_Definition (Node3)
5659 -------------------------------
5660 -- 9.4 Protected Definition --
5661 -------------------------------
5663 -- PROTECTED_DEFINITION ::=
5664 -- {PROTECTED_OPERATION_DECLARATION}
5666 -- {PROTECTED_ELEMENT_DECLARATION}]
5667 -- end [protected_IDENTIFIER]
5669 -- N_Protected_Definition
5670 -- Sloc points to first token of protected definition
5671 -- Visible_Declarations (List2)
5672 -- Private_Declarations (List3) (set to No_List if no private part)
5673 -- End_Label (Node4)
5675 ------------------------------------------
5676 -- 9.4 Protected Operation Declaration --
5677 ------------------------------------------
5679 -- PROTECTED_OPERATION_DECLARATION ::=
5680 -- SUBPROGRAM_DECLARATION
5681 -- | ENTRY_DECLARATION
5682 -- | REPRESENTATION_CLAUSE
5684 ----------------------------------------
5685 -- 9.4 Protected Element Declaration --
5686 ----------------------------------------
5688 -- PROTECTED_ELEMENT_DECLARATION ::=
5689 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
5691 -------------------------
5692 -- 9.4 Protected Body --
5693 -------------------------
5695 -- PROTECTED_BODY ::=
5696 -- protected body DEFINING_IDENTIFIER
5697 -- [ASPECT_SPECIFICATIONS];
5699 -- {PROTECTED_OPERATION_ITEM}
5700 -- end [protected_IDENTIFIER];
5702 -- Note: protected bodies are not allowed in Ada 83 mode
5704 -- Gigi restriction: This node never appears
5707 -- Sloc points to PROTECTED
5708 -- Defining_Identifier (Node1)
5709 -- Declarations (List2) protected operation items (and pragmas)
5710 -- End_Label (Node4)
5711 -- Corresponding_Spec (Node5-Sem)
5712 -- Was_Originally_Stub (Flag13-Sem)
5714 -----------------------------------
5715 -- 9.4 Protected Operation Item --
5716 -----------------------------------
5718 -- PROTECTED_OPERATION_ITEM ::=
5719 -- SUBPROGRAM_DECLARATION
5720 -- | SUBPROGRAM_BODY
5722 -- | REPRESENTATION_CLAUSE
5724 ------------------------------
5725 -- 9.5.2 Entry Declaration --
5726 ------------------------------
5728 -- ENTRY_DECLARATION ::=
5729 -- [[not] overriding]
5730 -- entry DEFINING_IDENTIFIER
5731 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE
5732 -- [ASPECT_SPECIFICATIONS];
5734 -- N_Entry_Declaration
5735 -- Sloc points to ENTRY
5736 -- Defining_Identifier (Node1)
5737 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
5738 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5739 -- Corresponding_Body (Node5-Sem)
5740 -- Must_Override (Flag14) set if overriding indicator present
5741 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5743 -- Note: overriding indicator is an Ada 2005 feature
5745 -----------------------------
5746 -- 9.5.2 Accept statement --
5747 -----------------------------
5749 -- ACCEPT_STATEMENT ::=
5750 -- accept entry_DIRECT_NAME
5751 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
5752 -- HANDLED_SEQUENCE_OF_STATEMENTS
5753 -- end [entry_IDENTIFIER]];
5755 -- Gigi restriction: This node never appears
5757 -- Note: there are no explicit declarations allowed in an accept
5758 -- statement. However, the implicit declarations for any statement
5759 -- identifiers (labels and block/loop identifiers) are declarations
5760 -- that belong logically to the accept statement, and that is why
5761 -- there is a Declarations field in this node.
5763 -- N_Accept_Statement
5764 -- Sloc points to ACCEPT
5765 -- Entry_Direct_Name (Node1)
5766 -- Entry_Index (Node5) (set to Empty if not present)
5767 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5768 -- Handled_Statement_Sequence (Node4)
5769 -- Declarations (List2) (set to No_List if no declarations)
5771 ------------------------
5772 -- 9.5.2 Entry Index --
5773 ------------------------
5775 -- ENTRY_INDEX ::= EXPRESSION
5777 -----------------------
5778 -- 9.5.2 Entry Body --
5779 -----------------------
5782 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5785 -- HANDLED_SEQUENCE_OF_STATEMENTS
5786 -- end [entry_IDENTIFIER];
5788 -- ENTRY_BARRIER ::= when CONDITION
5790 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5791 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5792 -- too full (it would otherwise have too many fields)
5794 -- Gigi restriction: This node never appears
5797 -- Sloc points to ENTRY
5798 -- Defining_Identifier (Node1)
5799 -- Entry_Body_Formal_Part (Node5)
5800 -- Declarations (List2)
5801 -- Handled_Statement_Sequence (Node4)
5802 -- Activation_Chain_Entity (Node3-Sem)
5804 -----------------------------------
5805 -- 9.5.2 Entry Body Formal Part --
5806 -----------------------------------
5808 -- ENTRY_BODY_FORMAL_PART ::=
5809 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5811 -- Note that an entry body formal part node is present even if it is
5812 -- empty. This reflects the grammar, in which it is the components of
5813 -- the entry body formal part that are optional, not the entry body
5814 -- formal part itself. Also this means that the barrier condition
5815 -- always has somewhere to be stored.
5817 -- Gigi restriction: This node never appears
5819 -- N_Entry_Body_Formal_Part
5820 -- Sloc points to first token
5821 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5822 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5823 -- Condition (Node1) from entry barrier of entry body
5825 --------------------------
5826 -- 9.5.2 Entry Barrier --
5827 --------------------------
5829 -- ENTRY_BARRIER ::= when CONDITION
5831 --------------------------------------
5832 -- 9.5.2 Entry Index Specification --
5833 --------------------------------------
5835 -- ENTRY_INDEX_SPECIFICATION ::=
5836 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5838 -- Gigi restriction: This node never appears
5840 -- N_Entry_Index_Specification
5841 -- Sloc points to FOR
5842 -- Defining_Identifier (Node1)
5843 -- Discrete_Subtype_Definition (Node4)
5845 ---------------------------------
5846 -- 9.5.3 Entry Call Statement --
5847 ---------------------------------
5849 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5851 -- The parser may generate a procedure call for this construct. The
5852 -- semantic pass must correct this misidentification where needed.
5854 -- Gigi restriction: This node never appears
5856 -- N_Entry_Call_Statement
5857 -- Sloc points to first token of name
5859 -- Parameter_Associations (List3) (set to No_List if no
5860 -- actual parameter part)
5861 -- First_Named_Actual (Node4-Sem)
5863 ------------------------------
5864 -- 9.5.4 Requeue Statement --
5865 ------------------------------
5867 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5869 -- Note: requeue statements are not permitted in Ada 83 mode
5871 -- Gigi restriction: This node never appears
5873 -- N_Requeue_Statement
5874 -- Sloc points to REQUEUE
5876 -- Abort_Present (Flag15)
5878 --------------------------
5879 -- 9.6 Delay Statement --
5880 --------------------------
5882 -- DELAY_STATEMENT ::=
5883 -- DELAY_UNTIL_STATEMENT
5884 -- | DELAY_RELATIVE_STATEMENT
5886 --------------------------------
5887 -- 9.6 Delay Until Statement --
5888 --------------------------------
5890 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5892 -- Note: delay until statements are not permitted in Ada 83 mode
5894 -- Gigi restriction: This node never appears
5896 -- N_Delay_Until_Statement
5897 -- Sloc points to DELAY
5898 -- Expression (Node3)
5900 -----------------------------------
5901 -- 9.6 Delay Relative Statement --
5902 -----------------------------------
5904 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5906 -- Gigi restriction: This node never appears
5908 -- N_Delay_Relative_Statement
5909 -- Sloc points to DELAY
5910 -- Expression (Node3)
5912 ---------------------------
5913 -- 9.7 Select Statement --
5914 ---------------------------
5916 -- SELECT_STATEMENT ::=
5918 -- | TIMED_ENTRY_CALL
5919 -- | CONDITIONAL_ENTRY_CALL
5920 -- | ASYNCHRONOUS_SELECT
5922 -----------------------------
5923 -- 9.7.1 Selective Accept --
5924 -----------------------------
5926 -- SELECTIVE_ACCEPT ::=
5929 -- SELECT_ALTERNATIVE
5932 -- SELECT_ALTERNATIVE}
5934 -- SEQUENCE_OF_STATEMENTS]
5937 -- Gigi restriction: This node never appears
5939 -- Note: the guard expression, if present, appears in the node for
5940 -- the select alternative.
5942 -- N_Selective_Accept
5943 -- Sloc points to SELECT
5944 -- Select_Alternatives (List1)
5945 -- Else_Statements (List4) (set to No_List if no else part)
5951 -- GUARD ::= when CONDITION =>
5953 -- As noted above, the CONDITION that is part of a GUARD is included
5954 -- in the node for the select alternative for convenience.
5956 -------------------------------
5957 -- 9.7.1 Select Alternative --
5958 -------------------------------
5960 -- SELECT_ALTERNATIVE ::=
5961 -- ACCEPT_ALTERNATIVE
5962 -- | DELAY_ALTERNATIVE
5963 -- | TERMINATE_ALTERNATIVE
5965 -------------------------------
5966 -- 9.7.1 Accept Alternative --
5967 -------------------------------
5969 -- ACCEPT_ALTERNATIVE ::=
5970 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5972 -- Gigi restriction: This node never appears
5974 -- N_Accept_Alternative
5975 -- Sloc points to ACCEPT
5976 -- Accept_Statement (Node2)
5977 -- Condition (Node1) from the guard (set to Empty if no guard present)
5978 -- Statements (List3) (set to Empty_List if no statements)
5979 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5980 -- Accept_Handler_Records (List5-Sem)
5982 ------------------------------
5983 -- 9.7.1 Delay Alternative --
5984 ------------------------------
5986 -- DELAY_ALTERNATIVE ::=
5987 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
5989 -- Gigi restriction: This node never appears
5991 -- N_Delay_Alternative
5992 -- Sloc points to DELAY
5993 -- Delay_Statement (Node2)
5994 -- Condition (Node1) from the guard (set to Empty if no guard present)
5995 -- Statements (List3) (set to Empty_List if no statements)
5996 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5998 ----------------------------------
5999 -- 9.7.1 Terminate Alternative --
6000 ----------------------------------
6002 -- TERMINATE_ALTERNATIVE ::= terminate;
6004 -- Gigi restriction: This node never appears
6006 -- N_Terminate_Alternative
6007 -- Sloc points to TERMINATE
6008 -- Condition (Node1) from the guard (set to Empty if no guard present)
6009 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6010 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
6012 -----------------------------
6013 -- 9.7.2 Timed Entry Call --
6014 -----------------------------
6016 -- TIMED_ENTRY_CALL ::=
6018 -- ENTRY_CALL_ALTERNATIVE
6020 -- DELAY_ALTERNATIVE
6023 -- Gigi restriction: This node never appears
6025 -- N_Timed_Entry_Call
6026 -- Sloc points to SELECT
6027 -- Entry_Call_Alternative (Node1)
6028 -- Delay_Alternative (Node4)
6030 -----------------------------------
6031 -- 9.7.2 Entry Call Alternative --
6032 -----------------------------------
6034 -- ENTRY_CALL_ALTERNATIVE ::=
6035 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
6037 -- PROCEDURE_OR_ENTRY_CALL ::=
6038 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
6040 -- Gigi restriction: This node never appears
6042 -- N_Entry_Call_Alternative
6043 -- Sloc points to first token of entry call statement
6044 -- Entry_Call_Statement (Node1)
6045 -- Statements (List3) (set to Empty_List if no statements)
6046 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6048 -----------------------------------
6049 -- 9.7.3 Conditional Entry Call --
6050 -----------------------------------
6052 -- CONDITIONAL_ENTRY_CALL ::=
6054 -- ENTRY_CALL_ALTERNATIVE
6056 -- SEQUENCE_OF_STATEMENTS
6059 -- Gigi restriction: This node never appears
6061 -- N_Conditional_Entry_Call
6062 -- Sloc points to SELECT
6063 -- Entry_Call_Alternative (Node1)
6064 -- Else_Statements (List4)
6066 --------------------------------
6067 -- 9.7.4 Asynchronous Select --
6068 --------------------------------
6070 -- ASYNCHRONOUS_SELECT ::=
6072 -- TRIGGERING_ALTERNATIVE
6077 -- Note: asynchronous select is not permitted in Ada 83 mode
6079 -- Gigi restriction: This node never appears
6081 -- N_Asynchronous_Select
6082 -- Sloc points to SELECT
6083 -- Triggering_Alternative (Node1)
6084 -- Abortable_Part (Node2)
6086 -----------------------------------
6087 -- 9.7.4 Triggering Alternative --
6088 -----------------------------------
6090 -- TRIGGERING_ALTERNATIVE ::=
6091 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
6093 -- Gigi restriction: This node never appears
6095 -- N_Triggering_Alternative
6096 -- Sloc points to first token of triggering statement
6097 -- Triggering_Statement (Node1)
6098 -- Statements (List3) (set to Empty_List if no statements)
6099 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6101 ---------------------------------
6102 -- 9.7.4 Triggering Statement --
6103 ---------------------------------
6105 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
6107 ---------------------------
6108 -- 9.7.4 Abortable Part --
6109 ---------------------------
6111 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
6113 -- Gigi restriction: This node never appears
6116 -- Sloc points to ABORT
6117 -- Statements (List3)
6119 --------------------------
6120 -- 9.8 Abort Statement --
6121 --------------------------
6123 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
6125 -- Gigi restriction: This node never appears
6127 -- N_Abort_Statement
6128 -- Sloc points to ABORT
6131 -------------------------
6132 -- 10.1.1 Compilation --
6133 -------------------------
6135 -- COMPILATION ::= {COMPILATION_UNIT}
6137 -- There is no explicit node in the tree for a compilation, since in
6138 -- general the compiler is processing only a single compilation unit
6139 -- at a time. It is possible to parse multiple units in syntax check
6140 -- only mode, but the trees are discarded in that case.
6142 ------------------------------
6143 -- 10.1.1 Compilation Unit --
6144 ------------------------------
6146 -- COMPILATION_UNIT ::=
6147 -- CONTEXT_CLAUSE LIBRARY_ITEM
6148 -- | CONTEXT_CLAUSE SUBUNIT
6150 -- The N_Compilation_Unit node itself represents the above syntax.
6151 -- However, there are two additional items not reflected in the above
6152 -- syntax. First we have the global declarations that are added by the
6153 -- code generator. These are outer level declarations (so they cannot
6154 -- be represented as being inside the units). An example is the wrapper
6155 -- subprograms that are created to do ABE checking. As always a list of
6156 -- declarations can contain actions as well (i.e. statements), and such
6157 -- statements are executed as part of the elaboration of the unit. Note
6158 -- that all such declarations are elaborated before the library unit.
6160 -- Similarly, certain actions need to be elaborated at the completion
6161 -- of elaboration of the library unit (notably the statement that sets
6162 -- the Boolean flag indicating that elaboration is complete).
6164 -- The third item not reflected in the syntax is pragmas that appear
6165 -- after the compilation unit. As always pragmas are a problem since
6166 -- they are not part of the formal syntax, but can be stuck into the
6167 -- source following a set of ad hoc rules, and we have to find an ad
6168 -- hoc way of sticking them into the tree. For pragmas that appear
6169 -- before the library unit, we just consider them to be part of the
6170 -- context clause, and pragmas can appear in the Context_Items list
6171 -- of the compilation unit. However, pragmas can also appear after
6172 -- the library item.
6174 -- To deal with all these problems, we create an auxiliary node for
6175 -- a compilation unit, referenced from the N_Compilation_Unit node,
6176 -- that contains these items.
6178 -- N_Compilation_Unit
6179 -- Sloc points to first token of defining unit name
6180 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
6181 -- Context_Items (List1) context items and pragmas preceding unit
6182 -- Private_Present (Flag15) set if library unit has private keyword
6183 -- Unit (Node2) library item or subunit
6184 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
6185 -- Has_No_Elaboration_Code (Flag17-Sem)
6186 -- Body_Required (Flag13-Sem) set for spec if body is required
6187 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
6188 -- Context_Pending (Flag16-Sem)
6189 -- First_Inlined_Subprogram (Node3-Sem)
6190 -- Has_Pragma_Suppress_All (Flag14-Sem)
6192 -- N_Compilation_Unit_Aux
6193 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
6194 -- Declarations (List2) (set to No_List if no global declarations)
6195 -- Actions (List1) (set to No_List if no actions)
6196 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
6197 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
6198 -- Default_Storage_Pool (Node3-Sem)
6200 --------------------------
6201 -- 10.1.1 Library Item --
6202 --------------------------
6205 -- [private] LIBRARY_UNIT_DECLARATION
6206 -- | LIBRARY_UNIT_BODY
6207 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
6209 -- Note: PRIVATE is not allowed in Ada 83 mode
6211 -- There is no explicit node in the tree for library item, instead
6212 -- the declaration or body, and the flag for private if present,
6213 -- appear in the N_Compilation_Unit node.
6215 --------------------------------------
6216 -- 10.1.1 Library Unit Declaration --
6217 --------------------------------------
6219 -- LIBRARY_UNIT_DECLARATION ::=
6220 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
6221 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
6223 -----------------------------------------------
6224 -- 10.1.1 Library Unit Renaming Declaration --
6225 -----------------------------------------------
6227 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
6228 -- PACKAGE_RENAMING_DECLARATION
6229 -- | GENERIC_RENAMING_DECLARATION
6230 -- | SUBPROGRAM_RENAMING_DECLARATION
6232 -------------------------------
6233 -- 10.1.1 Library unit body --
6234 -------------------------------
6236 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
6238 ------------------------------
6239 -- 10.1.1 Parent Unit Name --
6240 ------------------------------
6242 -- PARENT_UNIT_NAME ::= NAME
6244 ----------------------------
6245 -- 10.1.2 Context clause --
6246 ----------------------------
6248 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
6250 -- The context clause can include pragmas, and any pragmas that appear
6251 -- before the context clause proper (i.e. all configuration pragmas,
6252 -- also appear at the front of this list).
6254 --------------------------
6255 -- 10.1.2 Context_Item --
6256 --------------------------
6258 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
6260 -------------------------
6261 -- 10.1.2 With clause --
6262 -------------------------
6265 -- with library_unit_NAME {,library_unit_NAME};
6267 -- A separate With clause is built for each name, so that we have
6268 -- a Corresponding_Spec field for each with'ed spec. The flags
6269 -- First_Name and Last_Name are used to reconstruct the exact
6270 -- source form. When a list of names appears in one with clause,
6271 -- the first name in the list has First_Name set, and the last
6272 -- has Last_Name set. If the with clause has only one name, then
6273 -- both of the flags First_Name and Last_Name are set in this name.
6275 -- Note: in the case of implicit with's that are installed by the
6276 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
6277 -- set to Standard_Location, but it is incorrect to test the Sloc
6278 -- to find out if a with clause is implicit, test the flag instead.
6281 -- Sloc points to first token of library unit name
6282 -- Withed_Body (Node1-Sem)
6284 -- Next_Implicit_With (Node3-Sem)
6285 -- Library_Unit (Node4-Sem)
6286 -- Corresponding_Spec (Node5-Sem)
6287 -- First_Name (Flag5) (set to True if first name or only one name)
6288 -- Last_Name (Flag6) (set to True if last name or only one name)
6289 -- Context_Installed (Flag13-Sem)
6290 -- Elaborate_Present (Flag4-Sem)
6291 -- Elaborate_All_Present (Flag14-Sem)
6292 -- Elaborate_All_Desirable (Flag9-Sem)
6293 -- Elaborate_Desirable (Flag11-Sem)
6294 -- Private_Present (Flag15) set if with_clause has private keyword
6295 -- Implicit_With (Flag16-Sem)
6296 -- Implicit_With_From_Instantiation (Flag12-Sem)
6297 -- Limited_Present (Flag17) set if LIMITED is present
6298 -- Limited_View_Installed (Flag18-Sem)
6299 -- Unreferenced_In_Spec (Flag7-Sem)
6300 -- No_Entities_Ref_In_Spec (Flag8-Sem)
6302 -- Note: Limited_Present and Limited_View_Installed are used to support
6303 -- the implementation of Ada 2005 (AI-50217).
6305 -- Similarly, Private_Present is used to support the implementation of
6306 -- Ada 2005 (AI-50262).
6308 ----------------------
6309 -- With_Type clause --
6310 ----------------------
6312 -- This is a GNAT extension, used to implement mutually recursive
6313 -- types declared in different packages.
6315 -- Note: this is now obsolete. The functionality of this construct
6316 -- is now implemented by the Ada 2005 limited_with_clause.
6318 ---------------------
6319 -- 10.2 Body stub --
6320 ---------------------
6323 -- SUBPROGRAM_BODY_STUB
6324 -- | PACKAGE_BODY_STUB
6326 -- | PROTECTED_BODY_STUB
6328 ----------------------------------
6329 -- 10.1.3 Subprogram Body Stub --
6330 ----------------------------------
6332 -- SUBPROGRAM_BODY_STUB ::=
6333 -- SUBPROGRAM_SPECIFICATION is separate
6334 -- [ASPECT_SPECIFICATION];
6336 -- N_Subprogram_Body_Stub
6337 -- Sloc points to FUNCTION or PROCEDURE
6338 -- Specification (Node1)
6339 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6340 -- Library_Unit (Node4-Sem) points to the subunit
6341 -- Corresponding_Body (Node5-Sem)
6343 -------------------------------
6344 -- 10.1.3 Package Body Stub --
6345 -------------------------------
6347 -- PACKAGE_BODY_STUB ::=
6348 -- package body DEFINING_IDENTIFIER is separate
6349 -- [ASPECT_SPECIFICATION];
6351 -- N_Package_Body_Stub
6352 -- Sloc points to PACKAGE
6353 -- Defining_Identifier (Node1)
6354 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6355 -- Library_Unit (Node4-Sem) points to the subunit
6356 -- Corresponding_Body (Node5-Sem)
6358 ----------------------------
6359 -- 10.1.3 Task Body Stub --
6360 ----------------------------
6362 -- TASK_BODY_STUB ::=
6363 -- task body DEFINING_IDENTIFIER is separate
6364 -- [ASPECT_SPECIFICATION];
6367 -- Sloc points to TASK
6368 -- Defining_Identifier (Node1)
6369 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6370 -- Library_Unit (Node4-Sem) points to the subunit
6371 -- Corresponding_Body (Node5-Sem)
6373 ---------------------------------
6374 -- 10.1.3 Protected Body Stub --
6375 ---------------------------------
6377 -- PROTECTED_BODY_STUB ::=
6378 -- protected body DEFINING_IDENTIFIER is separate
6379 -- [ASPECT_SPECIFICATION];
6381 -- Note: protected body stubs are not allowed in Ada 83 mode
6383 -- N_Protected_Body_Stub
6384 -- Sloc points to PROTECTED
6385 -- Defining_Identifier (Node1)
6386 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6387 -- Library_Unit (Node4-Sem) points to the subunit
6388 -- Corresponding_Body (Node5-Sem)
6390 ---------------------
6391 -- 10.1.3 Subunit --
6392 ---------------------
6394 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
6397 -- Sloc points to SEPARATE
6398 -- Name (Node2) is the name of the parent unit
6399 -- Proper_Body (Node1) is the subunit body
6400 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
6402 ---------------------------------
6403 -- 11.1 Exception Declaration --
6404 ---------------------------------
6406 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
6407 -- [ASPECT_SPECIFICATIONS];
6409 -- For consistency with object declarations etc., the parser converts
6410 -- the case of multiple identifiers being declared to a series of
6411 -- declarations in which the expression is copied, using the More_Ids
6412 -- and Prev_Ids flags to remember the source form as described in the
6413 -- section on "Handling of Defining Identifier Lists".
6415 -- N_Exception_Declaration
6416 -- Sloc points to EXCEPTION
6417 -- Defining_Identifier (Node1)
6418 -- Expression (Node3-Sem)
6419 -- Renaming_Exception (Node2-Sem)
6420 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6421 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6423 ------------------------------------------
6424 -- 11.2 Handled Sequence Of Statements --
6425 ------------------------------------------
6427 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
6428 -- SEQUENCE_OF_STATEMENTS
6430 -- EXCEPTION_HANDLER
6431 -- {EXCEPTION_HANDLER}]
6433 -- cleanup_procedure_call (param, param, param, ...);]
6435 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
6436 -- used only internally currently, but is considered to be syntactic.
6437 -- At the moment, the only cleanup action allowed is a single call to
6438 -- a parameterless procedure, and the Identifier field of the node is
6439 -- the procedure to be called. The cleanup action occurs whenever the
6440 -- sequence of statements is left for any reason. The possible reasons
6442 -- 1. reaching the end of the sequence
6443 -- 2. exit, return, or goto
6444 -- 3. exception or abort
6445 -- For some back ends, such as gcc with ZCX, "at end" is implemented
6446 -- entirely in the back end. In this case, a handled sequence of
6447 -- statements with an "at end" cannot also have exception handlers.
6448 -- For other back ends, such as gcc with SJLJ and .NET, the
6449 -- implementation is split between the front end and back end; the front
6450 -- end implements 3, and the back end implements 1 and 2. In this case,
6451 -- if there is an "at end", the front end inserts the appropriate
6452 -- exception handler, and this handler takes precedence over "at end"
6453 -- in case of exception.
6455 -- The inserted exception handler is of the form:
6457 -- when all others =>
6461 -- where cleanup is the procedure to be called. The reason we do this is
6462 -- so that the front end can handle the necessary entries in the
6463 -- exception tables, and other exception handler actions required as
6464 -- part of the normal handling for exception handlers.
6466 -- The AT END cleanup handler protects only the sequence of statements
6467 -- (not the associated declarations of the parent), just like exception
6468 -- handlers. The big difference is that the cleanup procedure is called
6469 -- on either a normal or an abnormal exit from the statement sequence.
6471 -- Note: the list of Exception_Handlers can contain pragmas as well
6472 -- as actual handlers. In practice these pragmas can only occur at
6473 -- the start of the list, since any pragmas occurring later on will
6474 -- be included in the statement list of the corresponding handler.
6476 -- Note: although in the Ada syntax, the sequence of statements in
6477 -- a handled sequence of statements can only contain statements, we
6478 -- allow free mixing of declarations and statements in the resulting
6479 -- expanded tree. This is for example used to deal with the case of
6480 -- a cleanup procedure that must handle declarations as well as the
6481 -- statements of a block.
6483 -- N_Handled_Sequence_Of_Statements
6484 -- Sloc points to first token of first statement
6485 -- Statements (List3)
6486 -- End_Label (Node4) (set to Empty if expander generated)
6487 -- Exception_Handlers (List5) (set to No_List if none present)
6488 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
6489 -- First_Real_Statement (Node2-Sem)
6491 -- Note: the parent always contains a Declarations field which contains
6492 -- declarations associated with the handled sequence of statements. This
6493 -- is true even in the case of an accept statement (see description of
6494 -- the N_Accept_Statement node).
6496 -- End_Label refers to the containing construct
6498 -----------------------------
6499 -- 11.2 Exception Handler --
6500 -----------------------------
6502 -- EXCEPTION_HANDLER ::=
6503 -- when [CHOICE_PARAMETER_SPECIFICATION :]
6504 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
6505 -- SEQUENCE_OF_STATEMENTS
6507 -- Note: choice parameter specification is not allowed in Ada 83 mode
6509 -- N_Exception_Handler
6510 -- Sloc points to WHEN
6511 -- Choice_Parameter (Node2) (set to Empty if not present)
6512 -- Exception_Choices (List4)
6513 -- Statements (List3)
6514 -- Exception_Label (Node5-Sem) (set to Empty of not present)
6515 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
6516 -- Local_Raise_Not_OK (Flag7-Sem)
6517 -- Has_Local_Raise (Flag8-Sem)
6519 ------------------------------------------
6520 -- 11.2 Choice parameter specification --
6521 ------------------------------------------
6523 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
6525 ----------------------------
6526 -- 11.2 Exception Choice --
6527 ----------------------------
6529 -- EXCEPTION_CHOICE ::= exception_NAME | others
6531 -- Except in the case of OTHERS, no explicit node appears in the tree
6532 -- for exception choice. Instead the exception name appears directly.
6533 -- An OTHERS choice is represented by a N_Others_Choice node (see
6536 -- Note: for the exception choice created for an at end handler, the
6537 -- exception choice is an N_Others_Choice node with All_Others set.
6539 ---------------------------
6540 -- 11.3 Raise Statement --
6541 ---------------------------
6543 -- RAISE_STATEMENT ::= raise [exception_NAME];
6545 -- In Ada 2005, we have
6547 -- RAISE_STATEMENT ::=
6548 -- raise; | raise exception_NAME [with string_EXPRESSION];
6550 -- N_Raise_Statement
6551 -- Sloc points to RAISE
6552 -- Name (Node2) (set to Empty if no exception name present)
6553 -- Expression (Node3) (set to Empty if no expression present)
6554 -- From_At_End (Flag4-Sem)
6556 ----------------------------
6557 -- 11.3 Raise Expression --
6558 ----------------------------
6560 -- RAISE_EXPRESSION ::= raise exception_NAME [with string_EXPRESSION]
6562 -- N_Raise_Expression
6563 -- Sloc points to RAISE
6564 -- Name (Node2) (always present)
6565 -- Expression (Node3) (set to Empty if no expression present)
6566 -- Convert_To_Return_False (Flag13-Sem)
6567 -- plus fields for expression
6569 -------------------------------
6570 -- 12.1 Generic Declaration --
6571 -------------------------------
6573 -- GENERIC_DECLARATION ::=
6574 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
6576 ------------------------------------------
6577 -- 12.1 Generic Subprogram Declaration --
6578 ------------------------------------------
6580 -- GENERIC_SUBPROGRAM_DECLARATION ::=
6581 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION
6582 -- [ASPECT_SPECIFICATIONS];
6584 -- Note: Generic_Formal_Declarations can include pragmas
6586 -- N_Generic_Subprogram_Declaration
6587 -- Sloc points to GENERIC
6588 -- Specification (Node1) subprogram specification
6589 -- Corresponding_Body (Node5-Sem)
6590 -- Generic_Formal_Declarations (List2) from generic formal part
6591 -- Parent_Spec (Node4-Sem)
6593 ---------------------------------------
6594 -- 12.1 Generic Package Declaration --
6595 ---------------------------------------
6597 -- GENERIC_PACKAGE_DECLARATION ::=
6598 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
6599 -- [ASPECT_SPECIFICATIONS];
6601 -- Note: when we do generics right, the Activation_Chain_Entity entry
6602 -- for this node can be removed (since the expander won't see generic
6603 -- units any more)???.
6605 -- Note: Generic_Formal_Declarations can include pragmas
6607 -- N_Generic_Package_Declaration
6608 -- Sloc points to GENERIC
6609 -- Specification (Node1) package specification
6610 -- Corresponding_Body (Node5-Sem)
6611 -- Generic_Formal_Declarations (List2) from generic formal part
6612 -- Parent_Spec (Node4-Sem)
6613 -- Activation_Chain_Entity (Node3-Sem)
6615 -------------------------------
6616 -- 12.1 Generic Formal Part --
6617 -------------------------------
6619 -- GENERIC_FORMAL_PART ::=
6620 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
6622 ------------------------------------------------
6623 -- 12.1 Generic Formal Parameter Declaration --
6624 ------------------------------------------------
6626 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
6627 -- FORMAL_OBJECT_DECLARATION
6628 -- | FORMAL_TYPE_DECLARATION
6629 -- | FORMAL_SUBPROGRAM_DECLARATION
6630 -- | FORMAL_PACKAGE_DECLARATION
6632 ---------------------------------
6633 -- 12.3 Generic Instantiation --
6634 ---------------------------------
6636 -- GENERIC_INSTANTIATION ::=
6637 -- package DEFINING_PROGRAM_UNIT_NAME is
6638 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
6639 -- [ASPECT_SPECIFICATIONS];
6640 -- | [[not] overriding]
6641 -- procedure DEFINING_PROGRAM_UNIT_NAME is
6642 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
6643 -- [ASPECT_SPECIFICATIONS];
6644 -- | [[not] overriding]
6645 -- function DEFINING_DESIGNATOR is
6646 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
6647 -- [ASPECT_SPECIFICATIONS];
6649 -- N_Package_Instantiation
6650 -- Sloc points to PACKAGE
6651 -- Defining_Unit_Name (Node1)
6653 -- Generic_Associations (List3) (set to No_List if no
6654 -- generic actual part)
6655 -- Parent_Spec (Node4-Sem)
6656 -- Instance_Spec (Node5-Sem)
6657 -- ABE_Is_Certain (Flag18-Sem)
6659 -- N_Procedure_Instantiation
6660 -- Sloc points to PROCEDURE
6661 -- Defining_Unit_Name (Node1)
6663 -- Parent_Spec (Node4-Sem)
6664 -- Generic_Associations (List3) (set to No_List if no
6665 -- generic actual part)
6666 -- Instance_Spec (Node5-Sem)
6667 -- Must_Override (Flag14) set if overriding indicator present
6668 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6669 -- ABE_Is_Certain (Flag18-Sem)
6671 -- N_Function_Instantiation
6672 -- Sloc points to FUNCTION
6673 -- Defining_Unit_Name (Node1)
6675 -- Generic_Associations (List3) (set to No_List if no
6676 -- generic actual part)
6677 -- Parent_Spec (Node4-Sem)
6678 -- Instance_Spec (Node5-Sem)
6679 -- Must_Override (Flag14) set if overriding indicator present
6680 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6681 -- ABE_Is_Certain (Flag18-Sem)
6683 -- Note: overriding indicator is an Ada 2005 feature
6685 -------------------------------
6686 -- 12.3 Generic Actual Part --
6687 -------------------------------
6689 -- GENERIC_ACTUAL_PART ::=
6690 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
6692 -------------------------------
6693 -- 12.3 Generic Association --
6694 -------------------------------
6696 -- GENERIC_ASSOCIATION ::=
6697 -- [generic_formal_parameter_SELECTOR_NAME =>]
6699 -- Note: unlike the procedure call case, a generic association node
6700 -- is generated for every association, even if no formal parameter
6701 -- selector name is present. In this case the parser will leave the
6702 -- Selector_Name field set to Empty, to be filled in later by the
6705 -- In Ada 2005, a formal may be associated with a box, if the
6706 -- association is part of the list of actuals for a formal package.
6707 -- If the association is given by OTHERS => <>, the association is
6708 -- an N_Others_Choice.
6710 -- N_Generic_Association
6711 -- Sloc points to first token of generic association
6712 -- Selector_Name (Node2) (set to Empty if no formal
6713 -- parameter selector name)
6714 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
6715 -- Box_Present (Flag15) (for formal_package associations with a box)
6717 ---------------------------------------------
6718 -- 12.3 Explicit Generic Actual Parameter --
6719 ---------------------------------------------
6721 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
6722 -- EXPRESSION | variable_NAME | subprogram_NAME
6723 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
6725 -------------------------------------
6726 -- 12.4 Formal Object Declaration --
6727 -------------------------------------
6729 -- FORMAL_OBJECT_DECLARATION ::=
6730 -- DEFINING_IDENTIFIER_LIST :
6731 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
6732 -- [ASPECT_SPECIFICATIONS];
6733 -- | DEFINING_IDENTIFIER_LIST :
6734 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
6735 -- [ASPECT_SPECIFICATIONS];
6737 -- Although the syntax allows multiple identifiers in the list, the
6738 -- semantics is as though successive declarations were given with
6739 -- identical type definition and expression components. To simplify
6740 -- semantic processing, the parser represents a multiple declaration
6741 -- case as a sequence of single declarations, using the More_Ids and
6742 -- Prev_Ids flags to preserve the original source form as described
6743 -- in the section on "Handling of Defining Identifier Lists".
6745 -- N_Formal_Object_Declaration
6746 -- Sloc points to first identifier
6747 -- Defining_Identifier (Node1)
6748 -- In_Present (Flag15)
6749 -- Out_Present (Flag17)
6750 -- Null_Exclusion_Present (Flag11) (set to False if not present)
6751 -- Subtype_Mark (Node4) (set to Empty if not present)
6752 -- Access_Definition (Node3) (set to Empty if not present)
6753 -- Default_Expression (Node5) (set to Empty if no default expression)
6754 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6755 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6757 -----------------------------------
6758 -- 12.5 Formal Type Declaration --
6759 -----------------------------------
6761 -- FORMAL_TYPE_DECLARATION ::=
6762 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
6763 -- is FORMAL_TYPE_DEFINITION
6764 -- [ASPECT_SPECIFICATIONS];
6765 -- | type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [is tagged]
6767 -- N_Formal_Type_Declaration
6768 -- Sloc points to TYPE
6769 -- Defining_Identifier (Node1)
6770 -- Formal_Type_Definition (Node3)
6771 -- Discriminant_Specifications (List4) (set to No_List if no
6772 -- discriminant part)
6773 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
6775 ----------------------------------
6776 -- 12.5 Formal type definition --
6777 ----------------------------------
6779 -- FORMAL_TYPE_DEFINITION ::=
6780 -- FORMAL_PRIVATE_TYPE_DEFINITION
6781 -- | FORMAL_DERIVED_TYPE_DEFINITION
6782 -- | FORMAL_DISCRETE_TYPE_DEFINITION
6783 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
6784 -- | FORMAL_MODULAR_TYPE_DEFINITION
6785 -- | FORMAL_FLOATING_POINT_DEFINITION
6786 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
6787 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
6788 -- | FORMAL_ARRAY_TYPE_DEFINITION
6789 -- | FORMAL_ACCESS_TYPE_DEFINITION
6790 -- | FORMAL_INTERFACE_TYPE_DEFINITION
6791 -- | FORMAL_INCOMPLETE_TYPE_DEFINITION
6793 -- The Ada 2012 syntax introduces two new non-terminals:
6794 -- Formal_{Complete,Incomplete}_Type_Declaration just to introduce
6795 -- the latter category. Here we introduce an incomplete type definition
6796 -- in order to preserve as much as possible the existing structure.
6798 ---------------------------------------------
6799 -- 12.5.1 Formal Private Type Definition --
6800 ---------------------------------------------
6802 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
6803 -- [[abstract] tagged] [limited] private
6805 -- Note: TAGGED is not allowed in Ada 83 mode
6807 -- N_Formal_Private_Type_Definition
6808 -- Sloc points to PRIVATE
6809 -- Uninitialized_Variable (Node3-Sem)
6810 -- Abstract_Present (Flag4)
6811 -- Tagged_Present (Flag15)
6812 -- Limited_Present (Flag17)
6814 --------------------------------------------
6815 -- 12.5.1 Formal Derived Type Definition --
6816 --------------------------------------------
6818 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6819 -- [abstract] [limited | synchronized]
6820 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6821 -- Note: this construct is not allowed in Ada 83 mode
6823 -- N_Formal_Derived_Type_Definition
6824 -- Sloc points to NEW
6825 -- Subtype_Mark (Node4)
6826 -- Private_Present (Flag15)
6827 -- Abstract_Present (Flag4)
6828 -- Limited_Present (Flag17)
6829 -- Synchronized_Present (Flag7)
6830 -- Interface_List (List2) (set to No_List if none)
6832 -----------------------------------------------
6833 -- 12.5.1 Formal Incomplete Type Definition --
6834 -----------------------------------------------
6836 -- FORMAL_INCOMPLETE_TYPE_DEFINITION ::= [tagged]
6838 -- N_Formal_Incomplete_Type_Definition
6839 -- Sloc points to identifier of parent
6840 -- Tagged_Present (Flag15)
6842 ---------------------------------------------
6843 -- 12.5.2 Formal Discrete Type Definition --
6844 ---------------------------------------------
6846 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6848 -- N_Formal_Discrete_Type_Definition
6851 ---------------------------------------------------
6852 -- 12.5.2 Formal Signed Integer Type Definition --
6853 ---------------------------------------------------
6855 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6857 -- N_Formal_Signed_Integer_Type_Definition
6858 -- Sloc points to RANGE
6860 --------------------------------------------
6861 -- 12.5.2 Formal Modular Type Definition --
6862 --------------------------------------------
6864 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6866 -- N_Formal_Modular_Type_Definition
6867 -- Sloc points to MOD
6869 ----------------------------------------------
6870 -- 12.5.2 Formal Floating Point Definition --
6871 ----------------------------------------------
6873 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6875 -- N_Formal_Floating_Point_Definition
6876 -- Sloc points to DIGITS
6878 ----------------------------------------------------
6879 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6880 ----------------------------------------------------
6882 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6884 -- N_Formal_Ordinary_Fixed_Point_Definition
6885 -- Sloc points to DELTA
6887 ---------------------------------------------------
6888 -- 12.5.2 Formal Decimal Fixed Point Definition --
6889 ---------------------------------------------------
6891 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6893 -- Note: formal decimal fixed point definition not allowed in Ada 83
6895 -- N_Formal_Decimal_Fixed_Point_Definition
6896 -- Sloc points to DELTA
6898 ------------------------------------------
6899 -- 12.5.3 Formal Array Type Definition --
6900 ------------------------------------------
6902 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6904 -------------------------------------------
6905 -- 12.5.4 Formal Access Type Definition --
6906 -------------------------------------------
6908 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6910 ----------------------------------------------
6911 -- 12.5.5 Formal Interface Type Definition --
6912 ----------------------------------------------
6914 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6916 -----------------------------------------
6917 -- 12.6 Formal Subprogram Declaration --
6918 -----------------------------------------
6920 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6921 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6922 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6924 --------------------------------------------------
6925 -- 12.6 Formal Concrete Subprogram Declaration --
6926 --------------------------------------------------
6928 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6929 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
6930 -- [ASPECT_SPECIFICATIONS];
6932 -- N_Formal_Concrete_Subprogram_Declaration
6933 -- Sloc points to WITH
6934 -- Specification (Node1)
6935 -- Default_Name (Node2) (set to Empty if no subprogram default)
6936 -- Box_Present (Flag15)
6938 -- Note: if no subprogram default is present, then Name is set
6939 -- to Empty, and Box_Present is False.
6941 --------------------------------------------------
6942 -- 12.6 Formal Abstract Subprogram Declaration --
6943 --------------------------------------------------
6945 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6946 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
6947 -- [ASPECT_SPECIFICATIONS];
6949 -- N_Formal_Abstract_Subprogram_Declaration
6950 -- Sloc points to WITH
6951 -- Specification (Node1)
6952 -- Default_Name (Node2) (set to Empty if no subprogram default)
6953 -- Box_Present (Flag15)
6955 -- Note: if no subprogram default is present, then Name is set
6956 -- to Empty, and Box_Present is False.
6958 ------------------------------
6959 -- 12.6 Subprogram Default --
6960 ------------------------------
6962 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6964 -- There is no separate node in the tree for a subprogram default.
6965 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6966 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6967 -- default name or box indication, as needed.
6969 ------------------------
6970 -- 12.6 Default Name --
6971 ------------------------
6973 -- DEFAULT_NAME ::= NAME
6975 --------------------------------------
6976 -- 12.7 Formal Package Declaration --
6977 --------------------------------------
6979 -- FORMAL_PACKAGE_DECLARATION ::=
6980 -- with package DEFINING_IDENTIFIER
6981 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
6982 -- [ASPECT_SPECIFICATIONS];
6984 -- Note: formal package declarations not allowed in Ada 83 mode
6986 -- N_Formal_Package_Declaration
6987 -- Sloc points to WITH
6988 -- Defining_Identifier (Node1)
6990 -- Generic_Associations (List3) (set to No_List if (<>) case or
6991 -- empty generic actual part)
6992 -- Box_Present (Flag15)
6993 -- Instance_Spec (Node5-Sem)
6994 -- ABE_Is_Certain (Flag18-Sem)
6996 --------------------------------------
6997 -- 12.7 Formal Package Actual Part --
6998 --------------------------------------
7000 -- FORMAL_PACKAGE_ACTUAL_PART ::=
7002 -- | [GENERIC_ACTUAL_PART]
7003 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
7005 -- FORMAL_PACKAGE_ASSOCIATION ::=
7006 -- GENERIC_ASSOCIATION
7007 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
7009 -- There is no explicit node in the tree for a formal package actual
7010 -- part. Instead the information appears in the parent node (i.e. the
7011 -- formal package declaration node itself).
7013 -- There is no explicit node for a formal package association. All of
7014 -- them are represented either by a generic association, possibly with
7015 -- Box_Present, or by an N_Others_Choice.
7017 ---------------------------------
7018 -- 13.1 Representation clause --
7019 ---------------------------------
7021 -- REPRESENTATION_CLAUSE ::=
7022 -- ATTRIBUTE_DEFINITION_CLAUSE
7023 -- | ENUMERATION_REPRESENTATION_CLAUSE
7024 -- | RECORD_REPRESENTATION_CLAUSE
7027 ----------------------
7028 -- 13.1 Local Name --
7029 ----------------------
7033 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
7034 -- | library_unit_NAME
7036 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
7037 -- as an attribute reference, which has essentially the same form.
7039 ---------------------------------------
7040 -- 13.3 Attribute definition clause --
7041 ---------------------------------------
7043 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
7044 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
7045 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
7047 -- In Ada 83, the expression must be a simple expression and the
7048 -- local name must be a direct name.
7050 -- Note: the only attribute definition clause that is processed by
7051 -- gigi is an address clause. For all other cases, the information
7052 -- is extracted by the front end and either results in setting entity
7053 -- information, e.g. Esize for the Size clause, or in appropriate
7054 -- expansion actions (e.g. in the case of Storage_Size).
7056 -- For an address clause, Gigi constructs the appropriate addressing
7057 -- code. It also ensures that no aliasing optimizations are made
7058 -- for the object for which the address clause appears.
7060 -- Note: for an address clause used to achieve an overlay:
7064 -- for B'Address use A'Address;
7066 -- the above rule means that Gigi will ensure that no optimizations
7067 -- will be made for B that would violate the implementation advice
7068 -- of RM 13.3(19). However, this advice applies only to B and not
7069 -- to A, which seems unfortunate. The GNAT front end will mark the
7070 -- object A as volatile to also prevent unwanted optimization
7071 -- assumptions based on no aliasing being made for B.
7073 -- N_Attribute_Definition_Clause
7074 -- Sloc points to FOR
7075 -- Name (Node2) the local name
7076 -- Chars (Name1) the identifier name from the attribute designator
7077 -- Expression (Node3) the expression or name
7078 -- Entity (Node4-Sem)
7079 -- Next_Rep_Item (Node5-Sem)
7080 -- From_At_Mod (Flag4-Sem)
7081 -- Check_Address_Alignment (Flag11-Sem)
7082 -- From_Aspect_Specification (Flag13-Sem)
7083 -- Is_Delayed_Aspect (Flag14-Sem)
7084 -- Address_Warning_Posted (Flag18-Sem)
7086 -- Note: if From_Aspect_Specification is set, then Sloc points to the
7087 -- aspect name, and Entity is resolved already to reference the entity
7088 -- to which the aspect applies.
7090 -----------------------------------
7091 -- 13.3.1 Aspect Specifications --
7092 -----------------------------------
7094 -- We modify the RM grammar here, the RM grammar is:
7096 -- ASPECT_SPECIFICATION ::=
7097 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {,
7098 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
7100 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7102 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7104 -- That's inconvenient, since there is no non-terminal name for a single
7105 -- entry in the list of aspects. So we use this grammar instead:
7107 -- ASPECT_SPECIFICATIONS ::=
7108 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
7110 -- ASPECT_SPECIFICATION =>
7111 -- ASPECT_MARK [=> ASPECT_DEFINITION]
7113 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7115 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7117 -- Note that for Annotate, the ASPECT_DEFINITION is a pure positional
7118 -- aggregate with the elements of the aggregate corresponding to the
7119 -- successive arguments of the corresponding pragma.
7121 -- See separate package Aspects for details on the incorporation of
7122 -- these nodes into the tree, and how aspect specifications for a given
7123 -- declaration node are associated with that node.
7125 -- N_Aspect_Specification
7126 -- Sloc points to aspect identifier
7127 -- Identifier (Node1) aspect identifier
7128 -- Aspect_Rep_Item (Node2-Sem)
7129 -- Expression (Node3) Aspect_Definition (set to Empty if none)
7130 -- Entity (Node4-Sem) entity to which the aspect applies
7131 -- Next_Rep_Item (Node5-Sem)
7132 -- Class_Present (Flag6) Set if 'Class present
7133 -- Is_Ignored (Flag9-Sem)
7134 -- Is_Checked (Flag11-Sem)
7135 -- Uneval_Old_Accept (Flag13-Sem)
7136 -- Is_Delayed_Aspect (Flag14-Sem)
7137 -- Is_Disabled (Flag15-Sem)
7138 -- Is_Boolean_Aspect (Flag16-Sem)
7139 -- Split_PPC (Flag17) Set if split pre/post attribute
7140 -- Uneval_Old_Warn (Flag18-Sem)
7142 -- Note: Aspect_Specification is an Ada 2012 feature
7144 -- Note: The Identifier serves to identify the aspect involved (it
7145 -- is the aspect whose name corresponds to the Chars field). This
7146 -- means that the other fields of this identifier are unused, and
7147 -- in particular we use the Entity field of this identifier to save
7148 -- a copy of the expression for visibility analysis, see spec of
7149 -- Sem_Ch13 for full details of this usage.
7151 -- In the case of aspects of the form xxx'Class, the aspect identifier
7152 -- is for xxx, and Class_Present is set to True.
7154 -- Note: When a Pre or Post aspect specification is processed, it is
7155 -- broken into AND THEN sections. The left most section has Split_PPC
7156 -- set to False, indicating that it is the original specification (e.g.
7157 -- for posting errors). For the other sections, Split_PPC is set True.
7159 ---------------------------------------------
7160 -- 13.4 Enumeration representation clause --
7161 ---------------------------------------------
7163 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
7164 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
7166 -- In Ada 83, the name must be a direct name
7168 -- N_Enumeration_Representation_Clause
7169 -- Sloc points to FOR
7170 -- Identifier (Node1) direct name
7171 -- Array_Aggregate (Node3)
7172 -- Next_Rep_Item (Node5-Sem)
7174 ---------------------------------
7175 -- 13.4 Enumeration aggregate --
7176 ---------------------------------
7178 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
7180 ------------------------------------------
7181 -- 13.5.1 Record representation clause --
7182 ------------------------------------------
7184 -- RECORD_REPRESENTATION_CLAUSE ::=
7185 -- for first_subtype_LOCAL_NAME use
7186 -- record [MOD_CLAUSE]
7187 -- {COMPONENT_CLAUSE}
7190 -- Gigi restriction: Mod_Clause is always Empty (if present it is
7191 -- replaced by a corresponding Alignment attribute definition clause).
7193 -- Note: Component_Clauses can include pragmas
7195 -- N_Record_Representation_Clause
7196 -- Sloc points to FOR
7197 -- Identifier (Node1) direct name
7198 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
7199 -- Component_Clauses (List3)
7200 -- Next_Rep_Item (Node5-Sem)
7202 ------------------------------
7203 -- 13.5.1 Component clause --
7204 ------------------------------
7206 -- COMPONENT_CLAUSE ::=
7207 -- component_LOCAL_NAME at POSITION
7208 -- range FIRST_BIT .. LAST_BIT;
7210 -- N_Component_Clause
7211 -- Sloc points to AT
7212 -- Component_Name (Node1) points to Name or Attribute_Reference
7214 -- First_Bit (Node3)
7217 ----------------------
7218 -- 13.5.1 Position --
7219 ----------------------
7221 -- POSITION ::= static_EXPRESSION
7223 -----------------------
7224 -- 13.5.1 First_Bit --
7225 -----------------------
7227 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
7229 ----------------------
7230 -- 13.5.1 Last_Bit --
7231 ----------------------
7233 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
7235 --------------------------
7236 -- 13.8 Code statement --
7237 --------------------------
7239 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
7241 -- Note: in GNAT, the qualified expression has the form
7243 -- Asm_Insn'(Asm (...));
7245 -- See package System.Machine_Code in file s-maccod.ads for details on
7246 -- the allowed parameters to Asm. There are two ways this node can
7247 -- arise, as a code statement, in which case the expression is the
7248 -- qualified expression, or as a result of the expansion of an intrinsic
7249 -- call to the Asm or Asm_Input procedure.
7252 -- Sloc points to first token of the expression
7253 -- Expression (Node3)
7255 -- Note: package Exp_Code contains an abstract functional interface
7256 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
7258 ------------------------
7259 -- 13.12 Restriction --
7260 ------------------------
7263 -- restriction_IDENTIFIER
7264 -- | restriction_parameter_IDENTIFIER => EXPRESSION
7266 -- There is no explicit node for restrictions. Instead the restriction
7267 -- appears in normal pragma syntax as a pragma argument association,
7268 -- which has the same syntactic form.
7270 --------------------------
7271 -- B.2 Shift Operators --
7272 --------------------------
7274 -- Calls to the intrinsic shift functions are converted to one of
7275 -- the following shift nodes, which have the form of normal binary
7276 -- operator names. Note that for a given shift operation, one node
7277 -- covers all possible types, as for normal operators.
7279 -- Note: it is perfectly permissible for the expander to generate
7280 -- shift operation nodes directly, in which case they will be analyzed
7281 -- and parsed in the usual manner.
7283 -- Sprint syntax: shift-function-name!(expr, count)
7285 -- Note: the Left_Opnd field holds the first argument (the value to
7286 -- be shifted). The Right_Opnd field holds the second argument (the
7287 -- shift count). The Chars field is the name of the intrinsic function.
7290 -- Sloc points to the function name
7291 -- plus fields for binary operator
7292 -- plus fields for expression
7293 -- Shift_Count_OK (Flag4-Sem)
7295 -- N_Op_Rotate_Right
7296 -- Sloc points to the function name
7297 -- plus fields for binary operator
7298 -- plus fields for expression
7299 -- Shift_Count_OK (Flag4-Sem)
7302 -- Sloc points to the function name
7303 -- plus fields for binary operator
7304 -- plus fields for expression
7305 -- Shift_Count_OK (Flag4-Sem)
7307 -- N_Op_Shift_Right_Arithmetic
7308 -- Sloc points to the function name
7309 -- plus fields for binary operator
7310 -- plus fields for expression
7311 -- Shift_Count_OK (Flag4-Sem)
7314 -- Sloc points to the function name
7315 -- plus fields for binary operator
7316 -- plus fields for expression
7317 -- Shift_Count_OK (Flag4-Sem)
7319 -- Note: N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic
7320 -- never appear in the expanded tree if Modify_Tree_For_C mode is set.
7322 -- Note: For N_Op_Shift_Left and N_Op_Shift_Right, the right operand is
7323 -- always less than the word size if Modify_Tree_For_C mode is set.
7325 --------------------------
7326 -- Obsolescent Features --
7327 --------------------------
7329 -- The syntax descriptions and tree nodes for obsolescent features are
7330 -- grouped together, corresponding to their location in appendix I in
7331 -- the RM. However, parsing and semantic analysis for these constructs
7332 -- is located in an appropriate chapter (see individual notes).
7334 ---------------------------
7335 -- J.3 Delta Constraint --
7336 ---------------------------
7338 -- Note: the parse routine for this construct is located in section
7339 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
7340 -- where delta constraint logically belongs.
7342 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
7344 -- N_Delta_Constraint
7345 -- Sloc points to DELTA
7346 -- Delta_Expression (Node3)
7347 -- Range_Constraint (Node4) (set to Empty if not present)
7349 --------------------
7351 --------------------
7353 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
7355 -- Note: the parse routine for this construct is located in Par-Ch13,
7356 -- and the semantic analysis is in Sem_Ch13, where at clause logically
7357 -- belongs if it were not obsolescent.
7359 -- Note: in Ada 83 the expression must be a simple expression
7361 -- Gigi restriction: This node never appears, it is rewritten as an
7362 -- address attribute definition clause.
7365 -- Sloc points to FOR
7366 -- Identifier (Node1)
7367 -- Expression (Node3)
7369 ---------------------
7370 -- J.8 Mod clause --
7371 ---------------------
7373 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
7375 -- Note: the parse routine for this construct is located in Par-Ch13,
7376 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
7377 -- belongs if it were not obsolescent.
7379 -- Note: in Ada 83, the expression must be a simple expression
7381 -- Gigi restriction: this node never appears. It is replaced
7382 -- by a corresponding Alignment attribute definition clause.
7384 -- Note: pragmas can appear before and after the MOD_CLAUSE since
7385 -- its name has "clause" in it. This is rather strange, but is quite
7386 -- definitely specified. The pragmas before are collected in the
7387 -- Pragmas_Before field of the mod clause node itself, and pragmas
7388 -- after are simply swallowed up in the list of component clauses.
7391 -- Sloc points to AT
7392 -- Expression (Node3)
7393 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
7395 --------------------
7396 -- Semantic Nodes --
7397 --------------------
7399 -- These semantic nodes are used to hold additional semantic information.
7400 -- They are inserted into the tree as a result of semantic processing.
7401 -- Although there are no legitimate source syntax constructions that
7402 -- correspond directly to these nodes, we need a source syntax for the
7403 -- reconstructed tree printed by Sprint, and the node descriptions here
7404 -- show this syntax.
7406 ------------------------
7407 -- Compound Statement --
7408 ------------------------
7410 -- This node is created by the analyzer/expander to handle some
7411 -- expansion cases where a sequence of actions needs to be captured
7412 -- within a single node (which acts as a container and allows the
7413 -- entire list of actions to be moved around as a whole) appearing
7414 -- in a sequence of statements.
7416 -- This is the statement counterpart to the expression node
7417 -- N_Expression_With_Actions.
7419 -- The required semantics is that the set of actions is executed in
7420 -- the order in which it appears, as though they appeared by themselves
7421 -- in the enclosing list of declarations of statements. Unlike what
7422 -- happens when using an N_Block_Statement, no new scope is introduced.
7424 -- Note: for the time being, this is used only as a transient
7425 -- representation during expansion, and all compound statement nodes
7426 -- must be exploded back to their constituent statements before handing
7427 -- the tree to the back end.
7429 -- Sprint syntax: do
7436 -- N_Compound_Statement
7443 -- This node is used to hold the various parts of an entry, subprogram
7444 -- [body] or package [body] contract, in particular:
7445 -- Abstract states declared by a package declaration
7446 -- Contract cases that apply to a subprogram
7447 -- Dependency relations of inputs and output of a subprogram
7448 -- Global annotations classifying data as input or output
7449 -- Initialization sequences for a package declaration
7450 -- Pre- and postconditions that apply to a subprogram
7452 -- The node appears in an entry and [generic] subprogram [body] entity.
7454 -- Sprint syntax: <none> as the node should not appear in the tree, but
7455 -- only attached to an entry or [generic] subprogram
7459 -- Sloc points to the subprogram's name
7460 -- Pre_Post_Conditions (Node1) (set to Empty if none)
7461 -- Contract_Test_Cases (Node2) (set to Empty if none)
7462 -- Classifications (Node3) (set to Empty if none)
7464 -- Pre_Post_Conditions contains a collection of pragmas that correspond
7465 -- to pre- and postconditions associated with an entry or a subprogram
7466 -- [body or stub]. The pragmas can either come from source or be the
7467 -- byproduct of aspect expansion. Currently the following pragmas appear
7474 -- The ordering in the list is in LIFO fashion.
7476 -- Note that there might be multiple preconditions or postconditions
7477 -- in this list, either because they come from separate pragmas in the
7478 -- source, or because a Pre (resp. Post) aspect specification has been
7479 -- broken into AND THEN sections. See Split_PPC for details.
7481 -- Contract_Test_Cases contains a collection of pragmas that correspond
7482 -- to aspects/pragmas Contract_Cases and Test_Case. The ordering in the
7483 -- list is in LIFO fashion.
7485 -- Classifications contains pragmas that either declare, categorize or
7486 -- establish dependencies between subprogram or package inputs and
7487 -- outputs. Currently the following pragmas appear in this list:
7495 -- Initial_Condition
7501 -- The ordering is in LIFO fashion.
7507 -- The N_Expanded_Name node is used to represent a selected component
7508 -- name that has been resolved to an expanded name. The semantic phase
7509 -- replaces N_Selected_Component nodes that represent names by the use
7510 -- of this node, leaving the N_Selected_Component node used only when
7511 -- the prefix is a record or protected type.
7513 -- The fields of the N_Expanded_Name node are layed out identically
7514 -- to those of the N_Selected_Component node, allowing conversion of
7515 -- an expanded name node to a selected component node to be done
7516 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
7518 -- There is no special sprint syntax for an expanded name
7521 -- Sloc points to the period
7522 -- Chars (Name1) copy of Chars field of selector name
7524 -- Selector_Name (Node2)
7525 -- Entity (Node4-Sem)
7526 -- Associated_Node (Node4-Sem)
7527 -- Has_Private_View (Flag11-Sem) set in generic units.
7528 -- Redundant_Use (Flag13-Sem)
7529 -- Atomic_Sync_Required (Flag14-Sem)
7530 -- plus fields for expression
7532 -----------------------------
7533 -- Expression With Actions --
7534 -----------------------------
7536 -- This node is created by the analyzer/expander to handle some
7537 -- expansion cases, notably short circuit forms where there are
7538 -- actions associated with the right-hand side operand.
7540 -- The N_Expression_With_Actions node represents an expression with
7541 -- an associated set of actions (which are executable statements and
7542 -- declarations, as might occur in a handled statement sequence).
7544 -- The required semantics is that the set of actions is executed in
7545 -- the order in which it appears just before the expression is
7546 -- evaluated (and these actions must only be executed if the value
7547 -- of the expression is evaluated). The node is considered to be
7548 -- a subexpression, whose value is the value of the Expression after
7549 -- executing all the actions.
7551 -- If the actions contain declarations, then these declarations may
7552 -- be referenced within the expression. However note that there is
7553 -- no proper scope associated with the expression-with-action, so the
7554 -- back-end will elaborate them in the context of the enclosing scope.
7556 -- Sprint syntax: do
7561 -- in expression end
7563 -- N_Expression_With_Actions
7565 -- Expression (Node3)
7566 -- plus fields for expression
7568 -- Note: In the final generated tree presented to the code generator,
7569 -- the actions list is always non-null, since there is no point in this
7570 -- node if the actions are Empty. During semantic analysis there are
7571 -- cases where it is convenient to temporarily generate an empty actions
7572 -- list. This arises in cases where we create such an empty actions
7573 -- list, and it may or may not end up being a place where additional
7574 -- actions are inserted. The expander removes such empty cases after
7575 -- the expression of the node is fully analyzed and expanded, at which
7576 -- point it is safe to remove it, since no more actions can be inserted.
7578 -- Note: In Modify_Tree_For_C, we never generate any declarations in
7579 -- the action list, which can contain only non-declarative statements.
7581 --------------------
7582 -- Free Statement --
7583 --------------------
7585 -- The N_Free_Statement node is generated as a result of a call to an
7586 -- instantiation of Unchecked_Deallocation. The instantiation of this
7587 -- generic is handled specially and generates this node directly.
7589 -- Sprint syntax: free expression
7592 -- Sloc is copied from the unchecked deallocation call
7593 -- Expression (Node3) argument to unchecked deallocation call
7594 -- Storage_Pool (Node1-Sem)
7595 -- Procedure_To_Call (Node2-Sem)
7596 -- Actual_Designated_Subtype (Node4-Sem)
7598 -- Note: in the case where a debug source file is generated, the Sloc
7599 -- for this node points to the FREE keyword in the Sprint file output.
7605 -- This node marks the point in a declarative part at which an entity
7606 -- declared therein becomes frozen. The expander places initialization
7607 -- procedures for types at those points. Gigi uses the freezing point
7608 -- to elaborate entities that may depend on previous private types.
7610 -- See the section in Einfo "Delayed Freezing and Elaboration" for
7611 -- a full description of the use of this node.
7613 -- The Entity field points back to the entity for the type (whose
7614 -- Freeze_Node field points back to this freeze node).
7616 -- The Actions field contains a list of declarations and statements
7617 -- generated by the expander which are associated with the freeze
7618 -- node, and are elaborated as though the freeze node were replaced
7619 -- by this sequence of actions.
7621 -- Note: the Sloc field in the freeze node references a construct
7622 -- associated with the freezing point. This is used for posting
7623 -- messages in some error/warning situations, e.g. the case where
7624 -- a primitive operation of a tagged type is declared too late.
7626 -- Sprint syntax: freeze entity-name [
7631 -- Sloc points near freeze point (see above special note)
7632 -- Entity (Node4-Sem)
7633 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
7634 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
7635 -- Actions (List1) (set to No_List if no freeze actions)
7636 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
7638 -- The Actions field holds actions associated with the freeze. These
7639 -- actions are elaborated at the point where the type is frozen.
7641 -- Note: in the case where a debug source file is generated, the Sloc
7642 -- for this node points to the FREEZE keyword in the Sprint file output.
7644 ---------------------------
7645 -- Freeze Generic Entity --
7646 ---------------------------
7648 -- The freeze point of an entity indicates the point at which the
7649 -- information needed to generate code for the entity is complete.
7650 -- The freeze node for an entity triggers expander activities, such as
7651 -- build initialization procedures, and backend activities, such as
7652 -- completing the elaboration of packages.
7654 -- For entities declared within a generic unit, for which no code is
7655 -- generated, the freeze point is not equally meaningful. However, in
7656 -- Ada 2012 several semantic checks on declarations must be delayed to
7657 -- the freeze point, and we need to include such a mark in the tree to
7658 -- trigger these checks. The Freeze_Generic_Entity node plays no other
7659 -- role, and is ignored by the expander and the back-end.
7661 -- Sprint syntax: freeze_generic entity-name
7663 -- N_Freeze_Generic_Entity
7664 -- Sloc points near freeze point
7665 -- Entity (Node4-Sem)
7667 --------------------------------
7668 -- Implicit Label Declaration --
7669 --------------------------------
7671 -- An implicit label declaration is created for every occurrence of a
7672 -- label on a statement or a label on a block or loop. It is chained
7673 -- in the declarations of the innermost enclosing block as specified
7674 -- in RM section 5.1 (3).
7676 -- The Defining_Identifier is the actual identifier for the statement
7677 -- identifier. Note that the occurrence of the label is a reference, NOT
7678 -- the defining occurrence. The defining occurrence occurs at the head
7679 -- of the innermost enclosing block, and is represented by this node.
7681 -- Note: from the grammar, this might better be called an implicit
7682 -- statement identifier declaration, but the term we choose seems
7683 -- friendlier, since at least informally statement identifiers are
7684 -- called labels in both cases (i.e. when used in labels, and when
7685 -- used as the identifiers of blocks and loops).
7687 -- Note: although this is logically a semantic node, since it does not
7688 -- correspond directly to a source syntax construction, these nodes are
7689 -- actually created by the parser in a post pass done just after parsing
7690 -- is complete, before semantic analysis is started (see Par.Labl).
7692 -- Sprint syntax: labelname : label;
7694 -- N_Implicit_Label_Declaration
7695 -- Sloc points to the << token for a statement identifier, or to the
7696 -- LOOP, DECLARE, or BEGIN token for a loop or block identifier
7697 -- Defining_Identifier (Node1)
7698 -- Label_Construct (Node2-Sem)
7700 -- Note: in the case where a debug source file is generated, the Sloc
7701 -- for this node points to the label name in the generated declaration.
7703 ---------------------
7704 -- Itype Reference --
7705 ---------------------
7707 -- This node is used to create a reference to an Itype. The only purpose
7708 -- is to make sure the Itype is defined if this is the first reference.
7710 -- A typical use of this node is when an Itype is to be referenced in
7711 -- two branches of an IF statement. In this case it is important that
7712 -- the first use of the Itype not be inside the conditional, since then
7713 -- it might not be defined if the other branch of the IF is taken, in
7714 -- the case where the definition generates elaboration code.
7716 -- The Itype field points to the referenced Itype
7718 -- Sprint syntax: reference itype-name
7720 -- N_Itype_Reference
7721 -- Sloc points to the node generating the reference
7722 -- Itype (Node1-Sem)
7724 -- Note: in the case where a debug source file is generated, the Sloc
7725 -- for this node points to the REFERENCE keyword in the file output.
7727 ---------------------
7728 -- Raise xxx Error --
7729 ---------------------
7731 -- One of these nodes is created during semantic analysis to replace
7732 -- a node for an expression that is determined to definitely raise
7733 -- the corresponding exception.
7735 -- The N_Raise_xxx_Error node may also stand alone in place
7736 -- of a declaration or statement, in which case it simply causes
7737 -- the exception to be raised (i.e. it is equivalent to a raise
7738 -- statement that raises the corresponding exception). This use
7739 -- is distinguished by the fact that the Etype in this case is
7740 -- Standard_Void_Type; in the subexpression case, the Etype is the
7741 -- same as the type of the subexpression which it replaces.
7743 -- If Condition is empty, then the raise is unconditional. If the
7744 -- Condition field is non-empty, it is a boolean expression which
7745 -- is first evaluated, and the exception is raised only if the
7746 -- value of the expression is True. In the unconditional case, the
7747 -- creation of this node is usually accompanied by a warning message
7748 -- error. The creation of this node will usually be accompanied by a
7749 -- message (unless it appears within the right operand of a short
7750 -- circuit form whose left argument is static and decisively
7751 -- eliminates elaboration of the raise operation. The condition field
7752 -- can ONLY be present when the node is used as a statement form, it
7753 -- may NOT be present in the case where the node appears within an
7756 -- The exception is generated with a message that contains the
7757 -- file name and line number, and then appended text. The Reason
7758 -- code shows the text to be added. The Reason code is an element
7759 -- of the type Types.RT_Exception_Code, and indicates both the
7760 -- message to be added, and the exception to be raised (which must
7761 -- match the node type). The value is stored by storing a Uint which
7762 -- is the Pos value of the enumeration element in this type.
7764 -- Gigi restriction: This expander ensures that the type of the
7765 -- Condition field is always Standard.Boolean, even if the type
7766 -- in the source is some non-standard boolean type.
7768 -- Sprint syntax: [xxx_error "msg"]
7769 -- or: [xxx_error when condition "msg"]
7771 -- N_Raise_Constraint_Error
7772 -- Sloc references related construct
7773 -- Condition (Node1) (set to Empty if no condition)
7775 -- plus fields for expression
7777 -- N_Raise_Program_Error
7778 -- Sloc references related construct
7779 -- Condition (Node1) (set to Empty if no condition)
7781 -- plus fields for expression
7783 -- N_Raise_Storage_Error
7784 -- Sloc references related construct
7785 -- Condition (Node1) (set to Empty if no condition)
7787 -- plus fields for expression
7789 -- Note: Sloc is copied from the expression generating the exception.
7790 -- In the case where a debug source file is generated, the Sloc for
7791 -- this node points to the left bracket in the Sprint file output.
7793 -- Note: the back end may be required to translate these nodes into
7794 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
7796 ---------------------------------------------
7797 -- Optimization of Exception Raise to Goto --
7798 ---------------------------------------------
7800 -- In some cases, the front end will determine that any exception raised
7801 -- by the back end for a certain exception should be transformed into a
7804 -- There are three kinds of exceptions raised by the back end (note that
7805 -- for this purpose we consider gigi to be part of the back end in the
7808 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
7809 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
7810 -- 3. Other cases not specifically marked by the front end
7812 -- Normally all such exceptions are translated into calls to the proper
7813 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
7814 -- and the exception message.
7816 -- The front end may determine that for a particular sequence of code,
7817 -- exceptions in any of these three categories for a particular builtin
7818 -- exception should result in a goto, rather than a call to Rcheck_xx.
7819 -- The exact sequence to be generated is:
7821 -- Local_Raise (exception'Identity);
7824 -- The front end marks such a sequence of code by bracketing it with
7825 -- push and pop nodes:
7827 -- N_Push_xxx_Label (referencing the label)
7829 -- (code where transformation is expected for exception xxx)
7833 -- The use of push/pop reflects the fact that such regions can properly
7834 -- nest, and one special case is a subregion in which no transformation
7835 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
7836 -- Exception_Label field is Empty.
7838 -- N_Push_Constraint_Error_Label
7839 -- Sloc references first statement in region covered
7840 -- Exception_Label (Node5-Sem)
7842 -- N_Push_Program_Error_Label
7843 -- Sloc references first statement in region covered
7844 -- Exception_Label (Node5-Sem)
7846 -- N_Push_Storage_Error_Label
7847 -- Sloc references first statement in region covered
7848 -- Exception_Label (Node5-Sem)
7850 -- N_Pop_Constraint_Error_Label
7851 -- Sloc references last statement in region covered
7853 -- N_Pop_Program_Error_Label
7854 -- Sloc references last statement in region covered
7856 -- N_Pop_Storage_Error_Label
7857 -- Sloc references last statement in region covered
7863 -- For a number of purposes, we need to construct references to objects.
7864 -- These references are subsequently treated as normal access values.
7865 -- An example is the construction of the parameter block passed to a
7866 -- task entry. The N_Reference node is provided for this purpose. It is
7867 -- similar in effect to the use of the Unrestricted_Access attribute,
7868 -- and like Unrestricted_Access can be applied to objects which would
7869 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
7870 -- objects which are not aliased, and slices). In addition it can be
7871 -- applied to composite type values as well as objects, including string
7872 -- values and aggregates.
7874 -- Note: we use the Prefix field for this expression so that the
7875 -- resulting node can be treated using common code with the attribute
7876 -- nodes for the 'Access and related attributes. Logically it would make
7877 -- more sense to call it an Expression field, but then we would have to
7878 -- special case the treatment of the N_Reference node.
7880 -- Note: evaluating a N_Reference node is guaranteed to yield a non-null
7881 -- value at run time. Therefore, it is valid to set Is_Known_Non_Null on
7882 -- a temporary initialized to a N_Reference node in order to eliminate
7883 -- superfluous access checks.
7885 -- Sprint syntax: prefix'reference
7888 -- Sloc is copied from the expression
7890 -- plus fields for expression
7892 -- Note: in the case where a debug source file is generated, the Sloc
7893 -- for this node points to the quote in the Sprint file output.
7899 -- SCIL nodes are special nodes added to the tree when the CodePeer mode
7900 -- is active. They are only generated if SCIL generation is enabled.
7901 -- A standard tree-walk will not encounter these nodes even if they
7902 -- are present; these nodes are only accessible via the function
7903 -- SCIL_LL.Get_SCIL_Node. These nodes have no associated dynamic
7906 -- Sprint syntax: [ <node kind> ]
7907 -- No semantic field values are displayed.
7909 -- N_SCIL_Dispatch_Table_Tag_Init
7910 -- Sloc references a node for a tag initialization
7911 -- SCIL_Entity (Node4-Sem)
7913 -- An N_SCIL_Dispatch_Table_Tag_Init node may be associated (via
7914 -- Get_SCIL_Node) with the N_Object_Declaration node corresponding to
7915 -- the declaration of the dispatch table for a tagged type.
7917 -- N_SCIL_Dispatching_Call
7918 -- Sloc references the node of a dispatching call
7919 -- SCIL_Target_Prim (Node2-Sem)
7920 -- SCIL_Entity (Node4-Sem)
7921 -- SCIL_Controlling_Tag (Node5-Sem)
7923 -- An N_Scil_Dispatching call node may be associated (via Get_SCIL_Node)
7924 -- with the N_Procedure_Call or N_Function_Call node (or a rewriting
7925 -- thereof) corresponding to a dispatching call.
7927 -- N_SCIL_Membership_Test
7928 -- Sloc references the node of a membership test
7929 -- SCIL_Tag_Value (Node5-Sem)
7930 -- SCIL_Entity (Node4-Sem)
7932 -- An N_Scil_Membership_Test node may be associated (via Get_SCIL_Node)
7933 -- with the N_In node (or a rewriting thereof) corresponding to a
7934 -- classwide membership test.
7936 --------------------------
7937 -- Unchecked Expression --
7938 --------------------------
7940 -- An unchecked expression is one that must be analyzed and resolved
7941 -- with all checks off, regardless of the current setting of scope
7944 -- Sprint syntax: `(expression)
7946 -- Note: this node is always removed from the tree (and replaced by
7947 -- its constituent expression) on completion of analysis, so it only
7948 -- appears in intermediate trees, and will never be seen by Gigi.
7950 -- N_Unchecked_Expression
7951 -- Sloc is a copy of the Sloc of the expression
7952 -- Expression (Node3)
7953 -- plus fields for expression
7955 -- Note: in the case where a debug source file is generated, the Sloc
7956 -- for this node points to the back quote in the Sprint file output.
7958 -------------------------------
7959 -- Unchecked Type Conversion --
7960 -------------------------------
7962 -- An unchecked type conversion node represents the semantic action
7963 -- corresponding to a call to an instantiation of Unchecked_Conversion.
7964 -- It is generated as a result of actual use of Unchecked_Conversion
7965 -- and also the expander generates unchecked type conversion nodes
7966 -- directly for expansion of complex semantic actions.
7968 -- Note: an unchecked type conversion is a variable as far as the
7969 -- semantics are concerned, which is convenient for the expander.
7970 -- This does not change what Ada source programs are legal, since
7971 -- clearly a function call to an instantiation of Unchecked_Conversion
7972 -- is not a variable in any case.
7974 -- Sprint syntax: subtype-mark!(expression)
7976 -- N_Unchecked_Type_Conversion
7977 -- Sloc points to related node in source
7978 -- Subtype_Mark (Node4)
7979 -- Expression (Node3)
7980 -- Kill_Range_Check (Flag11-Sem)
7981 -- No_Truncation (Flag17-Sem)
7982 -- plus fields for expression
7984 -- Note: in the case where a debug source file is generated, the Sloc
7985 -- for this node points to the exclamation in the Sprint file output.
7987 -----------------------------------
7988 -- Validate_Unchecked_Conversion --
7989 -----------------------------------
7991 -- The front end does most of the validation of unchecked conversion,
7992 -- including checking sizes (this is done after the back end is called
7993 -- to take advantage of back-annotation of calculated sizes).
7995 -- The front end also deals with specific cases that are not allowed
7996 -- e.g. involving unconstrained array types.
7998 -- For the case of the standard gigi backend, this means that all
7999 -- checks are done in the front end.
8001 -- However, in the case of specialized back-ends, notably the JVM
8002 -- backend for JGNAT, additional requirements and restrictions apply
8003 -- to unchecked conversion, and these are most conveniently performed
8004 -- in the specialized back-end.
8006 -- To accommodate this requirement, for such back ends, the following
8007 -- special node is generated recording an unchecked conversion that
8008 -- needs to be validated. The back end should post an appropriate
8009 -- error message if the unchecked conversion is invalid or warrants
8010 -- a special warning message.
8012 -- Source_Type and Target_Type point to the entities for the two
8013 -- types involved in the unchecked conversion instantiation that
8014 -- is to be validated.
8016 -- Sprint syntax: validate Unchecked_Conversion (source, target);
8018 -- N_Validate_Unchecked_Conversion
8019 -- Sloc points to instantiation (location for warning message)
8020 -- Source_Type (Node1-Sem)
8021 -- Target_Type (Node2-Sem)
8023 -- Note: in the case where a debug source file is generated, the Sloc
8024 -- for this node points to the VALIDATE keyword in the file output.
8030 -- Used as the contents of the Nkind field of the dummy Empty node
8031 -- and in some other situations to indicate an uninitialized value.
8034 -- Chars (Name1) is set to No_Name
8040 -- Used as the contents of the Nkind field of the dummy Error node.
8041 -- Has an Etype field, which gets set to Any_Type later on, to help
8042 -- error recovery (Error_Posted is also set in the Error node).
8045 -- Chars (Name1) is set to Error_Name
8046 -- Etype (Node5-Sem)
8048 --------------------------
8049 -- Node Type Definition --
8050 --------------------------
8052 -- The following is the definition of the Node_Kind type. As previously
8053 -- discussed, this is separated off to allow rearrangement of the order to
8054 -- facilitate definition of subtype ranges. The comments show the subtype
8055 -- classes which apply to each set of node kinds. The first entry in the
8056 -- comment characterizes the following list of nodes.
8061 -- N_Representation_Clause
8065 N_Enumeration_Representation_Clause,
8067 N_Record_Representation_Clause,
8069 -- N_Representation_Clause, N_Has_Chars
8071 N_Attribute_Definition_Clause,
8076 N_Pragma_Argument_Association,
8078 -- N_Has_Etype, N_Has_Chars
8080 -- Note: of course N_Error does not really have Etype or Chars fields,
8081 -- and any attempt to access these fields in N_Error will cause an
8082 -- error, but historically this always has been positioned so that an
8083 -- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
8084 -- Most likely this makes coding easier somewhere but still seems
8085 -- undesirable. To be investigated some time ???
8089 -- N_Entity, N_Has_Etype, N_Has_Chars
8091 N_Defining_Character_Literal,
8092 N_Defining_Identifier,
8093 N_Defining_Operator_Symbol,
8095 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
8099 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8100 -- N_Has_Chars, N_Has_Entity
8105 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8106 -- N_Has_Chars, N_Has_Entity
8108 N_Character_Literal,
8110 -- N_Binary_Op, N_Op, N_Subexpr,
8111 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
8118 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
8119 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
8126 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8127 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8131 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8132 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
8141 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8142 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8147 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
8148 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
8154 N_Op_Shift_Right_Arithmetic,
8156 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
8157 -- N_Has_Chars, N_Has_Entity
8164 -- N_Subexpr, N_Has_Etype, N_Has_Entity
8166 N_Attribute_Reference,
8168 -- N_Subexpr, N_Has_Etype, N_Membership_Test
8173 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
8178 -- N_Subexpr, N_Has_Etype, N_Subprogram_Call
8181 N_Procedure_Call_Statement,
8183 -- N_Subexpr, N_Has_Etype, N_Raise_xxx_Error
8185 N_Raise_Constraint_Error,
8186 N_Raise_Program_Error,
8187 N_Raise_Storage_Error,
8189 -- N_Subexpr, N_Has_Etype, N_Numeric_Or_String_Literal
8195 -- N_Subexpr, N_Has_Etype
8197 N_Explicit_Dereference,
8198 N_Expression_With_Actions,
8200 N_Indexed_Component,
8202 N_Qualified_Expression,
8203 N_Quantified_Expression,
8207 N_Extension_Aggregate,
8211 N_Selected_Component,
8214 N_Unchecked_Expression,
8215 N_Unchecked_Type_Conversion,
8219 N_Subtype_Indication,
8223 N_Component_Declaration,
8224 N_Entry_Declaration,
8225 N_Expression_Function,
8226 N_Formal_Object_Declaration,
8227 N_Formal_Type_Declaration,
8228 N_Full_Type_Declaration,
8229 N_Incomplete_Type_Declaration,
8230 N_Iterator_Specification,
8231 N_Loop_Parameter_Specification,
8232 N_Object_Declaration,
8233 N_Protected_Type_Declaration,
8234 N_Private_Extension_Declaration,
8235 N_Private_Type_Declaration,
8236 N_Subtype_Declaration,
8238 -- N_Subprogram_Specification, N_Declaration
8240 N_Function_Specification,
8241 N_Procedure_Specification,
8243 -- N_Access_To_Subprogram_Definition
8245 N_Access_Function_Definition,
8246 N_Access_Procedure_Definition,
8248 -- N_Later_Decl_Item
8250 N_Task_Type_Declaration,
8252 -- N_Body_Stub, N_Later_Decl_Item
8254 N_Package_Body_Stub,
8255 N_Protected_Body_Stub,
8256 N_Subprogram_Body_Stub,
8259 -- N_Generic_Instantiation, N_Later_Decl_Item
8260 -- N_Subprogram_Instantiation
8262 N_Function_Instantiation,
8263 N_Procedure_Instantiation,
8265 -- N_Generic_Instantiation, N_Later_Decl_Item
8267 N_Package_Instantiation,
8269 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
8274 -- N_Later_Decl_Item, N_Proper_Body
8279 -- N_Later_Decl_Item
8281 N_Implicit_Label_Declaration,
8282 N_Package_Declaration,
8283 N_Single_Task_Declaration,
8284 N_Subprogram_Declaration,
8285 N_Use_Package_Clause,
8287 -- N_Generic_Declaration, N_Later_Decl_Item
8289 N_Generic_Package_Declaration,
8290 N_Generic_Subprogram_Declaration,
8292 -- N_Array_Type_Definition
8294 N_Constrained_Array_Definition,
8295 N_Unconstrained_Array_Definition,
8297 -- N_Renaming_Declaration
8299 N_Exception_Renaming_Declaration,
8300 N_Object_Renaming_Declaration,
8301 N_Package_Renaming_Declaration,
8302 N_Subprogram_Renaming_Declaration,
8304 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
8306 N_Generic_Function_Renaming_Declaration,
8307 N_Generic_Package_Renaming_Declaration,
8308 N_Generic_Procedure_Renaming_Declaration,
8310 -- N_Statement_Other_Than_Procedure_Call
8314 N_Assignment_Statement,
8315 N_Asynchronous_Select,
8319 N_Compound_Statement,
8320 N_Conditional_Entry_Call,
8322 -- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
8324 N_Delay_Relative_Statement,
8325 N_Delay_Until_Statement,
8327 -- N_Statement_Other_Than_Procedure_Call
8329 N_Entry_Call_Statement,
8335 N_Requeue_Statement,
8336 N_Simple_Return_Statement,
8337 N_Extended_Return_Statement,
8341 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
8348 N_Accept_Alternative,
8349 N_Delay_Alternative,
8351 N_Entry_Body_Formal_Part,
8353 N_Terminate_Alternative,
8355 -- N_Formal_Subprogram_Declaration
8357 N_Formal_Abstract_Subprogram_Declaration,
8358 N_Formal_Concrete_Subprogram_Declaration,
8360 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
8362 N_Push_Constraint_Error_Label,
8363 N_Push_Program_Error_Label,
8364 N_Push_Storage_Error_Label,
8366 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
8368 N_Pop_Constraint_Error_Label,
8369 N_Pop_Program_Error_Label,
8370 N_Pop_Storage_Error_Label,
8374 N_SCIL_Dispatch_Table_Tag_Init,
8375 N_SCIL_Dispatching_Call,
8376 N_SCIL_Membership_Test,
8378 -- Other nodes (not part of any subtype class)
8381 N_Abstract_Subprogram_Declaration,
8382 N_Access_Definition,
8383 N_Access_To_Object_Definition,
8384 N_Aspect_Specification,
8385 N_Case_Expression_Alternative,
8386 N_Case_Statement_Alternative,
8388 N_Compilation_Unit_Aux,
8389 N_Component_Association,
8390 N_Component_Definition,
8393 N_Derived_Type_Definition,
8394 N_Decimal_Fixed_Point_Definition,
8395 N_Defining_Program_Unit_Name,
8398 N_Digits_Constraint,
8399 N_Discriminant_Association,
8400 N_Discriminant_Specification,
8401 N_Enumeration_Type_Definition,
8403 N_Entry_Call_Alternative,
8404 N_Entry_Index_Specification,
8405 N_Exception_Declaration,
8406 N_Exception_Handler,
8407 N_Floating_Point_Definition,
8408 N_Formal_Decimal_Fixed_Point_Definition,
8409 N_Formal_Derived_Type_Definition,
8410 N_Formal_Discrete_Type_Definition,
8411 N_Formal_Floating_Point_Definition,
8412 N_Formal_Modular_Type_Definition,
8413 N_Formal_Ordinary_Fixed_Point_Definition,
8414 N_Formal_Package_Declaration,
8415 N_Formal_Private_Type_Definition,
8416 N_Formal_Incomplete_Type_Definition,
8417 N_Formal_Signed_Integer_Type_Definition,
8419 N_Freeze_Generic_Entity,
8420 N_Generic_Association,
8421 N_Handled_Sequence_Of_Statements,
8422 N_Index_Or_Discriminant_Constraint,
8425 N_Modular_Type_Definition,
8426 N_Number_Declaration,
8427 N_Ordinary_Fixed_Point_Definition,
8429 N_Package_Specification,
8430 N_Parameter_Association,
8431 N_Parameter_Specification,
8433 N_Protected_Definition,
8435 N_Real_Range_Specification,
8436 N_Record_Definition,
8437 N_Signed_Integer_Type_Definition,
8438 N_Single_Protected_Declaration,
8441 N_Triggering_Alternative,
8443 N_Validate_Unchecked_Conversion,
8449 for Node_Kind'Size use 8;
8450 -- The data structures in Atree assume this
8452 ----------------------------
8453 -- Node Class Definitions --
8454 ----------------------------
8456 subtype N_Access_To_Subprogram_Definition is Node_Kind range
8457 N_Access_Function_Definition ..
8458 N_Access_Procedure_Definition;
8460 subtype N_Array_Type_Definition is Node_Kind range
8461 N_Constrained_Array_Definition ..
8462 N_Unconstrained_Array_Definition;
8464 subtype N_Binary_Op is Node_Kind range
8466 N_Op_Shift_Right_Arithmetic;
8468 subtype N_Body_Stub is Node_Kind range
8469 N_Package_Body_Stub ..
8472 subtype N_Declaration is Node_Kind range
8473 N_Component_Declaration ..
8474 N_Procedure_Specification;
8475 -- Note: this includes all constructs normally thought of as declarations
8476 -- except those which are separately grouped as later declarations.
8478 subtype N_Delay_Statement is Node_Kind range
8479 N_Delay_Relative_Statement ..
8480 N_Delay_Until_Statement;
8482 subtype N_Direct_Name is Node_Kind range
8484 N_Character_Literal;
8486 subtype N_Entity is Node_Kind range
8487 N_Defining_Character_Literal ..
8488 N_Defining_Operator_Symbol;
8490 subtype N_Formal_Subprogram_Declaration is Node_Kind range
8491 N_Formal_Abstract_Subprogram_Declaration ..
8492 N_Formal_Concrete_Subprogram_Declaration;
8494 subtype N_Generic_Declaration is Node_Kind range
8495 N_Generic_Package_Declaration ..
8496 N_Generic_Subprogram_Declaration;
8498 subtype N_Generic_Instantiation is Node_Kind range
8499 N_Function_Instantiation ..
8500 N_Package_Instantiation;
8502 subtype N_Generic_Renaming_Declaration is Node_Kind range
8503 N_Generic_Function_Renaming_Declaration ..
8504 N_Generic_Procedure_Renaming_Declaration;
8506 subtype N_Has_Chars is Node_Kind range
8507 N_Attribute_Definition_Clause ..
8510 subtype N_Has_Entity is Node_Kind range
8512 N_Attribute_Reference;
8513 -- Nodes that have Entity fields
8514 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
8515 -- N_Aspect_Specification, or N_Attribute_Definition_Clause.
8517 subtype N_Has_Etype is Node_Kind range
8519 N_Subtype_Indication;
8521 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
8525 subtype N_Multiplying_Operator is Node_Kind range
8529 subtype N_Later_Decl_Item is Node_Kind range
8530 N_Task_Type_Declaration ..
8531 N_Generic_Subprogram_Declaration;
8532 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
8533 -- only those items which can appear as later declarative items. This also
8534 -- includes N_Implicit_Label_Declaration which is not specifically in the
8535 -- grammar but may appear as a valid later declarative items. It does NOT
8536 -- include N_Pragma which can also appear among later declarative items.
8537 -- It does however include N_Protected_Body, which is a bit peculiar, but
8538 -- harmless since this cannot appear in Ada 83 mode anyway.
8540 subtype N_Membership_Test is Node_Kind range
8544 subtype N_Numeric_Or_String_Literal is Node_Kind range
8545 N_Integer_Literal ..
8548 subtype N_Op is Node_Kind range
8552 subtype N_Op_Boolean is Node_Kind range
8555 -- Binary operators which take operands of a boolean type, and yield
8556 -- a result of a boolean type.
8558 subtype N_Op_Compare is Node_Kind range
8562 subtype N_Op_Shift is Node_Kind range
8564 N_Op_Shift_Right_Arithmetic;
8566 subtype N_Proper_Body is Node_Kind range
8570 subtype N_Push_xxx_Label is Node_Kind range
8571 N_Push_Constraint_Error_Label ..
8572 N_Push_Storage_Error_Label;
8574 subtype N_Pop_xxx_Label is Node_Kind range
8575 N_Pop_Constraint_Error_Label ..
8576 N_Pop_Storage_Error_Label;
8578 subtype N_Push_Pop_xxx_Label is Node_Kind range
8579 N_Push_Constraint_Error_Label ..
8580 N_Pop_Storage_Error_Label;
8582 subtype N_Raise_xxx_Error is Node_Kind range
8583 N_Raise_Constraint_Error ..
8584 N_Raise_Storage_Error;
8586 subtype N_Renaming_Declaration is Node_Kind range
8587 N_Exception_Renaming_Declaration ..
8588 N_Generic_Procedure_Renaming_Declaration;
8590 subtype N_Representation_Clause is Node_Kind range
8592 N_Attribute_Definition_Clause;
8594 subtype N_Short_Circuit is Node_Kind range
8598 subtype N_SCIL_Node is Node_Kind range
8599 N_SCIL_Dispatch_Table_Tag_Init ..
8600 N_SCIL_Membership_Test;
8602 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
8603 N_Abort_Statement ..
8605 -- Note that this includes all statement types except for the cases of the
8606 -- N_Procedure_Call_Statement which is considered to be a subexpression
8607 -- (since overloading is possible, so it needs to go through the normal
8608 -- overloading resolution for expressions).
8610 subtype N_Subprogram_Call is Node_Kind range
8612 N_Procedure_Call_Statement;
8614 subtype N_Subprogram_Instantiation is Node_Kind range
8615 N_Function_Instantiation ..
8616 N_Procedure_Instantiation;
8618 subtype N_Has_Condition is Node_Kind range
8620 N_Terminate_Alternative;
8621 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
8623 subtype N_Subexpr is Node_Kind range
8625 N_Unchecked_Type_Conversion;
8626 -- Nodes with expression fields
8628 subtype N_Subprogram_Specification is Node_Kind range
8629 N_Function_Specification ..
8630 N_Procedure_Specification;
8632 subtype N_Unary_Op is Node_Kind range
8636 subtype N_Unit_Body is Node_Kind range
8640 ---------------------------
8641 -- Node Access Functions --
8642 ---------------------------
8644 -- The following functions return the contents of the indicated field of
8645 -- the node referenced by the argument, which is a Node_Id. They provide
8646 -- logical access to fields in the node which could be accessed using the
8647 -- Atree.Unchecked_Access package, but the idea is always to use these
8648 -- higher level routines which preserve strong typing. In debug mode,
8649 -- these routines check that they are being applied to an appropriate
8650 -- node, as well as checking that the node is in range.
8652 function ABE_Is_Certain
8653 (N : Node_Id) return Boolean; -- Flag18
8655 function Abort_Present
8656 (N : Node_Id) return Boolean; -- Flag15
8658 function Abortable_Part
8659 (N : Node_Id) return Node_Id; -- Node2
8661 function Abstract_Present
8662 (N : Node_Id) return Boolean; -- Flag4
8664 function Accept_Handler_Records
8665 (N : Node_Id) return List_Id; -- List5
8667 function Accept_Statement
8668 (N : Node_Id) return Node_Id; -- Node2
8670 function Access_Definition
8671 (N : Node_Id) return Node_Id; -- Node3
8673 function Access_To_Subprogram_Definition
8674 (N : Node_Id) return Node_Id; -- Node3
8676 function Access_Types_To_Process
8677 (N : Node_Id) return Elist_Id; -- Elist2
8680 (N : Node_Id) return List_Id; -- List1
8682 function Activation_Chain_Entity
8683 (N : Node_Id) return Node_Id; -- Node3
8685 function Acts_As_Spec
8686 (N : Node_Id) return Boolean; -- Flag4
8688 function Actual_Designated_Subtype
8689 (N : Node_Id) return Node_Id; -- Node4
8691 function Address_Warning_Posted
8692 (N : Node_Id) return Boolean; -- Flag18
8694 function Aggregate_Bounds
8695 (N : Node_Id) return Node_Id; -- Node3
8697 function Aliased_Present
8698 (N : Node_Id) return Boolean; -- Flag4
8701 (N : Node_Id) return Boolean; -- Flag11
8703 function All_Present
8704 (N : Node_Id) return Boolean; -- Flag15
8706 function Alternatives
8707 (N : Node_Id) return List_Id; -- List4
8709 function Ancestor_Part
8710 (N : Node_Id) return Node_Id; -- Node3
8712 function Atomic_Sync_Required
8713 (N : Node_Id) return Boolean; -- Flag14
8715 function Array_Aggregate
8716 (N : Node_Id) return Node_Id; -- Node3
8718 function Aspect_Rep_Item
8719 (N : Node_Id) return Node_Id; -- Node2
8721 function Assignment_OK
8722 (N : Node_Id) return Boolean; -- Flag15
8724 function Associated_Node
8725 (N : Node_Id) return Node_Id; -- Node4
8727 function At_End_Proc
8728 (N : Node_Id) return Node_Id; -- Node1
8730 function Attribute_Name
8731 (N : Node_Id) return Name_Id; -- Name2
8733 function Aux_Decls_Node
8734 (N : Node_Id) return Node_Id; -- Node5
8736 function Backwards_OK
8737 (N : Node_Id) return Boolean; -- Flag6
8739 function Bad_Is_Detected
8740 (N : Node_Id) return Boolean; -- Flag15
8743 (N : Node_Id) return Boolean; -- Flag5
8745 function Body_Required
8746 (N : Node_Id) return Boolean; -- Flag13
8748 function Body_To_Inline
8749 (N : Node_Id) return Node_Id; -- Node3
8751 function Box_Present
8752 (N : Node_Id) return Boolean; -- Flag15
8754 function Char_Literal_Value
8755 (N : Node_Id) return Uint; -- Uint2
8758 (N : Node_Id) return Name_Id; -- Name1
8760 function Check_Address_Alignment
8761 (N : Node_Id) return Boolean; -- Flag11
8763 function Choice_Parameter
8764 (N : Node_Id) return Node_Id; -- Node2
8767 (N : Node_Id) return List_Id; -- List1
8769 function Class_Present
8770 (N : Node_Id) return Boolean; -- Flag6
8772 function Classifications
8773 (N : Node_Id) return Node_Id; -- Node3
8775 function Cleanup_Actions
8776 (N : Node_Id) return List_Id; -- List5
8778 function Comes_From_Extended_Return_Statement
8779 (N : Node_Id) return Boolean; -- Flag18
8781 function Compile_Time_Known_Aggregate
8782 (N : Node_Id) return Boolean; -- Flag18
8784 function Component_Associations
8785 (N : Node_Id) return List_Id; -- List2
8787 function Component_Clauses
8788 (N : Node_Id) return List_Id; -- List3
8790 function Component_Definition
8791 (N : Node_Id) return Node_Id; -- Node4
8793 function Component_Items
8794 (N : Node_Id) return List_Id; -- List3
8796 function Component_List
8797 (N : Node_Id) return Node_Id; -- Node1
8799 function Component_Name
8800 (N : Node_Id) return Node_Id; -- Node1
8802 function Componentwise_Assignment
8803 (N : Node_Id) return Boolean; -- Flag14
8806 (N : Node_Id) return Node_Id; -- Node1
8808 function Condition_Actions
8809 (N : Node_Id) return List_Id; -- List3
8811 function Config_Pragmas
8812 (N : Node_Id) return List_Id; -- List4
8814 function Constant_Present
8815 (N : Node_Id) return Boolean; -- Flag17
8818 (N : Node_Id) return Node_Id; -- Node3
8820 function Constraints
8821 (N : Node_Id) return List_Id; -- List1
8823 function Context_Installed
8824 (N : Node_Id) return Boolean; -- Flag13
8826 function Context_Pending
8827 (N : Node_Id) return Boolean; -- Flag16
8829 function Context_Items
8830 (N : Node_Id) return List_Id; -- List1
8832 function Contract_Test_Cases
8833 (N : Node_Id) return Node_Id; -- Node2
8835 function Controlling_Argument
8836 (N : Node_Id) return Node_Id; -- Node1
8838 function Conversion_OK
8839 (N : Node_Id) return Boolean; -- Flag14
8841 function Convert_To_Return_False
8842 (N : Node_Id) return Boolean; -- Flag13
8844 function Corresponding_Aspect
8845 (N : Node_Id) return Node_Id; -- Node3
8847 function Corresponding_Body
8848 (N : Node_Id) return Node_Id; -- Node5
8850 function Corresponding_Formal_Spec
8851 (N : Node_Id) return Node_Id; -- Node3
8853 function Corresponding_Generic_Association
8854 (N : Node_Id) return Node_Id; -- Node5
8856 function Corresponding_Integer_Value
8857 (N : Node_Id) return Uint; -- Uint4
8859 function Corresponding_Spec
8860 (N : Node_Id) return Node_Id; -- Node5
8862 function Corresponding_Spec_Of_Stub
8863 (N : Node_Id) return Node_Id; -- Node2
8865 function Corresponding_Stub
8866 (N : Node_Id) return Node_Id; -- Node3
8868 function Dcheck_Function
8869 (N : Node_Id) return Entity_Id; -- Node5
8871 function Declarations
8872 (N : Node_Id) return List_Id; -- List2
8874 function Default_Expression
8875 (N : Node_Id) return Node_Id; -- Node5
8877 function Default_Storage_Pool
8878 (N : Node_Id) return Node_Id; -- Node3
8880 function Default_Name
8881 (N : Node_Id) return Node_Id; -- Node2
8883 function Defining_Identifier
8884 (N : Node_Id) return Entity_Id; -- Node1
8886 function Defining_Unit_Name
8887 (N : Node_Id) return Node_Id; -- Node1
8889 function Delay_Alternative
8890 (N : Node_Id) return Node_Id; -- Node4
8892 function Delay_Statement
8893 (N : Node_Id) return Node_Id; -- Node2
8895 function Delta_Expression
8896 (N : Node_Id) return Node_Id; -- Node3
8898 function Digits_Expression
8899 (N : Node_Id) return Node_Id; -- Node2
8901 function Discr_Check_Funcs_Built
8902 (N : Node_Id) return Boolean; -- Flag11
8904 function Discrete_Choices
8905 (N : Node_Id) return List_Id; -- List4
8907 function Discrete_Range
8908 (N : Node_Id) return Node_Id; -- Node4
8910 function Discrete_Subtype_Definition
8911 (N : Node_Id) return Node_Id; -- Node4
8913 function Discrete_Subtype_Definitions
8914 (N : Node_Id) return List_Id; -- List2
8916 function Discriminant_Specifications
8917 (N : Node_Id) return List_Id; -- List4
8919 function Discriminant_Type
8920 (N : Node_Id) return Node_Id; -- Node5
8922 function Do_Accessibility_Check
8923 (N : Node_Id) return Boolean; -- Flag13
8925 function Do_Discriminant_Check
8926 (N : Node_Id) return Boolean; -- Flag1
8928 function Do_Division_Check
8929 (N : Node_Id) return Boolean; -- Flag13
8931 function Do_Length_Check
8932 (N : Node_Id) return Boolean; -- Flag4
8934 function Do_Overflow_Check
8935 (N : Node_Id) return Boolean; -- Flag17
8937 function Do_Range_Check
8938 (N : Node_Id) return Boolean; -- Flag9
8940 function Do_Storage_Check
8941 (N : Node_Id) return Boolean; -- Flag17
8943 function Do_Tag_Check
8944 (N : Node_Id) return Boolean; -- Flag13
8946 function Elaborate_All_Desirable
8947 (N : Node_Id) return Boolean; -- Flag9
8949 function Elaborate_All_Present
8950 (N : Node_Id) return Boolean; -- Flag14
8952 function Elaborate_Desirable
8953 (N : Node_Id) return Boolean; -- Flag11
8955 function Elaborate_Present
8956 (N : Node_Id) return Boolean; -- Flag4
8958 function Elaboration_Boolean
8959 (N : Node_Id) return Node_Id; -- Node2
8961 function Else_Actions
8962 (N : Node_Id) return List_Id; -- List3
8964 function Else_Statements
8965 (N : Node_Id) return List_Id; -- List4
8967 function Elsif_Parts
8968 (N : Node_Id) return List_Id; -- List3
8970 function Enclosing_Variant
8971 (N : Node_Id) return Node_Id; -- Node2
8974 (N : Node_Id) return Node_Id; -- Node4
8977 (N : Node_Id) return Uint; -- Uint5
8980 (N : Node_Id) return Node_Id; -- Node4
8982 function Entity_Or_Associated_Node
8983 (N : Node_Id) return Node_Id; -- Node4
8985 function Entry_Body_Formal_Part
8986 (N : Node_Id) return Node_Id; -- Node5
8988 function Entry_Call_Alternative
8989 (N : Node_Id) return Node_Id; -- Node1
8991 function Entry_Call_Statement
8992 (N : Node_Id) return Node_Id; -- Node1
8994 function Entry_Direct_Name
8995 (N : Node_Id) return Node_Id; -- Node1
8997 function Entry_Index
8998 (N : Node_Id) return Node_Id; -- Node5
9000 function Entry_Index_Specification
9001 (N : Node_Id) return Node_Id; -- Node4
9004 (N : Node_Id) return Node_Id; -- Node5
9006 function Exception_Choices
9007 (N : Node_Id) return List_Id; -- List4
9009 function Exception_Handlers
9010 (N : Node_Id) return List_Id; -- List5
9012 function Exception_Junk
9013 (N : Node_Id) return Boolean; -- Flag8
9015 function Exception_Label
9016 (N : Node_Id) return Node_Id; -- Node5
9018 function Explicit_Actual_Parameter
9019 (N : Node_Id) return Node_Id; -- Node3
9021 function Expansion_Delayed
9022 (N : Node_Id) return Boolean; -- Flag11
9024 function Explicit_Generic_Actual_Parameter
9025 (N : Node_Id) return Node_Id; -- Node1
9028 (N : Node_Id) return Node_Id; -- Node3
9030 function Expressions
9031 (N : Node_Id) return List_Id; -- List1
9034 (N : Node_Id) return Node_Id; -- Node3
9036 function First_Inlined_Subprogram
9037 (N : Node_Id) return Entity_Id; -- Node3
9040 (N : Node_Id) return Boolean; -- Flag5
9042 function First_Named_Actual
9043 (N : Node_Id) return Node_Id; -- Node4
9045 function First_Real_Statement
9046 (N : Node_Id) return Node_Id; -- Node2
9048 function First_Subtype_Link
9049 (N : Node_Id) return Entity_Id; -- Node5
9051 function Float_Truncate
9052 (N : Node_Id) return Boolean; -- Flag11
9054 function Formal_Type_Definition
9055 (N : Node_Id) return Node_Id; -- Node3
9057 function Forwards_OK
9058 (N : Node_Id) return Boolean; -- Flag5
9060 function From_Aspect_Specification
9061 (N : Node_Id) return Boolean; -- Flag13
9063 function From_At_End
9064 (N : Node_Id) return Boolean; -- Flag4
9066 function From_At_Mod
9067 (N : Node_Id) return Boolean; -- Flag4
9069 function From_Conditional_Expression
9070 (N : Node_Id) return Boolean; -- Flag1
9072 function From_Default
9073 (N : Node_Id) return Boolean; -- Flag6
9075 function Generalized_Indexing
9076 (N : Node_Id) return Node_Id; -- Node4
9077 function Generic_Associations
9078 (N : Node_Id) return List_Id; -- List3
9080 function Generic_Formal_Declarations
9081 (N : Node_Id) return List_Id; -- List2
9083 function Generic_Parent
9084 (N : Node_Id) return Node_Id; -- Node5
9086 function Generic_Parent_Type
9087 (N : Node_Id) return Node_Id; -- Node4
9089 function Handled_Statement_Sequence
9090 (N : Node_Id) return Node_Id; -- Node4
9092 function Handler_List_Entry
9093 (N : Node_Id) return Node_Id; -- Node2
9095 function Has_Created_Identifier
9096 (N : Node_Id) return Boolean; -- Flag15
9098 function Has_Dereference_Action
9099 (N : Node_Id) return Boolean; -- Flag13
9101 function Has_Dynamic_Length_Check
9102 (N : Node_Id) return Boolean; -- Flag10
9104 function Has_Dynamic_Range_Check
9105 (N : Node_Id) return Boolean; -- Flag12
9107 function Has_Init_Expression
9108 (N : Node_Id) return Boolean; -- Flag14
9110 function Has_Local_Raise
9111 (N : Node_Id) return Boolean; -- Flag8
9113 function Has_No_Elaboration_Code
9114 (N : Node_Id) return Boolean; -- Flag17
9116 function Has_Pragma_Suppress_All
9117 (N : Node_Id) return Boolean; -- Flag14
9119 function Has_Private_View
9120 (N : Node_Id) return Boolean; -- Flag11
9122 function Has_Relative_Deadline_Pragma
9123 (N : Node_Id) return Boolean; -- Flag9
9125 function Has_Self_Reference
9126 (N : Node_Id) return Boolean; -- Flag13
9128 function Has_SP_Choice
9129 (N : Node_Id) return Boolean; -- Flag15
9131 function Has_Storage_Size_Pragma
9132 (N : Node_Id) return Boolean; -- Flag5
9134 function Has_Wide_Character
9135 (N : Node_Id) return Boolean; -- Flag11
9137 function Has_Wide_Wide_Character
9138 (N : Node_Id) return Boolean; -- Flag13
9140 function Header_Size_Added
9141 (N : Node_Id) return Boolean; -- Flag11
9143 function Hidden_By_Use_Clause
9144 (N : Node_Id) return Elist_Id; -- Elist4
9147 (N : Node_Id) return Node_Id; -- Node2
9150 (N : Node_Id) return Node_Id; -- Node1
9152 function Interface_List
9153 (N : Node_Id) return List_Id; -- List2
9155 function Interface_Present
9156 (N : Node_Id) return Boolean; -- Flag16
9158 function Implicit_With
9159 (N : Node_Id) return Boolean; -- Flag16
9161 function Implicit_With_From_Instantiation
9162 (N : Node_Id) return Boolean; -- Flag12
9164 function Import_Interface_Present
9165 (N : Node_Id) return Boolean; -- Flag16
9168 (N : Node_Id) return Boolean; -- Flag15
9170 function Includes_Infinities
9171 (N : Node_Id) return Boolean; -- Flag11
9173 function Incomplete_View
9174 (N : Node_Id) return Node_Id; -- Node2
9176 function Inherited_Discriminant
9177 (N : Node_Id) return Boolean; -- Flag13
9179 function Instance_Spec
9180 (N : Node_Id) return Node_Id; -- Node5
9183 (N : Node_Id) return Uint; -- Uint3
9185 function Is_Accessibility_Actual
9186 (N : Node_Id) return Boolean; -- Flag13
9188 function Is_Asynchronous_Call_Block
9189 (N : Node_Id) return Boolean; -- Flag7
9191 function Is_Boolean_Aspect
9192 (N : Node_Id) return Boolean; -- Flag16
9195 (N : Node_Id) return Boolean; -- Flag11
9197 function Is_Component_Left_Opnd
9198 (N : Node_Id) return Boolean; -- Flag13
9200 function Is_Component_Right_Opnd
9201 (N : Node_Id) return Boolean; -- Flag14
9203 function Is_Controlling_Actual
9204 (N : Node_Id) return Boolean; -- Flag16
9206 function Is_Delayed_Aspect
9207 (N : Node_Id) return Boolean; -- Flag14
9209 function Is_Disabled
9210 (N : Node_Id) return Boolean; -- Flag15
9212 function Is_Dynamic_Coextension
9213 (N : Node_Id) return Boolean; -- Flag18
9216 (N : Node_Id) return Boolean; -- Flag13
9218 function Is_Entry_Barrier_Function
9219 (N : Node_Id) return Boolean; -- Flag8
9221 function Is_Expanded_Build_In_Place_Call
9222 (N : Node_Id) return Boolean; -- Flag11
9224 function Is_Finalization_Wrapper
9225 (N : Node_Id) return Boolean; -- Flag9
9227 function Is_Folded_In_Parser
9228 (N : Node_Id) return Boolean; -- Flag4
9231 (N : Node_Id) return Boolean; -- Flag9
9233 function Is_In_Discriminant_Check
9234 (N : Node_Id) return Boolean; -- Flag11
9236 function Is_Machine_Number
9237 (N : Node_Id) return Boolean; -- Flag11
9239 function Is_Null_Loop
9240 (N : Node_Id) return Boolean; -- Flag16
9242 function Is_Overloaded
9243 (N : Node_Id) return Boolean; -- Flag5
9245 function Is_Power_Of_2_For_Shift
9246 (N : Node_Id) return Boolean; -- Flag13
9248 function Is_Prefixed_Call
9249 (N : Node_Id) return Boolean; -- Flag17
9251 function Is_Protected_Subprogram_Body
9252 (N : Node_Id) return Boolean; -- Flag7
9254 function Is_Static_Coextension
9255 (N : Node_Id) return Boolean; -- Flag14
9257 function Is_Static_Expression
9258 (N : Node_Id) return Boolean; -- Flag6
9260 function Is_Subprogram_Descriptor
9261 (N : Node_Id) return Boolean; -- Flag16
9263 function Is_Task_Allocation_Block
9264 (N : Node_Id) return Boolean; -- Flag6
9266 function Is_Task_Master
9267 (N : Node_Id) return Boolean; -- Flag5
9269 function Iteration_Scheme
9270 (N : Node_Id) return Node_Id; -- Node2
9272 function Iterator_Specification
9273 (N : Node_Id) return Node_Id; -- Node2
9276 (N : Node_Id) return Entity_Id; -- Node1
9278 function Kill_Range_Check
9279 (N : Node_Id) return Boolean; -- Flag11
9281 function Label_Construct
9282 (N : Node_Id) return Node_Id; -- Node2
9285 (N : Node_Id) return Node_Id; -- Node2
9288 (N : Node_Id) return Node_Id; -- Node4
9291 (N : Node_Id) return Boolean; -- Flag6
9293 function Library_Unit
9294 (N : Node_Id) return Node_Id; -- Node4
9296 function Limited_View_Installed
9297 (N : Node_Id) return Boolean; -- Flag18
9299 function Limited_Present
9300 (N : Node_Id) return Boolean; -- Flag17
9303 (N : Node_Id) return List_Id; -- List1
9305 function Local_Raise_Not_OK
9306 (N : Node_Id) return Boolean; -- Flag7
9308 function Local_Raise_Statements
9309 (N : Node_Id) return Elist_Id; -- Elist1
9311 function Loop_Actions
9312 (N : Node_Id) return List_Id; -- List2
9314 function Loop_Parameter_Specification
9315 (N : Node_Id) return Node_Id; -- Node4
9318 (N : Node_Id) return Node_Id; -- Node1
9321 (N : Node_Id) return Node_Id; -- Node2
9324 (N : Node_Id) return Boolean; -- Flag5
9326 function Must_Be_Byte_Aligned
9327 (N : Node_Id) return Boolean; -- Flag14
9329 function Must_Not_Freeze
9330 (N : Node_Id) return Boolean; -- Flag8
9332 function Must_Not_Override
9333 (N : Node_Id) return Boolean; -- Flag15
9335 function Must_Override
9336 (N : Node_Id) return Boolean; -- Flag14
9339 (N : Node_Id) return Node_Id; -- Node2
9342 (N : Node_Id) return List_Id; -- List2
9344 function Next_Entity
9345 (N : Node_Id) return Node_Id; -- Node2
9347 function Next_Exit_Statement
9348 (N : Node_Id) return Node_Id; -- Node3
9350 function Next_Implicit_With
9351 (N : Node_Id) return Node_Id; -- Node3
9353 function Next_Named_Actual
9354 (N : Node_Id) return Node_Id; -- Node4
9356 function Next_Pragma
9357 (N : Node_Id) return Node_Id; -- Node1
9359 function Next_Rep_Item
9360 (N : Node_Id) return Node_Id; -- Node5
9362 function Next_Use_Clause
9363 (N : Node_Id) return Node_Id; -- Node3
9365 function No_Ctrl_Actions
9366 (N : Node_Id) return Boolean; -- Flag7
9368 function No_Elaboration_Check
9369 (N : Node_Id) return Boolean; -- Flag14
9371 function No_Entities_Ref_In_Spec
9372 (N : Node_Id) return Boolean; -- Flag8
9374 function No_Initialization
9375 (N : Node_Id) return Boolean; -- Flag13
9377 function No_Minimize_Eliminate
9378 (N : Node_Id) return Boolean; -- Flag17
9380 function No_Truncation
9381 (N : Node_Id) return Boolean; -- Flag17
9383 function Non_Aliased_Prefix
9384 (N : Node_Id) return Boolean; -- Flag18
9386 function Null_Present
9387 (N : Node_Id) return Boolean; -- Flag13
9389 function Null_Excluding_Subtype
9390 (N : Node_Id) return Boolean; -- Flag16
9392 function Null_Exclusion_Present
9393 (N : Node_Id) return Boolean; -- Flag11
9395 function Null_Exclusion_In_Return_Present
9396 (N : Node_Id) return Boolean; -- Flag14
9398 function Null_Record_Present
9399 (N : Node_Id) return Boolean; -- Flag17
9401 function Object_Definition
9402 (N : Node_Id) return Node_Id; -- Node4
9405 (N : Node_Id) return Boolean; -- Flag16
9407 function Original_Discriminant
9408 (N : Node_Id) return Node_Id; -- Node2
9410 function Original_Entity
9411 (N : Node_Id) return Entity_Id; -- Node2
9413 function Others_Discrete_Choices
9414 (N : Node_Id) return List_Id; -- List1
9416 function Out_Present
9417 (N : Node_Id) return Boolean; -- Flag17
9419 function Parameter_Associations
9420 (N : Node_Id) return List_Id; -- List3
9422 function Parameter_List_Truncated
9423 (N : Node_Id) return Boolean; -- Flag17
9425 function Parameter_Specifications
9426 (N : Node_Id) return List_Id; -- List3
9428 function Parameter_Type
9429 (N : Node_Id) return Node_Id; -- Node2
9431 function Parent_Spec
9432 (N : Node_Id) return Node_Id; -- Node4
9435 (N : Node_Id) return Node_Id; -- Node2
9437 function Pragma_Argument_Associations
9438 (N : Node_Id) return List_Id; -- List2
9440 function Pragma_Identifier
9441 (N : Node_Id) return Node_Id; -- Node4
9443 function Pragmas_After
9444 (N : Node_Id) return List_Id; -- List5
9446 function Pragmas_Before
9447 (N : Node_Id) return List_Id; -- List4
9449 function Pre_Post_Conditions
9450 (N : Node_Id) return Node_Id; -- Node1
9453 (N : Node_Id) return Node_Id; -- Node3
9455 function Premature_Use
9456 (N : Node_Id) return Node_Id; -- Node5
9458 function Present_Expr
9459 (N : Node_Id) return Uint; -- Uint3
9462 (N : Node_Id) return Boolean; -- Flag6
9464 function Print_In_Hex
9465 (N : Node_Id) return Boolean; -- Flag13
9467 function Private_Declarations
9468 (N : Node_Id) return List_Id; -- List3
9470 function Private_Present
9471 (N : Node_Id) return Boolean; -- Flag15
9473 function Procedure_To_Call
9474 (N : Node_Id) return Node_Id; -- Node2
9476 function Proper_Body
9477 (N : Node_Id) return Node_Id; -- Node1
9479 function Protected_Definition
9480 (N : Node_Id) return Node_Id; -- Node3
9482 function Protected_Present
9483 (N : Node_Id) return Boolean; -- Flag6
9485 function Raises_Constraint_Error
9486 (N : Node_Id) return Boolean; -- Flag7
9488 function Range_Constraint
9489 (N : Node_Id) return Node_Id; -- Node4
9491 function Range_Expression
9492 (N : Node_Id) return Node_Id; -- Node4
9494 function Real_Range_Specification
9495 (N : Node_Id) return Node_Id; -- Node4
9498 (N : Node_Id) return Ureal; -- Ureal3
9501 (N : Node_Id) return Uint; -- Uint3
9503 function Record_Extension_Part
9504 (N : Node_Id) return Node_Id; -- Node3
9506 function Redundant_Use
9507 (N : Node_Id) return Boolean; -- Flag13
9509 function Renaming_Exception
9510 (N : Node_Id) return Node_Id; -- Node2
9512 function Result_Definition
9513 (N : Node_Id) return Node_Id; -- Node4
9515 function Return_Object_Declarations
9516 (N : Node_Id) return List_Id; -- List3
9518 function Return_Statement_Entity
9519 (N : Node_Id) return Node_Id; -- Node5
9521 function Reverse_Present
9522 (N : Node_Id) return Boolean; -- Flag15
9525 (N : Node_Id) return Node_Id; -- Node3
9527 function Rounded_Result
9528 (N : Node_Id) return Boolean; -- Flag18
9530 function SCIL_Controlling_Tag
9531 (N : Node_Id) return Node_Id; -- Node5
9533 function SCIL_Entity
9534 (N : Node_Id) return Node_Id; -- Node4
9536 function SCIL_Tag_Value
9537 (N : Node_Id) return Node_Id; -- Node5
9539 function SCIL_Target_Prim
9540 (N : Node_Id) return Node_Id; -- Node2
9543 (N : Node_Id) return Node_Id; -- Node3
9545 function Select_Alternatives
9546 (N : Node_Id) return List_Id; -- List1
9548 function Selector_Name
9549 (N : Node_Id) return Node_Id; -- Node2
9551 function Selector_Names
9552 (N : Node_Id) return List_Id; -- List1
9554 function Shift_Count_OK
9555 (N : Node_Id) return Boolean; -- Flag4
9557 function Source_Type
9558 (N : Node_Id) return Entity_Id; -- Node1
9560 function Specification
9561 (N : Node_Id) return Node_Id; -- Node1
9564 (N : Node_Id) return Boolean; -- Flag17
9567 (N : Node_Id) return List_Id; -- List3
9569 function Storage_Pool
9570 (N : Node_Id) return Node_Id; -- Node1
9572 function Subpool_Handle_Name
9573 (N : Node_Id) return Node_Id; -- Node4
9576 (N : Node_Id) return String_Id; -- Str3
9578 function Subtype_Indication
9579 (N : Node_Id) return Node_Id; -- Node5
9581 function Subtype_Mark
9582 (N : Node_Id) return Node_Id; -- Node4
9584 function Subtype_Marks
9585 (N : Node_Id) return List_Id; -- List2
9587 function Suppress_Assignment_Checks
9588 (N : Node_Id) return Boolean; -- Flag18
9590 function Suppress_Loop_Warnings
9591 (N : Node_Id) return Boolean; -- Flag17
9593 function Synchronized_Present
9594 (N : Node_Id) return Boolean; -- Flag7
9596 function Tagged_Present
9597 (N : Node_Id) return Boolean; -- Flag15
9599 function Target_Type
9600 (N : Node_Id) return Entity_Id; -- Node2
9602 function Task_Definition
9603 (N : Node_Id) return Node_Id; -- Node3
9605 function Task_Present
9606 (N : Node_Id) return Boolean; -- Flag5
9608 function Then_Actions
9609 (N : Node_Id) return List_Id; -- List2
9611 function Then_Statements
9612 (N : Node_Id) return List_Id; -- List2
9614 function Treat_Fixed_As_Integer
9615 (N : Node_Id) return Boolean; -- Flag14
9617 function Triggering_Alternative
9618 (N : Node_Id) return Node_Id; -- Node1
9620 function Triggering_Statement
9621 (N : Node_Id) return Node_Id; -- Node1
9624 (N : Node_Id) return Elist_Id; -- Elist3
9626 function Type_Definition
9627 (N : Node_Id) return Node_Id; -- Node3
9629 function Uneval_Old_Accept
9630 (N : Node_Id) return Boolean; -- Flag13
9632 function Uneval_Old_Warn
9633 (N : Node_Id) return Boolean; -- Flag18
9636 (N : Node_Id) return Node_Id; -- Node2
9638 function Unknown_Discriminants_Present
9639 (N : Node_Id) return Boolean; -- Flag13
9641 function Unreferenced_In_Spec
9642 (N : Node_Id) return Boolean; -- Flag7
9644 function Variant_Part
9645 (N : Node_Id) return Node_Id; -- Node4
9648 (N : Node_Id) return List_Id; -- List1
9650 function Visible_Declarations
9651 (N : Node_Id) return List_Id; -- List2
9653 function Uninitialized_Variable
9654 (N : Node_Id) return Node_Id; -- Node3
9656 function Used_Operations
9657 (N : Node_Id) return Elist_Id; -- Elist5
9659 function Was_Originally_Stub
9660 (N : Node_Id) return Boolean; -- Flag13
9662 function Withed_Body
9663 (N : Node_Id) return Node_Id; -- Node1
9665 -- End functions (note used by xsinfo utility program to end processing)
9667 ----------------------------
9668 -- Node Update Procedures --
9669 ----------------------------
9671 -- These are the corresponding node update routines, which again provide
9672 -- a high level logical access with type checking. In addition to setting
9673 -- the indicated field of the node N to the given Val, in the case of
9674 -- tree pointers (List1-4), the parent pointer of the Val node is set to
9675 -- point back to node N. This automates the setting of the parent pointer.
9677 procedure Set_ABE_Is_Certain
9678 (N : Node_Id; Val : Boolean := True); -- Flag18
9680 procedure Set_Abort_Present
9681 (N : Node_Id; Val : Boolean := True); -- Flag15
9683 procedure Set_Abortable_Part
9684 (N : Node_Id; Val : Node_Id); -- Node2
9686 procedure Set_Abstract_Present
9687 (N : Node_Id; Val : Boolean := True); -- Flag4
9689 procedure Set_Accept_Handler_Records
9690 (N : Node_Id; Val : List_Id); -- List5
9692 procedure Set_Accept_Statement
9693 (N : Node_Id; Val : Node_Id); -- Node2
9695 procedure Set_Access_Definition
9696 (N : Node_Id; Val : Node_Id); -- Node3
9698 procedure Set_Access_To_Subprogram_Definition
9699 (N : Node_Id; Val : Node_Id); -- Node3
9701 procedure Set_Access_Types_To_Process
9702 (N : Node_Id; Val : Elist_Id); -- Elist2
9704 procedure Set_Actions
9705 (N : Node_Id; Val : List_Id); -- List1
9707 procedure Set_Activation_Chain_Entity
9708 (N : Node_Id; Val : Node_Id); -- Node3
9710 procedure Set_Acts_As_Spec
9711 (N : Node_Id; Val : Boolean := True); -- Flag4
9713 procedure Set_Actual_Designated_Subtype
9714 (N : Node_Id; Val : Node_Id); -- Node4
9716 procedure Set_Address_Warning_Posted
9717 (N : Node_Id; Val : Boolean := True); -- Flag18
9719 procedure Set_Aggregate_Bounds
9720 (N : Node_Id; Val : Node_Id); -- Node3
9722 procedure Set_Aliased_Present
9723 (N : Node_Id; Val : Boolean := True); -- Flag4
9725 procedure Set_All_Others
9726 (N : Node_Id; Val : Boolean := True); -- Flag11
9728 procedure Set_All_Present
9729 (N : Node_Id; Val : Boolean := True); -- Flag15
9731 procedure Set_Alternatives
9732 (N : Node_Id; Val : List_Id); -- List4
9734 procedure Set_Ancestor_Part
9735 (N : Node_Id; Val : Node_Id); -- Node3
9737 procedure Set_Atomic_Sync_Required
9738 (N : Node_Id; Val : Boolean := True); -- Flag14
9740 procedure Set_Array_Aggregate
9741 (N : Node_Id; Val : Node_Id); -- Node3
9743 procedure Set_Aspect_Rep_Item
9744 (N : Node_Id; Val : Node_Id); -- Node2
9746 procedure Set_Assignment_OK
9747 (N : Node_Id; Val : Boolean := True); -- Flag15
9749 procedure Set_Associated_Node
9750 (N : Node_Id; Val : Node_Id); -- Node4
9752 procedure Set_Attribute_Name
9753 (N : Node_Id; Val : Name_Id); -- Name2
9755 procedure Set_At_End_Proc
9756 (N : Node_Id; Val : Node_Id); -- Node1
9758 procedure Set_Aux_Decls_Node
9759 (N : Node_Id; Val : Node_Id); -- Node5
9761 procedure Set_Backwards_OK
9762 (N : Node_Id; Val : Boolean := True); -- Flag6
9764 procedure Set_Bad_Is_Detected
9765 (N : Node_Id; Val : Boolean := True); -- Flag15
9767 procedure Set_Body_Required
9768 (N : Node_Id; Val : Boolean := True); -- Flag13
9770 procedure Set_Body_To_Inline
9771 (N : Node_Id; Val : Node_Id); -- Node3
9773 procedure Set_Box_Present
9774 (N : Node_Id; Val : Boolean := True); -- Flag15
9776 procedure Set_By_Ref
9777 (N : Node_Id; Val : Boolean := True); -- Flag5
9779 procedure Set_Char_Literal_Value
9780 (N : Node_Id; Val : Uint); -- Uint2
9783 (N : Node_Id; Val : Name_Id); -- Name1
9785 procedure Set_Check_Address_Alignment
9786 (N : Node_Id; Val : Boolean := True); -- Flag11
9788 procedure Set_Choice_Parameter
9789 (N : Node_Id; Val : Node_Id); -- Node2
9791 procedure Set_Choices
9792 (N : Node_Id; Val : List_Id); -- List1
9794 procedure Set_Class_Present
9795 (N : Node_Id; Val : Boolean := True); -- Flag6
9797 procedure Set_Classifications
9798 (N : Node_Id; Val : Node_Id); -- Node3
9800 procedure Set_Cleanup_Actions
9801 (N : Node_Id; Val : List_Id); -- List5
9803 procedure Set_Comes_From_Extended_Return_Statement
9804 (N : Node_Id; Val : Boolean := True); -- Flag18
9806 procedure Set_Compile_Time_Known_Aggregate
9807 (N : Node_Id; Val : Boolean := True); -- Flag18
9809 procedure Set_Component_Associations
9810 (N : Node_Id; Val : List_Id); -- List2
9812 procedure Set_Component_Clauses
9813 (N : Node_Id; Val : List_Id); -- List3
9815 procedure Set_Component_Definition
9816 (N : Node_Id; Val : Node_Id); -- Node4
9818 procedure Set_Component_Items
9819 (N : Node_Id; Val : List_Id); -- List3
9821 procedure Set_Component_List
9822 (N : Node_Id; Val : Node_Id); -- Node1
9824 procedure Set_Component_Name
9825 (N : Node_Id; Val : Node_Id); -- Node1
9827 procedure Set_Componentwise_Assignment
9828 (N : Node_Id; Val : Boolean := True); -- Flag14
9830 procedure Set_Condition
9831 (N : Node_Id; Val : Node_Id); -- Node1
9833 procedure Set_Condition_Actions
9834 (N : Node_Id; Val : List_Id); -- List3
9836 procedure Set_Config_Pragmas
9837 (N : Node_Id; Val : List_Id); -- List4
9839 procedure Set_Constant_Present
9840 (N : Node_Id; Val : Boolean := True); -- Flag17
9842 procedure Set_Constraint
9843 (N : Node_Id; Val : Node_Id); -- Node3
9845 procedure Set_Constraints
9846 (N : Node_Id; Val : List_Id); -- List1
9848 procedure Set_Context_Installed
9849 (N : Node_Id; Val : Boolean := True); -- Flag13
9851 procedure Set_Context_Items
9852 (N : Node_Id; Val : List_Id); -- List1
9854 procedure Set_Context_Pending
9855 (N : Node_Id; Val : Boolean := True); -- Flag16
9857 procedure Set_Contract_Test_Cases
9858 (N : Node_Id; Val : Node_Id); -- Node2
9860 procedure Set_Controlling_Argument
9861 (N : Node_Id; Val : Node_Id); -- Node1
9863 procedure Set_Conversion_OK
9864 (N : Node_Id; Val : Boolean := True); -- Flag14
9866 procedure Set_Convert_To_Return_False
9867 (N : Node_Id; Val : Boolean := True); -- Flag13
9869 procedure Set_Corresponding_Aspect
9870 (N : Node_Id; Val : Node_Id); -- Node3
9872 procedure Set_Corresponding_Body
9873 (N : Node_Id; Val : Node_Id); -- Node5
9875 procedure Set_Corresponding_Formal_Spec
9876 (N : Node_Id; Val : Node_Id); -- Node3
9878 procedure Set_Corresponding_Generic_Association
9879 (N : Node_Id; Val : Node_Id); -- Node5
9881 procedure Set_Corresponding_Integer_Value
9882 (N : Node_Id; Val : Uint); -- Uint4
9884 procedure Set_Corresponding_Spec
9885 (N : Node_Id; Val : Node_Id); -- Node5
9887 procedure Set_Corresponding_Spec_Of_Stub
9888 (N : Node_Id; Val : Node_Id); -- Node2
9890 procedure Set_Corresponding_Stub
9891 (N : Node_Id; Val : Node_Id); -- Node3
9893 procedure Set_Dcheck_Function
9894 (N : Node_Id; Val : Entity_Id); -- Node5
9896 procedure Set_Declarations
9897 (N : Node_Id; Val : List_Id); -- List2
9899 procedure Set_Default_Expression
9900 (N : Node_Id; Val : Node_Id); -- Node5
9902 procedure Set_Default_Storage_Pool
9903 (N : Node_Id; Val : Node_Id); -- Node3
9905 procedure Set_Default_Name
9906 (N : Node_Id; Val : Node_Id); -- Node2
9908 procedure Set_Defining_Identifier
9909 (N : Node_Id; Val : Entity_Id); -- Node1
9911 procedure Set_Defining_Unit_Name
9912 (N : Node_Id; Val : Node_Id); -- Node1
9914 procedure Set_Delay_Alternative
9915 (N : Node_Id; Val : Node_Id); -- Node4
9917 procedure Set_Delay_Statement
9918 (N : Node_Id; Val : Node_Id); -- Node2
9920 procedure Set_Delta_Expression
9921 (N : Node_Id; Val : Node_Id); -- Node3
9923 procedure Set_Digits_Expression
9924 (N : Node_Id; Val : Node_Id); -- Node2
9926 procedure Set_Discr_Check_Funcs_Built
9927 (N : Node_Id; Val : Boolean := True); -- Flag11
9929 procedure Set_Discrete_Choices
9930 (N : Node_Id; Val : List_Id); -- List4
9932 procedure Set_Discrete_Range
9933 (N : Node_Id; Val : Node_Id); -- Node4
9935 procedure Set_Discrete_Subtype_Definition
9936 (N : Node_Id; Val : Node_Id); -- Node4
9938 procedure Set_Discrete_Subtype_Definitions
9939 (N : Node_Id; Val : List_Id); -- List2
9941 procedure Set_Discriminant_Specifications
9942 (N : Node_Id; Val : List_Id); -- List4
9944 procedure Set_Discriminant_Type
9945 (N : Node_Id; Val : Node_Id); -- Node5
9947 procedure Set_Do_Accessibility_Check
9948 (N : Node_Id; Val : Boolean := True); -- Flag13
9950 procedure Set_Do_Discriminant_Check
9951 (N : Node_Id; Val : Boolean := True); -- Flag1
9953 procedure Set_Do_Division_Check
9954 (N : Node_Id; Val : Boolean := True); -- Flag13
9956 procedure Set_Do_Length_Check
9957 (N : Node_Id; Val : Boolean := True); -- Flag4
9959 procedure Set_Do_Overflow_Check
9960 (N : Node_Id; Val : Boolean := True); -- Flag17
9962 procedure Set_Do_Range_Check
9963 (N : Node_Id; Val : Boolean := True); -- Flag9
9965 procedure Set_Do_Storage_Check
9966 (N : Node_Id; Val : Boolean := True); -- Flag17
9968 procedure Set_Do_Tag_Check
9969 (N : Node_Id; Val : Boolean := True); -- Flag13
9971 procedure Set_Elaborate_All_Desirable
9972 (N : Node_Id; Val : Boolean := True); -- Flag9
9974 procedure Set_Elaborate_All_Present
9975 (N : Node_Id; Val : Boolean := True); -- Flag14
9977 procedure Set_Elaborate_Desirable
9978 (N : Node_Id; Val : Boolean := True); -- Flag11
9980 procedure Set_Elaborate_Present
9981 (N : Node_Id; Val : Boolean := True); -- Flag4
9983 procedure Set_Elaboration_Boolean
9984 (N : Node_Id; Val : Node_Id); -- Node2
9986 procedure Set_Else_Actions
9987 (N : Node_Id; Val : List_Id); -- List3
9989 procedure Set_Else_Statements
9990 (N : Node_Id; Val : List_Id); -- List4
9992 procedure Set_Elsif_Parts
9993 (N : Node_Id; Val : List_Id); -- List3
9995 procedure Set_Enclosing_Variant
9996 (N : Node_Id; Val : Node_Id); -- Node2
9998 procedure Set_End_Label
9999 (N : Node_Id; Val : Node_Id); -- Node4
10001 procedure Set_End_Span
10002 (N : Node_Id; Val : Uint); -- Uint5
10004 procedure Set_Entity
10005 (N : Node_Id; Val : Node_Id); -- Node4
10007 procedure Set_Entry_Body_Formal_Part
10008 (N : Node_Id; Val : Node_Id); -- Node5
10010 procedure Set_Entry_Call_Alternative
10011 (N : Node_Id; Val : Node_Id); -- Node1
10013 procedure Set_Entry_Call_Statement
10014 (N : Node_Id; Val : Node_Id); -- Node1
10016 procedure Set_Entry_Direct_Name
10017 (N : Node_Id; Val : Node_Id); -- Node1
10019 procedure Set_Entry_Index
10020 (N : Node_Id; Val : Node_Id); -- Node5
10022 procedure Set_Entry_Index_Specification
10023 (N : Node_Id; Val : Node_Id); -- Node4
10025 procedure Set_Etype
10026 (N : Node_Id; Val : Node_Id); -- Node5
10028 procedure Set_Exception_Choices
10029 (N : Node_Id; Val : List_Id); -- List4
10031 procedure Set_Exception_Handlers
10032 (N : Node_Id; Val : List_Id); -- List5
10034 procedure Set_Exception_Junk
10035 (N : Node_Id; Val : Boolean := True); -- Flag8
10037 procedure Set_Exception_Label
10038 (N : Node_Id; Val : Node_Id); -- Node5
10040 procedure Set_Expansion_Delayed
10041 (N : Node_Id; Val : Boolean := True); -- Flag11
10043 procedure Set_Explicit_Actual_Parameter
10044 (N : Node_Id; Val : Node_Id); -- Node3
10046 procedure Set_Explicit_Generic_Actual_Parameter
10047 (N : Node_Id; Val : Node_Id); -- Node1
10049 procedure Set_Expression
10050 (N : Node_Id; Val : Node_Id); -- Node3
10052 procedure Set_Expressions
10053 (N : Node_Id; Val : List_Id); -- List1
10055 procedure Set_First_Bit
10056 (N : Node_Id; Val : Node_Id); -- Node3
10058 procedure Set_First_Inlined_Subprogram
10059 (N : Node_Id; Val : Entity_Id); -- Node3
10061 procedure Set_First_Name
10062 (N : Node_Id; Val : Boolean := True); -- Flag5
10064 procedure Set_First_Named_Actual
10065 (N : Node_Id; Val : Node_Id); -- Node4
10067 procedure Set_First_Real_Statement
10068 (N : Node_Id; Val : Node_Id); -- Node2
10070 procedure Set_First_Subtype_Link
10071 (N : Node_Id; Val : Entity_Id); -- Node5
10073 procedure Set_Float_Truncate
10074 (N : Node_Id; Val : Boolean := True); -- Flag11
10076 procedure Set_Formal_Type_Definition
10077 (N : Node_Id; Val : Node_Id); -- Node3
10079 procedure Set_Forwards_OK
10080 (N : Node_Id; Val : Boolean := True); -- Flag5
10082 procedure Set_From_Aspect_Specification
10083 (N : Node_Id; Val : Boolean := True); -- Flag13
10085 procedure Set_From_At_End
10086 (N : Node_Id; Val : Boolean := True); -- Flag4
10088 procedure Set_From_At_Mod
10089 (N : Node_Id; Val : Boolean := True); -- Flag4
10091 procedure Set_From_Conditional_Expression
10092 (N : Node_Id; Val : Boolean := True); -- Flag1
10094 procedure Set_From_Default
10095 (N : Node_Id; Val : Boolean := True); -- Flag6
10097 procedure Set_Generalized_Indexing
10098 (N : Node_Id; Val : Node_Id); -- Node4
10100 procedure Set_Generic_Associations
10101 (N : Node_Id; Val : List_Id); -- List3
10103 procedure Set_Generic_Formal_Declarations
10104 (N : Node_Id; Val : List_Id); -- List2
10106 procedure Set_Generic_Parent
10107 (N : Node_Id; Val : Node_Id); -- Node5
10109 procedure Set_Generic_Parent_Type
10110 (N : Node_Id; Val : Node_Id); -- Node4
10112 procedure Set_Handled_Statement_Sequence
10113 (N : Node_Id; Val : Node_Id); -- Node4
10115 procedure Set_Handler_List_Entry
10116 (N : Node_Id; Val : Node_Id); -- Node2
10118 procedure Set_Has_Created_Identifier
10119 (N : Node_Id; Val : Boolean := True); -- Flag15
10121 procedure Set_Has_Dereference_Action
10122 (N : Node_Id; Val : Boolean := True); -- Flag13
10124 procedure Set_Has_Dynamic_Length_Check
10125 (N : Node_Id; Val : Boolean := True); -- Flag10
10127 procedure Set_Has_Dynamic_Range_Check
10128 (N : Node_Id; Val : Boolean := True); -- Flag12
10130 procedure Set_Has_Init_Expression
10131 (N : Node_Id; Val : Boolean := True); -- Flag14
10133 procedure Set_Has_Local_Raise
10134 (N : Node_Id; Val : Boolean := True); -- Flag8
10136 procedure Set_Has_No_Elaboration_Code
10137 (N : Node_Id; Val : Boolean := True); -- Flag17
10139 procedure Set_Has_Pragma_Suppress_All
10140 (N : Node_Id; Val : Boolean := True); -- Flag14
10142 procedure Set_Has_Private_View
10143 (N : Node_Id; Val : Boolean := True); -- Flag11
10145 procedure Set_Has_Relative_Deadline_Pragma
10146 (N : Node_Id; Val : Boolean := True); -- Flag9
10148 procedure Set_Has_Self_Reference
10149 (N : Node_Id; Val : Boolean := True); -- Flag13
10151 procedure Set_Has_SP_Choice
10152 (N : Node_Id; Val : Boolean := True); -- Flag15
10154 procedure Set_Has_Storage_Size_Pragma
10155 (N : Node_Id; Val : Boolean := True); -- Flag5
10157 procedure Set_Has_Wide_Character
10158 (N : Node_Id; Val : Boolean := True); -- Flag11
10160 procedure Set_Has_Wide_Wide_Character
10161 (N : Node_Id; Val : Boolean := True); -- Flag13
10163 procedure Set_Header_Size_Added
10164 (N : Node_Id; Val : Boolean := True); -- Flag11
10166 procedure Set_Hidden_By_Use_Clause
10167 (N : Node_Id; Val : Elist_Id); -- Elist4
10169 procedure Set_High_Bound
10170 (N : Node_Id; Val : Node_Id); -- Node2
10172 procedure Set_Identifier
10173 (N : Node_Id; Val : Node_Id); -- Node1
10175 procedure Set_Interface_List
10176 (N : Node_Id; Val : List_Id); -- List2
10178 procedure Set_Interface_Present
10179 (N : Node_Id; Val : Boolean := True); -- Flag16
10181 procedure Set_Implicit_With
10182 (N : Node_Id; Val : Boolean := True); -- Flag16
10184 procedure Set_Implicit_With_From_Instantiation
10185 (N : Node_Id; Val : Boolean := True); -- Flag12
10187 procedure Set_Import_Interface_Present
10188 (N : Node_Id; Val : Boolean := True); -- Flag16
10190 procedure Set_In_Present
10191 (N : Node_Id; Val : Boolean := True); -- Flag15
10193 procedure Set_Includes_Infinities
10194 (N : Node_Id; Val : Boolean := True); -- Flag11
10196 procedure Set_Incomplete_View
10197 (N : Node_Id; Val : Node_Id); -- Node2
10199 procedure Set_Inherited_Discriminant
10200 (N : Node_Id; Val : Boolean := True); -- Flag13
10202 procedure Set_Instance_Spec
10203 (N : Node_Id; Val : Node_Id); -- Node5
10205 procedure Set_Intval
10206 (N : Node_Id; Val : Uint); -- Uint3
10208 procedure Set_Is_Accessibility_Actual
10209 (N : Node_Id; Val : Boolean := True); -- Flag13
10211 procedure Set_Is_Asynchronous_Call_Block
10212 (N : Node_Id; Val : Boolean := True); -- Flag7
10214 procedure Set_Is_Boolean_Aspect
10215 (N : Node_Id; Val : Boolean := True); -- Flag16
10217 procedure Set_Is_Checked
10218 (N : Node_Id; Val : Boolean := True); -- Flag11
10220 procedure Set_Is_Component_Left_Opnd
10221 (N : Node_Id; Val : Boolean := True); -- Flag13
10223 procedure Set_Is_Component_Right_Opnd
10224 (N : Node_Id; Val : Boolean := True); -- Flag14
10226 procedure Set_Is_Controlling_Actual
10227 (N : Node_Id; Val : Boolean := True); -- Flag16
10229 procedure Set_Is_Delayed_Aspect
10230 (N : Node_Id; Val : Boolean := True); -- Flag14
10232 procedure Set_Is_Disabled
10233 (N : Node_Id; Val : Boolean := True); -- Flag15
10235 procedure Set_Is_Ignored
10236 (N : Node_Id; Val : Boolean := True); -- Flag9
10238 procedure Set_Is_Dynamic_Coextension
10239 (N : Node_Id; Val : Boolean := True); -- Flag18
10241 procedure Set_Is_Elsif
10242 (N : Node_Id; Val : Boolean := True); -- Flag13
10244 procedure Set_Is_Entry_Barrier_Function
10245 (N : Node_Id; Val : Boolean := True); -- Flag8
10247 procedure Set_Is_Expanded_Build_In_Place_Call
10248 (N : Node_Id; Val : Boolean := True); -- Flag11
10250 procedure Set_Is_Finalization_Wrapper
10251 (N : Node_Id; Val : Boolean := True); -- Flag9
10253 procedure Set_Is_Folded_In_Parser
10254 (N : Node_Id; Val : Boolean := True); -- Flag4
10256 procedure Set_Is_In_Discriminant_Check
10257 (N : Node_Id; Val : Boolean := True); -- Flag11
10259 procedure Set_Is_Machine_Number
10260 (N : Node_Id; Val : Boolean := True); -- Flag11
10262 procedure Set_Is_Null_Loop
10263 (N : Node_Id; Val : Boolean := True); -- Flag16
10265 procedure Set_Is_Overloaded
10266 (N : Node_Id; Val : Boolean := True); -- Flag5
10268 procedure Set_Is_Power_Of_2_For_Shift
10269 (N : Node_Id; Val : Boolean := True); -- Flag13
10271 procedure Set_Is_Prefixed_Call
10272 (N : Node_Id; Val : Boolean := True); -- Flag17
10274 procedure Set_Is_Protected_Subprogram_Body
10275 (N : Node_Id; Val : Boolean := True); -- Flag7
10277 procedure Set_Is_Static_Coextension
10278 (N : Node_Id; Val : Boolean := True); -- Flag14
10280 procedure Set_Is_Static_Expression
10281 (N : Node_Id; Val : Boolean := True); -- Flag6
10283 procedure Set_Is_Subprogram_Descriptor
10284 (N : Node_Id; Val : Boolean := True); -- Flag16
10286 procedure Set_Is_Task_Allocation_Block
10287 (N : Node_Id; Val : Boolean := True); -- Flag6
10289 procedure Set_Is_Task_Master
10290 (N : Node_Id; Val : Boolean := True); -- Flag5
10292 procedure Set_Iteration_Scheme
10293 (N : Node_Id; Val : Node_Id); -- Node2
10295 procedure Set_Iterator_Specification
10296 (N : Node_Id; Val : Node_Id); -- Node2
10298 procedure Set_Itype
10299 (N : Node_Id; Val : Entity_Id); -- Node1
10301 procedure Set_Kill_Range_Check
10302 (N : Node_Id; Val : Boolean := True); -- Flag11
10304 procedure Set_Last_Bit
10305 (N : Node_Id; Val : Node_Id); -- Node4
10307 procedure Set_Last_Name
10308 (N : Node_Id; Val : Boolean := True); -- Flag6
10310 procedure Set_Library_Unit
10311 (N : Node_Id; Val : Node_Id); -- Node4
10313 procedure Set_Label_Construct
10314 (N : Node_Id; Val : Node_Id); -- Node2
10316 procedure Set_Left_Opnd
10317 (N : Node_Id; Val : Node_Id); -- Node2
10319 procedure Set_Limited_View_Installed
10320 (N : Node_Id; Val : Boolean := True); -- Flag18
10322 procedure Set_Limited_Present
10323 (N : Node_Id; Val : Boolean := True); -- Flag17
10325 procedure Set_Literals
10326 (N : Node_Id; Val : List_Id); -- List1
10328 procedure Set_Local_Raise_Not_OK
10329 (N : Node_Id; Val : Boolean := True); -- Flag7
10331 procedure Set_Local_Raise_Statements
10332 (N : Node_Id; Val : Elist_Id); -- Elist1
10334 procedure Set_Loop_Actions
10335 (N : Node_Id; Val : List_Id); -- List2
10337 procedure Set_Loop_Parameter_Specification
10338 (N : Node_Id; Val : Node_Id); -- Node4
10340 procedure Set_Low_Bound
10341 (N : Node_Id; Val : Node_Id); -- Node1
10343 procedure Set_Mod_Clause
10344 (N : Node_Id; Val : Node_Id); -- Node2
10346 procedure Set_More_Ids
10347 (N : Node_Id; Val : Boolean := True); -- Flag5
10349 procedure Set_Must_Be_Byte_Aligned
10350 (N : Node_Id; Val : Boolean := True); -- Flag14
10352 procedure Set_Must_Not_Freeze
10353 (N : Node_Id; Val : Boolean := True); -- Flag8
10355 procedure Set_Must_Not_Override
10356 (N : Node_Id; Val : Boolean := True); -- Flag15
10358 procedure Set_Must_Override
10359 (N : Node_Id; Val : Boolean := True); -- Flag14
10362 (N : Node_Id; Val : Node_Id); -- Node2
10364 procedure Set_Names
10365 (N : Node_Id; Val : List_Id); -- List2
10367 procedure Set_Next_Entity
10368 (N : Node_Id; Val : Node_Id); -- Node2
10370 procedure Set_Next_Exit_Statement
10371 (N : Node_Id; Val : Node_Id); -- Node3
10373 procedure Set_Next_Implicit_With
10374 (N : Node_Id; Val : Node_Id); -- Node3
10376 procedure Set_Next_Named_Actual
10377 (N : Node_Id; Val : Node_Id); -- Node4
10379 procedure Set_Next_Pragma
10380 (N : Node_Id; Val : Node_Id); -- Node1
10382 procedure Set_Next_Rep_Item
10383 (N : Node_Id; Val : Node_Id); -- Node5
10385 procedure Set_Next_Use_Clause
10386 (N : Node_Id; Val : Node_Id); -- Node3
10388 procedure Set_No_Ctrl_Actions
10389 (N : Node_Id; Val : Boolean := True); -- Flag7
10391 procedure Set_No_Elaboration_Check
10392 (N : Node_Id; Val : Boolean := True); -- Flag14
10394 procedure Set_No_Entities_Ref_In_Spec
10395 (N : Node_Id; Val : Boolean := True); -- Flag8
10397 procedure Set_No_Initialization
10398 (N : Node_Id; Val : Boolean := True); -- Flag13
10400 procedure Set_No_Minimize_Eliminate
10401 (N : Node_Id; Val : Boolean := True); -- Flag17
10403 procedure Set_No_Truncation
10404 (N : Node_Id; Val : Boolean := True); -- Flag17
10406 procedure Set_Non_Aliased_Prefix
10407 (N : Node_Id; Val : Boolean := True); -- Flag18
10409 procedure Set_Null_Present
10410 (N : Node_Id; Val : Boolean := True); -- Flag13
10412 procedure Set_Null_Excluding_Subtype
10413 (N : Node_Id; Val : Boolean := True); -- Flag16
10415 procedure Set_Null_Exclusion_Present
10416 (N : Node_Id; Val : Boolean := True); -- Flag11
10418 procedure Set_Null_Exclusion_In_Return_Present
10419 (N : Node_Id; Val : Boolean := True); -- Flag14
10421 procedure Set_Null_Record_Present
10422 (N : Node_Id; Val : Boolean := True); -- Flag17
10424 procedure Set_Object_Definition
10425 (N : Node_Id; Val : Node_Id); -- Node4
10427 procedure Set_Of_Present
10428 (N : Node_Id; Val : Boolean := True); -- Flag16
10430 procedure Set_Original_Discriminant
10431 (N : Node_Id; Val : Node_Id); -- Node2
10433 procedure Set_Original_Entity
10434 (N : Node_Id; Val : Entity_Id); -- Node2
10436 procedure Set_Others_Discrete_Choices
10437 (N : Node_Id; Val : List_Id); -- List1
10439 procedure Set_Out_Present
10440 (N : Node_Id; Val : Boolean := True); -- Flag17
10442 procedure Set_Parameter_Associations
10443 (N : Node_Id; Val : List_Id); -- List3
10445 procedure Set_Parameter_List_Truncated
10446 (N : Node_Id; Val : Boolean := True); -- Flag17
10448 procedure Set_Parameter_Specifications
10449 (N : Node_Id; Val : List_Id); -- List3
10451 procedure Set_Parameter_Type
10452 (N : Node_Id; Val : Node_Id); -- Node2
10454 procedure Set_Parent_Spec
10455 (N : Node_Id; Val : Node_Id); -- Node4
10457 procedure Set_Position
10458 (N : Node_Id; Val : Node_Id); -- Node2
10460 procedure Set_Pragma_Argument_Associations
10461 (N : Node_Id; Val : List_Id); -- List2
10463 procedure Set_Pragma_Identifier
10464 (N : Node_Id; Val : Node_Id); -- Node4
10466 procedure Set_Pragmas_After
10467 (N : Node_Id; Val : List_Id); -- List5
10469 procedure Set_Pragmas_Before
10470 (N : Node_Id; Val : List_Id); -- List4
10472 procedure Set_Pre_Post_Conditions
10473 (N : Node_Id; Val : Node_Id); -- Node1
10475 procedure Set_Prefix
10476 (N : Node_Id; Val : Node_Id); -- Node3
10478 procedure Set_Premature_Use
10479 (N : Node_Id; Val : Node_Id); -- Node5
10481 procedure Set_Present_Expr
10482 (N : Node_Id; Val : Uint); -- Uint3
10484 procedure Set_Prev_Ids
10485 (N : Node_Id; Val : Boolean := True); -- Flag6
10487 procedure Set_Print_In_Hex
10488 (N : Node_Id; Val : Boolean := True); -- Flag13
10490 procedure Set_Private_Declarations
10491 (N : Node_Id; Val : List_Id); -- List3
10493 procedure Set_Private_Present
10494 (N : Node_Id; Val : Boolean := True); -- Flag15
10496 procedure Set_Procedure_To_Call
10497 (N : Node_Id; Val : Node_Id); -- Node2
10499 procedure Set_Proper_Body
10500 (N : Node_Id; Val : Node_Id); -- Node1
10502 procedure Set_Protected_Definition
10503 (N : Node_Id; Val : Node_Id); -- Node3
10505 procedure Set_Protected_Present
10506 (N : Node_Id; Val : Boolean := True); -- Flag6
10508 procedure Set_Raises_Constraint_Error
10509 (N : Node_Id; Val : Boolean := True); -- Flag7
10511 procedure Set_Range_Constraint
10512 (N : Node_Id; Val : Node_Id); -- Node4
10514 procedure Set_Range_Expression
10515 (N : Node_Id; Val : Node_Id); -- Node4
10517 procedure Set_Real_Range_Specification
10518 (N : Node_Id; Val : Node_Id); -- Node4
10520 procedure Set_Realval
10521 (N : Node_Id; Val : Ureal); -- Ureal3
10523 procedure Set_Reason
10524 (N : Node_Id; Val : Uint); -- Uint3
10526 procedure Set_Record_Extension_Part
10527 (N : Node_Id; Val : Node_Id); -- Node3
10529 procedure Set_Redundant_Use
10530 (N : Node_Id; Val : Boolean := True); -- Flag13
10532 procedure Set_Renaming_Exception
10533 (N : Node_Id; Val : Node_Id); -- Node2
10535 procedure Set_Result_Definition
10536 (N : Node_Id; Val : Node_Id); -- Node4
10538 procedure Set_Return_Object_Declarations
10539 (N : Node_Id; Val : List_Id); -- List3
10541 procedure Set_Return_Statement_Entity
10542 (N : Node_Id; Val : Node_Id); -- Node5
10544 procedure Set_Reverse_Present
10545 (N : Node_Id; Val : Boolean := True); -- Flag15
10547 procedure Set_Right_Opnd
10548 (N : Node_Id; Val : Node_Id); -- Node3
10550 procedure Set_Rounded_Result
10551 (N : Node_Id; Val : Boolean := True); -- Flag18
10553 procedure Set_SCIL_Controlling_Tag
10554 (N : Node_Id; Val : Node_Id); -- Node5
10556 procedure Set_SCIL_Entity
10557 (N : Node_Id; Val : Node_Id); -- Node4
10559 procedure Set_SCIL_Tag_Value
10560 (N : Node_Id; Val : Node_Id); -- Node5
10562 procedure Set_SCIL_Target_Prim
10563 (N : Node_Id; Val : Node_Id); -- Node2
10565 procedure Set_Scope
10566 (N : Node_Id; Val : Node_Id); -- Node3
10568 procedure Set_Select_Alternatives
10569 (N : Node_Id; Val : List_Id); -- List1
10571 procedure Set_Selector_Name
10572 (N : Node_Id; Val : Node_Id); -- Node2
10574 procedure Set_Selector_Names
10575 (N : Node_Id; Val : List_Id); -- List1
10577 procedure Set_Shift_Count_OK
10578 (N : Node_Id; Val : Boolean := True); -- Flag4
10580 procedure Set_Source_Type
10581 (N : Node_Id; Val : Entity_Id); -- Node1
10583 procedure Set_Specification
10584 (N : Node_Id; Val : Node_Id); -- Node1
10586 procedure Set_Split_PPC
10587 (N : Node_Id; Val : Boolean); -- Flag17
10589 procedure Set_Statements
10590 (N : Node_Id; Val : List_Id); -- List3
10592 procedure Set_Storage_Pool
10593 (N : Node_Id; Val : Node_Id); -- Node1
10595 procedure Set_Subpool_Handle_Name
10596 (N : Node_Id; Val : Node_Id); -- Node4
10598 procedure Set_Strval
10599 (N : Node_Id; Val : String_Id); -- Str3
10601 procedure Set_Subtype_Indication
10602 (N : Node_Id; Val : Node_Id); -- Node5
10604 procedure Set_Subtype_Mark
10605 (N : Node_Id; Val : Node_Id); -- Node4
10607 procedure Set_Subtype_Marks
10608 (N : Node_Id; Val : List_Id); -- List2
10610 procedure Set_Suppress_Assignment_Checks
10611 (N : Node_Id; Val : Boolean := True); -- Flag18
10613 procedure Set_Suppress_Loop_Warnings
10614 (N : Node_Id; Val : Boolean := True); -- Flag17
10616 procedure Set_Synchronized_Present
10617 (N : Node_Id; Val : Boolean := True); -- Flag7
10619 procedure Set_Tagged_Present
10620 (N : Node_Id; Val : Boolean := True); -- Flag15
10622 procedure Set_Target_Type
10623 (N : Node_Id; Val : Entity_Id); -- Node2
10625 procedure Set_Task_Definition
10626 (N : Node_Id; Val : Node_Id); -- Node3
10628 procedure Set_Task_Present
10629 (N : Node_Id; Val : Boolean := True); -- Flag5
10631 procedure Set_Then_Actions
10632 (N : Node_Id; Val : List_Id); -- List2
10634 procedure Set_Then_Statements
10635 (N : Node_Id; Val : List_Id); -- List2
10637 procedure Set_Treat_Fixed_As_Integer
10638 (N : Node_Id; Val : Boolean := True); -- Flag14
10640 procedure Set_Triggering_Alternative
10641 (N : Node_Id; Val : Node_Id); -- Node1
10643 procedure Set_Triggering_Statement
10644 (N : Node_Id; Val : Node_Id); -- Node1
10646 procedure Set_TSS_Elist
10647 (N : Node_Id; Val : Elist_Id); -- Elist3
10649 procedure Set_Type_Definition
10650 (N : Node_Id; Val : Node_Id); -- Node3
10652 procedure Set_Uneval_Old_Accept
10653 (N : Node_Id; Val : Boolean := True); -- Flag13
10655 procedure Set_Uneval_Old_Warn
10656 (N : Node_Id; Val : Boolean := True); -- Flag18
10659 (N : Node_Id; Val : Node_Id); -- Node2
10661 procedure Set_Unknown_Discriminants_Present
10662 (N : Node_Id; Val : Boolean := True); -- Flag13
10664 procedure Set_Unreferenced_In_Spec
10665 (N : Node_Id; Val : Boolean := True); -- Flag7
10667 procedure Set_Variant_Part
10668 (N : Node_Id; Val : Node_Id); -- Node4
10670 procedure Set_Variants
10671 (N : Node_Id; Val : List_Id); -- List1
10673 procedure Set_Visible_Declarations
10674 (N : Node_Id; Val : List_Id); -- List2
10676 procedure Set_Uninitialized_Variable
10677 (N : Node_Id; Val : Node_Id); -- Node3
10679 procedure Set_Used_Operations
10680 (N : Node_Id; Val : Elist_Id); -- Elist5
10682 procedure Set_Was_Originally_Stub
10683 (N : Node_Id; Val : Boolean := True); -- Flag13
10685 procedure Set_Withed_Body
10686 (N : Node_Id; Val : Node_Id); -- Node1
10688 -------------------------
10689 -- Iterator Procedures --
10690 -------------------------
10692 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
10694 procedure Next_Entity (N : in out Node_Id);
10695 procedure Next_Named_Actual (N : in out Node_Id);
10696 procedure Next_Rep_Item (N : in out Node_Id);
10697 procedure Next_Use_Clause (N : in out Node_Id);
10699 -------------------------------------------
10700 -- Miscellaneous Tree Access Subprograms --
10701 -------------------------------------------
10703 function End_Location (N : Node_Id) return Source_Ptr;
10704 -- N is an N_If_Statement or N_Case_Statement node, and this function
10705 -- returns the location of the IF token in the END IF sequence by
10706 -- translating the value of the End_Span field.
10708 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
10709 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
10710 -- the End_Span field to correspond to the given value S. In other words,
10711 -- End_Span is set to the difference between S and Sloc (N), the starting
10714 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
10715 -- Given an argument to a pragma Arg, this function returns the expression
10716 -- for the argument. This is Arg itself, or, in the case where Arg is a
10717 -- pragma argument association node, the expression from this node.
10719 --------------------------------
10720 -- Node_Kind Membership Tests --
10721 --------------------------------
10723 -- The following functions allow a convenient notation for testing whether
10724 -- a Node_Kind value matches any one of a list of possible values. In each
10725 -- case True is returned if the given T argument is equal to any of the V
10726 -- arguments. Note that there is a similar set of functions defined in
10727 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
10732 V2 : Node_Kind) return Boolean;
10738 V3 : Node_Kind) return Boolean;
10745 V4 : Node_Kind) return Boolean;
10753 V5 : Node_Kind) return Boolean;
10762 V6 : Node_Kind) return Boolean;
10772 V7 : Node_Kind) return Boolean;
10783 V8 : Node_Kind) return Boolean;
10795 V9 : Node_Kind) return Boolean;
10797 pragma Inline (Nkind_In);
10798 -- Inline all above functions
10800 -----------------------
10801 -- Utility Functions --
10802 -----------------------
10804 function Pragma_Name (N : Node_Id) return Name_Id;
10805 pragma Inline (Pragma_Name);
10806 -- Convenient function to obtain Chars field of Pragma_Identifier
10808 -----------------------------
10809 -- Syntactic Parent Tables --
10810 -----------------------------
10812 -- These tables show for each node, and for each of the five fields,
10813 -- whether the corresponding field is syntactic (True) or semantic (False).
10814 -- Unused entries are also set to False.
10816 subtype Field_Num is Natural range 1 .. 5;
10818 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
10820 -- Following entries can be built automatically from the sinfo sources
10821 -- using the makeisf utility (currently this program is in spitbol).
10824 (1 => True, -- Chars (Name1)
10825 2 => False, -- Original_Discriminant (Node2-Sem)
10826 3 => False, -- unused
10827 4 => False, -- Entity (Node4-Sem)
10828 5 => False), -- Etype (Node5-Sem)
10830 N_Integer_Literal =>
10831 (1 => False, -- unused
10832 2 => False, -- Original_Entity (Node2-Sem)
10833 3 => True, -- Intval (Uint3)
10834 4 => False, -- unused
10835 5 => False), -- Etype (Node5-Sem)
10838 (1 => False, -- unused
10839 2 => False, -- Original_Entity (Node2-Sem)
10840 3 => True, -- Realval (Ureal3)
10841 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
10842 5 => False), -- Etype (Node5-Sem)
10844 N_Character_Literal =>
10845 (1 => True, -- Chars (Name1)
10846 2 => True, -- Char_Literal_Value (Uint2)
10847 3 => False, -- unused
10848 4 => False, -- Entity (Node4-Sem)
10849 5 => False), -- Etype (Node5-Sem)
10851 N_String_Literal =>
10852 (1 => False, -- unused
10853 2 => False, -- unused
10854 3 => True, -- Strval (Str3)
10855 4 => False, -- unused
10856 5 => False), -- Etype (Node5-Sem)
10859 (1 => False, -- Next_Pragma (Node1-Sem)
10860 2 => True, -- Pragma_Argument_Associations (List2)
10861 3 => False, -- unused
10862 4 => True, -- Pragma_Identifier (Node4)
10863 5 => False), -- Next_Rep_Item (Node5-Sem)
10865 N_Pragma_Argument_Association =>
10866 (1 => True, -- Chars (Name1)
10867 2 => False, -- unused
10868 3 => True, -- Expression (Node3)
10869 4 => False, -- unused
10870 5 => False), -- unused
10872 N_Defining_Identifier =>
10873 (1 => True, -- Chars (Name1)
10874 2 => False, -- Next_Entity (Node2-Sem)
10875 3 => False, -- Scope (Node3-Sem)
10876 4 => False, -- unused
10877 5 => False), -- Etype (Node5-Sem)
10879 N_Full_Type_Declaration =>
10880 (1 => True, -- Defining_Identifier (Node1)
10881 2 => False, -- Incomplete_View (Node2-Sem)
10882 3 => True, -- Type_Definition (Node3)
10883 4 => True, -- Discriminant_Specifications (List4)
10884 5 => False), -- unused
10886 N_Subtype_Declaration =>
10887 (1 => True, -- Defining_Identifier (Node1)
10888 2 => False, -- unused
10889 3 => False, -- unused
10890 4 => False, -- Generic_Parent_Type (Node4-Sem)
10891 5 => True), -- Subtype_Indication (Node5)
10893 N_Subtype_Indication =>
10894 (1 => False, -- unused
10895 2 => False, -- unused
10896 3 => True, -- Constraint (Node3)
10897 4 => True, -- Subtype_Mark (Node4)
10898 5 => False), -- Etype (Node5-Sem)
10900 N_Object_Declaration =>
10901 (1 => True, -- Defining_Identifier (Node1)
10902 2 => False, -- Handler_List_Entry (Node2-Sem)
10903 3 => True, -- Expression (Node3)
10904 4 => True, -- Object_Definition (Node4)
10905 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10907 N_Number_Declaration =>
10908 (1 => True, -- Defining_Identifier (Node1)
10909 2 => False, -- unused
10910 3 => True, -- Expression (Node3)
10911 4 => False, -- unused
10912 5 => False), -- unused
10914 N_Derived_Type_Definition =>
10915 (1 => False, -- unused
10916 2 => True, -- Interface_List (List2)
10917 3 => True, -- Record_Extension_Part (Node3)
10918 4 => False, -- unused
10919 5 => True), -- Subtype_Indication (Node5)
10921 N_Range_Constraint =>
10922 (1 => False, -- unused
10923 2 => False, -- unused
10924 3 => False, -- unused
10925 4 => True, -- Range_Expression (Node4)
10926 5 => False), -- unused
10929 (1 => True, -- Low_Bound (Node1)
10930 2 => True, -- High_Bound (Node2)
10931 3 => False, -- unused
10932 4 => False, -- unused
10933 5 => False), -- Etype (Node5-Sem)
10935 N_Enumeration_Type_Definition =>
10936 (1 => True, -- Literals (List1)
10937 2 => False, -- unused
10938 3 => False, -- unused
10939 4 => True, -- End_Label (Node4)
10940 5 => False), -- unused
10942 N_Defining_Character_Literal =>
10943 (1 => True, -- Chars (Name1)
10944 2 => False, -- Next_Entity (Node2-Sem)
10945 3 => False, -- Scope (Node3-Sem)
10946 4 => False, -- unused
10947 5 => False), -- Etype (Node5-Sem)
10949 N_Signed_Integer_Type_Definition =>
10950 (1 => True, -- Low_Bound (Node1)
10951 2 => True, -- High_Bound (Node2)
10952 3 => False, -- unused
10953 4 => False, -- unused
10954 5 => False), -- unused
10956 N_Modular_Type_Definition =>
10957 (1 => False, -- unused
10958 2 => False, -- unused
10959 3 => True, -- Expression (Node3)
10960 4 => False, -- unused
10961 5 => False), -- unused
10963 N_Floating_Point_Definition =>
10964 (1 => False, -- unused
10965 2 => True, -- Digits_Expression (Node2)
10966 3 => False, -- unused
10967 4 => True, -- Real_Range_Specification (Node4)
10968 5 => False), -- unused
10970 N_Real_Range_Specification =>
10971 (1 => True, -- Low_Bound (Node1)
10972 2 => True, -- High_Bound (Node2)
10973 3 => False, -- unused
10974 4 => False, -- unused
10975 5 => False), -- unused
10977 N_Ordinary_Fixed_Point_Definition =>
10978 (1 => False, -- unused
10979 2 => False, -- unused
10980 3 => True, -- Delta_Expression (Node3)
10981 4 => True, -- Real_Range_Specification (Node4)
10982 5 => False), -- unused
10984 N_Decimal_Fixed_Point_Definition =>
10985 (1 => False, -- unused
10986 2 => True, -- Digits_Expression (Node2)
10987 3 => True, -- Delta_Expression (Node3)
10988 4 => True, -- Real_Range_Specification (Node4)
10989 5 => False), -- unused
10991 N_Digits_Constraint =>
10992 (1 => False, -- unused
10993 2 => True, -- Digits_Expression (Node2)
10994 3 => False, -- unused
10995 4 => True, -- Range_Constraint (Node4)
10996 5 => False), -- unused
10998 N_Unconstrained_Array_Definition =>
10999 (1 => False, -- unused
11000 2 => True, -- Subtype_Marks (List2)
11001 3 => False, -- unused
11002 4 => True, -- Component_Definition (Node4)
11003 5 => False), -- unused
11005 N_Constrained_Array_Definition =>
11006 (1 => False, -- unused
11007 2 => True, -- Discrete_Subtype_Definitions (List2)
11008 3 => False, -- unused
11009 4 => True, -- Component_Definition (Node4)
11010 5 => False), -- unused
11012 N_Component_Definition =>
11013 (1 => False, -- unused
11014 2 => False, -- unused
11015 3 => True, -- Access_Definition (Node3)
11016 4 => False, -- unused
11017 5 => True), -- Subtype_Indication (Node5)
11019 N_Discriminant_Specification =>
11020 (1 => True, -- Defining_Identifier (Node1)
11021 2 => False, -- unused
11022 3 => True, -- Expression (Node3)
11023 4 => False, -- unused
11024 5 => True), -- Discriminant_Type (Node5)
11026 N_Index_Or_Discriminant_Constraint =>
11027 (1 => True, -- Constraints (List1)
11028 2 => False, -- unused
11029 3 => False, -- unused
11030 4 => False, -- unused
11031 5 => False), -- unused
11033 N_Discriminant_Association =>
11034 (1 => True, -- Selector_Names (List1)
11035 2 => False, -- unused
11036 3 => True, -- Expression (Node3)
11037 4 => False, -- unused
11038 5 => False), -- unused
11040 N_Record_Definition =>
11041 (1 => True, -- Component_List (Node1)
11042 2 => True, -- Interface_List (List2)
11043 3 => False, -- unused
11044 4 => True, -- End_Label (Node4)
11045 5 => False), -- unused
11047 N_Component_List =>
11048 (1 => False, -- unused
11049 2 => False, -- unused
11050 3 => True, -- Component_Items (List3)
11051 4 => True, -- Variant_Part (Node4)
11052 5 => False), -- unused
11054 N_Component_Declaration =>
11055 (1 => True, -- Defining_Identifier (Node1)
11056 2 => False, -- unused
11057 3 => True, -- Expression (Node3)
11058 4 => True, -- Component_Definition (Node4)
11059 5 => False), -- unused
11062 (1 => True, -- Variants (List1)
11063 2 => True, -- Name (Node2)
11064 3 => False, -- unused
11065 4 => False, -- unused
11066 5 => False), -- unused
11069 (1 => True, -- Component_List (Node1)
11070 2 => False, -- Enclosing_Variant (Node2-Sem)
11071 3 => False, -- Present_Expr (Uint3-Sem)
11072 4 => True, -- Discrete_Choices (List4)
11073 5 => False), -- Dcheck_Function (Node5-Sem)
11076 (1 => False, -- Others_Discrete_Choices (List1-Sem)
11077 2 => False, -- unused
11078 3 => False, -- unused
11079 4 => False, -- unused
11080 5 => False), -- unused
11082 N_Access_To_Object_Definition =>
11083 (1 => False, -- unused
11084 2 => False, -- unused
11085 3 => False, -- unused
11086 4 => False, -- unused
11087 5 => True), -- Subtype_Indication (Node5)
11089 N_Access_Function_Definition =>
11090 (1 => False, -- unused
11091 2 => False, -- unused
11092 3 => True, -- Parameter_Specifications (List3)
11093 4 => True, -- Result_Definition (Node4)
11094 5 => False), -- unused
11096 N_Access_Procedure_Definition =>
11097 (1 => False, -- unused
11098 2 => False, -- unused
11099 3 => True, -- Parameter_Specifications (List3)
11100 4 => False, -- unused
11101 5 => False), -- unused
11103 N_Access_Definition =>
11104 (1 => False, -- unused
11105 2 => False, -- unused
11106 3 => True, -- Access_To_Subprogram_Definition (Node3)
11107 4 => True, -- Subtype_Mark (Node4)
11108 5 => False), -- unused
11110 N_Incomplete_Type_Declaration =>
11111 (1 => True, -- Defining_Identifier (Node1)
11112 2 => False, -- unused
11113 3 => False, -- unused
11114 4 => True, -- Discriminant_Specifications (List4)
11115 5 => False), -- Premature_Use
11117 N_Explicit_Dereference =>
11118 (1 => False, -- unused
11119 2 => False, -- unused
11120 3 => True, -- Prefix (Node3)
11121 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11122 5 => False), -- Etype (Node5-Sem)
11124 N_Indexed_Component =>
11125 (1 => True, -- Expressions (List1)
11126 2 => False, -- unused
11127 3 => True, -- Prefix (Node3)
11128 4 => False, -- Generalized_Indexing (Node4-Sem)
11129 5 => False), -- Etype (Node5-Sem)
11132 (1 => False, -- unused
11133 2 => False, -- unused
11134 3 => True, -- Prefix (Node3)
11135 4 => True, -- Discrete_Range (Node4)
11136 5 => False), -- Etype (Node5-Sem)
11138 N_Selected_Component =>
11139 (1 => False, -- unused
11140 2 => True, -- Selector_Name (Node2)
11141 3 => True, -- Prefix (Node3)
11142 4 => False, -- unused
11143 5 => False), -- Etype (Node5-Sem)
11145 N_Attribute_Reference =>
11146 (1 => True, -- Expressions (List1)
11147 2 => True, -- Attribute_Name (Name2)
11148 3 => True, -- Prefix (Node3)
11149 4 => False, -- Entity (Node4-Sem)
11150 5 => False), -- Etype (Node5-Sem)
11153 (1 => True, -- Expressions (List1)
11154 2 => True, -- Component_Associations (List2)
11155 3 => False, -- Aggregate_Bounds (Node3-Sem)
11156 4 => False, -- unused
11157 5 => False), -- Etype (Node5-Sem)
11159 N_Component_Association =>
11160 (1 => True, -- Choices (List1)
11161 2 => False, -- Loop_Actions (List2-Sem)
11162 3 => True, -- Expression (Node3)
11163 4 => False, -- unused
11164 5 => False), -- unused
11166 N_Extension_Aggregate =>
11167 (1 => True, -- Expressions (List1)
11168 2 => True, -- Component_Associations (List2)
11169 3 => True, -- Ancestor_Part (Node3)
11170 4 => False, -- unused
11171 5 => False), -- Etype (Node5-Sem)
11174 (1 => False, -- unused
11175 2 => False, -- unused
11176 3 => False, -- unused
11177 4 => False, -- unused
11178 5 => False), -- Etype (Node5-Sem)
11181 (1 => False, -- Actions (List1-Sem)
11182 2 => True, -- Left_Opnd (Node2)
11183 3 => True, -- Right_Opnd (Node3)
11184 4 => False, -- unused
11185 5 => False), -- Etype (Node5-Sem)
11188 (1 => False, -- Actions (List1-Sem)
11189 2 => True, -- Left_Opnd (Node2)
11190 3 => True, -- Right_Opnd (Node3)
11191 4 => False, -- unused
11192 5 => False), -- Etype (Node5-Sem)
11195 (1 => False, -- unused
11196 2 => True, -- Left_Opnd (Node2)
11197 3 => True, -- Right_Opnd (Node3)
11198 4 => True, -- Alternatives (List4)
11199 5 => False), -- Etype (Node5-Sem)
11202 (1 => False, -- unused
11203 2 => True, -- Left_Opnd (Node2)
11204 3 => True, -- Right_Opnd (Node3)
11205 4 => True, -- Alternatives (List4)
11206 5 => False), -- Etype (Node5-Sem)
11209 (1 => True, -- Chars (Name1)
11210 2 => True, -- Left_Opnd (Node2)
11211 3 => True, -- Right_Opnd (Node3)
11212 4 => False, -- Entity (Node4-Sem)
11213 5 => False), -- Etype (Node5-Sem)
11216 (1 => True, -- Chars (Name1)
11217 2 => True, -- Left_Opnd (Node2)
11218 3 => True, -- Right_Opnd (Node3)
11219 4 => False, -- Entity (Node4-Sem)
11220 5 => False), -- Etype (Node5-Sem)
11223 (1 => True, -- Chars (Name1)
11224 2 => True, -- Left_Opnd (Node2)
11225 3 => True, -- Right_Opnd (Node3)
11226 4 => False, -- Entity (Node4-Sem)
11227 5 => False), -- Etype (Node5-Sem)
11230 (1 => True, -- Chars (Name1)
11231 2 => True, -- Left_Opnd (Node2)
11232 3 => True, -- Right_Opnd (Node3)
11233 4 => False, -- Entity (Node4-Sem)
11234 5 => False), -- Etype (Node5-Sem)
11237 (1 => True, -- Chars (Name1)
11238 2 => True, -- Left_Opnd (Node2)
11239 3 => True, -- Right_Opnd (Node3)
11240 4 => False, -- Entity (Node4-Sem)
11241 5 => False), -- Etype (Node5-Sem)
11244 (1 => True, -- Chars (Name1)
11245 2 => True, -- Left_Opnd (Node2)
11246 3 => True, -- Right_Opnd (Node3)
11247 4 => False, -- Entity (Node4-Sem)
11248 5 => False), -- Etype (Node5-Sem)
11251 (1 => True, -- Chars (Name1)
11252 2 => True, -- Left_Opnd (Node2)
11253 3 => True, -- Right_Opnd (Node3)
11254 4 => False, -- Entity (Node4-Sem)
11255 5 => False), -- Etype (Node5-Sem)
11258 (1 => True, -- Chars (Name1)
11259 2 => True, -- Left_Opnd (Node2)
11260 3 => True, -- Right_Opnd (Node3)
11261 4 => False, -- Entity (Node4-Sem)
11262 5 => False), -- Etype (Node5-Sem)
11265 (1 => True, -- Chars (Name1)
11266 2 => True, -- Left_Opnd (Node2)
11267 3 => True, -- Right_Opnd (Node3)
11268 4 => False, -- Entity (Node4-Sem)
11269 5 => False), -- Etype (Node5-Sem)
11272 (1 => True, -- Chars (Name1)
11273 2 => True, -- Left_Opnd (Node2)
11274 3 => True, -- Right_Opnd (Node3)
11275 4 => False, -- Entity (Node4-Sem)
11276 5 => False), -- Etype (Node5-Sem)
11279 (1 => True, -- Chars (Name1)
11280 2 => True, -- Left_Opnd (Node2)
11281 3 => True, -- Right_Opnd (Node3)
11282 4 => False, -- Entity (Node4-Sem)
11283 5 => False), -- Etype (Node5-Sem)
11286 (1 => True, -- Chars (Name1)
11287 2 => True, -- Left_Opnd (Node2)
11288 3 => True, -- Right_Opnd (Node3)
11289 4 => False, -- Entity (Node4-Sem)
11290 5 => False), -- Etype (Node5-Sem)
11293 (1 => True, -- Chars (Name1)
11294 2 => True, -- Left_Opnd (Node2)
11295 3 => True, -- Right_Opnd (Node3)
11296 4 => False, -- Entity (Node4-Sem)
11297 5 => False), -- Etype (Node5-Sem)
11300 (1 => True, -- Chars (Name1)
11301 2 => True, -- Left_Opnd (Node2)
11302 3 => True, -- Right_Opnd (Node3)
11303 4 => False, -- Entity (Node4-Sem)
11304 5 => False), -- Etype (Node5-Sem)
11307 (1 => True, -- Chars (Name1)
11308 2 => True, -- Left_Opnd (Node2)
11309 3 => True, -- Right_Opnd (Node3)
11310 4 => False, -- Entity (Node4-Sem)
11311 5 => False), -- Etype (Node5-Sem)
11314 (1 => True, -- Chars (Name1)
11315 2 => True, -- Left_Opnd (Node2)
11316 3 => True, -- Right_Opnd (Node3)
11317 4 => False, -- Entity (Node4-Sem)
11318 5 => False), -- Etype (Node5-Sem)
11321 (1 => True, -- Chars (Name1)
11322 2 => True, -- Left_Opnd (Node2)
11323 3 => True, -- Right_Opnd (Node3)
11324 4 => False, -- Entity (Node4-Sem)
11325 5 => False), -- Etype (Node5-Sem)
11328 (1 => True, -- Chars (Name1)
11329 2 => False, -- unused
11330 3 => True, -- Right_Opnd (Node3)
11331 4 => False, -- Entity (Node4-Sem)
11332 5 => False), -- Etype (Node5-Sem)
11335 (1 => True, -- Chars (Name1)
11336 2 => False, -- unused
11337 3 => True, -- Right_Opnd (Node3)
11338 4 => False, -- Entity (Node4-Sem)
11339 5 => False), -- Etype (Node5-Sem)
11342 (1 => True, -- Chars (Name1)
11343 2 => False, -- unused
11344 3 => True, -- Right_Opnd (Node3)
11345 4 => False, -- Entity (Node4-Sem)
11346 5 => False), -- Etype (Node5-Sem)
11349 (1 => True, -- Chars (Name1)
11350 2 => False, -- unused
11351 3 => True, -- Right_Opnd (Node3)
11352 4 => False, -- Entity (Node4-Sem)
11353 5 => False), -- Etype (Node5-Sem)
11355 N_Type_Conversion =>
11356 (1 => False, -- unused
11357 2 => False, -- unused
11358 3 => True, -- Expression (Node3)
11359 4 => True, -- Subtype_Mark (Node4)
11360 5 => False), -- Etype (Node5-Sem)
11362 N_Qualified_Expression =>
11363 (1 => False, -- unused
11364 2 => False, -- unused
11365 3 => True, -- Expression (Node3)
11366 4 => True, -- Subtype_Mark (Node4)
11367 5 => False), -- Etype (Node5-Sem)
11369 N_Quantified_Expression =>
11370 (1 => True, -- Condition (Node1)
11371 2 => True, -- Iterator_Specification
11372 3 => False, -- unused
11373 4 => True, -- Loop_Parameter_Specification (Node4)
11374 5 => False), -- Etype (Node5-Sem)
11377 (1 => False, -- Storage_Pool (Node1-Sem)
11378 2 => False, -- Procedure_To_Call (Node2-Sem)
11379 3 => True, -- Expression (Node3)
11380 4 => True, -- Subpool_Handle_Name (Node4)
11381 5 => False), -- Etype (Node5-Sem)
11383 N_Null_Statement =>
11384 (1 => False, -- unused
11385 2 => False, -- unused
11386 3 => False, -- unused
11387 4 => False, -- unused
11388 5 => False), -- unused
11391 (1 => True, -- Identifier (Node1)
11392 2 => False, -- unused
11393 3 => False, -- unused
11394 4 => False, -- unused
11395 5 => False), -- unused
11397 N_Assignment_Statement =>
11398 (1 => False, -- unused
11399 2 => True, -- Name (Node2)
11400 3 => True, -- Expression (Node3)
11401 4 => False, -- unused
11402 5 => False), -- unused
11405 (1 => True, -- Condition (Node1)
11406 2 => True, -- Then_Statements (List2)
11407 3 => True, -- Elsif_Parts (List3)
11408 4 => True, -- Else_Statements (List4)
11409 5 => True), -- End_Span (Uint5)
11412 (1 => True, -- Condition (Node1)
11413 2 => True, -- Then_Statements (List2)
11414 3 => False, -- Condition_Actions (List3-Sem)
11415 4 => False, -- unused
11416 5 => False), -- unused
11418 N_Case_Expression =>
11419 (1 => False, -- unused
11420 2 => False, -- unused
11421 3 => True, -- Expression (Node3)
11422 4 => True, -- Alternatives (List4)
11423 5 => False), -- unused
11425 N_Case_Expression_Alternative =>
11426 (1 => False, -- Actions (List1-Sem)
11427 2 => False, -- unused
11428 3 => True, -- Statements (List3)
11429 4 => True, -- Expression (Node4)
11430 5 => False), -- unused
11432 N_Case_Statement =>
11433 (1 => False, -- unused
11434 2 => False, -- unused
11435 3 => True, -- Expression (Node3)
11436 4 => True, -- Alternatives (List4)
11437 5 => True), -- End_Span (Uint5)
11439 N_Case_Statement_Alternative =>
11440 (1 => False, -- unused
11441 2 => False, -- unused
11442 3 => True, -- Statements (List3)
11443 4 => True, -- Discrete_Choices (List4)
11444 5 => False), -- unused
11446 N_Loop_Statement =>
11447 (1 => True, -- Identifier (Node1)
11448 2 => True, -- Iteration_Scheme (Node2)
11449 3 => True, -- Statements (List3)
11450 4 => True, -- End_Label (Node4)
11451 5 => False), -- unused
11453 N_Iteration_Scheme =>
11454 (1 => True, -- Condition (Node1)
11455 2 => True, -- Iterator_Specification (Node2)
11456 3 => False, -- Condition_Actions (List3-Sem)
11457 4 => True, -- Loop_Parameter_Specification (Node4)
11458 5 => False), -- unused
11460 N_Loop_Parameter_Specification =>
11461 (1 => True, -- Defining_Identifier (Node1)
11462 2 => False, -- unused
11463 3 => False, -- unused
11464 4 => True, -- Discrete_Subtype_Definition (Node4)
11465 5 => False), -- unused
11467 N_Iterator_Specification =>
11468 (1 => True, -- Defining_Identifier (Node1)
11469 2 => True, -- Name (Node2)
11470 3 => False, -- Unused
11471 4 => False, -- Unused
11472 5 => True), -- Subtype_Indication (Node5)
11474 N_Block_Statement =>
11475 (1 => True, -- Identifier (Node1)
11476 2 => True, -- Declarations (List2)
11477 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11478 4 => True, -- Handled_Statement_Sequence (Node4)
11479 5 => False), -- unused
11481 N_Exit_Statement =>
11482 (1 => True, -- Condition (Node1)
11483 2 => True, -- Name (Node2)
11484 3 => False, -- unused
11485 4 => False, -- unused
11486 5 => False), -- unused
11488 N_Goto_Statement =>
11489 (1 => False, -- unused
11490 2 => True, -- Name (Node2)
11491 3 => False, -- unused
11492 4 => False, -- unused
11493 5 => False), -- unused
11495 N_Subprogram_Declaration =>
11496 (1 => True, -- Specification (Node1)
11497 2 => False, -- unused
11498 3 => False, -- Body_To_Inline (Node3-Sem)
11499 4 => False, -- Parent_Spec (Node4-Sem)
11500 5 => False), -- Corresponding_Body (Node5-Sem)
11502 N_Abstract_Subprogram_Declaration =>
11503 (1 => True, -- Specification (Node1)
11504 2 => False, -- unused
11505 3 => False, -- unused
11506 4 => False, -- unused
11507 5 => False), -- unused
11509 N_Function_Specification =>
11510 (1 => True, -- Defining_Unit_Name (Node1)
11511 2 => False, -- Elaboration_Boolean (Node2-Sem)
11512 3 => True, -- Parameter_Specifications (List3)
11513 4 => True, -- Result_Definition (Node4)
11514 5 => False), -- Generic_Parent (Node5-Sem)
11516 N_Procedure_Specification =>
11517 (1 => True, -- Defining_Unit_Name (Node1)
11518 2 => False, -- Elaboration_Boolean (Node2-Sem)
11519 3 => True, -- Parameter_Specifications (List3)
11520 4 => False, -- unused
11521 5 => False), -- Generic_Parent (Node5-Sem)
11524 (1 => True, -- Identifier (Node1)
11525 2 => True, -- Name (Node2)
11526 3 => False, -- unused
11527 4 => False, -- unused
11528 5 => False), -- unused
11530 N_Defining_Program_Unit_Name =>
11531 (1 => True, -- Defining_Identifier (Node1)
11532 2 => True, -- Name (Node2)
11533 3 => False, -- unused
11534 4 => False, -- unused
11535 5 => False), -- unused
11537 N_Operator_Symbol =>
11538 (1 => True, -- Chars (Name1)
11539 2 => False, -- unused
11540 3 => True, -- Strval (Str3)
11541 4 => False, -- Entity (Node4-Sem)
11542 5 => False), -- Etype (Node5-Sem)
11544 N_Defining_Operator_Symbol =>
11545 (1 => True, -- Chars (Name1)
11546 2 => False, -- Next_Entity (Node2-Sem)
11547 3 => False, -- Scope (Node3-Sem)
11548 4 => False, -- unused
11549 5 => False), -- Etype (Node5-Sem)
11551 N_Parameter_Specification =>
11552 (1 => True, -- Defining_Identifier (Node1)
11553 2 => True, -- Parameter_Type (Node2)
11554 3 => True, -- Expression (Node3)
11555 4 => False, -- unused
11556 5 => False), -- Default_Expression (Node5-Sem)
11558 N_Subprogram_Body =>
11559 (1 => True, -- Specification (Node1)
11560 2 => True, -- Declarations (List2)
11561 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11562 4 => True, -- Handled_Statement_Sequence (Node4)
11563 5 => False), -- Corresponding_Spec (Node5-Sem)
11565 N_Expression_Function =>
11566 (1 => True, -- Specification (Node1)
11567 2 => False, -- unused
11568 3 => True, -- Expression (Node3)
11569 4 => False, -- unused
11570 5 => False), -- unused
11572 N_Procedure_Call_Statement =>
11573 (1 => False, -- Controlling_Argument (Node1-Sem)
11574 2 => True, -- Name (Node2)
11575 3 => True, -- Parameter_Associations (List3)
11576 4 => False, -- First_Named_Actual (Node4-Sem)
11577 5 => False), -- Etype (Node5-Sem)
11580 (1 => False, -- Controlling_Argument (Node1-Sem)
11581 2 => True, -- Name (Node2)
11582 3 => True, -- Parameter_Associations (List3)
11583 4 => False, -- First_Named_Actual (Node4-Sem)
11584 5 => False), -- Etype (Node5-Sem)
11586 N_Parameter_Association =>
11587 (1 => False, -- unused
11588 2 => True, -- Selector_Name (Node2)
11589 3 => True, -- Explicit_Actual_Parameter (Node3)
11590 4 => False, -- Next_Named_Actual (Node4-Sem)
11591 5 => False), -- unused
11593 N_Simple_Return_Statement =>
11594 (1 => False, -- Storage_Pool (Node1-Sem)
11595 2 => False, -- Procedure_To_Call (Node2-Sem)
11596 3 => True, -- Expression (Node3)
11597 4 => False, -- unused
11598 5 => False), -- Return_Statement_Entity (Node5-Sem)
11600 N_Extended_Return_Statement =>
11601 (1 => False, -- Storage_Pool (Node1-Sem)
11602 2 => False, -- Procedure_To_Call (Node2-Sem)
11603 3 => True, -- Return_Object_Declarations (List3)
11604 4 => True, -- Handled_Statement_Sequence (Node4)
11605 5 => False), -- Return_Statement_Entity (Node5-Sem)
11607 N_Package_Declaration =>
11608 (1 => True, -- Specification (Node1)
11609 2 => False, -- unused
11610 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11611 4 => False, -- Parent_Spec (Node4-Sem)
11612 5 => False), -- Corresponding_Body (Node5-Sem)
11614 N_Package_Specification =>
11615 (1 => True, -- Defining_Unit_Name (Node1)
11616 2 => True, -- Visible_Declarations (List2)
11617 3 => True, -- Private_Declarations (List3)
11618 4 => True, -- End_Label (Node4)
11619 5 => False), -- Generic_Parent (Node5-Sem)
11622 (1 => True, -- Defining_Unit_Name (Node1)
11623 2 => True, -- Declarations (List2)
11624 3 => False, -- unused
11625 4 => True, -- Handled_Statement_Sequence (Node4)
11626 5 => False), -- Corresponding_Spec (Node5-Sem)
11628 N_Private_Type_Declaration =>
11629 (1 => True, -- Defining_Identifier (Node1)
11630 2 => False, -- unused
11631 3 => False, -- unused
11632 4 => True, -- Discriminant_Specifications (List4)
11633 5 => False), -- unused
11635 N_Private_Extension_Declaration =>
11636 (1 => True, -- Defining_Identifier (Node1)
11637 2 => True, -- Interface_List (List2)
11638 3 => False, -- unused
11639 4 => True, -- Discriminant_Specifications (List4)
11640 5 => True), -- Subtype_Indication (Node5)
11642 N_Use_Package_Clause =>
11643 (1 => False, -- unused
11644 2 => True, -- Names (List2)
11645 3 => False, -- Next_Use_Clause (Node3-Sem)
11646 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
11647 5 => False), -- unused
11649 N_Use_Type_Clause =>
11650 (1 => False, -- unused
11651 2 => True, -- Subtype_Marks (List2)
11652 3 => False, -- Next_Use_Clause (Node3-Sem)
11653 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
11654 5 => False), -- unused
11656 N_Object_Renaming_Declaration =>
11657 (1 => True, -- Defining_Identifier (Node1)
11658 2 => True, -- Name (Node2)
11659 3 => True, -- Access_Definition (Node3)
11660 4 => True, -- Subtype_Mark (Node4)
11661 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
11663 N_Exception_Renaming_Declaration =>
11664 (1 => True, -- Defining_Identifier (Node1)
11665 2 => True, -- Name (Node2)
11666 3 => False, -- unused
11667 4 => False, -- unused
11668 5 => False), -- unused
11670 N_Package_Renaming_Declaration =>
11671 (1 => True, -- Defining_Unit_Name (Node1)
11672 2 => True, -- Name (Node2)
11673 3 => False, -- unused
11674 4 => False, -- Parent_Spec (Node4-Sem)
11675 5 => False), -- unused
11677 N_Subprogram_Renaming_Declaration =>
11678 (1 => True, -- Specification (Node1)
11679 2 => True, -- Name (Node2)
11680 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
11681 4 => False, -- Parent_Spec (Node4-Sem)
11682 5 => False), -- Corresponding_Spec (Node5-Sem)
11684 N_Generic_Package_Renaming_Declaration =>
11685 (1 => True, -- Defining_Unit_Name (Node1)
11686 2 => True, -- Name (Node2)
11687 3 => False, -- unused
11688 4 => False, -- Parent_Spec (Node4-Sem)
11689 5 => False), -- unused
11691 N_Generic_Procedure_Renaming_Declaration =>
11692 (1 => True, -- Defining_Unit_Name (Node1)
11693 2 => True, -- Name (Node2)
11694 3 => False, -- unused
11695 4 => False, -- Parent_Spec (Node4-Sem)
11696 5 => False), -- unused
11698 N_Generic_Function_Renaming_Declaration =>
11699 (1 => True, -- Defining_Unit_Name (Node1)
11700 2 => True, -- Name (Node2)
11701 3 => False, -- unused
11702 4 => False, -- Parent_Spec (Node4-Sem)
11703 5 => False), -- unused
11705 N_Task_Type_Declaration =>
11706 (1 => True, -- Defining_Identifier (Node1)
11707 2 => True, -- Interface_List (List2)
11708 3 => True, -- Task_Definition (Node3)
11709 4 => True, -- Discriminant_Specifications (List4)
11710 5 => False), -- Corresponding_Body (Node5-Sem)
11712 N_Single_Task_Declaration =>
11713 (1 => True, -- Defining_Identifier (Node1)
11714 2 => True, -- Interface_List (List2)
11715 3 => True, -- Task_Definition (Node3)
11716 4 => False, -- unused
11717 5 => False), -- unused
11719 N_Task_Definition =>
11720 (1 => False, -- unused
11721 2 => True, -- Visible_Declarations (List2)
11722 3 => True, -- Private_Declarations (List3)
11723 4 => True, -- End_Label (Node4)
11724 5 => False), -- unused
11727 (1 => True, -- Defining_Identifier (Node1)
11728 2 => True, -- Declarations (List2)
11729 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11730 4 => True, -- Handled_Statement_Sequence (Node4)
11731 5 => False), -- Corresponding_Spec (Node5-Sem)
11733 N_Protected_Type_Declaration =>
11734 (1 => True, -- Defining_Identifier (Node1)
11735 2 => True, -- Interface_List (List2)
11736 3 => True, -- Protected_Definition (Node3)
11737 4 => True, -- Discriminant_Specifications (List4)
11738 5 => False), -- Corresponding_Body (Node5-Sem)
11740 N_Single_Protected_Declaration =>
11741 (1 => True, -- Defining_Identifier (Node1)
11742 2 => True, -- Interface_List (List2)
11743 3 => True, -- Protected_Definition (Node3)
11744 4 => False, -- unused
11745 5 => False), -- unused
11747 N_Protected_Definition =>
11748 (1 => False, -- unused
11749 2 => True, -- Visible_Declarations (List2)
11750 3 => True, -- Private_Declarations (List3)
11751 4 => True, -- End_Label (Node4)
11752 5 => False), -- unused
11754 N_Protected_Body =>
11755 (1 => True, -- Defining_Identifier (Node1)
11756 2 => True, -- Declarations (List2)
11757 3 => False, -- unused
11758 4 => True, -- End_Label (Node4)
11759 5 => False), -- Corresponding_Spec (Node5-Sem)
11761 N_Entry_Declaration =>
11762 (1 => True, -- Defining_Identifier (Node1)
11763 2 => False, -- unused
11764 3 => True, -- Parameter_Specifications (List3)
11765 4 => True, -- Discrete_Subtype_Definition (Node4)
11766 5 => False), -- Corresponding_Body (Node5-Sem)
11768 N_Accept_Statement =>
11769 (1 => True, -- Entry_Direct_Name (Node1)
11770 2 => True, -- Declarations (List2)
11771 3 => True, -- Parameter_Specifications (List3)
11772 4 => True, -- Handled_Statement_Sequence (Node4)
11773 5 => True), -- Entry_Index (Node5)
11776 (1 => True, -- Defining_Identifier (Node1)
11777 2 => True, -- Declarations (List2)
11778 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11779 4 => True, -- Handled_Statement_Sequence (Node4)
11780 5 => True), -- Entry_Body_Formal_Part (Node5)
11782 N_Entry_Body_Formal_Part =>
11783 (1 => True, -- Condition (Node1)
11784 2 => False, -- unused
11785 3 => True, -- Parameter_Specifications (List3)
11786 4 => True, -- Entry_Index_Specification (Node4)
11787 5 => False), -- unused
11789 N_Entry_Index_Specification =>
11790 (1 => True, -- Defining_Identifier (Node1)
11791 2 => False, -- unused
11792 3 => False, -- unused
11793 4 => True, -- Discrete_Subtype_Definition (Node4)
11794 5 => False), -- unused
11796 N_Entry_Call_Statement =>
11797 (1 => False, -- unused
11798 2 => True, -- Name (Node2)
11799 3 => True, -- Parameter_Associations (List3)
11800 4 => False, -- First_Named_Actual (Node4-Sem)
11801 5 => False), -- unused
11803 N_Requeue_Statement =>
11804 (1 => False, -- unused
11805 2 => True, -- Name (Node2)
11806 3 => False, -- unused
11807 4 => False, -- unused
11808 5 => False), -- unused
11810 N_Delay_Until_Statement =>
11811 (1 => False, -- unused
11812 2 => False, -- unused
11813 3 => True, -- Expression (Node3)
11814 4 => False, -- unused
11815 5 => False), -- unused
11817 N_Delay_Relative_Statement =>
11818 (1 => False, -- unused
11819 2 => False, -- unused
11820 3 => True, -- Expression (Node3)
11821 4 => False, -- unused
11822 5 => False), -- unused
11824 N_Selective_Accept =>
11825 (1 => True, -- Select_Alternatives (List1)
11826 2 => False, -- unused
11827 3 => False, -- unused
11828 4 => True, -- Else_Statements (List4)
11829 5 => False), -- unused
11831 N_Accept_Alternative =>
11832 (1 => True, -- Condition (Node1)
11833 2 => True, -- Accept_Statement (Node2)
11834 3 => True, -- Statements (List3)
11835 4 => True, -- Pragmas_Before (List4)
11836 5 => False), -- Accept_Handler_Records (List5-Sem)
11838 N_Delay_Alternative =>
11839 (1 => True, -- Condition (Node1)
11840 2 => True, -- Delay_Statement (Node2)
11841 3 => True, -- Statements (List3)
11842 4 => True, -- Pragmas_Before (List4)
11843 5 => False), -- unused
11845 N_Terminate_Alternative =>
11846 (1 => True, -- Condition (Node1)
11847 2 => False, -- unused
11848 3 => False, -- unused
11849 4 => True, -- Pragmas_Before (List4)
11850 5 => True), -- Pragmas_After (List5)
11852 N_Timed_Entry_Call =>
11853 (1 => True, -- Entry_Call_Alternative (Node1)
11854 2 => False, -- unused
11855 3 => False, -- unused
11856 4 => True, -- Delay_Alternative (Node4)
11857 5 => False), -- unused
11859 N_Entry_Call_Alternative =>
11860 (1 => True, -- Entry_Call_Statement (Node1)
11861 2 => False, -- unused
11862 3 => True, -- Statements (List3)
11863 4 => True, -- Pragmas_Before (List4)
11864 5 => False), -- unused
11866 N_Conditional_Entry_Call =>
11867 (1 => True, -- Entry_Call_Alternative (Node1)
11868 2 => False, -- unused
11869 3 => False, -- unused
11870 4 => True, -- Else_Statements (List4)
11871 5 => False), -- unused
11873 N_Asynchronous_Select =>
11874 (1 => True, -- Triggering_Alternative (Node1)
11875 2 => True, -- Abortable_Part (Node2)
11876 3 => False, -- unused
11877 4 => False, -- unused
11878 5 => False), -- unused
11880 N_Triggering_Alternative =>
11881 (1 => True, -- Triggering_Statement (Node1)
11882 2 => False, -- unused
11883 3 => True, -- Statements (List3)
11884 4 => True, -- Pragmas_Before (List4)
11885 5 => False), -- unused
11887 N_Abortable_Part =>
11888 (1 => False, -- unused
11889 2 => False, -- unused
11890 3 => True, -- Statements (List3)
11891 4 => False, -- unused
11892 5 => False), -- unused
11894 N_Abort_Statement =>
11895 (1 => False, -- unused
11896 2 => True, -- Names (List2)
11897 3 => False, -- unused
11898 4 => False, -- unused
11899 5 => False), -- unused
11901 N_Compilation_Unit =>
11902 (1 => True, -- Context_Items (List1)
11903 2 => True, -- Unit (Node2)
11904 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
11905 4 => False, -- Library_Unit (Node4-Sem)
11906 5 => True), -- Aux_Decls_Node (Node5)
11908 N_Compilation_Unit_Aux =>
11909 (1 => True, -- Actions (List1)
11910 2 => True, -- Declarations (List2)
11911 3 => False, -- Default_Storage_Pool (Node3)
11912 4 => True, -- Config_Pragmas (List4)
11913 5 => True), -- Pragmas_After (List5)
11916 (1 => False, -- unused
11917 2 => True, -- Name (Node2)
11918 3 => False, -- unused
11919 4 => False, -- Library_Unit (Node4-Sem)
11920 5 => False), -- Corresponding_Spec (Node5-Sem)
11922 N_Subprogram_Body_Stub =>
11923 (1 => True, -- Specification (Node1)
11924 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11925 3 => False, -- unused
11926 4 => False, -- Library_Unit (Node4-Sem)
11927 5 => False), -- Corresponding_Body (Node5-Sem)
11929 N_Package_Body_Stub =>
11930 (1 => True, -- Defining_Identifier (Node1)
11931 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11932 3 => False, -- unused
11933 4 => False, -- Library_Unit (Node4-Sem)
11934 5 => False), -- Corresponding_Body (Node5-Sem)
11936 N_Task_Body_Stub =>
11937 (1 => True, -- Defining_Identifier (Node1)
11938 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11939 3 => False, -- unused
11940 4 => False, -- Library_Unit (Node4-Sem)
11941 5 => False), -- Corresponding_Body (Node5-Sem)
11943 N_Protected_Body_Stub =>
11944 (1 => True, -- Defining_Identifier (Node1)
11945 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11946 3 => False, -- unused
11947 4 => False, -- Library_Unit (Node4-Sem)
11948 5 => False), -- Corresponding_Body (Node5-Sem)
11951 (1 => True, -- Proper_Body (Node1)
11952 2 => True, -- Name (Node2)
11953 3 => False, -- Corresponding_Stub (Node3-Sem)
11954 4 => False, -- unused
11955 5 => False), -- unused
11957 N_Exception_Declaration =>
11958 (1 => True, -- Defining_Identifier (Node1)
11959 2 => False, -- unused
11960 3 => False, -- Expression (Node3-Sem)
11961 4 => False, -- unused
11962 5 => False), -- unused
11964 N_Handled_Sequence_Of_Statements =>
11965 (1 => True, -- At_End_Proc (Node1)
11966 2 => False, -- First_Real_Statement (Node2-Sem)
11967 3 => True, -- Statements (List3)
11968 4 => True, -- End_Label (Node4)
11969 5 => True), -- Exception_Handlers (List5)
11971 N_Exception_Handler =>
11972 (1 => False, -- Local_Raise_Statements (Elist1)
11973 2 => True, -- Choice_Parameter (Node2)
11974 3 => True, -- Statements (List3)
11975 4 => True, -- Exception_Choices (List4)
11976 5 => False), -- Exception_Label (Node5)
11978 N_Raise_Statement =>
11979 (1 => False, -- unused
11980 2 => True, -- Name (Node2)
11981 3 => True, -- Expression (Node3)
11982 4 => False, -- unused
11983 5 => False), -- unused
11985 N_Raise_Expression =>
11986 (1 => False, -- unused
11987 2 => True, -- Name (Node2)
11988 3 => True, -- Expression (Node3)
11989 4 => False, -- unused
11990 5 => False), -- Etype (Node5-Sem)
11992 N_Generic_Subprogram_Declaration =>
11993 (1 => True, -- Specification (Node1)
11994 2 => True, -- Generic_Formal_Declarations (List2)
11995 3 => False, -- unused
11996 4 => False, -- Parent_Spec (Node4-Sem)
11997 5 => False), -- Corresponding_Body (Node5-Sem)
11999 N_Generic_Package_Declaration =>
12000 (1 => True, -- Specification (Node1)
12001 2 => True, -- Generic_Formal_Declarations (List2)
12002 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12003 4 => False, -- Parent_Spec (Node4-Sem)
12004 5 => False), -- Corresponding_Body (Node5-Sem)
12006 N_Package_Instantiation =>
12007 (1 => True, -- Defining_Unit_Name (Node1)
12008 2 => True, -- Name (Node2)
12009 3 => True, -- Generic_Associations (List3)
12010 4 => False, -- Parent_Spec (Node4-Sem)
12011 5 => False), -- Instance_Spec (Node5-Sem)
12013 N_Procedure_Instantiation =>
12014 (1 => True, -- Defining_Unit_Name (Node1)
12015 2 => True, -- Name (Node2)
12016 3 => True, -- Generic_Associations (List3)
12017 4 => False, -- Parent_Spec (Node4-Sem)
12018 5 => False), -- Instance_Spec (Node5-Sem)
12020 N_Function_Instantiation =>
12021 (1 => True, -- Defining_Unit_Name (Node1)
12022 2 => True, -- Name (Node2)
12023 3 => True, -- Generic_Associations (List3)
12024 4 => False, -- Parent_Spec (Node4-Sem)
12025 5 => False), -- Instance_Spec (Node5-Sem)
12027 N_Generic_Association =>
12028 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
12029 2 => True, -- Selector_Name (Node2)
12030 3 => False, -- unused
12031 4 => False, -- unused
12032 5 => False), -- unused
12034 N_Formal_Object_Declaration =>
12035 (1 => True, -- Defining_Identifier (Node1)
12036 2 => False, -- unused
12037 3 => True, -- Access_Definition (Node3)
12038 4 => True, -- Subtype_Mark (Node4)
12039 5 => True), -- Default_Expression (Node5)
12041 N_Formal_Type_Declaration =>
12042 (1 => True, -- Defining_Identifier (Node1)
12043 2 => False, -- unused
12044 3 => True, -- Formal_Type_Definition (Node3)
12045 4 => True, -- Discriminant_Specifications (List4)
12046 5 => False), -- unused
12048 N_Formal_Private_Type_Definition =>
12049 (1 => False, -- unused
12050 2 => False, -- unused
12051 3 => False, -- unused
12052 4 => False, -- unused
12053 5 => False), -- unused
12055 N_Formal_Incomplete_Type_Definition =>
12056 (1 => False, -- unused
12057 2 => False, -- unused
12058 3 => False, -- unused
12059 4 => False, -- unused
12060 5 => False), -- unused
12062 N_Formal_Derived_Type_Definition =>
12063 (1 => False, -- unused
12064 2 => True, -- Interface_List (List2)
12065 3 => False, -- unused
12066 4 => True, -- Subtype_Mark (Node4)
12067 5 => False), -- unused
12069 N_Formal_Discrete_Type_Definition =>
12070 (1 => False, -- unused
12071 2 => False, -- unused
12072 3 => False, -- unused
12073 4 => False, -- unused
12074 5 => False), -- unused
12076 N_Formal_Signed_Integer_Type_Definition =>
12077 (1 => False, -- unused
12078 2 => False, -- unused
12079 3 => False, -- unused
12080 4 => False, -- unused
12081 5 => False), -- unused
12083 N_Formal_Modular_Type_Definition =>
12084 (1 => False, -- unused
12085 2 => False, -- unused
12086 3 => False, -- unused
12087 4 => False, -- unused
12088 5 => False), -- unused
12090 N_Formal_Floating_Point_Definition =>
12091 (1 => False, -- unused
12092 2 => False, -- unused
12093 3 => False, -- unused
12094 4 => False, -- unused
12095 5 => False), -- unused
12097 N_Formal_Ordinary_Fixed_Point_Definition =>
12098 (1 => False, -- unused
12099 2 => False, -- unused
12100 3 => False, -- unused
12101 4 => False, -- unused
12102 5 => False), -- unused
12104 N_Formal_Decimal_Fixed_Point_Definition =>
12105 (1 => False, -- unused
12106 2 => False, -- unused
12107 3 => False, -- unused
12108 4 => False, -- unused
12109 5 => False), -- unused
12111 N_Formal_Concrete_Subprogram_Declaration =>
12112 (1 => True, -- Specification (Node1)
12113 2 => True, -- Default_Name (Node2)
12114 3 => False, -- unused
12115 4 => False, -- unused
12116 5 => False), -- unused
12118 N_Formal_Abstract_Subprogram_Declaration =>
12119 (1 => True, -- Specification (Node1)
12120 2 => True, -- Default_Name (Node2)
12121 3 => False, -- unused
12122 4 => False, -- unused
12123 5 => False), -- unused
12125 N_Formal_Package_Declaration =>
12126 (1 => True, -- Defining_Identifier (Node1)
12127 2 => True, -- Name (Node2)
12128 3 => True, -- Generic_Associations (List3)
12129 4 => False, -- unused
12130 5 => False), -- Instance_Spec (Node5-Sem)
12132 N_Attribute_Definition_Clause =>
12133 (1 => True, -- Chars (Name1)
12134 2 => True, -- Name (Node2)
12135 3 => True, -- Expression (Node3)
12136 4 => False, -- unused
12137 5 => False), -- Next_Rep_Item (Node5-Sem)
12139 N_Aspect_Specification =>
12140 (1 => True, -- Identifier (Node1)
12141 2 => False, -- Aspect_Rep_Item (Node2-Sem)
12142 3 => True, -- Expression (Node3)
12143 4 => False, -- Entity (Node4-Sem)
12144 5 => False), -- Next_Rep_Item (Node5-Sem)
12146 N_Enumeration_Representation_Clause =>
12147 (1 => True, -- Identifier (Node1)
12148 2 => False, -- unused
12149 3 => True, -- Array_Aggregate (Node3)
12150 4 => False, -- unused
12151 5 => False), -- Next_Rep_Item (Node5-Sem)
12153 N_Record_Representation_Clause =>
12154 (1 => True, -- Identifier (Node1)
12155 2 => True, -- Mod_Clause (Node2)
12156 3 => True, -- Component_Clauses (List3)
12157 4 => False, -- unused
12158 5 => False), -- Next_Rep_Item (Node5-Sem)
12160 N_Component_Clause =>
12161 (1 => True, -- Component_Name (Node1)
12162 2 => True, -- Position (Node2)
12163 3 => True, -- First_Bit (Node3)
12164 4 => True, -- Last_Bit (Node4)
12165 5 => False), -- unused
12167 N_Code_Statement =>
12168 (1 => False, -- unused
12169 2 => False, -- unused
12170 3 => True, -- Expression (Node3)
12171 4 => False, -- unused
12172 5 => False), -- unused
12174 N_Op_Rotate_Left =>
12175 (1 => True, -- Chars (Name1)
12176 2 => True, -- Left_Opnd (Node2)
12177 3 => True, -- Right_Opnd (Node3)
12178 4 => False, -- Entity (Node4-Sem)
12179 5 => False), -- Etype (Node5-Sem)
12181 N_Op_Rotate_Right =>
12182 (1 => True, -- Chars (Name1)
12183 2 => True, -- Left_Opnd (Node2)
12184 3 => True, -- Right_Opnd (Node3)
12185 4 => False, -- Entity (Node4-Sem)
12186 5 => False), -- Etype (Node5-Sem)
12189 (1 => True, -- Chars (Name1)
12190 2 => True, -- Left_Opnd (Node2)
12191 3 => True, -- Right_Opnd (Node3)
12192 4 => False, -- Entity (Node4-Sem)
12193 5 => False), -- Etype (Node5-Sem)
12195 N_Op_Shift_Right_Arithmetic =>
12196 (1 => True, -- Chars (Name1)
12197 2 => True, -- Left_Opnd (Node2)
12198 3 => True, -- Right_Opnd (Node3)
12199 4 => False, -- Entity (Node4-Sem)
12200 5 => False), -- Etype (Node5-Sem)
12202 N_Op_Shift_Right =>
12203 (1 => True, -- Chars (Name1)
12204 2 => True, -- Left_Opnd (Node2)
12205 3 => True, -- Right_Opnd (Node3)
12206 4 => False, -- Entity (Node4-Sem)
12207 5 => False), -- Etype (Node5-Sem)
12209 N_Delta_Constraint =>
12210 (1 => False, -- unused
12211 2 => False, -- unused
12212 3 => True, -- Delta_Expression (Node3)
12213 4 => True, -- Range_Constraint (Node4)
12214 5 => False), -- unused
12217 (1 => True, -- Identifier (Node1)
12218 2 => False, -- unused
12219 3 => True, -- Expression (Node3)
12220 4 => False, -- unused
12221 5 => False), -- unused
12224 (1 => False, -- unused
12225 2 => False, -- unused
12226 3 => True, -- Expression (Node3)
12227 4 => True, -- Pragmas_Before (List4)
12228 5 => False), -- unused
12231 (1 => True, -- Expressions (List1)
12232 2 => False, -- Then_Actions (List2-Sem)
12233 3 => False, -- Else_Actions (List3-Sem)
12234 4 => False, -- unused
12235 5 => False), -- Etype (Node5-Sem)
12237 N_Compound_Statement =>
12238 (1 => True, -- Actions (List1)
12239 2 => False, -- unused
12240 3 => False, -- unused
12241 4 => False, -- unused
12242 5 => False), -- unused
12245 (1 => False, -- Pre_Post_Conditions (Node1)
12246 2 => False, -- Contract_Test_Cases (Node2)
12247 3 => False, -- Classifications (Node3)
12248 4 => False, -- unused
12249 5 => False), -- unused
12252 (1 => True, -- Chars (Name1)
12253 2 => True, -- Selector_Name (Node2)
12254 3 => True, -- Prefix (Node3)
12255 4 => False, -- Entity (Node4-Sem)
12256 5 => False), -- Etype (Node5-Sem)
12258 N_Expression_With_Actions =>
12259 (1 => True, -- Actions (List1)
12260 2 => False, -- unused
12261 3 => True, -- Expression (Node3)
12262 4 => False, -- unused
12263 5 => False), -- unused
12265 N_Free_Statement =>
12266 (1 => False, -- Storage_Pool (Node1-Sem)
12267 2 => False, -- Procedure_To_Call (Node2-Sem)
12268 3 => True, -- Expression (Node3)
12269 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
12270 5 => False), -- unused
12273 (1 => True, -- Actions (List1)
12274 2 => False, -- Access_Types_To_Process (Elist2-Sem)
12275 3 => False, -- TSS_Elist (Elist3-Sem)
12276 4 => False, -- Entity (Node4-Sem)
12277 5 => False), -- First_Subtype_Link (Node5-Sem)
12279 N_Freeze_Generic_Entity =>
12280 (1 => False, -- unused
12281 2 => False, -- unused
12282 3 => False, -- unused
12283 4 => False, -- Entity (Node4-Sem)
12284 5 => False), -- unused
12286 N_Implicit_Label_Declaration =>
12287 (1 => True, -- Defining_Identifier (Node1)
12288 2 => False, -- Label_Construct (Node2-Sem)
12289 3 => False, -- unused
12290 4 => False, -- unused
12291 5 => False), -- unused
12293 N_Itype_Reference =>
12294 (1 => False, -- Itype (Node1-Sem)
12295 2 => False, -- unused
12296 3 => False, -- unused
12297 4 => False, -- unused
12298 5 => False), -- unused
12300 N_Raise_Constraint_Error =>
12301 (1 => True, -- Condition (Node1)
12302 2 => False, -- unused
12303 3 => True, -- Reason (Uint3)
12304 4 => False, -- unused
12305 5 => False), -- Etype (Node5-Sem)
12307 N_Raise_Program_Error =>
12308 (1 => True, -- Condition (Node1)
12309 2 => False, -- unused
12310 3 => True, -- Reason (Uint3)
12311 4 => False, -- unused
12312 5 => False), -- Etype (Node5-Sem)
12314 N_Raise_Storage_Error =>
12315 (1 => True, -- Condition (Node1)
12316 2 => False, -- unused
12317 3 => True, -- Reason (Uint3)
12318 4 => False, -- unused
12319 5 => False), -- Etype (Node5-Sem)
12321 N_Push_Constraint_Error_Label =>
12322 (1 => False, -- unused
12323 2 => False, -- unused
12324 3 => False, -- unused
12325 4 => False, -- unused
12326 5 => False), -- unused
12328 N_Push_Program_Error_Label =>
12329 (1 => False, -- Exception_Label
12330 2 => False, -- unused
12331 3 => False, -- unused
12332 4 => False, -- unused
12333 5 => False), -- Exception_Label
12335 N_Push_Storage_Error_Label =>
12336 (1 => False, -- Exception_Label
12337 2 => False, -- unused
12338 3 => False, -- unused
12339 4 => False, -- unused
12340 5 => False), -- Exception_Label
12342 N_Pop_Constraint_Error_Label =>
12343 (1 => False, -- unused
12344 2 => False, -- unused
12345 3 => False, -- unused
12346 4 => False, -- unused
12347 5 => False), -- unused
12349 N_Pop_Program_Error_Label =>
12350 (1 => False, -- unused
12351 2 => False, -- unused
12352 3 => False, -- unused
12353 4 => False, -- unused
12354 5 => False), -- unused
12356 N_Pop_Storage_Error_Label =>
12357 (1 => False, -- unused
12358 2 => False, -- unused
12359 3 => False, -- unused
12360 4 => False, -- unused
12361 5 => False), -- unused
12364 (1 => False, -- unused
12365 2 => False, -- unused
12366 3 => True, -- Prefix (Node3)
12367 4 => False, -- unused
12368 5 => False), -- Etype (Node5-Sem)
12370 N_Unchecked_Expression =>
12371 (1 => False, -- unused
12372 2 => False, -- unused
12373 3 => True, -- Expression (Node3)
12374 4 => False, -- unused
12375 5 => False), -- Etype (Node5-Sem)
12377 N_Unchecked_Type_Conversion =>
12378 (1 => False, -- unused
12379 2 => False, -- unused
12380 3 => True, -- Expression (Node3)
12381 4 => True, -- Subtype_Mark (Node4)
12382 5 => False), -- Etype (Node5-Sem)
12384 N_Validate_Unchecked_Conversion =>
12385 (1 => False, -- Source_Type (Node1-Sem)
12386 2 => False, -- Target_Type (Node2-Sem)
12387 3 => False, -- unused
12388 4 => False, -- unused
12389 5 => False), -- unused
12391 -- Entries for SCIL nodes
12393 N_SCIL_Dispatch_Table_Tag_Init =>
12394 (1 => False, -- unused
12395 2 => False, -- unused
12396 3 => False, -- unused
12397 4 => False, -- SCIL_Entity (Node4-Sem)
12398 5 => False), -- unused
12400 N_SCIL_Dispatching_Call =>
12401 (1 => False, -- unused
12402 2 => False, -- SCIL_Target_Prim (Node2-Sem)
12403 3 => False, -- unused
12404 4 => False, -- SCIL_Entity (Node4-Sem)
12405 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
12407 N_SCIL_Membership_Test =>
12408 (1 => False, -- unused
12409 2 => False, -- unused
12410 3 => False, -- unused
12411 4 => False, -- SCIL_Entity (Node4-Sem)
12412 5 => False), -- SCIL_Tag_Value (Node5-Sem)
12414 -- Entries for Empty, Error and Unused. Even thought these have a Chars
12415 -- field for debugging purposes, they are not really syntactic fields, so
12416 -- we mark all fields as unused.
12419 (1 => False, -- unused
12420 2 => False, -- unused
12421 3 => False, -- unused
12422 4 => False, -- unused
12423 5 => False), -- unused
12426 (1 => False, -- unused
12427 2 => False, -- unused
12428 3 => False, -- unused
12429 4 => False, -- unused
12430 5 => False), -- unused
12432 N_Unused_At_Start =>
12433 (1 => False, -- unused
12434 2 => False, -- unused
12435 3 => False, -- unused
12436 4 => False, -- unused
12437 5 => False), -- unused
12440 (1 => False, -- unused
12441 2 => False, -- unused
12442 3 => False, -- unused
12443 4 => False, -- unused
12444 5 => False)); -- unused
12446 --------------------
12447 -- Inline Pragmas --
12448 --------------------
12450 pragma Inline (ABE_Is_Certain);
12451 pragma Inline (Abort_Present);
12452 pragma Inline (Abortable_Part);
12453 pragma Inline (Abstract_Present);
12454 pragma Inline (Accept_Handler_Records);
12455 pragma Inline (Accept_Statement);
12456 pragma Inline (Access_Definition);
12457 pragma Inline (Access_To_Subprogram_Definition);
12458 pragma Inline (Access_Types_To_Process);
12459 pragma Inline (Actions);
12460 pragma Inline (Activation_Chain_Entity);
12461 pragma Inline (Acts_As_Spec);
12462 pragma Inline (Actual_Designated_Subtype);
12463 pragma Inline (Address_Warning_Posted);
12464 pragma Inline (Aggregate_Bounds);
12465 pragma Inline (Aliased_Present);
12466 pragma Inline (All_Others);
12467 pragma Inline (All_Present);
12468 pragma Inline (Alternatives);
12469 pragma Inline (Ancestor_Part);
12470 pragma Inline (Atomic_Sync_Required);
12471 pragma Inline (Array_Aggregate);
12472 pragma Inline (Aspect_Rep_Item);
12473 pragma Inline (Assignment_OK);
12474 pragma Inline (Associated_Node);
12475 pragma Inline (At_End_Proc);
12476 pragma Inline (Attribute_Name);
12477 pragma Inline (Aux_Decls_Node);
12478 pragma Inline (Backwards_OK);
12479 pragma Inline (Bad_Is_Detected);
12480 pragma Inline (Body_To_Inline);
12481 pragma Inline (Body_Required);
12482 pragma Inline (By_Ref);
12483 pragma Inline (Box_Present);
12484 pragma Inline (Char_Literal_Value);
12485 pragma Inline (Chars);
12486 pragma Inline (Check_Address_Alignment);
12487 pragma Inline (Choice_Parameter);
12488 pragma Inline (Choices);
12489 pragma Inline (Class_Present);
12490 pragma Inline (Classifications);
12491 pragma Inline (Cleanup_Actions);
12492 pragma Inline (Comes_From_Extended_Return_Statement);
12493 pragma Inline (Compile_Time_Known_Aggregate);
12494 pragma Inline (Component_Associations);
12495 pragma Inline (Component_Clauses);
12496 pragma Inline (Component_Definition);
12497 pragma Inline (Component_Items);
12498 pragma Inline (Component_List);
12499 pragma Inline (Component_Name);
12500 pragma Inline (Componentwise_Assignment);
12501 pragma Inline (Condition);
12502 pragma Inline (Condition_Actions);
12503 pragma Inline (Config_Pragmas);
12504 pragma Inline (Constant_Present);
12505 pragma Inline (Constraint);
12506 pragma Inline (Constraints);
12507 pragma Inline (Context_Installed);
12508 pragma Inline (Context_Items);
12509 pragma Inline (Context_Pending);
12510 pragma Inline (Contract_Test_Cases);
12511 pragma Inline (Controlling_Argument);
12512 pragma Inline (Convert_To_Return_False);
12513 pragma Inline (Conversion_OK);
12514 pragma Inline (Corresponding_Aspect);
12515 pragma Inline (Corresponding_Body);
12516 pragma Inline (Corresponding_Formal_Spec);
12517 pragma Inline (Corresponding_Generic_Association);
12518 pragma Inline (Corresponding_Integer_Value);
12519 pragma Inline (Corresponding_Spec);
12520 pragma Inline (Corresponding_Spec_Of_Stub);
12521 pragma Inline (Corresponding_Stub);
12522 pragma Inline (Dcheck_Function);
12523 pragma Inline (Declarations);
12524 pragma Inline (Default_Expression);
12525 pragma Inline (Default_Storage_Pool);
12526 pragma Inline (Default_Name);
12527 pragma Inline (Defining_Identifier);
12528 pragma Inline (Defining_Unit_Name);
12529 pragma Inline (Delay_Alternative);
12530 pragma Inline (Delay_Statement);
12531 pragma Inline (Delta_Expression);
12532 pragma Inline (Digits_Expression);
12533 pragma Inline (Discr_Check_Funcs_Built);
12534 pragma Inline (Discrete_Choices);
12535 pragma Inline (Discrete_Range);
12536 pragma Inline (Discrete_Subtype_Definition);
12537 pragma Inline (Discrete_Subtype_Definitions);
12538 pragma Inline (Discriminant_Specifications);
12539 pragma Inline (Discriminant_Type);
12540 pragma Inline (Do_Accessibility_Check);
12541 pragma Inline (Do_Discriminant_Check);
12542 pragma Inline (Do_Length_Check);
12543 pragma Inline (Do_Division_Check);
12544 pragma Inline (Do_Overflow_Check);
12545 pragma Inline (Do_Range_Check);
12546 pragma Inline (Do_Storage_Check);
12547 pragma Inline (Do_Tag_Check);
12548 pragma Inline (Elaborate_Present);
12549 pragma Inline (Elaborate_All_Desirable);
12550 pragma Inline (Elaborate_All_Present);
12551 pragma Inline (Elaborate_Desirable);
12552 pragma Inline (Elaboration_Boolean);
12553 pragma Inline (Else_Actions);
12554 pragma Inline (Else_Statements);
12555 pragma Inline (Elsif_Parts);
12556 pragma Inline (Enclosing_Variant);
12557 pragma Inline (End_Label);
12558 pragma Inline (End_Span);
12559 pragma Inline (Entity);
12560 pragma Inline (Entity_Or_Associated_Node);
12561 pragma Inline (Entry_Body_Formal_Part);
12562 pragma Inline (Entry_Call_Alternative);
12563 pragma Inline (Entry_Call_Statement);
12564 pragma Inline (Entry_Direct_Name);
12565 pragma Inline (Entry_Index);
12566 pragma Inline (Entry_Index_Specification);
12567 pragma Inline (Etype);
12568 pragma Inline (Exception_Choices);
12569 pragma Inline (Exception_Handlers);
12570 pragma Inline (Exception_Junk);
12571 pragma Inline (Exception_Label);
12572 pragma Inline (Expansion_Delayed);
12573 pragma Inline (Explicit_Actual_Parameter);
12574 pragma Inline (Explicit_Generic_Actual_Parameter);
12575 pragma Inline (Expression);
12576 pragma Inline (Expressions);
12577 pragma Inline (First_Bit);
12578 pragma Inline (First_Inlined_Subprogram);
12579 pragma Inline (First_Name);
12580 pragma Inline (First_Named_Actual);
12581 pragma Inline (First_Real_Statement);
12582 pragma Inline (First_Subtype_Link);
12583 pragma Inline (Float_Truncate);
12584 pragma Inline (Formal_Type_Definition);
12585 pragma Inline (Forwards_OK);
12586 pragma Inline (From_Aspect_Specification);
12587 pragma Inline (From_At_End);
12588 pragma Inline (From_At_Mod);
12589 pragma Inline (From_Conditional_Expression);
12590 pragma Inline (From_Default);
12591 pragma Inline (Generalized_Indexing);
12592 pragma Inline (Generic_Associations);
12593 pragma Inline (Generic_Formal_Declarations);
12594 pragma Inline (Generic_Parent);
12595 pragma Inline (Generic_Parent_Type);
12596 pragma Inline (Handled_Statement_Sequence);
12597 pragma Inline (Handler_List_Entry);
12598 pragma Inline (Has_Created_Identifier);
12599 pragma Inline (Has_Dereference_Action);
12600 pragma Inline (Has_Dynamic_Length_Check);
12601 pragma Inline (Has_Dynamic_Range_Check);
12602 pragma Inline (Has_Init_Expression);
12603 pragma Inline (Has_Local_Raise);
12604 pragma Inline (Has_Self_Reference);
12605 pragma Inline (Has_SP_Choice);
12606 pragma Inline (Has_No_Elaboration_Code);
12607 pragma Inline (Has_Pragma_Suppress_All);
12608 pragma Inline (Has_Private_View);
12609 pragma Inline (Has_Relative_Deadline_Pragma);
12610 pragma Inline (Has_Storage_Size_Pragma);
12611 pragma Inline (Has_Wide_Character);
12612 pragma Inline (Has_Wide_Wide_Character);
12613 pragma Inline (Header_Size_Added);
12614 pragma Inline (Hidden_By_Use_Clause);
12615 pragma Inline (High_Bound);
12616 pragma Inline (Identifier);
12617 pragma Inline (Implicit_With);
12618 pragma Inline (Implicit_With_From_Instantiation);
12619 pragma Inline (Interface_List);
12620 pragma Inline (Interface_Present);
12621 pragma Inline (Includes_Infinities);
12622 pragma Inline (Import_Interface_Present);
12623 pragma Inline (In_Present);
12624 pragma Inline (Incomplete_View);
12625 pragma Inline (Inherited_Discriminant);
12626 pragma Inline (Instance_Spec);
12627 pragma Inline (Intval);
12628 pragma Inline (Iterator_Specification);
12629 pragma Inline (Is_Accessibility_Actual);
12630 pragma Inline (Is_Asynchronous_Call_Block);
12631 pragma Inline (Is_Boolean_Aspect);
12632 pragma Inline (Is_Checked);
12633 pragma Inline (Is_Component_Left_Opnd);
12634 pragma Inline (Is_Component_Right_Opnd);
12635 pragma Inline (Is_Controlling_Actual);
12636 pragma Inline (Is_Delayed_Aspect);
12637 pragma Inline (Is_Disabled);
12638 pragma Inline (Is_Dynamic_Coextension);
12639 pragma Inline (Is_Elsif);
12640 pragma Inline (Is_Entry_Barrier_Function);
12641 pragma Inline (Is_Expanded_Build_In_Place_Call);
12642 pragma Inline (Is_Finalization_Wrapper);
12643 pragma Inline (Is_Folded_In_Parser);
12644 pragma Inline (Is_Ignored);
12645 pragma Inline (Is_In_Discriminant_Check);
12646 pragma Inline (Is_Machine_Number);
12647 pragma Inline (Is_Null_Loop);
12648 pragma Inline (Is_Overloaded);
12649 pragma Inline (Is_Power_Of_2_For_Shift);
12650 pragma Inline (Is_Prefixed_Call);
12651 pragma Inline (Is_Protected_Subprogram_Body);
12652 pragma Inline (Is_Static_Coextension);
12653 pragma Inline (Is_Static_Expression);
12654 pragma Inline (Is_Subprogram_Descriptor);
12655 pragma Inline (Is_Task_Allocation_Block);
12656 pragma Inline (Is_Task_Master);
12657 pragma Inline (Iteration_Scheme);
12658 pragma Inline (Itype);
12659 pragma Inline (Kill_Range_Check);
12660 pragma Inline (Last_Bit);
12661 pragma Inline (Last_Name);
12662 pragma Inline (Library_Unit);
12663 pragma Inline (Label_Construct);
12664 pragma Inline (Left_Opnd);
12665 pragma Inline (Limited_View_Installed);
12666 pragma Inline (Limited_Present);
12667 pragma Inline (Literals);
12668 pragma Inline (Local_Raise_Not_OK);
12669 pragma Inline (Local_Raise_Statements);
12670 pragma Inline (Loop_Actions);
12671 pragma Inline (Loop_Parameter_Specification);
12672 pragma Inline (Low_Bound);
12673 pragma Inline (Mod_Clause);
12674 pragma Inline (More_Ids);
12675 pragma Inline (Must_Be_Byte_Aligned);
12676 pragma Inline (Must_Not_Freeze);
12677 pragma Inline (Must_Not_Override);
12678 pragma Inline (Must_Override);
12679 pragma Inline (Name);
12680 pragma Inline (Names);
12681 pragma Inline (Next_Entity);
12682 pragma Inline (Next_Exit_Statement);
12683 pragma Inline (Next_Implicit_With);
12684 pragma Inline (Next_Named_Actual);
12685 pragma Inline (Next_Pragma);
12686 pragma Inline (Next_Rep_Item);
12687 pragma Inline (Next_Use_Clause);
12688 pragma Inline (No_Ctrl_Actions);
12689 pragma Inline (No_Elaboration_Check);
12690 pragma Inline (No_Entities_Ref_In_Spec);
12691 pragma Inline (No_Initialization);
12692 pragma Inline (No_Minimize_Eliminate);
12693 pragma Inline (No_Truncation);
12694 pragma Inline (Non_Aliased_Prefix);
12695 pragma Inline (Null_Present);
12696 pragma Inline (Null_Excluding_Subtype);
12697 pragma Inline (Null_Exclusion_Present);
12698 pragma Inline (Null_Exclusion_In_Return_Present);
12699 pragma Inline (Null_Record_Present);
12700 pragma Inline (Object_Definition);
12701 pragma Inline (Of_Present);
12702 pragma Inline (Original_Discriminant);
12703 pragma Inline (Original_Entity);
12704 pragma Inline (Others_Discrete_Choices);
12705 pragma Inline (Out_Present);
12706 pragma Inline (Parameter_Associations);
12707 pragma Inline (Parameter_Specifications);
12708 pragma Inline (Parameter_List_Truncated);
12709 pragma Inline (Parameter_Type);
12710 pragma Inline (Parent_Spec);
12711 pragma Inline (Position);
12712 pragma Inline (Pragma_Argument_Associations);
12713 pragma Inline (Pragma_Identifier);
12714 pragma Inline (Pragmas_After);
12715 pragma Inline (Pragmas_Before);
12716 pragma Inline (Pre_Post_Conditions);
12717 pragma Inline (Prefix);
12718 pragma Inline (Premature_Use);
12719 pragma Inline (Present_Expr);
12720 pragma Inline (Prev_Ids);
12721 pragma Inline (Print_In_Hex);
12722 pragma Inline (Private_Declarations);
12723 pragma Inline (Private_Present);
12724 pragma Inline (Procedure_To_Call);
12725 pragma Inline (Proper_Body);
12726 pragma Inline (Protected_Definition);
12727 pragma Inline (Protected_Present);
12728 pragma Inline (Raises_Constraint_Error);
12729 pragma Inline (Range_Constraint);
12730 pragma Inline (Range_Expression);
12731 pragma Inline (Real_Range_Specification);
12732 pragma Inline (Realval);
12733 pragma Inline (Reason);
12734 pragma Inline (Record_Extension_Part);
12735 pragma Inline (Redundant_Use);
12736 pragma Inline (Renaming_Exception);
12737 pragma Inline (Result_Definition);
12738 pragma Inline (Return_Object_Declarations);
12739 pragma Inline (Return_Statement_Entity);
12740 pragma Inline (Reverse_Present);
12741 pragma Inline (Right_Opnd);
12742 pragma Inline (Rounded_Result);
12743 pragma Inline (SCIL_Controlling_Tag);
12744 pragma Inline (SCIL_Entity);
12745 pragma Inline (SCIL_Tag_Value);
12746 pragma Inline (SCIL_Target_Prim);
12747 pragma Inline (Scope);
12748 pragma Inline (Select_Alternatives);
12749 pragma Inline (Selector_Name);
12750 pragma Inline (Selector_Names);
12751 pragma Inline (Shift_Count_OK);
12752 pragma Inline (Source_Type);
12753 pragma Inline (Specification);
12754 pragma Inline (Split_PPC);
12755 pragma Inline (Statements);
12756 pragma Inline (Storage_Pool);
12757 pragma Inline (Subpool_Handle_Name);
12758 pragma Inline (Strval);
12759 pragma Inline (Subtype_Indication);
12760 pragma Inline (Subtype_Mark);
12761 pragma Inline (Subtype_Marks);
12762 pragma Inline (Suppress_Assignment_Checks);
12763 pragma Inline (Suppress_Loop_Warnings);
12764 pragma Inline (Synchronized_Present);
12765 pragma Inline (Tagged_Present);
12766 pragma Inline (Target_Type);
12767 pragma Inline (Task_Definition);
12768 pragma Inline (Task_Present);
12769 pragma Inline (Then_Actions);
12770 pragma Inline (Then_Statements);
12771 pragma Inline (Triggering_Alternative);
12772 pragma Inline (Triggering_Statement);
12773 pragma Inline (Treat_Fixed_As_Integer);
12774 pragma Inline (TSS_Elist);
12775 pragma Inline (Type_Definition);
12776 pragma Inline (Uneval_Old_Accept);
12777 pragma Inline (Uneval_Old_Warn);
12778 pragma Inline (Unit);
12779 pragma Inline (Uninitialized_Variable);
12780 pragma Inline (Unknown_Discriminants_Present);
12781 pragma Inline (Unreferenced_In_Spec);
12782 pragma Inline (Variant_Part);
12783 pragma Inline (Variants);
12784 pragma Inline (Visible_Declarations);
12785 pragma Inline (Used_Operations);
12786 pragma Inline (Was_Originally_Stub);
12787 pragma Inline (Withed_Body);
12789 pragma Inline (Set_ABE_Is_Certain);
12790 pragma Inline (Set_Abort_Present);
12791 pragma Inline (Set_Abortable_Part);
12792 pragma Inline (Set_Abstract_Present);
12793 pragma Inline (Set_Accept_Handler_Records);
12794 pragma Inline (Set_Accept_Statement);
12795 pragma Inline (Set_Access_Definition);
12796 pragma Inline (Set_Access_To_Subprogram_Definition);
12797 pragma Inline (Set_Access_Types_To_Process);
12798 pragma Inline (Set_Actions);
12799 pragma Inline (Set_Activation_Chain_Entity);
12800 pragma Inline (Set_Acts_As_Spec);
12801 pragma Inline (Set_Actual_Designated_Subtype);
12802 pragma Inline (Set_Address_Warning_Posted);
12803 pragma Inline (Set_Aggregate_Bounds);
12804 pragma Inline (Set_Aliased_Present);
12805 pragma Inline (Set_All_Others);
12806 pragma Inline (Set_All_Present);
12807 pragma Inline (Set_Alternatives);
12808 pragma Inline (Set_Ancestor_Part);
12809 pragma Inline (Set_Array_Aggregate);
12810 pragma Inline (Set_Aspect_Rep_Item);
12811 pragma Inline (Set_Assignment_OK);
12812 pragma Inline (Set_Associated_Node);
12813 pragma Inline (Set_At_End_Proc);
12814 pragma Inline (Set_Atomic_Sync_Required);
12815 pragma Inline (Set_Attribute_Name);
12816 pragma Inline (Set_Aux_Decls_Node);
12817 pragma Inline (Set_Backwards_OK);
12818 pragma Inline (Set_Bad_Is_Detected);
12819 pragma Inline (Set_Body_Required);
12820 pragma Inline (Set_Body_To_Inline);
12821 pragma Inline (Set_Box_Present);
12822 pragma Inline (Set_By_Ref);
12823 pragma Inline (Set_Char_Literal_Value);
12824 pragma Inline (Set_Chars);
12825 pragma Inline (Set_Check_Address_Alignment);
12826 pragma Inline (Set_Choice_Parameter);
12827 pragma Inline (Set_Choices);
12828 pragma Inline (Set_Class_Present);
12829 pragma Inline (Set_Classifications);
12830 pragma Inline (Set_Cleanup_Actions);
12831 pragma Inline (Set_Comes_From_Extended_Return_Statement);
12832 pragma Inline (Set_Compile_Time_Known_Aggregate);
12833 pragma Inline (Set_Component_Associations);
12834 pragma Inline (Set_Component_Clauses);
12835 pragma Inline (Set_Component_Definition);
12836 pragma Inline (Set_Component_Items);
12837 pragma Inline (Set_Component_List);
12838 pragma Inline (Set_Component_Name);
12839 pragma Inline (Set_Componentwise_Assignment);
12840 pragma Inline (Set_Condition);
12841 pragma Inline (Set_Condition_Actions);
12842 pragma Inline (Set_Config_Pragmas);
12843 pragma Inline (Set_Constant_Present);
12844 pragma Inline (Set_Constraint);
12845 pragma Inline (Set_Constraints);
12846 pragma Inline (Set_Context_Installed);
12847 pragma Inline (Set_Context_Items);
12848 pragma Inline (Set_Context_Pending);
12849 pragma Inline (Set_Contract_Test_Cases);
12850 pragma Inline (Set_Controlling_Argument);
12851 pragma Inline (Set_Conversion_OK);
12852 pragma Inline (Set_Convert_To_Return_False);
12853 pragma Inline (Set_Corresponding_Aspect);
12854 pragma Inline (Set_Corresponding_Body);
12855 pragma Inline (Set_Corresponding_Formal_Spec);
12856 pragma Inline (Set_Corresponding_Generic_Association);
12857 pragma Inline (Set_Corresponding_Integer_Value);
12858 pragma Inline (Set_Corresponding_Spec);
12859 pragma Inline (Set_Corresponding_Spec_Of_Stub);
12860 pragma Inline (Set_Corresponding_Stub);
12861 pragma Inline (Set_Dcheck_Function);
12862 pragma Inline (Set_Declarations);
12863 pragma Inline (Set_Default_Expression);
12864 pragma Inline (Set_Default_Name);
12865 pragma Inline (Set_Default_Storage_Pool);
12866 pragma Inline (Set_Defining_Identifier);
12867 pragma Inline (Set_Defining_Unit_Name);
12868 pragma Inline (Set_Delay_Alternative);
12869 pragma Inline (Set_Delay_Statement);
12870 pragma Inline (Set_Delta_Expression);
12871 pragma Inline (Set_Digits_Expression);
12872 pragma Inline (Set_Discr_Check_Funcs_Built);
12873 pragma Inline (Set_Discrete_Choices);
12874 pragma Inline (Set_Discrete_Range);
12875 pragma Inline (Set_Discrete_Subtype_Definition);
12876 pragma Inline (Set_Discrete_Subtype_Definitions);
12877 pragma Inline (Set_Discriminant_Specifications);
12878 pragma Inline (Set_Discriminant_Type);
12879 pragma Inline (Set_Do_Accessibility_Check);
12880 pragma Inline (Set_Do_Discriminant_Check);
12881 pragma Inline (Set_Do_Division_Check);
12882 pragma Inline (Set_Do_Length_Check);
12883 pragma Inline (Set_Do_Overflow_Check);
12884 pragma Inline (Set_Do_Range_Check);
12885 pragma Inline (Set_Do_Storage_Check);
12886 pragma Inline (Set_Do_Tag_Check);
12887 pragma Inline (Set_Elaborate_All_Desirable);
12888 pragma Inline (Set_Elaborate_All_Present);
12889 pragma Inline (Set_Elaborate_Desirable);
12890 pragma Inline (Set_Elaborate_Present);
12891 pragma Inline (Set_Elaboration_Boolean);
12892 pragma Inline (Set_Else_Actions);
12893 pragma Inline (Set_Else_Statements);
12894 pragma Inline (Set_Elsif_Parts);
12895 pragma Inline (Set_Enclosing_Variant);
12896 pragma Inline (Set_End_Label);
12897 pragma Inline (Set_End_Span);
12898 pragma Inline (Set_Entity);
12899 pragma Inline (Set_Entry_Body_Formal_Part);
12900 pragma Inline (Set_Entry_Call_Alternative);
12901 pragma Inline (Set_Entry_Call_Statement);
12902 pragma Inline (Set_Entry_Direct_Name);
12903 pragma Inline (Set_Entry_Index);
12904 pragma Inline (Set_Entry_Index_Specification);
12905 pragma Inline (Set_Etype);
12906 pragma Inline (Set_Exception_Choices);
12907 pragma Inline (Set_Exception_Handlers);
12908 pragma Inline (Set_Exception_Junk);
12909 pragma Inline (Set_Exception_Label);
12910 pragma Inline (Set_Expansion_Delayed);
12911 pragma Inline (Set_Explicit_Actual_Parameter);
12912 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
12913 pragma Inline (Set_Expression);
12914 pragma Inline (Set_Expressions);
12915 pragma Inline (Set_First_Bit);
12916 pragma Inline (Set_First_Inlined_Subprogram);
12917 pragma Inline (Set_First_Name);
12918 pragma Inline (Set_First_Named_Actual);
12919 pragma Inline (Set_First_Real_Statement);
12920 pragma Inline (Set_First_Subtype_Link);
12921 pragma Inline (Set_Float_Truncate);
12922 pragma Inline (Set_Formal_Type_Definition);
12923 pragma Inline (Set_Forwards_OK);
12924 pragma Inline (Set_From_Aspect_Specification);
12925 pragma Inline (Set_From_At_End);
12926 pragma Inline (Set_From_At_Mod);
12927 pragma Inline (Set_From_Conditional_Expression);
12928 pragma Inline (Set_From_Default);
12929 pragma Inline (Set_Generalized_Indexing);
12930 pragma Inline (Set_Generic_Associations);
12931 pragma Inline (Set_Generic_Formal_Declarations);
12932 pragma Inline (Set_Generic_Parent);
12933 pragma Inline (Set_Generic_Parent_Type);
12934 pragma Inline (Set_Handled_Statement_Sequence);
12935 pragma Inline (Set_Handler_List_Entry);
12936 pragma Inline (Set_Has_Created_Identifier);
12937 pragma Inline (Set_Has_Dereference_Action);
12938 pragma Inline (Set_Has_Dynamic_Length_Check);
12939 pragma Inline (Set_Has_Dynamic_Range_Check);
12940 pragma Inline (Set_Has_Init_Expression);
12941 pragma Inline (Set_Has_Local_Raise);
12942 pragma Inline (Set_Has_No_Elaboration_Code);
12943 pragma Inline (Set_Has_Pragma_Suppress_All);
12944 pragma Inline (Set_Has_Private_View);
12945 pragma Inline (Set_Has_Relative_Deadline_Pragma);
12946 pragma Inline (Set_Has_Self_Reference);
12947 pragma Inline (Set_Has_SP_Choice);
12948 pragma Inline (Set_Has_Storage_Size_Pragma);
12949 pragma Inline (Set_Has_Wide_Character);
12950 pragma Inline (Set_Has_Wide_Wide_Character);
12951 pragma Inline (Set_Header_Size_Added);
12952 pragma Inline (Set_Hidden_By_Use_Clause);
12953 pragma Inline (Set_High_Bound);
12954 pragma Inline (Set_Identifier);
12955 pragma Inline (Set_Implicit_With);
12956 pragma Inline (Set_Import_Interface_Present);
12957 pragma Inline (Set_In_Present);
12958 pragma Inline (Set_Includes_Infinities);
12959 pragma Inline (Set_Incomplete_View);
12960 pragma Inline (Set_Inherited_Discriminant);
12961 pragma Inline (Set_Instance_Spec);
12962 pragma Inline (Set_Interface_List);
12963 pragma Inline (Set_Interface_Present);
12964 pragma Inline (Set_Intval);
12965 pragma Inline (Set_Is_Accessibility_Actual);
12966 pragma Inline (Set_Is_Asynchronous_Call_Block);
12967 pragma Inline (Set_Is_Boolean_Aspect);
12968 pragma Inline (Set_Is_Checked);
12969 pragma Inline (Set_Is_Component_Left_Opnd);
12970 pragma Inline (Set_Is_Component_Right_Opnd);
12971 pragma Inline (Set_Is_Controlling_Actual);
12972 pragma Inline (Set_Is_Delayed_Aspect);
12973 pragma Inline (Set_Is_Disabled);
12974 pragma Inline (Set_Is_Dynamic_Coextension);
12975 pragma Inline (Set_Is_Elsif);
12976 pragma Inline (Set_Is_Entry_Barrier_Function);
12977 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
12978 pragma Inline (Set_Is_Finalization_Wrapper);
12979 pragma Inline (Set_Is_Folded_In_Parser);
12980 pragma Inline (Set_Is_Ignored);
12981 pragma Inline (Set_Is_In_Discriminant_Check);
12982 pragma Inline (Set_Is_Machine_Number);
12983 pragma Inline (Set_Is_Null_Loop);
12984 pragma Inline (Set_Is_Overloaded);
12985 pragma Inline (Set_Is_Power_Of_2_For_Shift);
12986 pragma Inline (Set_Is_Prefixed_Call);
12987 pragma Inline (Set_Is_Protected_Subprogram_Body);
12988 pragma Inline (Set_Is_Static_Coextension);
12989 pragma Inline (Set_Is_Static_Expression);
12990 pragma Inline (Set_Is_Subprogram_Descriptor);
12991 pragma Inline (Set_Is_Task_Allocation_Block);
12992 pragma Inline (Set_Is_Task_Master);
12993 pragma Inline (Set_Iteration_Scheme);
12994 pragma Inline (Set_Iterator_Specification);
12995 pragma Inline (Set_Itype);
12996 pragma Inline (Set_Kill_Range_Check);
12997 pragma Inline (Set_Label_Construct);
12998 pragma Inline (Set_Last_Bit);
12999 pragma Inline (Set_Last_Name);
13000 pragma Inline (Set_Left_Opnd);
13001 pragma Inline (Set_Library_Unit);
13002 pragma Inline (Set_Limited_Present);
13003 pragma Inline (Set_Limited_View_Installed);
13004 pragma Inline (Set_Literals);
13005 pragma Inline (Set_Local_Raise_Not_OK);
13006 pragma Inline (Set_Local_Raise_Statements);
13007 pragma Inline (Set_Loop_Actions);
13008 pragma Inline (Set_Loop_Parameter_Specification);
13009 pragma Inline (Set_Low_Bound);
13010 pragma Inline (Set_Mod_Clause);
13011 pragma Inline (Set_More_Ids);
13012 pragma Inline (Set_Must_Be_Byte_Aligned);
13013 pragma Inline (Set_Must_Not_Freeze);
13014 pragma Inline (Set_Must_Not_Override);
13015 pragma Inline (Set_Must_Override);
13016 pragma Inline (Set_Name);
13017 pragma Inline (Set_Names);
13018 pragma Inline (Set_Next_Entity);
13019 pragma Inline (Set_Next_Exit_Statement);
13020 pragma Inline (Set_Next_Implicit_With);
13021 pragma Inline (Set_Next_Named_Actual);
13022 pragma Inline (Set_Next_Pragma);
13023 pragma Inline (Set_Next_Rep_Item);
13024 pragma Inline (Set_Next_Use_Clause);
13025 pragma Inline (Set_No_Ctrl_Actions);
13026 pragma Inline (Set_No_Elaboration_Check);
13027 pragma Inline (Set_No_Entities_Ref_In_Spec);
13028 pragma Inline (Set_No_Initialization);
13029 pragma Inline (Set_No_Minimize_Eliminate);
13030 pragma Inline (Set_No_Truncation);
13031 pragma Inline (Set_Non_Aliased_Prefix);
13032 pragma Inline (Set_Null_Excluding_Subtype);
13033 pragma Inline (Set_Null_Exclusion_Present);
13034 pragma Inline (Set_Null_Exclusion_In_Return_Present);
13035 pragma Inline (Set_Null_Present);
13036 pragma Inline (Set_Null_Record_Present);
13037 pragma Inline (Set_Object_Definition);
13038 pragma Inline (Set_Of_Present);
13039 pragma Inline (Set_Original_Discriminant);
13040 pragma Inline (Set_Original_Entity);
13041 pragma Inline (Set_Others_Discrete_Choices);
13042 pragma Inline (Set_Out_Present);
13043 pragma Inline (Set_Parameter_Associations);
13044 pragma Inline (Set_Parameter_List_Truncated);
13045 pragma Inline (Set_Parameter_Specifications);
13046 pragma Inline (Set_Parameter_Type);
13047 pragma Inline (Set_Parent_Spec);
13048 pragma Inline (Set_Position);
13049 pragma Inline (Set_Pragma_Argument_Associations);
13050 pragma Inline (Set_Pragma_Identifier);
13051 pragma Inline (Set_Pragmas_After);
13052 pragma Inline (Set_Pragmas_Before);
13053 pragma Inline (Set_Pre_Post_Conditions);
13054 pragma Inline (Set_Prefix);
13055 pragma Inline (Set_Premature_Use);
13056 pragma Inline (Set_Present_Expr);
13057 pragma Inline (Set_Prev_Ids);
13058 pragma Inline (Set_Print_In_Hex);
13059 pragma Inline (Set_Private_Declarations);
13060 pragma Inline (Set_Private_Present);
13061 pragma Inline (Set_Procedure_To_Call);
13062 pragma Inline (Set_Proper_Body);
13063 pragma Inline (Set_Protected_Definition);
13064 pragma Inline (Set_Protected_Present);
13065 pragma Inline (Set_Raises_Constraint_Error);
13066 pragma Inline (Set_Range_Constraint);
13067 pragma Inline (Set_Range_Expression);
13068 pragma Inline (Set_Real_Range_Specification);
13069 pragma Inline (Set_Realval);
13070 pragma Inline (Set_Reason);
13071 pragma Inline (Set_Record_Extension_Part);
13072 pragma Inline (Set_Redundant_Use);
13073 pragma Inline (Set_Renaming_Exception);
13074 pragma Inline (Set_Result_Definition);
13075 pragma Inline (Set_Return_Object_Declarations);
13076 pragma Inline (Set_Reverse_Present);
13077 pragma Inline (Set_Right_Opnd);
13078 pragma Inline (Set_Rounded_Result);
13079 pragma Inline (Set_SCIL_Controlling_Tag);
13080 pragma Inline (Set_SCIL_Entity);
13081 pragma Inline (Set_SCIL_Tag_Value);
13082 pragma Inline (Set_SCIL_Target_Prim);
13083 pragma Inline (Set_Scope);
13084 pragma Inline (Set_Select_Alternatives);
13085 pragma Inline (Set_Selector_Name);
13086 pragma Inline (Set_Selector_Names);
13087 pragma Inline (Set_Shift_Count_OK);
13088 pragma Inline (Set_Source_Type);
13089 pragma Inline (Set_Split_PPC);
13090 pragma Inline (Set_Statements);
13091 pragma Inline (Set_Storage_Pool);
13092 pragma Inline (Set_Strval);
13093 pragma Inline (Set_Subpool_Handle_Name);
13094 pragma Inline (Set_Subtype_Indication);
13095 pragma Inline (Set_Subtype_Mark);
13096 pragma Inline (Set_Subtype_Marks);
13097 pragma Inline (Set_Suppress_Assignment_Checks);
13098 pragma Inline (Set_Suppress_Loop_Warnings);
13099 pragma Inline (Set_Synchronized_Present);
13100 pragma Inline (Set_TSS_Elist);
13101 pragma Inline (Set_Tagged_Present);
13102 pragma Inline (Set_Target_Type);
13103 pragma Inline (Set_Task_Definition);
13104 pragma Inline (Set_Task_Present);
13105 pragma Inline (Set_Then_Actions);
13106 pragma Inline (Set_Then_Statements);
13107 pragma Inline (Set_Treat_Fixed_As_Integer);
13108 pragma Inline (Set_Triggering_Alternative);
13109 pragma Inline (Set_Triggering_Statement);
13110 pragma Inline (Set_Type_Definition);
13111 pragma Inline (Set_Uneval_Old_Accept);
13112 pragma Inline (Set_Uneval_Old_Warn);
13113 pragma Inline (Set_Unit);
13114 pragma Inline (Set_Uninitialized_Variable);
13115 pragma Inline (Set_Unknown_Discriminants_Present);
13116 pragma Inline (Set_Unreferenced_In_Spec);
13117 pragma Inline (Set_Used_Operations);
13118 pragma Inline (Set_Variant_Part);
13119 pragma Inline (Set_Variants);
13120 pragma Inline (Set_Visible_Declarations);
13121 pragma Inline (Set_Was_Originally_Stub);
13122 pragma Inline (Set_Withed_Body);