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 -- GNATprove relies on the following frontend behaviors:
567 -- 1. The first declarations in the list of visible declarations of
568 -- a package declaration for a generic instance, up to the first
569 -- declaration which comes from source, should correspond to
570 -- the "mappings nodes" between formal and actual generic parameters.
572 -- 2. In addition pragma Debug statements are removed from the tree
573 -- (rewritten to NULL stmt), since they should be ignored in formal
576 -- 3. An error is also issued for missing subunits, similar to the
577 -- warning issued when generating code, to avoid formal verification
578 -- of a partial unit.
580 -----------------------
581 -- Check Flag Fields --
582 -----------------------
584 -- The following flag fields appear in expression nodes:
590 -- These three flags are always set by the front end during semantic
591 -- analysis, on expression nodes that may trigger the corresponding
592 -- check. The front end then inserts or not the check during expansion. In
593 -- particular, these flags should also be correctly set in ASIS mode and
596 -- Note: the expander always takes care of the Do_Range check case,
597 -- so this flag will never be set in the expanded tree passed to the
598 -- back end code generator.
600 -- Note that this accounts for all nodes that trigger the corresponding
601 -- checks, except for range checks on subtype_indications, which may be
602 -- required to check that a range_constraint is compatible with the given
603 -- subtype (RM 3.2.2(11)).
605 -- The following flag fields appear in various nodes:
607 -- Do_Accessibility_Check
608 -- Do_Discriminant_Check
613 -- These flags are used in some specific cases by the front end, either
614 -- during semantic analysis or during expansion, and cannot be expected
615 -- to be set on all nodes that trigger the corresponding check.
617 ------------------------
618 -- Common Flag Fields --
619 ------------------------
621 -- The following flag fields appear in all nodes:
624 -- This flag is used to indicate that a node (and all its children have
625 -- been analyzed. It is used to avoid reanalysis of a node that has
626 -- already been analyzed, both for efficiency and functional correctness
630 -- This flag is set if the node comes directly from an explicit construct
631 -- in the source. It is normally on for any nodes built by the scanner or
632 -- parser from the source program, with the exception that in a few cases
633 -- the parser adds nodes to normalize the representation (in particular
634 -- a null statement is added to a package body if there is no begin/end
635 -- initialization section.
637 -- Most nodes inserted by the analyzer or expander are not considered
638 -- as coming from source, so the flag is off for such nodes. In a few
639 -- cases, the expander constructs nodes closely equivalent to nodes
640 -- from the source program (e.g. the allocator built for build-in-place
641 -- case), and the Comes_From_Source flag is deliberately set.
644 -- This flag is used to avoid multiple error messages being posted on or
645 -- referring to the same node. This flag is set if an error message
646 -- refers to a node or is posted on its source location, and has the
647 -- effect of inhibiting further messages involving this same node.
649 -----------------------
650 -- Modify_Tree_For_C --
651 -----------------------
653 -- If the flag Opt.Modify_Tree_For_C is set True, then the tree is modified
654 -- in ways that help match the semantics better with C, easing the task of
655 -- interfacing to C code generators (other than GCC, where the work is done
656 -- in gigi, and there is no point in changing that), and also making life
657 -- easier for Cprint in generating C source code.
659 -- The current modifications implemented are as follows:
661 -- N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic nodes
662 -- are eliminated from the tree (since these operations do not exist in
663 -- C), and the operations are rewritten in terms of logical shifts and
664 -- other logical operations that do exist in C. See Exp_Ch4 expansion
665 -- routines for these operators for details of the transformations made.
667 -- The right operand of N_Op_Shift_Right and N_Op_Shift_Left is always
668 -- less than the word size (since other values are not well-defined in
669 -- C). This is done using an explicit test if necessary.
671 -- Min and Max attributes are expanded into equivalent if expressions,
672 -- dealing properly with side effect issues.
674 -- Mod for signed integer types is expanded into equivalent expressions
675 -- using Rem (which is % in C) and other C-available operators.
677 -- The Actions list of an Expression_With_Actions node does not contain
678 -- any declarations,(so that DO X, .. Y IN Z becomes (X, .. Y, Z) in C).
680 ------------------------------------
681 -- Description of Semantic Fields --
682 ------------------------------------
684 -- The meaning of the syntactic fields is generally clear from their names
685 -- without any further description, since the names are chosen to
686 -- correspond very closely to the syntax in the reference manual. This
687 -- section describes the usage of the semantic fields, which are used to
688 -- contain additional information determined during semantic analysis.
690 -- ABE_Is_Certain (Flag18-Sem)
691 -- This flag is set in an instantiation node or a call node is determined
692 -- to be sure to raise an ABE. This is used to trigger special handling
693 -- of such cases, particularly in the instantiation case where we avoid
694 -- instantiating the body if this flag is set. This flag is also present
695 -- in an N_Formal_Package_Declaration_Node since formal package
696 -- declarations are treated like instantiations, but it is always set to
697 -- False in this context.
699 -- Accept_Handler_Records (List5-Sem)
700 -- This field is present only in an N_Accept_Alternative node. It is used
701 -- to temporarily hold the exception handler records from an accept
702 -- statement in a selective accept. These exception handlers will
703 -- eventually be placed in the Handler_Records list of the procedure
704 -- built for this accept (see Expand_N_Selective_Accept procedure in
705 -- Exp_Ch9 for further details).
707 -- Access_Types_To_Process (Elist2-Sem)
708 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
709 -- Contains the list of access types which may require specific treatment
710 -- when the nature of the type completion is completely known. An example
711 -- of such treatment is the generation of the associated_final_chain.
713 -- Actions (List1-Sem)
714 -- This field contains a sequence of actions that are associated with the
715 -- node holding the field. See the individual node types for details of
716 -- how this field is used, as well as the description of the specific use
717 -- for a particular node type.
719 -- Activation_Chain_Entity (Node3-Sem)
720 -- This is used in tree nodes representing task activators (blocks,
721 -- subprogram bodies, package declarations, and task bodies). It is
722 -- initially Empty, and then gets set to point to the entity for the
723 -- declared Activation_Chain variable when the first task is declared.
724 -- When tasks are declared in the corresponding declarative region this
725 -- entity is located by name (its name is always _Chain) and the declared
726 -- tasks are added to the chain. Note that N_Extended_Return_Statement
727 -- does not have this attribute, although it does have an activation
728 -- chain. This chain is used to store the tasks temporarily, and is not
729 -- used for activating them. On successful completion of the return
730 -- statement, the tasks are moved to the caller's chain, and the caller
733 -- Acts_As_Spec (Flag4-Sem)
734 -- A flag set in the N_Subprogram_Body node for a subprogram body which
735 -- is acting as its own spec, except in the case of a library level
736 -- subprogram, in which case the flag is set on the parent compilation
737 -- unit node instead.
739 -- Actual_Designated_Subtype (Node4-Sem)
740 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
741 -- needs to known the dynamic constrained subtype of the designated
742 -- object, this attribute is set to that type. This is done for
743 -- N_Free_Statements for access-to-classwide types and access to
744 -- unconstrained packed array types, and for N_Explicit_Dereference when
745 -- the designated type is an unconstrained packed array and the
746 -- dereference is the prefix of a 'Size attribute reference.
748 -- Address_Warning_Posted (Flag18-Sem)
749 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
750 -- posted a warning for the address clause regarding size or alignment
751 -- issues. Used to inhibit multiple redundant messages.
753 -- Aggregate_Bounds (Node3-Sem)
754 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
755 -- known at compile time, this field points to an N_Range node with those
756 -- bounds. Otherwise Empty.
758 -- All_Others (Flag11-Sem)
759 -- Present in an N_Others_Choice node. This flag is set for an others
760 -- exception where all exceptions are to be caught, even those that are
761 -- not normally handled (in particular the tasking abort signal). This
762 -- is used for translation of the at end handler into a normal exception
765 -- Aspect_Rep_Item (Node2-Sem)
766 -- Present in N_Aspect_Specification nodes. Points to the corresponding
767 -- pragma/attribute definition node used to process the aspect.
769 -- Assignment_OK (Flag15-Sem)
770 -- This flag is set in a subexpression node for an object, indicating
771 -- that the associated object can be modified, even if this would not
772 -- normally be permissible (either by direct assignment, or by being
773 -- passed as an out or in-out parameter). This is used by the expander
774 -- for a number of purposes, including initialization of constants and
775 -- limited type objects (such as tasks), setting discriminant fields,
776 -- setting tag values, etc. N_Object_Declaration nodes also have this
777 -- flag defined. Here it is used to indicate that an initialization
778 -- expression is valid, even where it would normally not be allowed
779 -- (e.g. where the type involved is limited).
781 -- Associated_Node (Node4-Sem)
782 -- Present in nodes that can denote an entity: identifiers, character
783 -- literals, operator symbols, expanded names, operator nodes, and
784 -- attribute reference nodes (all these nodes have an Entity field).
785 -- This field is also present in N_Aggregate, N_Selected_Component, and
786 -- N_Extension_Aggregate nodes. This field is used in generic processing
787 -- to create links between the generic template and the generic copy.
788 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
789 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
790 -- the normal function of Entity is not required at the point where the
791 -- Associated_Node is set. Note also, that in generic templates, this
792 -- means that the Entity field does not necessarily point to an Entity.
793 -- Since the back end is expected to ignore generic templates, this is
796 -- Atomic_Sync_Required (Flag14-Sem)
797 -- This flag is set on a node for which atomic synchronization is
798 -- required for the corresponding reference or modification.
800 -- At_End_Proc (Node1)
801 -- This field is present in an N_Handled_Sequence_Of_Statements node.
802 -- It contains an identifier reference for the cleanup procedure to be
803 -- called. See description of this node for further details.
805 -- Backwards_OK (Flag6-Sem)
806 -- A flag present in the N_Assignment_Statement node. It is used only
807 -- if the type being assigned is an array type, and is set if analysis
808 -- determines that it is definitely safe to do the copy backwards, i.e.
809 -- starting at the highest addressed element. This is the case if either
810 -- the operands do not overlap, or they may overlap, but if they do,
811 -- then the left operand is at a higher address than the right operand.
813 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
814 -- means that the front end could not determine that either direction is
815 -- definitely safe, and a runtime check may be required if the backend
816 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
817 -- set, it means that the front end can assure no overlap of operands.
819 -- Body_To_Inline (Node3-Sem)
820 -- present in subprogram declarations. Denotes analyzed but unexpanded
821 -- body of subprogram, to be used when inlining calls. Present when the
822 -- subprogram has an Inline pragma and inlining is enabled. If the
823 -- declaration is completed by a renaming_as_body, and the renamed en-
824 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
825 -- which is used directly in later calls to the original subprogram.
827 -- Body_Required (Flag13-Sem)
828 -- A flag that appears in the N_Compilation_Unit node indicating that
829 -- the corresponding unit requires a body. For the package case, this
830 -- indicates that a completion is required. In Ada 95, if the flag is not
831 -- set for the package case, then a body may not be present. In Ada 83,
832 -- if the flag is not set for the package case, then body is optional.
833 -- For a subprogram declaration, the flag is set except in the case where
834 -- a pragma Import or Interface applies, in which case no body is
835 -- permitted (in Ada 83 or Ada 95).
837 -- By_Ref (Flag5-Sem)
838 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
839 -- this flag is set when the returned expression is already allocated on
840 -- the secondary stack and thus the result is passed by reference rather
841 -- than copied another time.
843 -- Cleanup_Actions (List5-Sem)
844 -- Present in block statements created for transient blocks, contains
845 -- additional cleanup actions carried over from the transient scope.
847 -- Check_Address_Alignment (Flag11-Sem)
848 -- A flag present in N_Attribute_Definition clause for a 'Address
849 -- attribute definition. This flag is set if a dynamic check should be
850 -- generated at the freeze point for the entity to which this address
851 -- clause applies. The reason that we need this flag is that we want to
852 -- check for range checks being suppressed at the point where the
853 -- attribute definition clause is given, rather than testing this at the
856 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
857 -- Present in N_Simple_Return_Statement nodes. True if this node was
858 -- constructed as part of the N_Extended_Return_Statement expansion.
860 -- Compile_Time_Known_Aggregate (Flag18-Sem)
861 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
862 -- evaluated at compile time without raising constraint error. Such
863 -- aggregates can be passed as is the back end without any expansion.
864 -- See Exp_Aggr for specific conditions under which this flag gets set.
866 -- Componentwise_Assignment (Flag14-Sem)
867 -- Present in N_Assignment_Statement nodes. Set for a record assignment
868 -- where all that needs doing is to expand it into component-by-component
869 -- assignments. This is used internally for the case of tagged types with
870 -- rep clauses, where we need to avoid recursion (we don't want to try to
871 -- generate a call to the primitive operation, because this is the case
872 -- where we are compiling the primitive operation). Note that when we are
873 -- expanding component assignments in this case, we never assign the _tag
874 -- field, but we recursively assign components of the parent type.
876 -- Condition_Actions (List3-Sem)
877 -- This field appears in else-if nodes and in the iteration scheme node
878 -- for while loops. This field is only used during semantic processing to
879 -- temporarily hold actions inserted into the tree. In the tree passed
880 -- to gigi, the condition actions field is always set to No_List. For
881 -- details on how this field is used, see the routine Insert_Actions in
882 -- package Exp_Util, and also the expansion routines for the relevant
885 -- Context_Pending (Flag16-Sem)
886 -- This field appears in Compilation_Unit nodes, to indicate that the
887 -- context of the unit is being compiled. Used to detect circularities
888 -- that are not otherwise detected by the loading mechanism. Such
889 -- circularities can occur in the presence of limited and non-limited
890 -- with_clauses that mention the same units.
892 -- Controlling_Argument (Node1-Sem)
893 -- This field is set in procedure and function call nodes if the call
894 -- is a dispatching call (it is Empty for a non-dispatching call). It
895 -- indicates the source of the call's controlling tag. For procedure
896 -- calls, the Controlling_Argument is one of the actuals. For function
897 -- that has a dispatching result, it is an entity in the context of the
898 -- call that can provide a tag, or else it is the tag of the root type
899 -- of the class. It can also specify a tag directly rather than being a
900 -- tagged object. The latter is needed by the implementations of AI-239
903 -- Conversion_OK (Flag14-Sem)
904 -- A flag set on type conversion nodes to indicate that the conversion
905 -- is to be considered as being valid, even though it is the case that
906 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
907 -- Fixed_Value and Integer_Value, for internal conversions done for
908 -- fixed-point operations, and for certain conversions for calls to
909 -- initialization procedures. If Conversion_OK is set, then Etype must be
910 -- set (the analyzer assumes that Etype has been set). For the case of
911 -- fixed-point operands, it also indicates that the conversion is to be
912 -- direct conversion of the underlying integer result, with no regard to
913 -- the small operand.
915 -- Convert_To_Return_False (Flag13-Sem)
916 -- Present in N_Raise_Expression nodes that appear in the body of the
917 -- special predicateM function used to test a predicate in the context
918 -- of a membership test, where raise expression results in returning a
919 -- value of False rather than raising an exception.
921 -- Corresponding_Aspect (Node3-Sem)
922 -- Present in N_Pragma node. Used to point back to the source aspect from
923 -- the corresponding pragma. This field is Empty for source pragmas.
925 -- Corresponding_Body (Node5-Sem)
926 -- This field is set in subprogram declarations, package declarations,
927 -- entry declarations of protected types, and in generic units. It points
928 -- to the defining entity for the corresponding body (NOT the node for
931 -- Corresponding_Formal_Spec (Node3-Sem)
932 -- This field is set in subprogram renaming declarations, where it points
933 -- to the defining entity for a formal subprogram in the case where the
934 -- renaming corresponds to a generic formal subprogram association in an
935 -- instantiation. The field is Empty if the renaming does not correspond
936 -- to such a formal association.
938 -- Corresponding_Generic_Association (Node5-Sem)
939 -- This field is defined for object declarations and object renaming
940 -- declarations. It is set for the declarations within an instance that
941 -- map generic formals to their actuals. If set, the field points to
942 -- a generic_association which is the original parent of the expression
943 -- or name appearing in the declaration. This simplifies ASIS queries.
945 -- Corresponding_Integer_Value (Uint4-Sem)
946 -- This field is set in real literals of fixed-point types (it is not
947 -- used for floating-point types). It contains the integer value used
948 -- to represent the fixed-point value. It is also set on the universal
949 -- real literals used to represent bounds of fixed-point base types
950 -- and their first named subtypes.
952 -- Corresponding_Spec (Node5-Sem)
953 -- This field is set in subprogram, package, task, and protected body
954 -- nodes, where it points to the defining entity in the corresponding
955 -- spec. The attribute is also set in N_With_Clause nodes where it points
956 -- to the defining entity for the with'ed spec, and in a subprogram
957 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
958 -- if there is no corresponding spec, as in the case of a subprogram body
959 -- that serves as its own spec.
961 -- In Ada 2012, Corresponding_Spec is set on expression functions that
962 -- complete a subprogram declaration.
964 -- Corresponding_Spec_Of_Stub (Node2-Sem)
965 -- This field is present in subprogram, package, task and protected body
966 -- stubs where it points to the corresponding spec of the stub. Due to
967 -- clashes in the structure of nodes, we cannot use Corresponding_Spec.
969 -- Corresponding_Stub (Node3-Sem)
970 -- This field is present in an N_Subunit node. It holds the node in
971 -- the parent unit that is the stub declaration for the subunit. It is
972 -- set when analysis of the stub forces loading of the proper body. If
973 -- expansion of the proper body creates new declarative nodes, they are
974 -- inserted at the point of the corresponding_stub.
976 -- Dcheck_Function (Node5-Sem)
977 -- This field is present in an N_Variant node, It references the entity
978 -- for the discriminant checking function for the variant.
980 -- Default_Expression (Node5-Sem)
981 -- This field is Empty if there is no default expression. If there is a
982 -- simple default expression (one with no side effects), then this field
983 -- simply contains a copy of the Expression field (both point to the tree
984 -- for the default expression). Default_Expression is used for
985 -- conformance checking.
987 -- Default_Storage_Pool (Node3-Sem)
988 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
989 -- copy of Opt.Default_Pool at the end of the compilation unit. See
990 -- package Opt for details. This is used for inheriting the
991 -- Default_Storage_Pool in child units.
993 -- Discr_Check_Funcs_Built (Flag11-Sem)
994 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
995 -- discriminant checking functions are constructed. The purpose is to
996 -- avoid attempting to set these functions more than once.
998 -- Do_Accessibility_Check (Flag13-Sem)
999 -- This flag is set on N_Parameter_Specification nodes to indicate
1000 -- that an accessibility check is required for the parameter. It is
1001 -- not yet decided who takes care of this check (TBD ???).
1003 -- Do_Discriminant_Check (Flag1-Sem)
1004 -- This flag is set on N_Selected_Component nodes to indicate that a
1005 -- discriminant check is required using the discriminant check routine
1006 -- associated with the selector. The actual check is generated by the
1007 -- expander when processing selected components. In the case of
1008 -- Unchecked_Union, the flag is also set, but no discriminant check
1009 -- routine is associated with the selector, and the expander does not
1010 -- generate a check. This flag is also present in assignment statements
1011 -- (and set if the assignment requires a discriminant check), and in type
1012 -- conversion nodes (and set if the conversion requires a check).
1014 -- Do_Division_Check (Flag13-Sem)
1015 -- This flag is set on a division operator (/ mod rem) to indicate
1016 -- that a zero divide check is required. The actual check is dealt
1017 -- with by the backend (all the front end does is to set the flag).
1019 -- Do_Length_Check (Flag4-Sem)
1020 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
1021 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
1022 -- is required. It is not determined who deals with this flag (???).
1024 -- Do_Overflow_Check (Flag17-Sem)
1025 -- This flag is set on an operator where an overflow check is required on
1026 -- the operation. The actual check is dealt with by the backend (all the
1027 -- front end does is to set the flag). The other cases where this flag is
1028 -- used is on a Type_Conversion node and for attribute reference nodes.
1029 -- For a type conversion, it means that the conversion is from one base
1030 -- type to another, and the value may not fit in the target base type.
1031 -- See also the description of Do_Range_Check for this case. The only
1032 -- attribute references which use this flag are Pred and Succ, where it
1033 -- means that the result should be checked for going outside the base
1034 -- range. Note that this flag is not set for modular types. This flag is
1035 -- also set on if and case expression nodes if we are operating in either
1036 -- MINIMIZED or ELIMINATED overflow checking mode (to make sure that we
1037 -- properly process overflow checking for dependent expressions).
1039 -- Do_Range_Check (Flag9-Sem)
1040 -- This flag is set on an expression which appears in a context where a
1041 -- range check is required. The target type is clear from the context.
1042 -- The contexts in which this flag can appear are the following:
1044 -- Right side of an assignment. In this case the target type is
1045 -- taken from the left side of the assignment, which is referenced
1046 -- by the Name of the N_Assignment_Statement node.
1048 -- Subscript expressions in an indexed component. In this case the
1049 -- target type is determined from the type of the array, which is
1050 -- referenced by the Prefix of the N_Indexed_Component node.
1052 -- Argument expression for a parameter, appearing either directly in
1053 -- the Parameter_Associations list of a call or as the Expression of an
1054 -- N_Parameter_Association node that appears in this list. In either
1055 -- case, the check is against the type of the formal. Note that the
1056 -- flag is relevant only in IN and IN OUT parameters, and will be
1057 -- ignored for OUT parameters, where no check is required in the call,
1058 -- and if a check is required on the return, it is generated explicitly
1059 -- with a type conversion.
1061 -- Initialization expression for the initial value in an object
1062 -- declaration. In this case the Do_Range_Check flag is set on
1063 -- the initialization expression, and the check is against the
1064 -- range of the type of the object being declared.
1066 -- The expression of a type conversion. In this case the range check is
1067 -- against the target type of the conversion. See also the use of
1068 -- Do_Overflow_Check on a type conversion. The distinction is that the
1069 -- overflow check protects against a value that is outside the range of
1070 -- the target base type, whereas a range check checks that the
1071 -- resulting value (which is a value of the base type of the target
1072 -- type), satisfies the range constraint of the target type.
1074 -- Note: when a range check is required in contexts other than those
1075 -- listed above (e.g. in a return statement), an additional type
1076 -- conversion node is introduced to represent the required check.
1078 -- A special case arises for the arguments of the Pred/Succ attributes.
1079 -- Here the range check needed is against First + 1 .. Last (Pred) or
1080 -- First .. Last - 1 (Succ) of the corresponding base type. Essentially
1081 -- these checks are what would be performed within the implicit body of
1082 -- the functions that correspond to these attributes. In these cases,
1083 -- the Do_Range check flag is set on the argument to the attribute
1084 -- function, and the back end must special case the appropriate range
1085 -- to check against.
1087 -- Do_Storage_Check (Flag17-Sem)
1088 -- This flag is set in an N_Allocator node to indicate that a storage
1089 -- check is required for the allocation, or in an N_Subprogram_Body node
1090 -- to indicate that a stack check is required in the subprogram prolog.
1091 -- The N_Allocator case is handled by the routine that expands the call
1092 -- to the runtime routine. The N_Subprogram_Body case is handled by the
1093 -- backend, and all the semantics does is set the flag.
1095 -- Do_Tag_Check (Flag13-Sem)
1096 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
1097 -- N_Procedure_Call_Statement, N_Type_Conversion,
1098 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
1099 -- node to indicate that the tag check can be suppressed. It is not
1100 -- yet decided how this flag is used (TBD ???).
1102 -- Elaborate_Present (Flag4-Sem)
1103 -- This flag is set in the N_With_Clause node to indicate that pragma
1104 -- Elaborate pragma appears for the with'ed units.
1106 -- Elaborate_All_Desirable (Flag9-Sem)
1107 -- This flag is set in the N_With_Clause mode to indicate that the static
1108 -- elaboration processing has determined that an Elaborate_All pragma is
1109 -- desirable for correct elaboration for this unit.
1111 -- Elaborate_All_Present (Flag14-Sem)
1112 -- This flag is set in the N_With_Clause node to indicate that a
1113 -- pragma Elaborate_All pragma appears for the with'ed units.
1115 -- Elaborate_Desirable (Flag11-Sem)
1116 -- This flag is set in the N_With_Clause mode to indicate that the static
1117 -- elaboration processing has determined that an Elaborate pragma is
1118 -- desirable for correct elaboration for this unit.
1120 -- Elaboration_Boolean (Node2-Sem)
1121 -- This field is present in function and procedure specification nodes.
1122 -- If set, it points to the entity for a Boolean flag that must be tested
1123 -- for certain calls to check for access before elaboration. See body of
1124 -- Sem_Elab for further details. This field is Empty if no elaboration
1125 -- boolean is required.
1127 -- Else_Actions (List3-Sem)
1128 -- This field is present in if expression nodes. During code
1129 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1130 -- actions at an appropriate place in the tree to get elaborated at the
1131 -- right time. For if expressions, we have to be sure that the actions
1132 -- for the Else branch are only elaborated if the condition is False.
1133 -- The Else_Actions field is used as a temporary parking place for
1134 -- these actions. The final tree is always rewritten to eliminate the
1135 -- need for this field, so in the tree passed to Gigi, this field is
1136 -- always set to No_List.
1138 -- Enclosing_Variant (Node2-Sem)
1139 -- This field is present in the N_Variant node and identifies the Node_Id
1140 -- corresponding to the immediately enclosing variant when the variant is
1141 -- nested, and N_Empty otherwise. Set during semantic processing of the
1142 -- variant part of a record type.
1144 -- Entity (Node4-Sem)
1145 -- Appears in all direct names (identifiers, character literals, and
1146 -- operator symbols), as well as expanded names, and attributes that
1147 -- denote entities, such as 'Class. Points to entity for corresponding
1148 -- defining occurrence. Set after name resolution. For identifiers in a
1149 -- WITH list, the corresponding defining occurrence is in a separately
1150 -- compiled file, and Entity must be set by the library Load procedure.
1152 -- Note: During name resolution, the value in Entity may be temporarily
1153 -- incorrect (e.g. during overload resolution, Entity is initially set to
1154 -- the first possible correct interpretation, and then later modified if
1155 -- necessary to contain the correct value after resolution).
1157 -- Note: This field overlaps Associated_Node, which is used during
1158 -- generic processing (see Sem_Ch12 for details). Note also that in
1159 -- generic templates, this means that the Entity field does not always
1160 -- point to an Entity. Since the back end is expected to ignore generic
1161 -- templates, this is harmless.
1163 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
1164 -- It is used only for stream attributes definition clauses. In this
1165 -- case, it denotes a (possibly dummy) subprogram entity that is declared
1166 -- conceptually at the point of the clause. Thus the visibility of the
1167 -- attribute definition clause (in the sense of 8.3(23) as amended by
1168 -- AI-195) can be checked by testing the visibility of that subprogram.
1170 -- Note: Normally the Entity field of an identifier points to the entity
1171 -- for the corresponding defining identifier, and hence the Chars field
1172 -- of an identifier will match the Chars field of the entity. However,
1173 -- there is no requirement that these match, and there are obscure cases
1174 -- of generated code where they do not match.
1176 -- Note: Ada 2012 aspect specifications require additional links between
1177 -- identifiers and various attributes. These attributes can be of
1178 -- arbitrary types, and the entity field of identifiers that denote
1179 -- aspects must be used to store arbitrary expressions for later semantic
1180 -- checks. See section on aspect specifications for details.
1182 -- Entity_Or_Associated_Node (Node4-Sem)
1183 -- A synonym for both Entity and Associated_Node. Used by convention in
1184 -- the code when referencing this field in cases where it is not known
1185 -- whether the field contains an Entity or an Associated_Node.
1187 -- Etype (Node5-Sem)
1188 -- Appears in all expression nodes, all direct names, and all entities.
1189 -- Points to the entity for the related type. Set after type resolution.
1190 -- Normally this is the actual subtype of the expression. However, in
1191 -- certain contexts such as the right side of an assignment, subscripts,
1192 -- arguments to calls, returned value in a function, initial value etc.
1193 -- it is the desired target type. In the event that this is different
1194 -- from the actual type, the Do_Range_Check flag will be set if a range
1195 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
1196 -- points to an essentially arbitrary choice from the possible set of
1199 -- Exception_Junk (Flag8-Sem)
1200 -- This flag is set in a various nodes appearing in a statement sequence
1201 -- to indicate that the corresponding node is an artifact of the
1202 -- generated code for exception handling, and should be ignored when
1203 -- analyzing the control flow of the relevant sequence of statements
1204 -- (e.g. to check that it does not end with a bad return statement).
1206 -- Exception_Label (Node5-Sem)
1207 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1208 -- to be used for transforming the corresponding exception into a goto,
1209 -- or contains Empty, if this exception is not to be transformed. Also
1210 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1211 -- that there may be a local raise for the handler, so that expansion
1212 -- to allow a goto is required (and this field contains the label for
1213 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1215 -- Expansion_Delayed (Flag11-Sem)
1216 -- Set on aggregates and extension aggregates that need a top-down rather
1217 -- than bottom-up expansion. Typically aggregate expansion happens bottom
1218 -- up. For nested aggregates the expansion is delayed until the enclosing
1219 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1220 -- delay it we set this flag. This is done to avoid creating a temporary
1221 -- for each level of a nested aggregates, and also to prevent the
1222 -- premature generation of constraint checks. This is also a requirement
1223 -- if we want to generate the proper attachment to the internal
1224 -- finalization lists (for record with controlled components). Top down
1225 -- expansion of aggregates is also used for in-place array aggregate
1226 -- assignment or initialization. When the full context is known, the
1227 -- target of the assignment or initialization is used to generate the
1228 -- left-hand side of individual assignment to each sub-component.
1230 -- First_Inlined_Subprogram (Node3-Sem)
1231 -- Present in the N_Compilation_Unit node for the main program. Points
1232 -- to a chain of entities for subprograms that are to be inlined. The
1233 -- Next_Inlined_Subprogram field of these entities is used as a link
1234 -- pointer with Empty marking the end of the list. This field is Empty
1235 -- if there are no inlined subprograms or inlining is not active.
1237 -- First_Named_Actual (Node4-Sem)
1238 -- Present in procedure call statement and function call nodes, and also
1239 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1240 -- named parameter where parameters are ordered by declaration order (as
1241 -- opposed to the actual order in the call which may be different due to
1242 -- named associations). Note: this field points to the explicit actual
1243 -- parameter itself, not the N_Parameter_Association node (its parent).
1245 -- First_Real_Statement (Node2-Sem)
1246 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1247 -- Empty. Used only when declarations are moved into the statement part
1248 -- of a construct as a result of wrapping an AT END handler that is
1249 -- required to cover the declarations. In this case, this field is used
1250 -- to remember the location in the statements list of the first real
1251 -- statement, i.e. the statement that used to be first in the statement
1252 -- list before the declarations were prepended.
1254 -- First_Subtype_Link (Node5-Sem)
1255 -- Present in N_Freeze_Entity node for an anonymous base type that is
1256 -- implicitly created by the declaration of a first subtype. It points
1257 -- to the entity for the first subtype.
1259 -- Float_Truncate (Flag11-Sem)
1260 -- A flag present in type conversion nodes. This is used for float to
1261 -- integer conversions where truncation is required rather than rounding.
1262 -- Note that Gigi does not handle type conversions from real to integer
1263 -- with rounding (see Expand_N_Type_Conversion).
1265 -- Forwards_OK (Flag5-Sem)
1266 -- A flag present in the N_Assignment_Statement node. It is used only
1267 -- if the type being assigned is an array type, and is set if analysis
1268 -- determines that it is definitely safe to do the copy forwards, i.e.
1269 -- starting at the lowest addressed element. This is the case if either
1270 -- the operands do not overlap, or they may overlap, but if they do,
1271 -- then the left operand is at a lower address than the right operand.
1273 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1274 -- means that the front end could not determine that either direction is
1275 -- definitely safe, and a runtime check may be required if the backend
1276 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1277 -- set, it means that the front end can assure no overlap of operands.
1279 -- From_Aspect_Specification (Flag13-Sem)
1280 -- Processing of aspect specifications typically results in insertion in
1281 -- the tree of corresponding pragma or attribute definition clause nodes.
1282 -- These generated nodes have the From_Aspect_Specification flag set to
1283 -- indicate that they came from aspect specifications originally.
1285 -- From_At_End (Flag4-Sem)
1286 -- This flag is set on an N_Raise_Statement node if it corresponds to
1287 -- the reraise statement generated as the last statement of an AT END
1288 -- handler when SJLJ exception handling is active. It is used to stop
1289 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1290 -- because if the restriction is set, the reraise is not generated.
1292 -- From_At_Mod (Flag4-Sem)
1293 -- This flag is set on the attribute definition clause node that is
1294 -- generated by a transformation of an at mod phrase in a record
1295 -- representation clause. This is used to give slightly different (Ada 83
1296 -- compatible) semantics to such a clause, namely it is used to specify a
1297 -- minimum acceptable alignment for the base type and all subtypes. In
1298 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1299 -- must be a multiple of the given value, and the representation clause
1300 -- is considered to be type specific instead of subtype specific.
1302 -- From_Conditional_Expression (Flag1-Sem)
1303 -- This flag is set on if and case statements generated by the expansion
1304 -- of if and case expressions respectively. The flag is used to suppress
1305 -- any finalization of controlled objects found within these statements.
1307 -- From_Default (Flag6-Sem)
1308 -- This flag is set on the subprogram renaming declaration created in an
1309 -- instance for a formal subprogram, when the formal is declared with a
1310 -- box, and there is no explicit actual. If the flag is present, the
1311 -- declaration is treated as an implicit reference to the formal in the
1314 -- Generalized_Indexing (Node4-Sem)
1315 -- Present in N_Indexed_Component nodes. Set for Indexed_Component nodes
1316 -- that are Ada 2012 container indexing operations. The value of the
1317 -- attribute is a function call (possibly dereferenced) that corresponds
1318 -- to the proper expansion of the source indexing operation. Before
1319 -- expansion, the source node is rewritten as the resolved generalized
1320 -- indexing. In ASIS mode, the expansion does not take place, so that
1321 -- the source is preserved and properly annotated with types.
1323 -- Generic_Parent (Node5-Sem)
1324 -- Generic_Parent is defined on declaration nodes that are instances. The
1325 -- value of Generic_Parent is the generic entity from which the instance
1326 -- is obtained. Generic_Parent is also defined for the renaming
1327 -- declarations and object declarations created for the actuals in an
1328 -- instantiation. The generic parent of such a declaration is the
1329 -- corresponding generic association in the Instantiation node.
1331 -- Generic_Parent_Type (Node4-Sem)
1332 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1333 -- actuals of formal private and derived types. Within the instance, the
1334 -- operations on the actual are those inherited from the parent. For a
1335 -- formal private type, the parent type is the generic type itself. The
1336 -- Generic_Parent_Type is also used in an instance to determine whether a
1337 -- private operation overrides an inherited one.
1339 -- Handler_List_Entry (Node2-Sem)
1340 -- This field is present in N_Object_Declaration nodes. It is set only
1341 -- for the Handler_Record entry generated for an exception in zero cost
1342 -- exception handling mode. It references the corresponding item in the
1343 -- handler list, and is used to delete this entry if the corresponding
1344 -- handler is deleted during optimization. For further details on why
1345 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1347 -- Has_Dereference_Action (Flag13-Sem)
1348 -- This flag is present in N_Explicit_Dereference nodes. It is set to
1349 -- indicate that the expansion has aready produced a call to primitive
1350 -- Dereference of a System.Checked_Pools.Checked_Pool implementation.
1351 -- Such dereference actions are produced for debugging purposes.
1353 -- Has_Dynamic_Length_Check (Flag10-Sem)
1354 -- This flag is present in all expression nodes. It is set to indicate
1355 -- that one of the routines in unit Checks has generated a length check
1356 -- action which has been inserted at the flagged node. This is used to
1357 -- avoid the generation of duplicate checks.
1359 -- Has_Dynamic_Range_Check (Flag12-Sem)
1360 -- This flag is present in N_Subtype_Declaration nodes and on all
1361 -- expression nodes. It is set to indicate that one of the routines in
1362 -- unit Checks has generated a range check action which has been inserted
1363 -- at the flagged node. This is used to avoid the generation of duplicate
1364 -- checks. Why does this occur on N_Subtype_Declaration nodes, what does
1365 -- it mean in that context???
1367 -- Has_Local_Raise (Flag8-Sem)
1368 -- Present in exception handler nodes. Set if the handler can be entered
1369 -- via a local raise that gets transformed to a goto statement. This will
1370 -- always be set if Local_Raise_Statements is non-empty, but can also be
1371 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
1372 -- nodes requiring generation of back end checks.
1374 -- Has_No_Elaboration_Code (Flag17-Sem)
1375 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1376 -- or not elaboration code is present for this unit. It is initially set
1377 -- true for subprogram specs and bodies and for all generic units and
1378 -- false for non-generic package specs and bodies. Gigi may set the flag
1379 -- in the non-generic package case if it determines that no elaboration
1380 -- code is generated. Note that this flag is not related to the
1381 -- Is_Preelaborated status, there can be preelaborated packages that
1382 -- generate elaboration code, and non-preelaborated packages which do
1383 -- not generate elaboration code.
1385 -- Has_Pragma_Suppress_All (Flag14-Sem)
1386 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1387 -- pragma appears anywhere in the unit. This accommodates the rather
1388 -- strange placement rules of other compilers (DEC permits it at the
1389 -- end of a unit, and Rational allows it as a program unit pragma). We
1390 -- allow it anywhere at all, and consider it equivalent to a pragma
1391 -- Suppress (All_Checks) appearing at the start of the configuration
1392 -- pragmas for the unit.
1394 -- Has_Private_View (Flag11-Sem)
1395 -- A flag present in generic nodes that have an entity, to indicate that
1396 -- the node has a private type. Used to exchange private and full
1397 -- declarations if the visibility at instantiation is different from the
1398 -- visibility at generic definition.
1400 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1401 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1402 -- flag the presence of a pragma Relative_Deadline.
1404 -- Has_Self_Reference (Flag13-Sem)
1405 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1406 -- of the expressions contains an access attribute reference to the
1407 -- enclosing type. Such a self-reference can only appear in default-
1408 -- initialized aggregate for a record type.
1410 -- Has_SP_Choice (Flag15-Sem)
1411 -- Present in all nodes containing a Discrete_Choices field (N_Variant,
1412 -- N_Case_Expression_Alternative, N_Case_Statement_Alternative). Set to
1413 -- True if the Discrete_Choices list has at least one occurrence of a
1414 -- statically predicated subtype.
1416 -- Has_Storage_Size_Pragma (Flag5-Sem)
1417 -- A flag present in an N_Task_Definition node to flag the presence of a
1418 -- Storage_Size pragma.
1420 -- Has_Wide_Character (Flag11-Sem)
1421 -- Present in string literals, set if any wide character (i.e. character
1422 -- code outside the Character range but within Wide_Character range)
1423 -- appears in the string. Used to implement pragma preference rules.
1425 -- Has_Wide_Wide_Character (Flag13-Sem)
1426 -- Present in string literals, set if any wide character (i.e. character
1427 -- code outside the Wide_Character range) appears in the string. Used to
1428 -- implement pragma preference rules.
1430 -- Header_Size_Added (Flag11-Sem)
1431 -- Present in N_Attribute_Reference nodes, set only for attribute
1432 -- Max_Size_In_Storage_Elements. The flag indicates that the size of the
1433 -- hidden list header used by the runtime finalization support has been
1434 -- added to the size of the prefix. The flag also prevents the infinite
1435 -- expansion of the same attribute in the said context.
1437 -- Hidden_By_Use_Clause (Elist4-Sem)
1438 -- An entity list present in use clauses that appear within
1439 -- instantiations. For the resolution of local entities, entities
1440 -- introduced by these use clauses have priority over global ones, and
1441 -- outer entities must be explicitly hidden/restored on exit.
1443 -- Implicit_With (Flag16-Sem)
1444 -- This flag is set in the N_With_Clause node that is implicitly
1445 -- generated for runtime units that are loaded by the expander, and also
1446 -- for package System, if it is loaded implicitly by a use of the
1447 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1450 -- Implicit_With_From_Instantiation (Flag12-Sem)
1451 -- Set in N_With_Clause nodes from generic instantiations.
1453 -- Import_Interface_Present (Flag16-Sem)
1454 -- This flag is set in an Interface or Import pragma if a matching
1455 -- pragma of the other kind is also present. This is used to avoid
1456 -- generating some unwanted error messages.
1458 -- Includes_Infinities (Flag11-Sem)
1459 -- This flag is present in N_Range nodes. It is set for the range of
1460 -- unconstrained float types defined in Standard, which include not only
1461 -- the given range of values, but also legitimately can include infinite
1462 -- values. This flag is false for any float type for which an explicit
1463 -- range is given by the programmer, even if that range is identical to
1464 -- the range for Float.
1466 -- Incomplete_View (Node2-Sem)
1467 -- Present in full type declarations that are completions of incomplete
1468 -- type declarations. Denotes the corresponding incomplete type
1469 -- declaration. Used to simplify the retrieval of primitive operations
1470 -- that may be declared between the partial and the full view of an
1473 -- Inherited_Discriminant (Flag13-Sem)
1474 -- This flag is present in N_Component_Association nodes. It indicates
1475 -- that a given component association in an extension aggregate is the
1476 -- value obtained from a constraint on an ancestor. Used to prevent
1477 -- double expansion when the aggregate has expansion delayed.
1479 -- Instance_Spec (Node5-Sem)
1480 -- This field is present in generic instantiation nodes, and also in
1481 -- formal package declaration nodes (formal package declarations are
1482 -- treated in a manner very similar to package instantiations). It points
1483 -- to the node for the spec of the instance, inserted as part of the
1484 -- semantic processing for instantiations in Sem_Ch12.
1486 -- Is_Accessibility_Actual (Flag13-Sem)
1487 -- Present in N_Parameter_Association nodes. True if the parameter is
1488 -- an extra actual that carries the accessibility level of the actual
1489 -- for an access parameter, in a function that dispatches on result and
1490 -- is called in a dispatching context. Used to prevent a formal/actual
1491 -- mismatch when the call is rewritten as a dispatching call.
1493 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1494 -- A flag set in a Block_Statement node to indicate that it is the
1495 -- expansion of an asynchronous entry call. Such a block needs cleanup
1496 -- handler to assure that the call is cancelled.
1498 -- Is_Boolean_Aspect (Flag16-Sem)
1499 -- Present in N_Aspect_Specification node. Set if the aspect is for a
1500 -- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1502 -- Is_Checked (Flag11-Sem)
1503 -- Present in N_Aspect_Specification and N_Pragma nodes. Set for an
1504 -- assertion aspect or pragma, or check pragma for an assertion, that
1505 -- is to be checked at run time. If either Is_Checked or Is_Ignored
1506 -- is set (they cannot both be set), then this means that the status of
1507 -- the pragma has been checked at the appropriate point and should not
1508 -- be further modified (in some cases these flags are copied when a
1509 -- pragma is rewritten).
1511 -- Is_Component_Left_Opnd (Flag13-Sem)
1512 -- Is_Component_Right_Opnd (Flag14-Sem)
1513 -- Present in concatenation nodes, to indicate that the corresponding
1514 -- operand is of the component type of the result. Used in resolving
1515 -- concatenation nodes in instances.
1517 -- Is_Delayed_Aspect (Flag14-Sem)
1518 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1519 -- come from aspect specifications, where the evaluation of the aspect
1520 -- must be delayed to the freeze point. This flag is also set True in
1521 -- the corresponding N_Aspect_Specification node.
1523 -- Is_Controlling_Actual (Flag16-Sem)
1524 -- This flag is set on in an expression that is a controlling argument in
1525 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1526 -- details of its use.
1528 -- Is_Disabled (Flag15-Sem)
1529 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1530 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1531 -- a Debug_Policy pragma that resulted in totally disabling the flagged
1532 -- aspect or policy as a result of using the GNAT-defined policy DISABLE.
1533 -- If this flag is set, the aspect or policy is not analyzed for semantic
1534 -- correctness, so any expressions etc will not be marked as analyzed.
1536 -- Is_Dynamic_Coextension (Flag18-Sem)
1537 -- Present in allocator nodes, to indicate that this is an allocator
1538 -- for an access discriminant of a dynamically allocated object. The
1539 -- coextension must be deallocated and finalized at the same time as
1540 -- the enclosing object.
1542 -- Is_Entry_Barrier_Function (Flag8-Sem)
1543 -- This flag is set in an N_Subprogram_Body node which is the expansion
1544 -- of an entry barrier from a protected entry body. It is used for the
1545 -- circuitry checking for incorrect use of Current_Task.
1547 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1548 -- This flag is set in an N_Function_Call node to indicate that the extra
1549 -- actuals to support a build-in-place style of call have been added to
1552 -- Is_Finalization_Wrapper (Flag9-Sem);
1553 -- This flag is present in N_Block_Statement nodes. It is set when the
1554 -- block acts as a wrapper of a handled construct which has controlled
1555 -- objects. The wrapper prevents interference between exception handlers
1556 -- and At_End handlers.
1558 -- Is_Ignored (Flag9-Sem)
1559 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1560 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1561 -- a Debug_Policy pragma that specified a policy of IGNORE, DISABLE, or
1562 -- OFF, for the pragma/aspect. If there was a Policy pragma specifying
1563 -- a Policy of ON or CHECK, then this flag is reset. If no Policy pragma
1564 -- gives a policy for the aspect or pragma, then there are two cases. For
1565 -- an assertion aspect or pragma (one of the assertion kinds allowed in
1566 -- an Assertion_Policy pragma), then Is_Ignored is set if assertions are
1567 -- ignored because of the absence of a -gnata switch. For any other
1568 -- aspects or pragmas, the flag is off. If this flag is set, the
1569 -- aspect/pragma is fully analyzed and checked for other syntactic
1570 -- and semantic errors, but it does not have any semantic effect.
1572 -- Is_In_Discriminant_Check (Flag11-Sem)
1573 -- This flag is present in a selected component, and is used to indicate
1574 -- that the reference occurs within a discriminant check. The
1575 -- significance is that optimizations based on assuming that the
1576 -- discriminant check has a correct value cannot be performed in this
1577 -- case (or the discriminant check may be optimized away).
1579 -- Is_Machine_Number (Flag11-Sem)
1580 -- This flag is set in an N_Real_Literal node to indicate that the value
1581 -- is a machine number. This avoids some unnecessary cases of converting
1582 -- real literals to machine numbers.
1584 -- Is_Null_Loop (Flag16-Sem)
1585 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1586 -- can be determined to be null at compile time. This is used to remove
1587 -- the loop entirely at expansion time.
1589 -- Is_Overloaded (Flag5-Sem)
1590 -- A flag present in all expression nodes. Used temporarily during
1591 -- overloading determination. The setting of this flag is not relevant
1592 -- once overloading analysis is complete.
1594 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1595 -- A flag present only in N_Op_Expon nodes. It is set when the
1596 -- exponentiation is of the form 2 ** N, where the type of N is an
1597 -- unsigned integral subtype whose size does not exceed the size of
1598 -- Standard_Integer (i.e. a type that can be safely converted to
1599 -- Natural), and the exponentiation appears as the right operand of an
1600 -- integer multiplication or an integer division where the dividend is
1601 -- unsigned. It is also required that overflow checking is off for both
1602 -- the exponentiation and the multiply/divide node. If this set of
1603 -- conditions holds, and the flag is set, then the division or
1604 -- multiplication can be (and is) converted to a shift.
1606 -- Is_Prefixed_Call (Flag17-Sem)
1607 -- This flag is set in a selected component within a generic unit, if
1608 -- it resolves to a prefixed call to a primitive operation. The flag
1609 -- is used to prevent accidental overloadings in an instance, when a
1610 -- primitive operation and a private record component may be homographs.
1612 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1613 -- A flag set in a Subprogram_Body block to indicate that it is the
1614 -- implementation of a protected subprogram. Such a body needs cleanup
1615 -- handler to make sure that the associated protected object is unlocked
1616 -- when the subprogram completes.
1618 -- Is_Static_Coextension (Flag14-Sem)
1619 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1620 -- of an object allocated on the stack rather than the heap.
1622 -- Is_Static_Expression (Flag6-Sem)
1623 -- Indicates that an expression is a static expression according to the
1624 -- rules in (RM 4.9). Note that it is possible for this flag to be set
1625 -- when Raises_Constraint_Error is also set. In practice almost all cases
1626 -- where a static expression is required do not allow an expression which
1627 -- raises Constraint_Error, so almost always, callers should call the
1628 -- Is_Ok_Static_Exprression routine instead of testing this flag. See
1629 -- spec of package Sem_Eval for full details on the use of this flag.
1631 -- Is_Subprogram_Descriptor (Flag16-Sem)
1632 -- Present in N_Object_Declaration, and set only for the object
1633 -- declaration generated for a subprogram descriptor in fast exception
1634 -- mode. See Exp_Ch11 for details of use.
1636 -- Is_Task_Allocation_Block (Flag6-Sem)
1637 -- A flag set in a Block_Statement node to indicate that it is the
1638 -- expansion of a task allocator, or the allocator of an object
1639 -- containing tasks. Such a block requires a cleanup handler to call
1640 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1641 -- allocated but not activated when the allocator completes abnormally.
1643 -- Is_Task_Master (Flag5-Sem)
1644 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1645 -- indicate that the construct is a task master (i.e. has declared tasks
1646 -- or declares an access to a task type).
1648 -- Itype (Node1-Sem)
1649 -- Used in N_Itype_Reference node to reference an itype for which it is
1650 -- important to ensure that it is defined. See description of this node
1651 -- for further details.
1653 -- Kill_Range_Check (Flag11-Sem)
1654 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1655 -- result should not be subjected to range checks. This is used for the
1656 -- implementation of Normalize_Scalars.
1658 -- Label_Construct (Node2-Sem)
1659 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1660 -- N_Block_Statement or N_Loop_Statement node to which the label
1661 -- declaration applies. This attribute is used both in the compiler and
1662 -- in the implementation of ASIS queries. The field is left empty for the
1663 -- special labels generated as part of expanding raise statements with a
1664 -- local exception handler.
1666 -- Library_Unit (Node4-Sem)
1667 -- In a stub node, Library_Unit points to the compilation unit node of
1668 -- the corresponding subunit.
1670 -- In a with clause node, Library_Unit points to the spec of the with'ed
1673 -- In a compilation unit node, the usage depends on the unit type:
1675 -- For a library unit body, Library_Unit points to the compilation unit
1676 -- node of the corresponding spec, unless it's a subprogram body with
1677 -- Acts_As_Spec set, in which case it points to itself.
1679 -- For a spec, Library_Unit points to the compilation unit node of the
1680 -- corresponding body, if present. The body will be present if the spec
1681 -- is or contains generics that we needed to instantiate. Similarly, the
1682 -- body will be present if we needed it for inlining purposes. Thus, if
1683 -- we have a spec/body pair, both of which are present, they point to
1684 -- each other via Library_Unit.
1686 -- For a subunit, Library_Unit points to the compilation unit node of
1689 -- Note that this field is not used to hold the parent pointer for child
1690 -- unit (which might in any case need to use it for some other purpose as
1691 -- described above). Instead for a child unit, implicit with's are
1692 -- generated for all parents.
1694 -- Local_Raise_Statements (Elist1)
1695 -- This field is present in exception handler nodes. It is set to
1696 -- No_Elist in the normal case. If there is at least one raise statement
1697 -- which can potentially be handled as a local raise, then this field
1698 -- points to a list of raise nodes, which are calls to a routine to raise
1699 -- an exception. These are raise nodes which can be optimized into gotos
1700 -- if the handler turns out to meet the conditions which permit this
1701 -- transformation. Note that this does NOT include instances of the
1702 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1703 -- handled by the back end (using the N_Push/N_Pop mechanism).
1705 -- Loop_Actions (List2-Sem)
1706 -- A list present in Component_Association nodes in array aggregates.
1707 -- Used to collect actions that must be executed within the loop because
1708 -- they may need to be evaluated anew each time through.
1710 -- Limited_View_Installed (Flag18-Sem)
1711 -- Present in With_Clauses and in package specifications. If set on
1712 -- with_clause, it indicates that this clause has created the current
1713 -- limited view of the designated package. On a package specification, it
1714 -- indicates that the limited view has already been created because the
1715 -- package is mentioned in a limited_with_clause in the closure of the
1716 -- unit being compiled.
1718 -- Local_Raise_Not_OK (Flag7-Sem)
1719 -- Present in N_Exception_Handler nodes. Set if the handler contains
1720 -- a construct (reraise statement, or call to subprogram in package
1721 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1722 -- for a local raise (one that could otherwise be converted to a goto).
1724 -- Must_Be_Byte_Aligned (Flag14-Sem)
1725 -- This flag is present in N_Attribute_Reference nodes. It can be set
1726 -- only for the Address and Unrestricted_Access attributes. If set it
1727 -- means that the object for which the address/access is given must be on
1728 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1729 -- of the object is to be made before taking the address (this copy is in
1730 -- the current scope on the stack frame). This is used for certain cases
1731 -- of code generated by the expander that passes parameters by address.
1733 -- The reason the copy is not made by the front end is that the back end
1734 -- has more information about type layout and may be able to (but is not
1735 -- guaranteed to) prevent making unnecessary copies.
1737 -- Must_Not_Freeze (Flag8-Sem)
1738 -- A flag present in all expression nodes. Normally expressions cause
1739 -- freezing as described in the RM. If this flag is set, then this is
1740 -- inhibited. This is used by the analyzer and expander to label nodes
1741 -- that are created by semantic analysis or expansion and which must not
1742 -- cause freezing even though they normally would. This flag is also
1743 -- present in an N_Subtype_Indication node, since we also use these in
1744 -- calls to Freeze_Expression.
1746 -- Next_Entity (Node2-Sem)
1747 -- Present in defining identifiers, defining character literals and
1748 -- defining operator symbols (i.e. in all entities). The entities of a
1749 -- scope are chained, and this field is used as the forward pointer for
1750 -- this list. See Einfo for further details.
1752 -- Next_Exit_Statement (Node3-Sem)
1753 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
1754 -- chained (in reverse order of appearance) from the First_Exit_Statement
1755 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
1756 -- the next entry on this chain (Empty = end of list).
1758 -- Next_Implicit_With (Node3-Sem)
1759 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1760 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1761 -- to prevent multiple with_clauses for the same unit in a given context.
1762 -- A postorder traversal of the tree whose nodes are units and whose
1763 -- links are with_clauses defines the order in which CodePeer must
1764 -- examine a compiled unit and its full context. This ordering ensures
1765 -- that any subprogram call is examined after the subprogram declaration
1768 -- Next_Named_Actual (Node4-Sem)
1769 -- Present in parameter association nodes. Set during semantic analysis
1770 -- to point to the next named parameter, where parameters are ordered by
1771 -- declaration order (as opposed to the actual order in the call, which
1772 -- may be different due to named associations). Not that this field
1773 -- points to the explicit actual parameter itself, not to the
1774 -- N_Parameter_Association node (its parent).
1776 -- Next_Pragma (Node1-Sem)
1777 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1778 -- nodes. Currently used for two purposes:
1780 -- Create a list of linked Check_Policy pragmas. The head of this list
1781 -- is stored in Opt.Check_Policy_List (which has further details).
1783 -- Used by processing for Pre/Postcondition pragmas to store a list of
1784 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1787 -- Used by processing for pragma SPARK_Mode to store multiple pragmas
1788 -- the apply to the same construct. These are visible/private mode for
1789 -- a package spec and declarative/statement mode for package body.
1791 -- Next_Rep_Item (Node5-Sem)
1792 -- Present in pragma nodes, attribute definition nodes, enumeration rep
1793 -- clauses, record rep clauses, aspect specification nodes. Used to link
1794 -- representation items that apply to an entity. See full description of
1795 -- First_Rep_Item field in Einfo for further details.
1797 -- Next_Use_Clause (Node3-Sem)
1798 -- While use clauses are active during semantic processing, they are
1799 -- chained from the scope stack entry, using Next_Use_Clause as a link
1800 -- pointer, with Empty marking the end of the list. The head pointer is
1801 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1802 -- processing (i.e. when Gigi sees the tree, the contents of this field
1803 -- is undefined and should not be read).
1805 -- No_Ctrl_Actions (Flag7-Sem)
1806 -- Present in N_Assignment_Statement to indicate that no Finalize nor
1807 -- Adjust should take place on this assignment even though the RHS is
1808 -- controlled. Also indicates that the primitive _assign should not be
1809 -- used for a tagged assignment. This is used in init procs and aggregate
1810 -- expansions where the generated assignments are initializations, not
1811 -- real assignments.
1813 -- No_Elaboration_Check (Flag14-Sem)
1814 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1815 -- that no elaboration check is needed on the call, because it appears in
1816 -- the context of a local Suppress pragma. This is used on calls within
1817 -- task bodies, where the actual elaboration checks are applied after
1818 -- analysis, when the local scope stack is not present.
1820 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1821 -- Present in N_With_Clause nodes. Set if the with clause is on the
1822 -- package or subprogram spec where the main unit is the corresponding
1823 -- body, and no entities of the with'ed unit are referenced by the spec
1824 -- (an entity may still be referenced in the body, so this flag is used
1825 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1828 -- No_Initialization (Flag13-Sem)
1829 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1830 -- object must not be initialized (by Initialize or call to an init
1831 -- proc). This is needed for controlled aggregates. When the Object
1832 -- declaration has an expression, this flag means that this expression
1833 -- should not be taken into account (needed for in place initialization
1834 -- with aggregates, and for object with an address clause, which are
1835 -- initialized with an assignment at freeze time).
1837 -- No_Minimize_Eliminate (Flag17-Sem)
1838 -- This flag is present in membership operator nodes (N_In/N_Not_In).
1839 -- It is used to indicate that processing for extended overflow checking
1840 -- modes is not required (this is used to prevent infinite recursion).
1842 -- No_Truncation (Flag17-Sem)
1843 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1844 -- only if the RM_Size of the source is greater than the RM_Size of the
1845 -- target for scalar operands. Normally in such a case we truncate some
1846 -- higher order bits of the source, and then sign/zero extend the result
1847 -- to form the output value. But if this flag is set, then we do not do
1848 -- any truncation, so for example, if an 8 bit input is converted to 5
1849 -- bit result which is in fact stored in 8 bits, then the high order
1850 -- three bits of the target result will be copied from the source. This
1851 -- is used for properly setting out of range values for use by pragmas
1852 -- Initialize_Scalars and Normalize_Scalars.
1854 -- Non_Aliased_Prefix (Flag18-Sem)
1855 -- Present in N_Attribute_Reference nodes. Set only for the case of an
1856 -- Unrestricted_Access reference whose prefix is non-aliased, which is
1857 -- the case that is permitted for Unrestricted_Access except when the
1858 -- expected type is a thin pointer to unconstrained array. This flag is
1859 -- to assist in detecting this illegal use of Unrestricted_Access.
1861 -- Null_Excluding_Subtype (Flag16)
1862 -- Present in N_Access_To_Object_Definition. Indicates that the subtype
1863 -- indication carries a null-exclusion indicator, which is distinct from
1864 -- the null-exclusion indicator that may precede the access keyword.
1866 -- Original_Discriminant (Node2-Sem)
1867 -- Present in identifiers. Used in references to discriminants that
1868 -- appear in generic units. Because the names of the discriminants may be
1869 -- different in an instance, we use this field to recover the position of
1870 -- the discriminant in the original type, and replace it with the
1871 -- discriminant at the same position in the instantiated type.
1873 -- Original_Entity (Node2-Sem)
1874 -- Present in numeric literals. Used to denote the named number that has
1875 -- been constant-folded into the given literal. If literal is from
1876 -- source, or the result of some other constant-folding operation, then
1877 -- Original_Entity is empty. This field is needed to handle properly
1878 -- named numbers in generic units, where the Associated_Node field
1879 -- interferes with the Entity field, making it impossible to preserve the
1880 -- original entity at the point of instantiation (ASIS problem).
1882 -- Others_Discrete_Choices (List1-Sem)
1883 -- When a case statement or variant is analyzed, the semantic checks
1884 -- determine the actual list of choices that correspond to an others
1885 -- choice. This list is materialized for later use by the expander and
1886 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1887 -- this materialized list of choices, which is in standard format for a
1888 -- list of discrete choices, except that of course it cannot contain an
1889 -- N_Others_Choice entry.
1891 -- Parameter_List_Truncated (Flag17-Sem)
1892 -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set
1893 -- (for OpenVMS ports of GNAT only) if the parameter list is truncated
1894 -- as a result of a First_Optional_Parameter specification in one of the
1895 -- pragmas Import_Function, Import_Procedure, or Import_Valued_Procedure.
1896 -- The truncation is done by the expander by removing trailing parameters
1897 -- from the argument list, in accordance with the set of rules allowing
1898 -- such parameter removal. In particular, parameters can be removed
1899 -- working from the end of the parameter list backwards up to and
1900 -- including the entry designated by First_Optional_Parameter in the
1901 -- Import pragma. Parameters can be removed if they are implicit and the
1902 -- default value is known at compile time value, including the use of
1903 -- the Null_Parameter attribute, or if explicit parameter values are
1904 -- present that match the corresponding defaults.
1906 -- Parent_Spec (Node4-Sem)
1907 -- For a library unit that is a child unit spec (package or subprogram
1908 -- declaration, generic declaration or instantiation, or library level
1909 -- rename, this field points to the compilation unit node for the parent
1910 -- package specification. This field is Empty for library bodies (the
1911 -- parent spec in this case can be found from the corresponding spec).
1913 -- Premature_Use (Node5-Sem)
1914 -- Present in N_Incomplete_Type_Declaration node. Used for improved
1915 -- error diagnostics: if there is a premature usage of an incomplete
1916 -- type, a subsequently generated error message indicates the position
1917 -- of its full declaration.
1919 -- Present_Expr (Uint3-Sem)
1920 -- Present in an N_Variant node. This has a meaningful value only after
1921 -- Gigi has back annotated the tree with representation information. At
1922 -- this point, it contains a reference to a gcc expression that depends
1923 -- on the values of one or more discriminants. Give a set of discriminant
1924 -- values, this expression evaluates to False (zero) if variant is not
1925 -- present, and True (non-zero) if it is present. See unit Repinfo for
1926 -- further details on gigi back annotation. This field is used during
1927 -- ASIS processing (data decomposition annex) to determine if a field is
1930 -- Print_In_Hex (Flag13-Sem)
1931 -- Set on an N_Integer_Literal node to indicate that the value should be
1932 -- printed in hexadecimal in the sprint listing. Has no effect on
1933 -- legality or semantics of program, only on the displayed output. This
1934 -- is used to clarify output from the packed array cases.
1936 -- Procedure_To_Call (Node2-Sem)
1937 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1938 -- and N_Extended_Return_Statement nodes. References the entity for the
1939 -- declaration of the procedure to be called to accomplish the required
1940 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1941 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1942 -- allocating the return value), and for the Deallocate procedure in the
1943 -- case of N_Free_Statement.
1945 -- Raises_Constraint_Error (Flag7-Sem)
1946 -- Set on an expression whose evaluation will definitely fail constraint
1947 -- error check. In the case of static expressions, this flag must be set
1948 -- accurately (and if it is set, the expression is typically illegal
1949 -- unless it appears as a non-elaborated branch of a short-circuit form).
1950 -- For a non-static expression, this flag may be set whenever an
1951 -- expression (e.g. an aggregate) is known to raise constraint error. If
1952 -- set, the expression definitely will raise CE if elaborated at runtime.
1953 -- If not set, the expression may or may not raise CE. In other words, on
1954 -- static expressions, the flag is set accurately, on non-static
1955 -- expressions it is set conservatively.
1957 -- Redundant_Use (Flag13-Sem)
1958 -- Present in nodes that can appear as an operand in a use clause or use
1959 -- type clause (identifiers, expanded names, attribute references). Set
1960 -- to indicate that a use is redundant (and therefore need not be undone
1963 -- Renaming_Exception (Node2-Sem)
1964 -- Present in N_Exception_Declaration node. Used to point back to the
1965 -- exception renaming for an exception declared within a subprogram.
1966 -- What happens is that an exception declared in a subprogram is moved
1967 -- to the library level with a unique name, and the original exception
1968 -- becomes a renaming. This link from the library level exception to the
1969 -- renaming declaration allows registering of the proper exception name.
1971 -- Return_Statement_Entity (Node5-Sem)
1972 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1973 -- Points to an E_Return_Statement representing the return statement.
1975 -- Return_Object_Declarations (List3)
1976 -- Present in N_Extended_Return_Statement. Points to a list initially
1977 -- containing a single N_Object_Declaration representing the return
1978 -- object. We use a list (instead of just a pointer to the object decl)
1979 -- because Analyze wants to insert extra actions on this list.
1981 -- Rounded_Result (Flag18-Sem)
1982 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1983 -- Used in the fixed-point cases to indicate that the result must be
1984 -- rounded as a result of the use of the 'Round attribute. Also used for
1985 -- integer N_Op_Divide nodes to indicate that the result should be
1986 -- rounded to the nearest integer (breaking ties away from zero), rather
1987 -- than truncated towards zero as usual. These rounded integer operations
1988 -- are the result of expansion of rounded fixed-point divide, conversion
1989 -- and multiplication operations.
1991 -- SCIL_Entity (Node4-Sem)
1992 -- Present in SCIL nodes. References the specific tagged type associated
1993 -- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
1994 -- the controlling type of the call; for an N_SCIL_Membership_Test node
1995 -- generated as part of testing membership in T'Class, this is T; for an
1996 -- N_SCIL_Dispatch_Table_Tag_Init node, this is the type being declared).
1998 -- SCIL_Controlling_Tag (Node5-Sem)
1999 -- Present in N_SCIL_Dispatching_Call nodes. References the controlling
2000 -- tag of a dispatching call. This is usually an N_Selected_Component
2001 -- node (for a _tag component), but may be an N_Object_Declaration or
2002 -- N_Parameter_Specification node in some cases (e.g., for a call to
2003 -- a classwide streaming operation or a call to an instance of
2004 -- Ada.Tags.Generic_Dispatching_Constructor).
2006 -- SCIL_Tag_Value (Node5-Sem)
2007 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
2008 -- of the value that is being tested.
2010 -- SCIL_Target_Prim (Node2-Sem)
2011 -- Present in N_SCIL_Dispatching_Call nodes. References the primitive
2012 -- operation named (statically) in a dispatching call.
2014 -- Scope (Node3-Sem)
2015 -- Present in defining identifiers, defining character literals and
2016 -- defining operator symbols (i.e. in all entities). The entities of a
2017 -- scope all use this field to reference the corresponding scope entity.
2018 -- See Einfo for further details.
2020 -- Shift_Count_OK (Flag4-Sem)
2021 -- A flag present in shift nodes to indicate that the shift count is
2022 -- known to be in range, i.e. is in the range from zero to word length
2023 -- minus one. If this flag is not set, then the shift count may be
2024 -- outside this range, i.e. larger than the word length, and the code
2025 -- must ensure that such shift counts give the appropriate result.
2027 -- Source_Type (Node1-Sem)
2028 -- Used in an N_Validate_Unchecked_Conversion node to point to the
2029 -- source type entity for the unchecked conversion instantiation
2030 -- which gigi must do size validation for.
2032 -- Split_PPC (Flag17)
2033 -- When a Pre or Post aspect specification is processed, it is broken
2034 -- into AND THEN sections. The left most section has Split_PPC set to
2035 -- False, indicating that it is the original specification (e.g. for
2036 -- posting errors). For other sections, Split_PPC is set to True.
2037 -- This flag is set in both the N_Aspect_Specification node itself,
2038 -- and in the pragma which is generated from this node.
2040 -- Storage_Pool (Node1-Sem)
2041 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2042 -- and N_Extended_Return_Statement nodes. References the entity for the
2043 -- storage pool to be used for the allocate or free call or for the
2044 -- allocation of the returned value from function. Empty indicates that
2045 -- the global default pool is to be used. Note that in the case
2046 -- of a return statement, this field is set only if the function returns
2047 -- value of a type whose size is not known at compile time on the
2050 -- Suppress_Assignment_Checks (Flag18-Sem)
2051 -- Used in generated N_Assignment_Statement nodes to suppress predicate
2052 -- and range checks in cases where the generated code knows that the
2053 -- value being assigned is in range and satisfies any predicate. Also
2054 -- can be set in N_Object_Declaration nodes, to similarly suppress any
2055 -- checks on the initializing value.
2057 -- Suppress_Loop_Warnings (Flag17-Sem)
2058 -- Used in N_Loop_Statement node to indicate that warnings within the
2059 -- body of the loop should be suppressed. This is set when the range
2060 -- of a FOR loop is known to be null, or is probably null (loop would
2061 -- only execute if invalid values are present).
2063 -- Target_Type (Node2-Sem)
2064 -- Used in an N_Validate_Unchecked_Conversion node to point to the target
2065 -- type entity for the unchecked conversion instantiation which gigi must
2066 -- do size validation for.
2068 -- Then_Actions (List3-Sem)
2069 -- This field is present in if expression nodes. During code expansion
2070 -- we use the Insert_Actions procedure (in Exp_Util) to insert actions
2071 -- at an appropriate place in the tree to get elaborated at the right
2072 -- time. For if expressions, we have to be sure that the actions for
2073 -- for the Then branch are only elaborated if the condition is True.
2074 -- The Then_Actions field is used as a temporary parking place for
2075 -- these actions. The final tree is always rewritten to eliminate the
2076 -- need for this field, so in the tree passed to Gigi, this field is
2077 -- always set to No_List.
2079 -- Treat_Fixed_As_Integer (Flag14-Sem)
2080 -- This flag appears in operator nodes for divide, multiply, mod and rem
2081 -- on fixed-point operands. It indicates that the operands are to be
2082 -- treated as integer values, ignoring small values. This flag is only
2083 -- set as a result of expansion of fixed-point operations. Typically a
2084 -- fixed-point multiplication in the source generates subsidiary
2085 -- multiplication and division operations that work with the underlying
2086 -- integer values and have this flag set. Note that this flag is not
2087 -- needed on other arithmetic operations (add, neg, subtract etc.) since
2088 -- in these cases it is always the case that fixed is treated as integer.
2089 -- The Etype field MUST be set if this flag is set. The analyzer knows to
2090 -- leave such nodes alone, and whoever makes them must set the correct
2093 -- TSS_Elist (Elist3-Sem)
2094 -- Present in N_Freeze_Entity nodes. Holds an element list containing
2095 -- entries for each TSS (type support subprogram) associated with the
2096 -- frozen type. The elements of the list are the entities for the
2097 -- subprograms (see package Exp_TSS for further details). Set to No_Elist
2098 -- if there are no type support subprograms for the type or if the freeze
2099 -- node is not for a type.
2101 -- Uneval_Old_Accept (Flag7-Sem)
2102 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'A'
2103 -- (accept) at the point where the pragma is encountered (including the
2104 -- case of a pragma generated from an aspect specification). It is this
2105 -- setting that is relevant, rather than the setting at the point where
2106 -- a contract is finally analyzed after the delay till the freeze point.
2108 -- Uneval_Old_Warn (Flag18-Sem)
2109 -- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'W'
2110 -- (warn) at the point where the pragma is encountered (including the
2111 -- case of a pragma generated from an aspect specification). It is this
2112 -- setting that is relevant, rather than the setting at the point where
2113 -- a contract is finally analyzed after the delay till the freeze point.
2115 -- Unreferenced_In_Spec (Flag7-Sem)
2116 -- Present in N_With_Clause nodes. Set if the with clause is on the
2117 -- package or subprogram spec where the main unit is the corresponding
2118 -- body, and is not referenced by the spec (it may still be referenced by
2119 -- the body, so this flag is used to generate the proper message (see
2120 -- Sem_Util.Check_Unused_Withs for details)
2122 -- Uninitialized_Variable (Node3-Sem)
2123 -- Present in N_Formal_Private_Type_Definition and in N_Private_
2124 -- Extension_Declarations. Indicates that a variable in a generic unit
2125 -- whose type is a formal private or derived type is read without being
2126 -- initialized. Used to warn if the corresponding actual type is not
2127 -- a fully initialized type.
2129 -- Used_Operations (Elist5-Sem)
2130 -- Present in N_Use_Type_Clause nodes. Holds the list of operations that
2131 -- are made potentially use-visible by the clause. Simplifies processing
2132 -- on exit from the scope of the use_type_clause, in particular in the
2133 -- case of Use_All_Type, when those operations several scopes.
2135 -- Was_Originally_Stub (Flag13-Sem)
2136 -- This flag is set in the node for a proper body that replaces stub.
2137 -- During the analysis procedure, stubs in some situations get rewritten
2138 -- by the corresponding bodies, and we set this flag to remember that
2139 -- this happened. Note that it is not good enough to rely on the use of
2140 -- Original_Node here because of the case of nested instantiations where
2141 -- the substituted node can be copied.
2143 -- Withed_Body (Node1-Sem)
2144 -- Present in N_With_Clause nodes. Set if the unit in whose context
2145 -- the with_clause appears instantiates a generic contained in the
2146 -- library unit of the with_clause and as a result loads its body.
2147 -- Used for a more precise unit traversal for CodePeer.
2149 --------------------------------------------------
2150 -- Note on Use of End_Label and End_Span Fields --
2151 --------------------------------------------------
2153 -- Several constructs have end lines:
2155 -- Loop Statement end loop [loop_IDENTIFIER];
2156 -- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
2157 -- Task Definition end [task_IDENTIFIER]
2158 -- Protected Definition end [protected_IDENTIFIER]
2159 -- Protected Body end [protected_IDENTIFIER]
2161 -- Block Statement end [block_IDENTIFIER];
2162 -- Subprogram Body end [DESIGNATOR];
2163 -- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
2164 -- Task Body end [task_IDENTIFIER];
2165 -- Accept Statement end [entry_IDENTIFIER]];
2166 -- Entry Body end [entry_IDENTIFIER];
2168 -- If Statement end if;
2169 -- Case Statement end case;
2171 -- Record Definition end record;
2172 -- Enumeration Definition );
2174 -- The End_Label and End_Span fields are used to mark the locations of
2175 -- these lines, and also keep track of the label in the case where a label
2178 -- For the first group above, the End_Label field of the corresponding node
2179 -- is used to point to the label identifier. In the case where there is no
2180 -- label in the source, the parser supplies a dummy identifier (with
2181 -- Comes_From_Source set to False), and the Sloc of this dummy identifier
2182 -- marks the location of the token following the END token.
2184 -- For the second group, the use of End_Label is similar, but the End_Label
2185 -- is found in the N_Handled_Sequence_Of_Statements node. This is done
2186 -- simply because in some cases there is no room in the parent node.
2188 -- For the third group, there is never any label, and instead of using
2189 -- End_Label, we use the End_Span field which gives the location of the
2190 -- token following END, relative to the starting Sloc of the construct,
2191 -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
2192 -- following the End_Label.
2194 -- The record definition case is handled specially, we treat it as though
2195 -- it required an optional label which is never present, and so the parser
2196 -- always builds a dummy identifier with Comes From Source set False. The
2197 -- reason we do this, rather than using End_Span in this case, is that we
2198 -- want to generate a cross-ref entry for the end of a record, since it
2199 -- represents a scope for name declaration purposes.
2201 -- The enumeration definition case is handled in an exactly similar manner,
2202 -- building a dummy identifier to get a cross-reference.
2204 -- Note: the reason we store the difference as a Uint, instead of storing
2205 -- the Source_Ptr value directly, is that Source_Ptr values cannot be
2206 -- distinguished from other types of values, and we count on all general
2207 -- use fields being self describing. To make things easier for clients,
2208 -- note that we provide function End_Location, and procedure
2209 -- Set_End_Location to allow access to the logical value (which is the
2210 -- Source_Ptr value for the end token).
2212 ---------------------
2213 -- Syntactic Nodes --
2214 ---------------------
2216 ---------------------
2217 -- 2.3 Identifier --
2218 ---------------------
2220 -- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
2221 -- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
2223 -- An IDENTIFIER shall not be a reserved word
2225 -- In the Ada grammar identifiers are the bottom level tokens which have
2226 -- very few semantics. Actual program identifiers are direct names. If
2227 -- we were being 100% honest with the grammar, then we would have a node
2228 -- called N_Direct_Name which would point to an identifier. However,
2229 -- that's too many extra nodes, so we just use the N_Identifier node
2230 -- directly as a direct name, and it contains the expression fields and
2231 -- Entity field that correspond to its use as a direct name. In those
2232 -- few cases where identifiers appear in contexts where they are not
2233 -- direct names (pragmas, pragma argument associations, attribute
2234 -- references and attribute definition clauses), the Chars field of the
2235 -- node contains the Name_Id for the identifier name.
2237 -- Note: in GNAT, a reserved word can be treated as an identifier in two
2238 -- cases. First, an incorrect use of a reserved word as an identifier is
2239 -- diagnosed and then treated as a normal identifier. Second, an
2240 -- attribute designator of the form of a reserved word (access, delta,
2241 -- digits, range) is treated as an identifier.
2243 -- Note: The set of letters that is permitted in an identifier depends
2244 -- on the character set in use. See package Csets for full details.
2247 -- Sloc points to identifier
2248 -- Chars (Name1) contains the Name_Id for the identifier
2249 -- Entity (Node4-Sem)
2250 -- Associated_Node (Node4-Sem)
2251 -- Original_Discriminant (Node2-Sem)
2252 -- Redundant_Use (Flag13-Sem)
2253 -- Atomic_Sync_Required (Flag14-Sem)
2254 -- Has_Private_View (Flag11-Sem) (set in generic units)
2255 -- plus fields for expression
2257 --------------------------
2258 -- 2.4 Numeric Literal --
2259 --------------------------
2261 -- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
2263 ----------------------------
2264 -- 2.4.1 Decimal Literal --
2265 ----------------------------
2267 -- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
2269 -- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
2271 -- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
2273 -- Decimal literals appear in the tree as either integer literal nodes
2274 -- or real literal nodes, depending on whether a period is present.
2276 -- Note: literal nodes appear as a result of direct use of literals
2277 -- in the source program, and also as the result of evaluating
2278 -- expressions at compile time. In the latter case, it is possible
2279 -- to construct real literals that have no syntactic representation
2280 -- using the standard literal format. Such literals are listed by
2281 -- Sprint using the notation [numerator / denominator].
2283 -- Note: the value of an integer literal node created by the front end
2284 -- is never outside the range of values of the base type. However, it
2285 -- can be the case that the created value is outside the range of the
2286 -- particular subtype. This happens in the case of integer overflows
2287 -- with checks suppressed.
2289 -- N_Integer_Literal
2290 -- Sloc points to literal
2291 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2292 -- has been constant-folded into its literal value.
2293 -- Intval (Uint3) contains integer value of literal
2294 -- plus fields for expression
2295 -- Print_In_Hex (Flag13-Sem)
2298 -- Sloc points to literal
2299 -- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
2300 -- has been constant-folded into its literal value.
2301 -- Realval (Ureal3) contains real value of literal
2302 -- Corresponding_Integer_Value (Uint4-Sem)
2303 -- Is_Machine_Number (Flag11-Sem)
2304 -- plus fields for expression
2306 --------------------------
2307 -- 2.4.2 Based Literal --
2308 --------------------------
2310 -- BASED_LITERAL ::=
2311 -- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
2315 -- BASED_NUMERAL ::=
2316 -- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
2318 -- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
2320 -- Based literals appear in the tree as either integer literal nodes
2321 -- or real literal nodes, depending on whether a period is present.
2323 ----------------------------
2324 -- 2.5 Character Literal --
2325 ----------------------------
2327 -- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
2329 -- N_Character_Literal
2330 -- Sloc points to literal
2331 -- Chars (Name1) contains the Name_Id for the identifier
2332 -- Char_Literal_Value (Uint2) contains the literal value
2333 -- Entity (Node4-Sem)
2334 -- Associated_Node (Node4-Sem)
2335 -- Has_Private_View (Flag11-Sem) set in generic units.
2336 -- plus fields for expression
2338 -- Note: the Entity field will be missing (set to Empty) for character
2339 -- literals whose type is Standard.Wide_Character or Standard.Character
2340 -- or a type derived from one of these two. In this case the character
2341 -- literal stands for its own coding. The reason we take this irregular
2342 -- short cut is to avoid the need to build lots of junk defining
2343 -- character literal nodes.
2345 -------------------------
2346 -- 2.6 String Literal --
2347 -------------------------
2349 -- STRING LITERAL ::= "{STRING_ELEMENT}"
2351 -- A STRING_ELEMENT is either a pair of quotation marks ("), or a
2352 -- single GRAPHIC_CHARACTER other than a quotation mark.
2354 -- Is_Folded_In_Parser is True if the parser created this literal by
2355 -- folding a sequence of "&" operators. For example, if the source code
2356 -- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
2357 -- is set. This flag is needed because the parser doesn't know about
2358 -- visibility, so the folded result might be wrong, and semantic
2359 -- analysis needs to check for that.
2362 -- Sloc points to literal
2363 -- Strval (Str3) contains Id of string value
2364 -- Has_Wide_Character (Flag11-Sem)
2365 -- Has_Wide_Wide_Character (Flag13-Sem)
2366 -- Is_Folded_In_Parser (Flag4)
2367 -- plus fields for expression
2373 -- A COMMENT starts with two adjacent hyphens and extends up to the
2374 -- end of the line. A COMMENT may appear on any line of a program.
2376 -- Comments are skipped by the scanner and do not appear in the tree.
2377 -- It is possible to reconstruct the position of comments with respect
2378 -- to the elements of the tree by using the source position (Sloc)
2379 -- pointers that appear in every tree node.
2385 -- PRAGMA ::= pragma IDENTIFIER
2386 -- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
2388 -- Note that a pragma may appear in the tree anywhere a declaration
2389 -- or a statement may appear, as well as in some other situations
2390 -- which are explicitly documented.
2393 -- Sloc points to PRAGMA
2394 -- Next_Pragma (Node1-Sem)
2395 -- Pragma_Argument_Associations (List2) (set to No_List if none)
2396 -- Corresponding_Aspect (Node3-Sem) (set to Empty if not present)
2397 -- Pragma_Identifier (Node4)
2398 -- Next_Rep_Item (Node5-Sem)
2399 -- Class_Present (Flag6) set if from Aspect with 'Class
2400 -- From_Aspect_Specification (Flag13-Sem)
2401 -- Is_Delayed_Aspect (Flag14-Sem)
2402 -- Is_Disabled (Flag15-Sem)
2403 -- Is_Ignored (Flag9-Sem)
2404 -- Is_Checked (Flag11-Sem)
2405 -- Import_Interface_Present (Flag16-Sem)
2406 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2407 -- Uneval_Old_Accept (Flag7-Sem)
2408 -- Uneval_Old_Warn (Flag18-Sem)
2410 -- Note: we should have a section on what pragmas are passed on to
2411 -- the back end to be processed. This section should note that pragma
2412 -- Psect_Object is always converted to Common_Object, but there are
2413 -- undoubtedly many other similar notes required ???
2415 -- Note: a utility function Pragma_Name may be applied to pragma nodes
2416 -- to conveniently obtain the Chars field of the Pragma_Identifier.
2418 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2419 -- aspect name, as does the Pragma_Identifier. In this case if the
2420 -- pragma has a local name argument (such as pragma Inline), it is
2421 -- resolved to point to the specific entity affected by the pragma.
2423 --------------------------------------
2424 -- 2.8 Pragma Argument Association --
2425 --------------------------------------
2427 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2428 -- [pragma_argument_IDENTIFIER =>] NAME
2429 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2431 -- In Ada 2012, there are two more possibilities:
2433 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2434 -- [pragma_argument_ASPECT_MARK =>] NAME
2435 -- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
2437 -- where the interesting allowed cases (which do not fit the syntax of
2438 -- the first alternative above) are
2440 -- ASPECT_MARK => Pre'Class |
2442 -- Type_Invariant'Class |
2445 -- We allow this special usage in all Ada modes, but it would be a
2446 -- pain to allow these aspects to pervade the pragma syntax, and the
2447 -- representation of pragma nodes internally. So what we do is to
2448 -- replace these ASPECT_MARK forms with identifiers whose name is one
2449 -- of the special internal names _Pre, _Post or _Type_Invariant.
2451 -- We do a similar replacement of these Aspect_Mark forms in the
2452 -- Expression of a pragma argument association for the cases of
2453 -- the first arguments of any Check pragmas and Check_Policy pragmas
2455 -- N_Pragma_Argument_Association
2456 -- Sloc points to first token in association
2457 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2458 -- Expression (Node3)
2460 ------------------------
2461 -- 2.9 Reserved Word --
2462 ------------------------
2464 -- Reserved words are parsed by the scanner, and returned as the
2465 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2467 ----------------------------
2468 -- 3.1 Basic Declaration --
2469 ----------------------------
2471 -- BASIC_DECLARATION ::=
2472 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2473 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2474 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2475 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2476 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2477 -- | GENERIC_INSTANTIATION
2479 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2480 -- see further description in section on semantic nodes.
2482 -- Also, in the tree that is constructed, a pragma may appear
2483 -- anywhere that a declaration may appear.
2485 ------------------------------
2486 -- 3.1 Defining Identifier --
2487 ------------------------------
2489 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2491 -- A defining identifier is an entity, which has additional fields
2492 -- depending on the setting of the Ekind field. These additional
2493 -- fields are defined (and access subprograms declared) in package
2496 -- Note: N_Defining_Identifier is an extended node whose fields are
2497 -- deliberate layed out to match the layout of fields in an ordinary
2498 -- N_Identifier node allowing for easy alteration of an identifier
2499 -- node into a defining identifier node. For details, see procedure
2500 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2502 -- N_Defining_Identifier
2503 -- Sloc points to identifier
2504 -- Chars (Name1) contains the Name_Id for the identifier
2505 -- Next_Entity (Node2-Sem)
2506 -- Scope (Node3-Sem)
2507 -- Etype (Node5-Sem)
2509 -----------------------------
2510 -- 3.2.1 Type Declaration --
2511 -----------------------------
2513 -- TYPE_DECLARATION ::=
2514 -- FULL_TYPE_DECLARATION
2515 -- | INCOMPLETE_TYPE_DECLARATION
2516 -- | PRIVATE_TYPE_DECLARATION
2517 -- | PRIVATE_EXTENSION_DECLARATION
2519 ----------------------------------
2520 -- 3.2.1 Full Type Declaration --
2521 ----------------------------------
2523 -- FULL_TYPE_DECLARATION ::=
2524 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2525 -- is TYPE_DEFINITION
2526 -- [ASPECT_SPECIFICATIONS];
2527 -- | TASK_TYPE_DECLARATION
2528 -- | PROTECTED_TYPE_DECLARATION
2530 -- The full type declaration node is used only for the first case. The
2531 -- second case (concurrent type declaration), is represented directly
2532 -- by a task type declaration or a protected type declaration.
2534 -- N_Full_Type_Declaration
2535 -- Sloc points to TYPE
2536 -- Defining_Identifier (Node1)
2537 -- Incomplete_View (Node2-Sem)
2538 -- Discriminant_Specifications (List4) (set to No_List if none)
2539 -- Type_Definition (Node3)
2540 -- Discr_Check_Funcs_Built (Flag11-Sem)
2542 ----------------------------
2543 -- 3.2.1 Type Definition --
2544 ----------------------------
2546 -- TYPE_DEFINITION ::=
2547 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2548 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2549 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2550 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2552 --------------------------------
2553 -- 3.2.2 Subtype Declaration --
2554 --------------------------------
2556 -- SUBTYPE_DECLARATION ::=
2557 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
2558 -- [ASPECT_SPECIFICATIONS];
2560 -- The subtype indication field is set to Empty for subtypes
2561 -- declared in package Standard (Positive, Natural).
2563 -- N_Subtype_Declaration
2564 -- Sloc points to SUBTYPE
2565 -- Defining_Identifier (Node1)
2566 -- Null_Exclusion_Present (Flag11)
2567 -- Subtype_Indication (Node5)
2568 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2569 -- Exception_Junk (Flag8-Sem)
2570 -- Has_Dynamic_Range_Check (Flag12-Sem)
2572 -------------------------------
2573 -- 3.2.2 Subtype Indication --
2574 -------------------------------
2576 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2578 -- Note: if no constraint is present, the subtype indication appears
2579 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2580 -- node is used only if a constraint is present.
2582 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2583 -- with the null-exclusion part (see AI-231), we had to introduce a new
2584 -- attribute in all the parents of subtype_indication nodes to indicate
2585 -- if the null-exclusion is present.
2587 -- Note: the reason that this node has expression fields is that a
2588 -- subtype indication can appear as an operand of a membership test.
2590 -- N_Subtype_Indication
2591 -- Sloc points to first token of subtype mark
2592 -- Subtype_Mark (Node4)
2593 -- Constraint (Node3)
2594 -- Etype (Node5-Sem)
2595 -- Must_Not_Freeze (Flag8-Sem)
2597 -- Note: Depending on context, the Etype is either the entity of the
2598 -- Subtype_Mark field, or it is an itype constructed to reify the
2599 -- subtype indication. In particular, such itypes are created for a
2600 -- subtype indication that appears in an array type declaration. This
2601 -- simplifies constraint checking in indexed components.
2603 -- For subtype indications that appear in scalar type and subtype
2604 -- declarations, the Etype is the entity of the subtype mark.
2606 -------------------------
2607 -- 3.2.2 Subtype Mark --
2608 -------------------------
2610 -- SUBTYPE_MARK ::= subtype_NAME
2612 -----------------------
2613 -- 3.2.2 Constraint --
2614 -----------------------
2616 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2618 ------------------------------
2619 -- 3.2.2 Scalar Constraint --
2620 ------------------------------
2622 -- SCALAR_CONSTRAINT ::=
2623 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2625 ---------------------------------
2626 -- 3.2.2 Composite Constraint --
2627 ---------------------------------
2629 -- COMPOSITE_CONSTRAINT ::=
2630 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2632 -------------------------------
2633 -- 3.3.1 Object Declaration --
2634 -------------------------------
2636 -- OBJECT_DECLARATION ::=
2637 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2638 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2639 -- [ASPECT_SPECIFICATIONS];
2640 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2641 -- ACCESS_DEFINITION [:= EXPRESSION]
2642 -- [ASPECT_SPECIFICATIONS];
2643 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2644 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2645 -- [ASPECT_SPECIFICATIONS];
2646 -- | SINGLE_TASK_DECLARATION
2647 -- | SINGLE_PROTECTED_DECLARATION
2649 -- Note: aliased is not permitted in Ada 83 mode
2651 -- The N_Object_Declaration node is only for the first two cases.
2652 -- Single task declaration is handled by P_Task (9.1)
2653 -- Single protected declaration is handled by P_protected (9.5)
2655 -- Although the syntax allows multiple identifiers in the list, the
2656 -- semantics is as though successive declarations were given with
2657 -- identical type definition and expression components. To simplify
2658 -- semantic processing, the parser represents a multiple declaration
2659 -- case as a sequence of single declarations, using the More_Ids and
2660 -- Prev_Ids flags to preserve the original source form as described
2661 -- in the section on "Handling of Defining Identifier Lists".
2663 -- The flag Has_Init_Expression is set if an initializing expression
2664 -- is present. Normally it is set if and only if Expression contains
2665 -- a non-empty value, but there is an exception to this. When the
2666 -- initializing expression is an aggregate which requires explicit
2667 -- assignments, the Expression field gets set to Empty, but this flag
2668 -- is still set, so we don't forget we had an initializing expression.
2670 -- Note: if a range check is required for the initialization
2671 -- expression then the Do_Range_Check flag is set in the Expression,
2672 -- with the check being done against the type given by the object
2673 -- definition, which is also the Etype of the defining identifier.
2675 -- Note: the contents of the Expression field must be ignored (i.e.
2676 -- treated as though it were Empty) if No_Initialization is set True.
2678 -- Note: the back end places some restrictions on the form of the
2679 -- Expression field. If the object being declared is Atomic, then
2680 -- the Expression may not have the form of an aggregate (since this
2681 -- might cause the back end to generate separate assignments). In this
2682 -- case the front end must generate an extra temporary and initialize
2683 -- this temporary as required (the temporary itself is not atomic).
2685 -- Note: there is not node kind for object definition. Instead, the
2686 -- corresponding field holds a subtype indication, an array type
2687 -- definition, or (Ada 2005, AI-406) an access definition.
2689 -- N_Object_Declaration
2690 -- Sloc points to first identifier
2691 -- Defining_Identifier (Node1)
2692 -- Aliased_Present (Flag4)
2693 -- Constant_Present (Flag17) set if CONSTANT appears
2694 -- Null_Exclusion_Present (Flag11)
2695 -- Object_Definition (Node4) subtype indic./array type def./access def.
2696 -- Expression (Node3) (set to Empty if not present)
2697 -- Handler_List_Entry (Node2-Sem)
2698 -- Corresponding_Generic_Association (Node5-Sem)
2699 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2700 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2701 -- No_Initialization (Flag13-Sem)
2702 -- Assignment_OK (Flag15-Sem)
2703 -- Exception_Junk (Flag8-Sem)
2704 -- Is_Subprogram_Descriptor (Flag16-Sem)
2705 -- Has_Init_Expression (Flag14)
2706 -- Suppress_Assignment_Checks (Flag18-Sem)
2708 -------------------------------------
2709 -- 3.3.1 Defining Identifier List --
2710 -------------------------------------
2712 -- DEFINING_IDENTIFIER_LIST ::=
2713 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2715 -------------------------------
2716 -- 3.3.2 Number Declaration --
2717 -------------------------------
2719 -- NUMBER_DECLARATION ::=
2720 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2722 -- Although the syntax allows multiple identifiers in the list, the
2723 -- semantics is as though successive declarations were given with
2724 -- identical expressions. To simplify semantic processing, the parser
2725 -- represents a multiple declaration case as a sequence of single
2726 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2727 -- the original source form as described in the section on "Handling
2728 -- of Defining Identifier Lists".
2730 -- N_Number_Declaration
2731 -- Sloc points to first identifier
2732 -- Defining_Identifier (Node1)
2733 -- Expression (Node3)
2734 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2735 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2737 ----------------------------------
2738 -- 3.4 Derived Type Definition --
2739 ----------------------------------
2741 -- DERIVED_TYPE_DEFINITION ::=
2742 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2743 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2745 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2748 -- Note: a record extension part is required if ABSTRACT is present
2750 -- N_Derived_Type_Definition
2751 -- Sloc points to NEW
2752 -- Abstract_Present (Flag4)
2753 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2754 -- Subtype_Indication (Node5)
2755 -- Record_Extension_Part (Node3) (set to Empty if not present)
2756 -- Limited_Present (Flag17)
2757 -- Task_Present (Flag5) set in task interfaces
2758 -- Protected_Present (Flag6) set in protected interfaces
2759 -- Synchronized_Present (Flag7) set in interfaces
2760 -- Interface_List (List2) (set to No_List if none)
2761 -- Interface_Present (Flag16) set in abstract interfaces
2763 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2764 -- Interface_List, and Interface_Present are used for abstract
2765 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2767 ---------------------------
2768 -- 3.5 Range Constraint --
2769 ---------------------------
2771 -- RANGE_CONSTRAINT ::= range RANGE
2773 -- N_Range_Constraint
2774 -- Sloc points to RANGE
2775 -- Range_Expression (Node4)
2782 -- RANGE_ATTRIBUTE_REFERENCE
2783 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2785 -- Note: the case of a range given as a range attribute reference
2786 -- appears directly in the tree as an attribute reference.
2788 -- Note: the field name for a reference to a range is Range_Expression
2789 -- rather than Range, because range is a reserved keyword in Ada.
2791 -- Note: the reason that this node has expression fields is that a
2792 -- range can appear as an operand of a membership test. The Etype
2793 -- field is the type of the range (we do NOT construct an implicit
2794 -- subtype to represent the range exactly).
2797 -- Sloc points to ..
2798 -- Low_Bound (Node1)
2799 -- High_Bound (Node2)
2800 -- Includes_Infinities (Flag11)
2801 -- plus fields for expression
2803 -- Note: if the range appears in a context, such as a subtype
2804 -- declaration, where range checks are required on one or both of
2805 -- the expression fields, then type conversion nodes are inserted
2806 -- to represent the required checks.
2808 ----------------------------------------
2809 -- 3.5.1 Enumeration Type Definition --
2810 ----------------------------------------
2812 -- ENUMERATION_TYPE_DEFINITION ::=
2813 -- (ENUMERATION_LITERAL_SPECIFICATION
2814 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2816 -- Note: the Literals field in the node described below is null for
2817 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2818 -- which special processing handles these types as special cases.
2820 -- N_Enumeration_Type_Definition
2821 -- Sloc points to left parenthesis
2822 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2823 -- End_Label (Node4) (set to Empty if internally generated record)
2825 ----------------------------------------------
2826 -- 3.5.1 Enumeration Literal Specification --
2827 ----------------------------------------------
2829 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2830 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2832 ---------------------------------------
2833 -- 3.5.1 Defining Character Literal --
2834 ---------------------------------------
2836 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2838 -- A defining character literal is an entity, which has additional
2839 -- fields depending on the setting of the Ekind field. These
2840 -- additional fields are defined (and access subprograms declared)
2841 -- in package Einfo.
2843 -- Note: N_Defining_Character_Literal is an extended node whose fields
2844 -- are deliberate layed out to match the layout of fields in an ordinary
2845 -- N_Character_Literal node allowing for easy alteration of a character
2846 -- literal node into a defining character literal node. For details, see
2847 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2849 -- N_Defining_Character_Literal
2850 -- Sloc points to literal
2851 -- Chars (Name1) contains the Name_Id for the identifier
2852 -- Next_Entity (Node2-Sem)
2853 -- Scope (Node3-Sem)
2854 -- Etype (Node5-Sem)
2856 ------------------------------------
2857 -- 3.5.4 Integer Type Definition --
2858 ------------------------------------
2860 -- Note: there is an error in this rule in the latest version of the
2861 -- grammar, so we have retained the old rule pending clarification.
2863 -- INTEGER_TYPE_DEFINITION ::=
2864 -- SIGNED_INTEGER_TYPE_DEFINITION
2865 -- | MODULAR_TYPE_DEFINITION
2867 -------------------------------------------
2868 -- 3.5.4 Signed Integer Type Definition --
2869 -------------------------------------------
2871 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2872 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2874 -- Note: the Low_Bound and High_Bound fields are set to Empty
2875 -- for integer types defined in package Standard.
2877 -- N_Signed_Integer_Type_Definition
2878 -- Sloc points to RANGE
2879 -- Low_Bound (Node1)
2880 -- High_Bound (Node2)
2882 ------------------------------------
2883 -- 3.5.4 Modular Type Definition --
2884 ------------------------------------
2886 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2888 -- N_Modular_Type_Definition
2889 -- Sloc points to MOD
2890 -- Expression (Node3)
2892 ---------------------------------
2893 -- 3.5.6 Real Type Definition --
2894 ---------------------------------
2896 -- REAL_TYPE_DEFINITION ::=
2897 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2899 --------------------------------------
2900 -- 3.5.7 Floating Point Definition --
2901 --------------------------------------
2903 -- FLOATING_POINT_DEFINITION ::=
2904 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2906 -- Note: The Digits_Expression and Real_Range_Specifications fields
2907 -- are set to Empty for floating-point types declared in Standard.
2909 -- N_Floating_Point_Definition
2910 -- Sloc points to DIGITS
2911 -- Digits_Expression (Node2)
2912 -- Real_Range_Specification (Node4) (set to Empty if not present)
2914 -------------------------------------
2915 -- 3.5.7 Real Range Specification --
2916 -------------------------------------
2918 -- REAL_RANGE_SPECIFICATION ::=
2919 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2921 -- N_Real_Range_Specification
2922 -- Sloc points to RANGE
2923 -- Low_Bound (Node1)
2924 -- High_Bound (Node2)
2926 -----------------------------------
2927 -- 3.5.9 Fixed Point Definition --
2928 -----------------------------------
2930 -- FIXED_POINT_DEFINITION ::=
2931 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2933 --------------------------------------------
2934 -- 3.5.9 Ordinary Fixed Point Definition --
2935 --------------------------------------------
2937 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2938 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2940 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2942 -- N_Ordinary_Fixed_Point_Definition
2943 -- Sloc points to DELTA
2944 -- Delta_Expression (Node3)
2945 -- Real_Range_Specification (Node4)
2947 -------------------------------------------
2948 -- 3.5.9 Decimal Fixed Point Definition --
2949 -------------------------------------------
2951 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2952 -- delta static_EXPRESSION
2953 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2955 -- Note: decimal types are not permitted in Ada 83 mode
2957 -- N_Decimal_Fixed_Point_Definition
2958 -- Sloc points to DELTA
2959 -- Delta_Expression (Node3)
2960 -- Digits_Expression (Node2)
2961 -- Real_Range_Specification (Node4) (set to Empty if not present)
2963 ------------------------------
2964 -- 3.5.9 Digits Constraint --
2965 ------------------------------
2967 -- DIGITS_CONSTRAINT ::=
2968 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2970 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2971 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2973 -- N_Digits_Constraint
2974 -- Sloc points to DIGITS
2975 -- Digits_Expression (Node2)
2976 -- Range_Constraint (Node4) (set to Empty if not present)
2978 --------------------------------
2979 -- 3.6 Array Type Definition --
2980 --------------------------------
2982 -- ARRAY_TYPE_DEFINITION ::=
2983 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2985 -----------------------------------------
2986 -- 3.6 Unconstrained Array Definition --
2987 -----------------------------------------
2989 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2990 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2991 -- COMPONENT_DEFINITION
2993 -- Note: dimensionality of array is indicated by number of entries in
2994 -- the Subtype_Marks list, which has one entry for each dimension.
2996 -- N_Unconstrained_Array_Definition
2997 -- Sloc points to ARRAY
2998 -- Subtype_Marks (List2)
2999 -- Component_Definition (Node4)
3001 -----------------------------------
3002 -- 3.6 Index Subtype Definition --
3003 -----------------------------------
3005 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
3007 -- There is no explicit node in the tree for an index subtype
3008 -- definition since the N_Unconstrained_Array_Definition node
3009 -- incorporates the type marks which appear in this context.
3011 ---------------------------------------
3012 -- 3.6 Constrained Array Definition --
3013 ---------------------------------------
3015 -- CONSTRAINED_ARRAY_DEFINITION ::=
3016 -- array (DISCRETE_SUBTYPE_DEFINITION
3017 -- {, DISCRETE_SUBTYPE_DEFINITION})
3018 -- of COMPONENT_DEFINITION
3020 -- Note: dimensionality of array is indicated by number of entries
3021 -- in the Discrete_Subtype_Definitions list, which has one entry
3022 -- for each dimension.
3024 -- N_Constrained_Array_Definition
3025 -- Sloc points to ARRAY
3026 -- Discrete_Subtype_Definitions (List2)
3027 -- Component_Definition (Node4)
3029 -- Note: although the language allows the full syntax for discrete
3030 -- subtype definitions (i.e. a discrete subtype indication or a range),
3031 -- in the generated tree, we always rewrite these as N_Range nodes.
3033 --------------------------------------
3034 -- 3.6 Discrete Subtype Definition --
3035 --------------------------------------
3037 -- DISCRETE_SUBTYPE_DEFINITION ::=
3038 -- discrete_SUBTYPE_INDICATION | RANGE
3040 -------------------------------
3041 -- 3.6 Component Definition --
3042 -------------------------------
3044 -- COMPONENT_DEFINITION ::=
3045 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
3047 -- Note: although the syntax does not permit a component definition to
3048 -- be an anonymous array (and the parser will diagnose such an attempt
3049 -- with an appropriate message), it is possible for anonymous arrays
3050 -- to appear as component definitions. The semantics and back end handle
3051 -- this case properly, and the expander in fact generates such cases.
3052 -- Access_Definition is an optional field that gives support to
3053 -- Ada 2005 (AI-230). The parser generates nodes that have either the
3054 -- Subtype_Indication field or else the Access_Definition field.
3056 -- N_Component_Definition
3057 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
3058 -- Aliased_Present (Flag4)
3059 -- Null_Exclusion_Present (Flag11)
3060 -- Subtype_Indication (Node5) (set to Empty if not present)
3061 -- Access_Definition (Node3) (set to Empty if not present)
3063 -----------------------------
3064 -- 3.6.1 Index Constraint --
3065 -----------------------------
3067 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
3069 -- It is not in general possible to distinguish between discriminant
3070 -- constraints and index constraints at parse time, since a simple
3071 -- name could be either the subtype mark of a discrete range, or an
3072 -- expression in a discriminant association with no name. Either
3073 -- entry appears simply as the name, and the semantic parse must
3074 -- distinguish between the two cases. Thus we use a common tree
3075 -- node format for both of these constraint types.
3077 -- See Discriminant_Constraint for format of node
3079 ---------------------------
3080 -- 3.6.1 Discrete Range --
3081 ---------------------------
3083 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
3085 ----------------------------
3086 -- 3.7 Discriminant Part --
3087 ----------------------------
3089 -- DISCRIMINANT_PART ::=
3090 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
3092 ------------------------------------
3093 -- 3.7 Unknown Discriminant Part --
3094 ------------------------------------
3096 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
3098 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
3100 -- There is no explicit node in the tree for an unknown discriminant
3101 -- part. Instead the Unknown_Discriminants_Present flag is set in the
3104 ----------------------------------
3105 -- 3.7 Known Discriminant Part --
3106 ----------------------------------
3108 -- KNOWN_DISCRIMINANT_PART ::=
3109 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
3111 -------------------------------------
3112 -- 3.7 Discriminant Specification --
3113 -------------------------------------
3115 -- DISCRIMINANT_SPECIFICATION ::=
3116 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
3117 -- [:= DEFAULT_EXPRESSION]
3118 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
3119 -- [:= DEFAULT_EXPRESSION]
3121 -- Although the syntax allows multiple identifiers in the list, the
3122 -- semantics is as though successive specifications were given with
3123 -- identical type definition and expression components. To simplify
3124 -- semantic processing, the parser represents a multiple declaration
3125 -- case as a sequence of single specifications, using the More_Ids and
3126 -- Prev_Ids flags to preserve the original source form as described
3127 -- in the section on "Handling of Defining Identifier Lists".
3129 -- N_Discriminant_Specification
3130 -- Sloc points to first identifier
3131 -- Defining_Identifier (Node1)
3132 -- Null_Exclusion_Present (Flag11)
3133 -- Discriminant_Type (Node5) subtype mark or access parameter definition
3134 -- Expression (Node3) (set to Empty if no default expression)
3135 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3136 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3138 -----------------------------
3139 -- 3.7 Default Expression --
3140 -----------------------------
3142 -- DEFAULT_EXPRESSION ::= EXPRESSION
3144 ------------------------------------
3145 -- 3.7.1 Discriminant Constraint --
3146 ------------------------------------
3148 -- DISCRIMINANT_CONSTRAINT ::=
3149 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
3151 -- It is not in general possible to distinguish between discriminant
3152 -- constraints and index constraints at parse time, since a simple
3153 -- name could be either the subtype mark of a discrete range, or an
3154 -- expression in a discriminant association with no name. Either
3155 -- entry appears simply as the name, and the semantic parse must
3156 -- distinguish between the two cases. Thus we use a common tree
3157 -- node format for both of these constraint types.
3159 -- N_Index_Or_Discriminant_Constraint
3160 -- Sloc points to left paren
3161 -- Constraints (List1) points to list of discrete ranges or
3162 -- discriminant associations
3164 -------------------------------------
3165 -- 3.7.1 Discriminant Association --
3166 -------------------------------------
3168 -- DISCRIMINANT_ASSOCIATION ::=
3169 -- [discriminant_SELECTOR_NAME
3170 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
3172 -- Note: a discriminant association that has no selector name list
3173 -- appears directly as an expression in the tree.
3175 -- N_Discriminant_Association
3176 -- Sloc points to first token of discriminant association
3177 -- Selector_Names (List1) (always non-empty, since if no selector
3178 -- names are present, this node is not used, see comment above)
3179 -- Expression (Node3)
3181 ---------------------------------
3182 -- 3.8 Record Type Definition --
3183 ---------------------------------
3185 -- RECORD_TYPE_DEFINITION ::=
3186 -- [[abstract] tagged] [limited] RECORD_DEFINITION
3188 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
3190 -- There is no explicit node in the tree for a record type definition.
3191 -- Instead the flags for Tagged_Present and Limited_Present appear in
3192 -- the N_Record_Definition node for a record definition appearing in
3193 -- the context of a record type definition.
3195 ----------------------------
3196 -- 3.8 Record Definition --
3197 ----------------------------
3199 -- RECORD_DEFINITION ::=
3205 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
3206 -- flags appear only for a record definition appearing in a record
3209 -- Note: the NULL RECORD case is not permitted in Ada 83
3211 -- N_Record_Definition
3212 -- Sloc points to RECORD or NULL
3213 -- End_Label (Node4) (set to Empty if internally generated record)
3214 -- Abstract_Present (Flag4)
3215 -- Tagged_Present (Flag15)
3216 -- Limited_Present (Flag17)
3217 -- Component_List (Node1) empty in null record case
3218 -- Null_Present (Flag13) set in null record case
3219 -- Task_Present (Flag5) set in task interfaces
3220 -- Protected_Present (Flag6) set in protected interfaces
3221 -- Synchronized_Present (Flag7) set in interfaces
3222 -- Interface_Present (Flag16) set in abstract interfaces
3223 -- Interface_List (List2) (set to No_List if none)
3225 -- Note: Task_Present, Protected_Present, Synchronized _Present,
3226 -- Interface_List and Interface_Present are used for abstract
3227 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
3229 -------------------------
3230 -- 3.8 Component List --
3231 -------------------------
3233 -- COMPONENT_LIST ::=
3234 -- COMPONENT_ITEM {COMPONENT_ITEM}
3235 -- | {COMPONENT_ITEM} VARIANT_PART
3239 -- Sloc points to first token of component list
3240 -- Component_Items (List3)
3241 -- Variant_Part (Node4) (set to Empty if no variant part)
3242 -- Null_Present (Flag13)
3244 -------------------------
3245 -- 3.8 Component Item --
3246 -------------------------
3248 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
3250 -- Note: A component item can also be a pragma, and in the tree
3251 -- that is obtained after semantic processing, a component item
3252 -- can be an N_Null node resulting from a non-recognized pragma.
3254 --------------------------------
3255 -- 3.8 Component Declaration --
3256 --------------------------------
3258 -- COMPONENT_DECLARATION ::=
3259 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
3260 -- [:= DEFAULT_EXPRESSION]
3261 -- [ASPECT_SPECIFICATIONS];
3263 -- Note: although the syntax does not permit a component definition to
3264 -- be an anonymous array (and the parser will diagnose such an attempt
3265 -- with an appropriate message), it is possible for anonymous arrays
3266 -- to appear as component definitions. The semantics and back end handle
3267 -- this case properly, and the expander in fact generates such cases.
3269 -- Although the syntax allows multiple identifiers in the list, the
3270 -- semantics is as though successive declarations were given with the
3271 -- same component definition and expression components. To simplify
3272 -- semantic processing, the parser represents a multiple declaration
3273 -- case as a sequence of single declarations, using the More_Ids and
3274 -- Prev_Ids flags to preserve the original source form as described
3275 -- in the section on "Handling of Defining Identifier Lists".
3277 -- N_Component_Declaration
3278 -- Sloc points to first identifier
3279 -- Defining_Identifier (Node1)
3280 -- Component_Definition (Node4)
3281 -- Expression (Node3) (set to Empty if no default expression)
3282 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3283 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3285 -------------------------
3286 -- 3.8.1 Variant Part --
3287 -------------------------
3290 -- case discriminant_DIRECT_NAME is
3291 -- VARIANT {VARIANT}
3294 -- Note: the variants list can contain pragmas as well as variants.
3295 -- In a properly formed program there is at least one variant.
3298 -- Sloc points to CASE
3302 --------------------
3304 --------------------
3307 -- when DISCRETE_CHOICE_LIST =>
3311 -- Sloc points to WHEN
3312 -- Discrete_Choices (List4)
3313 -- Component_List (Node1)
3314 -- Enclosing_Variant (Node2-Sem)
3315 -- Present_Expr (Uint3-Sem)
3316 -- Dcheck_Function (Node5-Sem)
3317 -- Has_SP_Choice (Flag15-Sem)
3319 -- Note: in the list of Discrete_Choices, the tree passed to the back
3320 -- end does not have choice entries corresponding to names of statically
3321 -- predicated subtypes. Such entries are always expanded out to the list
3322 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
3323 -- mode also has this expansion, but done with a proper Rewrite call on
3324 -- the N_Variant node so that ASIS can properly retrieve the original.
3326 ---------------------------------
3327 -- 3.8.1 Discrete Choice List --
3328 ---------------------------------
3330 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
3332 ----------------------------
3333 -- 3.8.1 Discrete Choice --
3334 ----------------------------
3336 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
3338 -- Note: in Ada 83 mode, the expression must be a simple expression
3340 -- The only choice that appears explicitly is the OTHERS choice, as
3341 -- defined here. Other cases of discrete choice (expression and
3342 -- discrete range) appear directly. This production is also used
3343 -- for the OTHERS possibility of an exception choice.
3345 -- Note: in accordance with the syntax, the parser does not check that
3346 -- OTHERS appears at the end on its own in a choice list context. This
3347 -- is a semantic check.
3350 -- Sloc points to OTHERS
3351 -- Others_Discrete_Choices (List1-Sem)
3352 -- All_Others (Flag11-Sem)
3354 ----------------------------------
3355 -- 3.9.1 Record Extension Part --
3356 ----------------------------------
3358 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
3360 -- Note: record extension parts are not permitted in Ada 83 mode
3362 --------------------------------------
3363 -- 3.9.4 Interface Type Definition --
3364 --------------------------------------
3366 -- INTERFACE_TYPE_DEFINITION ::=
3367 -- [limited | task | protected | synchronized]
3368 -- interface [interface_list]
3370 -- Note: Interfaces are implemented with N_Record_Definition and
3371 -- N_Derived_Type_Definition nodes because most of the support
3372 -- for the analysis of abstract types has been reused to
3373 -- analyze abstract interfaces.
3375 ----------------------------------
3376 -- 3.10 Access Type Definition --
3377 ----------------------------------
3379 -- ACCESS_TYPE_DEFINITION ::=
3380 -- ACCESS_TO_OBJECT_DEFINITION
3381 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3383 --------------------------
3384 -- 3.10 Null Exclusion --
3385 --------------------------
3387 -- NULL_EXCLUSION ::= not null
3389 ---------------------------------------
3390 -- 3.10 Access To Object Definition --
3391 ---------------------------------------
3393 -- ACCESS_TO_OBJECT_DEFINITION ::=
3394 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3395 -- SUBTYPE_INDICATION
3397 -- N_Access_To_Object_Definition
3398 -- Sloc points to ACCESS
3399 -- All_Present (Flag15)
3400 -- Null_Exclusion_Present (Flag11)
3401 -- Null_Excluding_Subtype (Flag16)
3402 -- Subtype_Indication (Node5)
3403 -- Constant_Present (Flag17)
3405 -----------------------------------
3406 -- 3.10 General Access Modifier --
3407 -----------------------------------
3409 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3411 -- Note: general access modifiers are not permitted in Ada 83 mode
3413 -- There is no explicit node in the tree for general access modifier.
3414 -- Instead the All_Present or Constant_Present flags are set in the
3417 -------------------------------------------
3418 -- 3.10 Access To Subprogram Definition --
3419 -------------------------------------------
3421 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3422 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3423 -- | [NULL_EXCLUSION] access [protected] function
3424 -- PARAMETER_AND_RESULT_PROFILE
3426 -- Note: access to subprograms are not permitted in Ada 83 mode
3428 -- N_Access_Function_Definition
3429 -- Sloc points to ACCESS
3430 -- Null_Exclusion_Present (Flag11)
3431 -- Null_Exclusion_In_Return_Present (Flag14)
3432 -- Protected_Present (Flag6)
3433 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3434 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3436 -- N_Access_Procedure_Definition
3437 -- Sloc points to ACCESS
3438 -- Null_Exclusion_Present (Flag11)
3439 -- Protected_Present (Flag6)
3440 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3442 -----------------------------
3443 -- 3.10 Access Definition --
3444 -----------------------------
3446 -- ACCESS_DEFINITION ::=
3447 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3448 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3450 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3452 -- N_Access_Definition
3453 -- Sloc points to ACCESS
3454 -- Null_Exclusion_Present (Flag11)
3455 -- All_Present (Flag15)
3456 -- Constant_Present (Flag17)
3457 -- Subtype_Mark (Node4)
3458 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3460 -----------------------------------------
3461 -- 3.10.1 Incomplete Type Declaration --
3462 -----------------------------------------
3464 -- INCOMPLETE_TYPE_DECLARATION ::=
3465 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3467 -- N_Incomplete_Type_Declaration
3468 -- Sloc points to TYPE
3469 -- Defining_Identifier (Node1)
3470 -- Discriminant_Specifications (List4) (set to No_List if no
3471 -- discriminant part, or if the discriminant part is an
3472 -- unknown discriminant part)
3473 -- Premature_Use (Node5-Sem) used for improved diagnostics.
3474 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3475 -- Tagged_Present (Flag15)
3477 ----------------------------
3478 -- 3.11 Declarative Part --
3479 ----------------------------
3481 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3483 -- Note: although the parser enforces the syntactic requirement that
3484 -- a declarative part can contain only declarations, the semantic
3485 -- processing may add statements to the list of actions in a
3486 -- declarative part, so the code generator should be prepared
3487 -- to accept a statement in this position.
3489 ----------------------------
3490 -- 3.11 Declarative Item --
3491 ----------------------------
3493 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3495 ----------------------------------
3496 -- 3.11 Basic Declarative Item --
3497 ----------------------------------
3499 -- BASIC_DECLARATIVE_ITEM ::=
3500 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3506 -- BODY ::= PROPER_BODY | BODY_STUB
3508 -----------------------
3509 -- 3.11 Proper Body --
3510 -----------------------
3513 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3520 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3521 -- | INDEXED_COMPONENT | SLICE
3522 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3523 -- | TYPE_CONVERSION | FUNCTION_CALL
3524 -- | CHARACTER_LITERAL
3526 ----------------------
3527 -- 4.1 Direct Name --
3528 ----------------------
3530 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3536 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3538 -------------------------------
3539 -- 4.1 Explicit Dereference --
3540 -------------------------------
3542 -- EXPLICIT_DEREFERENCE ::= NAME . all
3544 -- N_Explicit_Dereference
3545 -- Sloc points to ALL
3547 -- Actual_Designated_Subtype (Node4-Sem)
3548 -- Atomic_Sync_Required (Flag14-Sem)
3549 -- Has_Dereference_Action (Flag13-Sem)
3550 -- plus fields for expression
3552 -------------------------------
3553 -- 4.1 Implicit Dereference --
3554 -------------------------------
3556 -- IMPLICIT_DEREFERENCE ::= NAME
3558 ------------------------------
3559 -- 4.1.1 Indexed Component --
3560 ------------------------------
3562 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3564 -- Note: the parser may generate this node in some situations where it
3565 -- should be a function call. The semantic pass must correct this
3566 -- misidentification (which is inevitable at the parser level).
3568 -- N_Indexed_Component
3569 -- Sloc contains a copy of the Sloc value of the Prefix
3571 -- Expressions (List1)
3572 -- Generalized_Indexing (Node4-Sem)
3573 -- Atomic_Sync_Required (Flag14-Sem)
3574 -- plus fields for expression
3576 -- Note: if any of the subscripts requires a range check, then the
3577 -- Do_Range_Check flag is set on the corresponding expression, with
3578 -- the index type being determined from the type of the Prefix, which
3579 -- references the array being indexed.
3581 -- Note: in a fully analyzed and expanded indexed component node, and
3582 -- hence in any such node that gigi sees, if the prefix is an access
3583 -- type, then an explicit dereference operation has been inserted.
3589 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3591 -- Note: an implicit subtype is created to describe the resulting
3592 -- type, so that the bounds of this type are the bounds of the slice.
3595 -- Sloc points to first token of prefix
3597 -- Discrete_Range (Node4)
3598 -- plus fields for expression
3600 -------------------------------
3601 -- 4.1.3 Selected Component --
3602 -------------------------------
3604 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3606 -- Note: selected components that are semantically expanded names get
3607 -- changed during semantic processing into the separate N_Expanded_Name
3608 -- node. See description of this node in the section on semantic nodes.
3610 -- N_Selected_Component
3611 -- Sloc points to period
3613 -- Selector_Name (Node2)
3614 -- Associated_Node (Node4-Sem)
3615 -- Do_Discriminant_Check (Flag1-Sem)
3616 -- Is_In_Discriminant_Check (Flag11-Sem)
3617 -- Is_Prefixed_Call (Flag17-Sem)
3618 -- Atomic_Sync_Required (Flag14-Sem)
3619 -- plus fields for expression
3621 --------------------------
3622 -- 4.1.3 Selector Name --
3623 --------------------------
3625 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3627 --------------------------------
3628 -- 4.1.4 Attribute Reference --
3629 --------------------------------
3631 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3633 -- Note: the syntax is quite ambiguous at this point. Consider:
3635 -- A'Length (X) X is part of the attribute designator
3636 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3637 -- A'Class (X) X is the expression of a type conversion
3639 -- It would be possible for the parser to distinguish these cases
3640 -- by looking at the attribute identifier. However, that would mean
3641 -- more work in introducing new implementation defined attributes,
3642 -- and also it would mean that special processing for attributes
3643 -- would be scattered around, instead of being centralized in the
3644 -- semantic routine that handles an N_Attribute_Reference node.
3645 -- Consequently, the parser in all the above cases stores the
3646 -- expression (X in these examples) as a single element list in
3647 -- in the Expressions field of the N_Attribute_Reference node.
3649 -- Similarly, for attributes like Max which take two arguments,
3650 -- we store the two arguments as a two element list in the
3651 -- Expressions field. Of course it is clear at parse time that
3652 -- this case is really a function call with an attribute as the
3653 -- prefix, but it turns out to be convenient to handle the two
3654 -- argument case in a similar manner to the one argument case,
3655 -- and indeed in general the parser will accept any number of
3656 -- expressions in this position and store them as a list in the
3657 -- attribute reference node. This allows for future addition of
3658 -- attributes that take more than two arguments.
3660 -- Note: named associates are not permitted in function calls where
3661 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3662 -- to skip the normal subprogram argument processing.
3664 -- Note: for the attributes whose designators are technically keywords,
3665 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3666 -- the corresponding name, even though no identifier is involved.
3668 -- Note: the generated code may contain stream attributes applied to
3669 -- limited types for which no stream routines exist officially. In such
3670 -- case, the result is to use the stream attribute for the underlying
3671 -- full type, or in the case of a protected type, the components
3672 -- (including any discriminants) are merely streamed in order.
3674 -- See Exp_Attr for a complete description of which attributes are
3675 -- passed onto Gigi, and which are handled entirely by the front end.
3677 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3678 -- a non-standard enumeration type or a nonzero/zero semantics
3679 -- boolean type, so the value is simply the stored representation.
3681 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3682 -- references a subprogram that is a renaming, then the front end must
3683 -- rewrite the attribute to refer directly to the renamed entity.
3685 -- Note: syntactically the prefix of an attribute reference must be a
3686 -- name, and this (somewhat artificial) requirement is enforced by the
3687 -- parser. However, for many attributes, such as 'Valid, it is quite
3688 -- reasonable to apply the attribute to any value, and hence to any
3689 -- expression. Internally in the tree, the prefix is an expression which
3690 -- does not have to be a name, and this is handled fine by the semantic
3691 -- analysis and expansion, and back ends. This arises for the case of
3692 -- attribute references built by the expander (e.g. 'Valid for the case
3693 -- of an implicit validity check).
3695 -- Note: In generated code, the Address and Unrestricted_Access
3696 -- attributes can be applied to any expression, and the meaning is
3697 -- to create an object containing the value (the object is in the
3698 -- current stack frame), and pass the address of this value. If the
3699 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3700 -- is taken must be on a byte (storage unit) boundary, and if it is
3701 -- not (or may not be), then the generated code must create a copy
3702 -- that is byte aligned, and pass the address of this copy.
3704 -- N_Attribute_Reference
3705 -- Sloc points to apostrophe
3706 -- Prefix (Node3) (general expression, see note above)
3707 -- Attribute_Name (Name2) identifier name from attribute designator
3708 -- Expressions (List1) (set to No_List if no associated expressions)
3709 -- Entity (Node4-Sem) used if the attribute yields a type
3710 -- Associated_Node (Node4-Sem)
3711 -- Do_Overflow_Check (Flag17-Sem)
3712 -- Header_Size_Added (Flag11-Sem)
3713 -- Must_Be_Byte_Aligned (Flag14-Sem)
3714 -- Non_Aliased_Prefix (Flag18-Sem)
3715 -- Redundant_Use (Flag13-Sem)
3717 -- plus fields for expression
3719 -- Note: in Modify_Tree_For_C mode, Max and Min attributes are expanded
3720 -- into equivalent if expressions, properly taking care of side effects.
3722 ---------------------------------
3723 -- 4.1.4 Attribute Designator --
3724 ---------------------------------
3726 -- ATTRIBUTE_DESIGNATOR ::=
3727 -- IDENTIFIER [(static_EXPRESSION)]
3728 -- | access | delta | digits
3730 -- There is no explicit node in the tree for an attribute designator.
3731 -- Instead the Attribute_Name and Expressions fields of the parent
3732 -- node (N_Attribute_Reference node) hold the information.
3734 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3735 -- designator, then they are treated as identifiers internally
3736 -- rather than the keywords of the same name.
3738 --------------------------------------
3739 -- 4.1.4 Range Attribute Reference --
3740 --------------------------------------
3742 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3744 -- A range attribute reference is represented in the tree using the
3745 -- normal N_Attribute_Reference node.
3747 ---------------------------------------
3748 -- 4.1.4 Range Attribute Designator --
3749 ---------------------------------------
3751 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3753 -- A range attribute designator is represented in the tree using the
3754 -- normal N_Attribute_Reference node.
3756 --------------------
3758 --------------------
3761 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3763 -----------------------------
3764 -- 4.3.1 Record Aggregate --
3765 -----------------------------
3767 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3770 -- Sloc points to left parenthesis
3771 -- Expressions (List1) (set to No_List if none or null record case)
3772 -- Component_Associations (List2) (set to No_List if none)
3773 -- Null_Record_Present (Flag17)
3774 -- Aggregate_Bounds (Node3-Sem)
3775 -- Associated_Node (Node4-Sem)
3776 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3777 -- Expansion_Delayed (Flag11-Sem)
3778 -- Has_Self_Reference (Flag13-Sem)
3779 -- plus fields for expression
3781 -- Note: this structure is used for both record and array aggregates
3782 -- since the two cases are not separable by the parser. The parser
3783 -- makes no attempt to enforce consistency here, so it is up to the
3784 -- semantic phase to make sure that the aggregate is consistent (i.e.
3785 -- that it is not a "half-and-half" case that mixes record and array
3786 -- syntax. In particular, for a record aggregate, the expressions
3787 -- field will be set if there are positional associations.
3789 -- Note: N_Aggregate is not used for all aggregates; in particular,
3790 -- there is a separate node kind for extension aggregates.
3792 -- Note: gigi/gcc can handle array aggregates correctly providing that
3793 -- they are entirely positional, and the array subtype involved has a
3794 -- known at compile time length and is not bit packed, or a convention
3795 -- Fortran array with more than one dimension. If these conditions
3796 -- are not met, then the front end must translate the aggregate into
3797 -- an appropriate set of assignments into a temporary.
3799 -- Note: for the record aggregate case, gigi/gcc can handle most cases
3800 -- of record aggregates, including those for packed, and rep-claused
3801 -- records, and also variant records, providing that there are no
3802 -- variable length fields whose size is not known at compile time,
3803 -- and providing that the aggregate is presented in fully named form.
3805 -- The other situation in which array aggregates and record aggregates
3806 -- cannot be passed to the back end is if assignment to one or more
3807 -- components itself needs expansion, e.g. in the case of an assignment
3808 -- of an object of a controlled type. In such cases, the front end
3809 -- must expand the aggregate to a series of assignments, and apply
3810 -- the required expansion to the individual assignment statements.
3812 ----------------------------------------------
3813 -- 4.3.1 Record Component Association List --
3814 ----------------------------------------------
3816 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3817 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3820 -- There is no explicit node in the tree for a record component
3821 -- association list. Instead the Null_Record_Present flag is set in
3822 -- the parent node for the NULL RECORD case.
3824 ------------------------------------------------------
3825 -- 4.3.1 Record Component Association (also 4.3.3) --
3826 ------------------------------------------------------
3828 -- RECORD_COMPONENT_ASSOCIATION ::=
3829 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3831 -- N_Component_Association
3832 -- Sloc points to first selector name
3834 -- Loop_Actions (List2-Sem)
3835 -- Expression (Node3) (empty if Box_Present)
3836 -- Box_Present (Flag15)
3837 -- Inherited_Discriminant (Flag13)
3839 -- Note: this structure is used for both record component associations
3840 -- and array component associations, since the two cases aren't always
3841 -- separable by the parser. The choices list may represent either a
3842 -- list of selector names in the record aggregate case, or a list of
3843 -- discrete choices in the array aggregate case or an N_Others_Choice
3844 -- node (which appears as a singleton list). Box_Present gives support
3845 -- to Ada 2005 (AI-287).
3847 ----------------------------------
3848 -- 4.3.1 Component Choice List --
3849 ----------------------------------
3851 -- COMPONENT_CHOICE_LIST ::=
3852 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3855 -- The entries of a component choice list appear in the Choices list of
3856 -- the associated N_Component_Association, as either selector names, or
3857 -- as an N_Others_Choice node.
3859 --------------------------------
3860 -- 4.3.2 Extension Aggregate --
3861 --------------------------------
3863 -- EXTENSION_AGGREGATE ::=
3864 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3866 -- Note: extension aggregates are not permitted in Ada 83 mode
3868 -- N_Extension_Aggregate
3869 -- Sloc points to left parenthesis
3870 -- Ancestor_Part (Node3)
3871 -- Associated_Node (Node4-Sem)
3872 -- Expressions (List1) (set to No_List if none or null record case)
3873 -- Component_Associations (List2) (set to No_List if none)
3874 -- Null_Record_Present (Flag17)
3875 -- Expansion_Delayed (Flag11-Sem)
3876 -- Has_Self_Reference (Flag13-Sem)
3877 -- plus fields for expression
3879 --------------------------
3880 -- 4.3.2 Ancestor Part --
3881 --------------------------
3883 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3885 ----------------------------
3886 -- 4.3.3 Array Aggregate --
3887 ----------------------------
3889 -- ARRAY_AGGREGATE ::=
3890 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3892 ---------------------------------------
3893 -- 4.3.3 Positional Array Aggregate --
3894 ---------------------------------------
3896 -- POSITIONAL_ARRAY_AGGREGATE ::=
3897 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3898 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3900 -- See Record_Aggregate (4.3.1) for node structure
3902 ----------------------------------
3903 -- 4.3.3 Named Array Aggregate --
3904 ----------------------------------
3906 -- NAMED_ARRAY_AGGREGATE ::=
3907 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3909 -- See Record_Aggregate (4.3.1) for node structure
3911 ----------------------------------------
3912 -- 4.3.3 Array Component Association --
3913 ----------------------------------------
3915 -- ARRAY_COMPONENT_ASSOCIATION ::=
3916 -- DISCRETE_CHOICE_LIST => EXPRESSION
3918 -- See Record_Component_Association (4.3.1) for node structure
3920 --------------------------------------------------
3921 -- 4.4 Expression/Relation/Term/Factor/Primary --
3922 --------------------------------------------------
3925 -- RELATION {LOGICAL_OPERATOR RELATION}
3927 -- CHOICE_EXPRESSION ::=
3928 -- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
3930 -- CHOICE_RELATION ::=
3931 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3934 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
3935 -- | RAISE_EXPRESSION
3937 -- MEMBERSHIP_CHOICE_LIST ::=
3938 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
3940 -- MEMBERSHIP_CHOICE ::=
3941 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
3943 -- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
3945 -- SIMPLE_EXPRESSION ::=
3946 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3948 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3950 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3952 -- No nodes are generated for any of these constructs. Instead, the
3953 -- node for the operator appears directly. When we refer to an
3954 -- expression in this description, we mean any of the possible
3955 -- constituent components of an expression (e.g. identifier is
3956 -- an example of an expression).
3958 -- Note: the above syntax is that Ada 2012 syntax which restricts
3959 -- choice relations to simple expressions to avoid ambiguities in
3960 -- some contexts with set membership notation. It has been decided
3961 -- that in retrospect, the Ada 95 change allowing general expressions
3962 -- in this context was a mistake, so we have reverted to the above
3963 -- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
3964 -- expressions was there in Ada 83 from the start).
3971 -- NUMERIC_LITERAL | null
3972 -- | STRING_LITERAL | AGGREGATE
3973 -- | NAME | QUALIFIED_EXPRESSION
3974 -- | ALLOCATOR | (EXPRESSION)
3976 -- Usually there is no explicit node in the tree for primary. Instead
3977 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3978 -- exceptions. First, there is an explicit node for a null primary.
3981 -- Sloc points to NULL
3982 -- plus fields for expression
3984 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3985 -- that the parser keep track of which subexpressions are enclosed
3986 -- in parentheses, and how many levels of parentheses are used. This
3987 -- information is required for optimization purposes, and also for
3988 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3989 -- conform with ((((1)))) in the body).
3991 -- The parentheses are recorded by keeping a Paren_Count field in every
3992 -- subexpression node (it is actually present in all nodes, but only
3993 -- used in subexpression nodes). This count records the number of
3994 -- levels of parentheses. If the number of levels in the source exceeds
3995 -- the maximum accommodated by this count, then the count is simply left
3996 -- at the maximum value. This means that there are some pathological
3997 -- cases of failure to detect conformance failures (e.g. an expression
3998 -- with 500 levels of parens will conform with one with 501 levels),
3999 -- but we do not need to lose sleep over this.
4001 -- Historical note: in versions of GNAT prior to 1.75, there was a node
4002 -- type N_Parenthesized_Expression used to accurately record unlimited
4003 -- numbers of levels of parentheses. However, it turned out to be a
4004 -- real nuisance to have to take into account the possible presence of
4005 -- this node during semantic analysis, since basically parentheses have
4006 -- zero relevance to semantic analysis.
4008 -- Note: the level of parentheses always present in things like
4009 -- aggregates does not count, only the parentheses in the primary
4010 -- (EXPRESSION) affect the setting of the Paren_Count field.
4012 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
4013 -- treated as though it were Empty) if No_Initialization is set True.
4015 --------------------------------------
4016 -- 4.5 Short Circuit Control Forms --
4017 --------------------------------------
4020 -- RELATION {and then RELATION} | RELATION {or else RELATION}
4022 -- Gigi restriction: For both these control forms, the operand and
4023 -- result types are always Standard.Boolean. The expander inserts the
4024 -- required conversion operations where needed to ensure this is the
4028 -- Sloc points to AND of AND THEN
4029 -- Left_Opnd (Node2)
4030 -- Right_Opnd (Node3)
4031 -- Actions (List1-Sem)
4032 -- plus fields for expression
4035 -- Sloc points to OR of OR ELSE
4036 -- Left_Opnd (Node2)
4037 -- Right_Opnd (Node3)
4038 -- Actions (List1-Sem)
4039 -- plus fields for expression
4041 -- Note: The Actions field is used to hold actions associated with
4042 -- the right hand operand. These have to be treated specially since
4043 -- they are not unconditionally executed. See Insert_Actions for a
4044 -- more detailed description of how these actions are handled.
4046 ---------------------------
4047 -- 4.5 Membership Tests --
4048 ---------------------------
4051 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4053 -- MEMBERSHIP_CHOICE_LIST ::=
4054 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4056 -- MEMBERSHIP_CHOICE ::=
4057 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4059 -- Note: although the grammar above allows only a range or a subtype
4060 -- mark, the parser in fact will accept any simple expression in place
4061 -- of a subtype mark. This means that the semantic analyzer must be able
4062 -- to deal with, and diagnose a simple expression other than a name for
4063 -- the right operand. This simplifies error recovery in the parser.
4065 -- The Alternatives field below is present only if there is more than
4066 -- one Membership_Choice present (which is legitimate only in Ada 2012
4067 -- mode) in which case Right_Opnd is Empty, and Alternatives contains
4068 -- the list of choices. In the tree passed to the back end, Alternatives
4069 -- is always No_List, and Right_Opnd is set (i.e. the expansion circuit
4070 -- expands out the complex set membership case using simple membership
4071 -- and equality operations).
4073 -- Should we rename Alternatives here to Membership_Choices ???
4076 -- Sloc points to IN
4077 -- Left_Opnd (Node2)
4078 -- Right_Opnd (Node3)
4079 -- Alternatives (List4) (set to No_List if only one set alternative)
4080 -- No_Minimize_Eliminate (Flag17)
4081 -- plus fields for expression
4084 -- Sloc points to NOT of NOT IN
4085 -- Left_Opnd (Node2)
4086 -- Right_Opnd (Node3)
4087 -- Alternatives (List4) (set to No_List if only one set alternative)
4088 -- No_Minimize_Eliminate (Flag17)
4089 -- plus fields for expression
4091 --------------------
4093 --------------------
4095 -- LOGICAL_OPERATOR ::= and | or | xor
4097 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
4099 -- BINARY_ADDING_OPERATOR ::= + | - | &
4101 -- UNARY_ADDING_OPERATOR ::= + | -
4103 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
4105 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
4107 -- Sprint syntax if Treat_Fixed_As_Integer is set:
4114 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
4115 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
4116 -- All handling of smalls for multiplication and division is handled
4117 -- by the front end (mod and rem result only from expansion). Gigi
4118 -- thus never needs to worry about small values (for other operators
4119 -- operating on fixed-point, e.g. addition, the small value does not
4120 -- have any semantic effect anyway, these are always integer operations.
4122 -- Gigi restriction: For all operators taking Boolean operands, the
4123 -- type is always Standard.Boolean. The expander inserts the required
4124 -- conversion operations where needed to ensure this is the case.
4127 -- Sloc points to AND
4128 -- Do_Length_Check (Flag4-Sem)
4129 -- plus fields for binary operator
4130 -- plus fields for expression
4133 -- Sloc points to OR
4134 -- Do_Length_Check (Flag4-Sem)
4135 -- plus fields for binary operator
4136 -- plus fields for expression
4139 -- Sloc points to XOR
4140 -- Do_Length_Check (Flag4-Sem)
4141 -- plus fields for binary operator
4142 -- plus fields for expression
4146 -- plus fields for binary operator
4147 -- plus fields for expression
4150 -- Sloc points to /=
4151 -- plus fields for binary operator
4152 -- plus fields for expression
4156 -- plus fields for binary operator
4157 -- plus fields for expression
4160 -- Sloc points to <=
4161 -- plus fields for binary operator
4162 -- plus fields for expression
4166 -- plus fields for binary operator
4167 -- plus fields for expression
4170 -- Sloc points to >=
4171 -- plus fields for binary operator
4172 -- plus fields for expression
4175 -- Sloc points to + (binary)
4176 -- plus fields for binary operator
4177 -- plus fields for expression
4180 -- Sloc points to - (binary)
4181 -- plus fields for binary operator
4182 -- plus fields for expression
4186 -- Is_Component_Left_Opnd (Flag13-Sem)
4187 -- Is_Component_Right_Opnd (Flag14-Sem)
4188 -- plus fields for binary operator
4189 -- plus fields for expression
4193 -- Treat_Fixed_As_Integer (Flag14-Sem)
4194 -- Rounded_Result (Flag18-Sem)
4195 -- plus fields for binary operator
4196 -- plus fields for expression
4200 -- Treat_Fixed_As_Integer (Flag14-Sem)
4201 -- Do_Division_Check (Flag13-Sem)
4202 -- Rounded_Result (Flag18-Sem)
4203 -- plus fields for binary operator
4204 -- plus fields for expression
4207 -- Sloc points to MOD
4208 -- Treat_Fixed_As_Integer (Flag14-Sem)
4209 -- Do_Division_Check (Flag13-Sem)
4210 -- plus fields for binary operator
4211 -- plus fields for expression
4214 -- Sloc points to REM
4215 -- Treat_Fixed_As_Integer (Flag14-Sem)
4216 -- Do_Division_Check (Flag13-Sem)
4217 -- plus fields for binary operator
4218 -- plus fields for expression
4221 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
4222 -- Sloc points to **
4223 -- plus fields for binary operator
4224 -- plus fields for expression
4227 -- Sloc points to + (unary)
4228 -- plus fields for unary operator
4229 -- plus fields for expression
4232 -- Sloc points to - (unary)
4233 -- plus fields for unary operator
4234 -- plus fields for expression
4237 -- Sloc points to ABS
4238 -- plus fields for unary operator
4239 -- plus fields for expression
4242 -- Sloc points to NOT
4243 -- plus fields for unary operator
4244 -- plus fields for expression
4246 -- See also shift operators in section B.2
4248 -- Note on fixed-point operations passed to Gigi: For adding operators,
4249 -- the semantics is to treat these simply as integer operations, with
4250 -- the small values being ignored (the bounds are already stored in
4251 -- units of small, so that constraint checking works as usual). For the
4252 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
4253 -- point operands if the Treat_Fixed_As_Integer flag is set and will
4254 -- thus treat these nodes in identical manner, ignoring small values.
4256 -- Note on overflow handling: When the overflow checking mode is set to
4257 -- MINIMIZED or ELIMINATED, nodes for signed arithmetic operations may
4258 -- be modified to use a larger type for the operands and result. In
4259 -- the case where the computed range exceeds that of Long_Long_Integer,
4260 -- and we are running in ELIMINATED mode, the operator node will be
4261 -- changed to be a call to the appropriate routine in System.Bignums.
4263 -- Note: In Modify_Tree_For_C mode, we do not generate an N_Op_Mod node
4264 -- for signed integer types (since there is no equivalent operator in
4265 -- C). Instead we rewrite such an operation in terms of REM (which is
4266 -- % in C) and other C-available operators.
4268 ------------------------------------
4269 -- 4.5.7 Conditional Expressions --
4270 ------------------------------------
4272 -- CONDITIONAL_EXPRESSION ::= IF_EXPRESSION | CASE_EXPRESSION
4274 --------------------------
4275 -- 4.5.7 If Expression --
4276 ----------------------------
4278 -- IF_EXPRESSION ::=
4279 -- if CONDITION then DEPENDENT_EXPRESSION
4280 -- {elsif CONDITION then DEPENDENT_EXPRESSION}
4281 -- [else DEPENDENT_EXPRESSION]
4283 -- DEPENDENT_EXPRESSION ::= EXPRESSION
4285 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
4286 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
4287 -- the Is_Elsif flag is set on the inner if expression.
4290 -- Sloc points to IF or ELSIF keyword
4291 -- Expressions (List1)
4292 -- Then_Actions (List2-Sem)
4293 -- Else_Actions (List3-Sem)
4294 -- Is_Elsif (Flag13) (set if comes from ELSIF)
4295 -- Do_Overflow_Check (Flag17-Sem)
4296 -- plus fields for expression
4298 -- Expressions here is a three-element list, whose first element is the
4299 -- condition, the second element is the dependent expression after THEN
4300 -- and the third element is the dependent expression after the ELSE
4301 -- (explicitly set to True if missing).
4303 -- Note: the Then_Actions and Else_Actions fields are always set to
4304 -- No_List in the tree passed to the back end. These are used only
4305 -- for temporary processing purposes in the expander. Even though they
4306 -- are semantic fields, their parent pointers are set because analysis
4307 -- of actions nodes in those lists may generate additional actions that
4308 -- need to know their insertion point (for example for the creation of
4309 -- transient scopes).
4311 -- Note: in the tree passed to the back end, if the result type is
4312 -- an unconstrained array, the if expression can only appears in the
4313 -- initializing expression of an object declaration (this avoids the
4314 -- back end having to create a variable length temporary on the fly).
4316 ----------------------------
4317 -- 4.5.7 Case Expression --
4318 ----------------------------
4320 -- CASE_EXPRESSION ::=
4321 -- case SELECTING_EXPRESSION is
4322 -- CASE_EXPRESSION_ALTERNATIVE
4323 -- {,CASE_EXPRESSION_ALTERNATIVE}
4325 -- Note that the Alternatives cannot include pragmas (this contrasts
4326 -- with the situation of case statements where pragmas are allowed).
4328 -- N_Case_Expression
4329 -- Sloc points to CASE
4330 -- Expression (Node3) (the selecting expression)
4331 -- Alternatives (List4) (the case expression alternatives)
4332 -- Do_Overflow_Check (Flag17-Sem)
4334 ----------------------------------------
4335 -- 4.5.7 Case Expression Alternative --
4336 ----------------------------------------
4338 -- CASE_EXPRESSION_ALTERNATIVE ::=
4339 -- when DISCRETE_CHOICE_LIST =>
4340 -- DEPENDENT_EXPRESSION
4342 -- N_Case_Expression_Alternative
4343 -- Sloc points to WHEN
4345 -- Discrete_Choices (List4)
4346 -- Expression (Node3)
4347 -- Has_SP_Choice (Flag15-Sem)
4349 -- Note: The Actions field temporarily holds any actions associated with
4350 -- evaluation of the Expression. During expansion of the case expression
4351 -- these actions are wrapped into an N_Expressions_With_Actions node
4352 -- replacing the original expression.
4354 -- Note: this node never appears in the tree passed to the back end,
4355 -- since the expander converts case expressions into case statements.
4357 ---------------------------------
4358 -- 4.5.9 Quantified Expression --
4359 ---------------------------------
4361 -- QUANTIFIED_EXPRESSION ::=
4362 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
4363 -- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
4365 -- QUANTIFIER ::= all | some
4367 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4368 -- is present at a time, in which case the other one is empty.
4370 -- N_Quantified_Expression
4371 -- Sloc points to FOR
4372 -- Iterator_Specification (Node2)
4373 -- Loop_Parameter_Specification (Node4)
4374 -- Condition (Node1)
4375 -- All_Present (Flag15)
4377 --------------------------
4378 -- 4.6 Type Conversion --
4379 --------------------------
4381 -- TYPE_CONVERSION ::=
4382 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
4384 -- In the (NAME) case, the name is stored as the expression
4386 -- Note: the parser never generates a type conversion node, since it
4387 -- looks like an indexed component which is generated by preference.
4388 -- The semantic pass must correct this misidentification.
4390 -- Gigi handles conversions that involve no change in the root type,
4391 -- and also all conversions from integer to floating-point types.
4392 -- Conversions from floating-point to integer are only handled in
4393 -- the case where Float_Truncate flag set. Other conversions from
4394 -- floating-point to integer (involving rounding) and all conversions
4395 -- involving fixed-point types are handled by the expander.
4397 -- Sprint syntax if Float_Truncate set: X^(Y)
4398 -- Sprint syntax if Conversion_OK set X?(Y)
4399 -- Sprint syntax if both flags set X?^(Y)
4401 -- Note: If either the operand or result type is fixed-point, Gigi will
4402 -- only see a type conversion node with Conversion_OK set. The front end
4403 -- takes care of all handling of small's for fixed-point conversions.
4405 -- N_Type_Conversion
4406 -- Sloc points to first token of subtype mark
4407 -- Subtype_Mark (Node4)
4408 -- Expression (Node3)
4409 -- Do_Discriminant_Check (Flag1-Sem)
4410 -- Do_Length_Check (Flag4-Sem)
4411 -- Float_Truncate (Flag11-Sem)
4412 -- Do_Tag_Check (Flag13-Sem)
4413 -- Conversion_OK (Flag14-Sem)
4414 -- Do_Overflow_Check (Flag17-Sem)
4415 -- Rounded_Result (Flag18-Sem)
4416 -- plus fields for expression
4418 -- Note: if a range check is required, then the Do_Range_Check flag
4419 -- is set in the Expression with the check being done against the
4420 -- target type range (after the base type conversion, if any).
4422 -------------------------------
4423 -- 4.7 Qualified Expression --
4424 -------------------------------
4426 -- QUALIFIED_EXPRESSION ::=
4427 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
4429 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
4430 -- the expression, so the Expression field of this node always points
4431 -- to a parenthesized expression in this case (i.e. Paren_Count will
4432 -- always be non-zero for the referenced expression if it is not an
4435 -- N_Qualified_Expression
4436 -- Sloc points to apostrophe
4437 -- Subtype_Mark (Node4)
4438 -- Expression (Node3) expression or aggregate
4439 -- plus fields for expression
4441 --------------------
4443 --------------------
4446 -- new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
4447 -- | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
4449 -- SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
4451 -- Sprint syntax (when storage pool present)
4452 -- new xxx (storage_pool = pool)
4454 -- new (subpool) xxx (storage_pool = pool)
4457 -- Sloc points to NEW
4458 -- Expression (Node3) subtype indication or qualified expression
4459 -- Subpool_Handle_Name (Node4) (set to Empty if not present)
4460 -- Storage_Pool (Node1-Sem)
4461 -- Procedure_To_Call (Node2-Sem)
4462 -- Null_Exclusion_Present (Flag11)
4463 -- No_Initialization (Flag13-Sem)
4464 -- Is_Static_Coextension (Flag14-Sem)
4465 -- Do_Storage_Check (Flag17-Sem)
4466 -- Is_Dynamic_Coextension (Flag18-Sem)
4467 -- plus fields for expression
4469 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
4470 -- This flag has a special function in conjunction with the restriction
4471 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
4472 -- is not set. This means that if a source allocator is replaced with
4473 -- a constructed allocator, the Comes_From_Source flag should be copied
4474 -- to the newly created allocator.
4476 ---------------------------------
4477 -- 5.1 Sequence Of Statements --
4478 ---------------------------------
4480 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
4482 -- Note: Although the parser will not accept a declaration as a
4483 -- statement, the semantic analyzer may insert declarations (e.g.
4484 -- declarations of implicit types needed for execution of other
4485 -- statements) into a sequence of statements, so the code generator
4486 -- should be prepared to accept a declaration where a statement is
4487 -- expected. Note also that pragmas can appear as statements.
4489 --------------------
4491 --------------------
4494 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
4496 -- There is no explicit node in the tree for a statement. Instead, the
4497 -- individual statement appears directly. Labels are treated as a
4498 -- kind of statement, i.e. they are linked into a statement list at
4499 -- the point they appear, so the labeled statement appears following
4500 -- the label or labels in the statement list.
4502 ---------------------------
4503 -- 5.1 Simple Statement --
4504 ---------------------------
4506 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
4507 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
4508 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
4509 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
4510 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
4511 -- | ABORT_STATEMENT | RAISE_STATEMENT
4514 -----------------------------
4515 -- 5.1 Compound Statement --
4516 -----------------------------
4518 -- COMPOUND_STATEMENT ::=
4519 -- IF_STATEMENT | CASE_STATEMENT
4520 -- | LOOP_STATEMENT | BLOCK_STATEMENT
4521 -- | EXTENDED_RETURN_STATEMENT
4522 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
4524 -------------------------
4525 -- 5.1 Null Statement --
4526 -------------------------
4528 -- NULL_STATEMENT ::= null;
4531 -- Sloc points to NULL
4537 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4539 -- Note that the occurrence of a label is not a defining identifier,
4540 -- but rather a referencing occurrence. The defining occurrence is
4541 -- in the implicit label declaration which occurs in the innermost
4545 -- Sloc points to <<
4546 -- Identifier (Node1) direct name of statement identifier
4547 -- Exception_Junk (Flag8-Sem)
4549 -- Note: Before Ada 2012, a label is always followed by a statement,
4550 -- and this is true in the tree even in Ada 2012 mode (the parser
4551 -- inserts a null statement marked with Comes_From_Source False).
4553 -------------------------------
4554 -- 5.1 Statement Identifier --
4555 -------------------------------
4557 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
4559 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4560 -- (not an OPERATOR_SYMBOL)
4562 -------------------------------
4563 -- 5.2 Assignment Statement --
4564 -------------------------------
4566 -- ASSIGNMENT_STATEMENT ::=
4567 -- variable_NAME := EXPRESSION;
4569 -- N_Assignment_Statement
4570 -- Sloc points to :=
4572 -- Expression (Node3)
4573 -- Do_Discriminant_Check (Flag1-Sem)
4574 -- Do_Tag_Check (Flag13-Sem)
4575 -- Do_Length_Check (Flag4-Sem)
4576 -- Forwards_OK (Flag5-Sem)
4577 -- Backwards_OK (Flag6-Sem)
4578 -- No_Ctrl_Actions (Flag7-Sem)
4579 -- Componentwise_Assignment (Flag14-Sem)
4580 -- Suppress_Assignment_Checks (Flag18-Sem)
4582 -- Note: if a range check is required, then the Do_Range_Check flag
4583 -- is set in the Expression (right hand side), with the check being
4584 -- done against the type of the Name (left hand side).
4586 -- Note: the back end places some restrictions on the form of the
4587 -- Expression field. If the object being assigned to is Atomic, then
4588 -- the Expression may not have the form of an aggregate (since this
4589 -- might cause the back end to generate separate assignments). In this
4590 -- case the front end must generate an extra temporary and initialize
4591 -- this temporary as required (the temporary itself is not atomic).
4593 -----------------------
4594 -- 5.3 If Statement --
4595 -----------------------
4598 -- if CONDITION then
4599 -- SEQUENCE_OF_STATEMENTS
4600 -- {elsif CONDITION then
4601 -- SEQUENCE_OF_STATEMENTS}
4603 -- SEQUENCE_OF_STATEMENTS]
4606 -- Gigi restriction: This expander ensures that the type of the
4607 -- Condition fields is always Standard.Boolean, even if the type
4608 -- in the source is some non-standard boolean type.
4611 -- Sloc points to IF
4612 -- Condition (Node1)
4613 -- Then_Statements (List2)
4614 -- Elsif_Parts (List3) (set to No_List if none present)
4615 -- Else_Statements (List4) (set to No_List if no else part present)
4616 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4617 -- From_Conditional_Expression (Flag1-Sem)
4620 -- Sloc points to ELSIF
4621 -- Condition (Node1)
4622 -- Then_Statements (List2)
4623 -- Condition_Actions (List3-Sem)
4625 --------------------
4627 --------------------
4629 -- CONDITION ::= boolean_EXPRESSION
4631 -------------------------
4632 -- 5.4 Case Statement --
4633 -------------------------
4635 -- CASE_STATEMENT ::=
4636 -- case EXPRESSION is
4637 -- CASE_STATEMENT_ALTERNATIVE
4638 -- {CASE_STATEMENT_ALTERNATIVE}
4641 -- Note: the Alternatives can contain pragmas. These only occur at
4642 -- the start of the list, since any pragmas occurring after the first
4643 -- alternative are absorbed into the corresponding statement sequence.
4646 -- Sloc points to CASE
4647 -- Expression (Node3)
4648 -- Alternatives (List4)
4649 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4650 -- From_Conditional_Expression (Flag1-Sem)
4652 -- Note: Before Ada 2012, a pragma in a statement sequence is always
4653 -- followed by a statement, and this is true in the tree even in Ada
4654 -- 2012 mode (the parser inserts a null statement marked with the flag
4655 -- Comes_From_Source False).
4657 -------------------------------------
4658 -- 5.4 Case Statement Alternative --
4659 -------------------------------------
4661 -- CASE_STATEMENT_ALTERNATIVE ::=
4662 -- when DISCRETE_CHOICE_LIST =>
4663 -- SEQUENCE_OF_STATEMENTS
4665 -- N_Case_Statement_Alternative
4666 -- Sloc points to WHEN
4667 -- Discrete_Choices (List4)
4668 -- Statements (List3)
4669 -- Has_SP_Choice (Flag15-Sem)
4671 -- Note: in the list of Discrete_Choices, the tree passed to the back
4672 -- end does not have choice entries corresponding to names of statically
4673 -- predicated subtypes. Such entries are always expanded out to the list
4674 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
4675 -- mode does not have this expansion, and has the original choices.
4677 -------------------------
4678 -- 5.5 Loop Statement --
4679 -------------------------
4681 -- LOOP_STATEMENT ::=
4682 -- [loop_STATEMENT_IDENTIFIER :]
4683 -- [ITERATION_SCHEME] loop
4684 -- SEQUENCE_OF_STATEMENTS
4685 -- end loop [loop_IDENTIFIER];
4687 -- Note: The occurrence of a loop label is not a defining identifier
4688 -- but rather a referencing occurrence. The defining occurrence is in
4689 -- the implicit label declaration which occurs in the innermost
4692 -- Note: there is always a loop statement identifier present in the
4693 -- tree, even if none was given in the source. In the case where no loop
4694 -- identifier is given in the source, the parser creates a name of the
4695 -- form _Loop_n, where n is a decimal integer (the two underlines ensure
4696 -- that the loop names created in this manner do not conflict with any
4697 -- user defined identifiers), and the flag Has_Created_Identifier is set
4698 -- to True. The only exception to the rule that all loop statement nodes
4699 -- have identifiers occurs for loops constructed by the expander, and
4700 -- the semantic analyzer will create and supply dummy loop identifiers
4704 -- Sloc points to LOOP
4705 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4706 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4707 -- Statements (List3)
4708 -- End_Label (Node4)
4709 -- Has_Created_Identifier (Flag15)
4710 -- Is_Null_Loop (Flag16)
4711 -- Suppress_Loop_Warnings (Flag17)
4713 -- Note: the parser fills in the Identifier field if there is an
4714 -- explicit loop identifier. Otherwise the parser leaves this field
4715 -- set to Empty, and then the semantic processing for a loop statement
4716 -- creates an identifier, setting the Has_Created_Identifier flag to
4717 -- True. So after semantic analysis, the Identifier is always set,
4718 -- referencing an identifier whose entity has an Ekind of E_Loop.
4720 ---------------------------
4721 -- 5.5 Iteration Scheme --
4722 ---------------------------
4724 -- ITERATION_SCHEME ::=
4726 -- | for LOOP_PARAMETER_SPECIFICATION
4727 -- | for ITERATOR_SPECIFICATION
4729 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4730 -- is present at a time, in which case the other one is empty. Both are
4731 -- empty in the case of a WHILE loop.
4733 -- Gigi restriction: The expander ensures that the type of the Condition
4734 -- field is always Standard.Boolean, even if the type in the source is
4735 -- some non-standard boolean type.
4737 -- N_Iteration_Scheme
4738 -- Sloc points to WHILE or FOR
4739 -- Condition (Node1) (set to Empty if FOR case)
4740 -- Condition_Actions (List3-Sem)
4741 -- Iterator_Specification (Node2) (set to Empty if WHILE case)
4742 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4744 ---------------------------------------
4745 -- 5.5 Loop Parameter Specification --
4746 ---------------------------------------
4748 -- LOOP_PARAMETER_SPECIFICATION ::=
4749 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4751 -- N_Loop_Parameter_Specification
4752 -- Sloc points to first identifier
4753 -- Defining_Identifier (Node1)
4754 -- Reverse_Present (Flag15)
4755 -- Discrete_Subtype_Definition (Node4)
4757 -----------------------------------
4758 -- 5.5.1 Iterator Specification --
4759 -----------------------------------
4761 -- ITERATOR_SPECIFICATION ::=
4762 -- DEFINING_IDENTIFIER in [reverse] NAME
4763 -- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
4765 -- N_Iterator_Specification
4766 -- Sloc points to defining identifier
4767 -- Defining_Identifier (Node1)
4769 -- Reverse_Present (Flag15)
4770 -- Of_Present (Flag16)
4771 -- Subtype_Indication (Node5)
4773 -- Note: The Of_Present flag distinguishes the two forms
4775 --------------------------
4776 -- 5.6 Block Statement --
4777 --------------------------
4779 -- BLOCK_STATEMENT ::=
4780 -- [block_STATEMENT_IDENTIFIER:]
4782 -- DECLARATIVE_PART]
4784 -- HANDLED_SEQUENCE_OF_STATEMENTS
4785 -- end [block_IDENTIFIER];
4787 -- Note that the occurrence of a block identifier is not a defining
4788 -- identifier, but rather a referencing occurrence. The defining
4789 -- occurrence is an E_Block entity declared by the implicit label
4790 -- declaration which occurs in the innermost enclosing block statement
4791 -- or body; the block identifier denotes that E_Block.
4793 -- For block statements that come from source code, there is always a
4794 -- block statement identifier present in the tree, denoting an E_Block.
4795 -- In the case where no block identifier is given in the source,
4796 -- the parser creates a name of the form B_n, where n is a decimal
4797 -- integer, and the flag Has_Created_Identifier is set to True. Blocks
4798 -- constructed by the expander usually have no identifier, and no
4799 -- corresponding entity.
4801 -- Note: the block statement created for an extended return statement
4802 -- has an entity, and this entity is an E_Return_Statement, rather than
4803 -- the usual E_Block.
4805 -- Note: Exception_Junk is set for the wrapping blocks created during
4806 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4808 -- Note: from a control flow viewpoint, a block statement defines an
4809 -- extended basic block, i.e. the entry of the block dominates every
4810 -- statement in the sequence. When generating new statements with
4811 -- exception handlers in the expander at the end of a sequence that
4812 -- comes from source code, it can be necessary to wrap them all in a
4813 -- block statement in order to expose the implicit control flow to
4814 -- gigi and thus prevent it from issuing bogus control flow warnings.
4816 -- N_Block_Statement
4817 -- Sloc points to DECLARE or BEGIN
4818 -- Identifier (Node1) block direct name (set to Empty if not present)
4819 -- Declarations (List2) (set to No_List if no DECLARE part)
4820 -- Handled_Statement_Sequence (Node4)
4821 -- Cleanup_Actions (List5-Sem)
4822 -- Is_Task_Master (Flag5-Sem)
4823 -- Activation_Chain_Entity (Node3-Sem)
4824 -- Has_Created_Identifier (Flag15)
4825 -- Is_Task_Allocation_Block (Flag6)
4826 -- Is_Asynchronous_Call_Block (Flag7)
4827 -- Exception_Junk (Flag8-Sem)
4828 -- Is_Finalization_Wrapper (Flag9-Sem)
4830 -------------------------
4831 -- 5.7 Exit Statement --
4832 -------------------------
4834 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4836 -- Gigi restriction: The expander ensures that the type of the Condition
4837 -- field is always Standard.Boolean, even if the type in the source is
4838 -- some non-standard boolean type.
4841 -- Sloc points to EXIT
4842 -- Name (Node2) (set to Empty if no loop name present)
4843 -- Condition (Node1) (set to Empty if no WHEN part present)
4844 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
4846 -------------------------
4847 -- 5.9 Goto Statement --
4848 -------------------------
4850 -- GOTO_STATEMENT ::= goto label_NAME;
4853 -- Sloc points to GOTO
4855 -- Exception_Junk (Flag8-Sem)
4857 ---------------------------------
4858 -- 6.1 Subprogram Declaration --
4859 ---------------------------------
4861 -- SUBPROGRAM_DECLARATION ::=
4862 -- SUBPROGRAM_SPECIFICATION
4863 -- [ASPECT_SPECIFICATIONS];
4865 -- N_Subprogram_Declaration
4866 -- Sloc points to FUNCTION or PROCEDURE
4867 -- Specification (Node1)
4868 -- Body_To_Inline (Node3-Sem)
4869 -- Corresponding_Body (Node5-Sem)
4870 -- Parent_Spec (Node4-Sem)
4872 ------------------------------------------
4873 -- 6.1 Abstract Subprogram Declaration --
4874 ------------------------------------------
4876 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4877 -- SUBPROGRAM_SPECIFICATION is abstract
4878 -- [ASPECT_SPECIFICATIONS];
4880 -- N_Abstract_Subprogram_Declaration
4881 -- Sloc points to ABSTRACT
4882 -- Specification (Node1)
4884 -----------------------------------
4885 -- 6.1 Subprogram Specification --
4886 -----------------------------------
4888 -- SUBPROGRAM_SPECIFICATION ::=
4889 -- [[not] overriding]
4890 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4891 -- | [[not] overriding]
4892 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4894 -- Note: there are no separate nodes for the profiles, instead the
4895 -- information appears directly in the following nodes.
4897 -- N_Function_Specification
4898 -- Sloc points to FUNCTION
4899 -- Defining_Unit_Name (Node1) (the designator)
4900 -- Elaboration_Boolean (Node2-Sem)
4901 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4902 -- Null_Exclusion_Present (Flag11)
4903 -- Result_Definition (Node4) for result subtype
4904 -- Generic_Parent (Node5-Sem)
4905 -- Must_Override (Flag14) set if overriding indicator present
4906 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4908 -- N_Procedure_Specification
4909 -- Sloc points to PROCEDURE
4910 -- Defining_Unit_Name (Node1)
4911 -- Elaboration_Boolean (Node2-Sem)
4912 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4913 -- Generic_Parent (Node5-Sem)
4914 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4915 -- Must_Override (Flag14) set if overriding indicator present
4916 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4918 -- Note: overriding indicator is an Ada 2005 feature
4920 ---------------------
4921 -- 6.1 Designator --
4922 ---------------------
4925 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4927 -- Designators that are simply identifiers or operator symbols appear
4928 -- directly in the tree in this form. The following node is used only
4929 -- in the case where the designator has a parent unit name component.
4932 -- Sloc points to period
4933 -- Name (Node2) holds the parent unit name
4934 -- Identifier (Node1)
4936 -- Note: Name is always non-Empty, since this node is only used for the
4937 -- case where a parent library unit package name is present.
4939 -- Note that the identifier can also be an operator symbol here
4941 ------------------------------
4942 -- 6.1 Defining Designator --
4943 ------------------------------
4945 -- DEFINING_DESIGNATOR ::=
4946 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4948 -------------------------------------
4949 -- 6.1 Defining Program Unit Name --
4950 -------------------------------------
4952 -- DEFINING_PROGRAM_UNIT_NAME ::=
4953 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4955 -- The parent unit name is present only in the case of a child unit name
4956 -- (permissible only for Ada 95 for a library level unit, i.e. a unit
4957 -- at scope level one). If no such name is present, the defining program
4958 -- unit name is represented simply as the defining identifier. In the
4959 -- child unit case, the following node is used to represent the child
4962 -- N_Defining_Program_Unit_Name
4963 -- Sloc points to period
4964 -- Name (Node2) holds the parent unit name
4965 -- Defining_Identifier (Node1)
4967 -- Note: Name is always non-Empty, since this node is only used for the
4968 -- case where a parent unit name is present.
4970 --------------------------
4971 -- 6.1 Operator Symbol --
4972 --------------------------
4974 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4976 -- Note: the fields of the N_Operator_Symbol node are laid out to match
4977 -- the corresponding fields of an N_Character_Literal node. This allows
4978 -- easy conversion of the operator symbol node into a character literal
4979 -- node in the case where a string constant of the form of an operator
4980 -- symbol is scanned out as such, but turns out semantically to be a
4981 -- string literal that is not an operator. For details see Sinfo.CN.
4982 -- Change_Operator_Symbol_To_String_Literal.
4984 -- N_Operator_Symbol
4985 -- Sloc points to literal
4986 -- Chars (Name1) contains the Name_Id for the operator symbol
4987 -- Strval (Str3) Id of string value. This is used if the operator
4988 -- symbol turns out to be a normal string after all.
4989 -- Entity (Node4-Sem)
4990 -- Associated_Node (Node4-Sem)
4991 -- Has_Private_View (Flag11-Sem) set in generic units.
4992 -- Etype (Node5-Sem)
4994 -- Note: the Strval field may be set to No_String for generated
4995 -- operator symbols that are known not to be string literals
4998 -----------------------------------
4999 -- 6.1 Defining Operator Symbol --
5000 -----------------------------------
5002 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
5004 -- A defining operator symbol is an entity, which has additional
5005 -- fields depending on the setting of the Ekind field. These
5006 -- additional fields are defined (and access subprograms declared)
5007 -- in package Einfo.
5009 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
5010 -- are deliberately layed out to match the layout of fields in an
5011 -- ordinary N_Operator_Symbol node allowing for easy alteration of
5012 -- an operator symbol node into a defining operator symbol node.
5013 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
5014 -- for further details.
5016 -- N_Defining_Operator_Symbol
5017 -- Sloc points to literal
5018 -- Chars (Name1) contains the Name_Id for the operator symbol
5019 -- Next_Entity (Node2-Sem)
5020 -- Scope (Node3-Sem)
5021 -- Etype (Node5-Sem)
5023 ----------------------------
5024 -- 6.1 Parameter Profile --
5025 ----------------------------
5027 -- PARAMETER_PROFILE ::= [FORMAL_PART]
5029 ---------------------------------------
5030 -- 6.1 Parameter and Result Profile --
5031 ---------------------------------------
5033 -- PARAMETER_AND_RESULT_PROFILE ::=
5034 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
5035 -- | [FORMAL_PART] return ACCESS_DEFINITION
5037 -- There is no explicit node in the tree for a parameter and result
5038 -- profile. Instead the information appears directly in the parent.
5040 ----------------------
5041 -- 6.1 Formal Part --
5042 ----------------------
5045 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
5047 ----------------------------------
5048 -- 6.1 Parameter Specification --
5049 ----------------------------------
5051 -- PARAMETER_SPECIFICATION ::=
5052 -- DEFINING_IDENTIFIER_LIST : [ALIASED] MODE [NULL_EXCLUSION]
5053 -- SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
5054 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
5055 -- [:= DEFAULT_EXPRESSION]
5057 -- Although the syntax allows multiple identifiers in the list, the
5058 -- semantics is as though successive specifications were given with
5059 -- identical type definition and expression components. To simplify
5060 -- semantic processing, the parser represents a multiple declaration
5061 -- case as a sequence of single Specifications, using the More_Ids and
5062 -- Prev_Ids flags to preserve the original source form as described
5063 -- in the section on "Handling of Defining Identifier Lists".
5065 -- ALIASED can only be present in Ada 2012 mode
5067 -- N_Parameter_Specification
5068 -- Sloc points to first identifier
5069 -- Defining_Identifier (Node1)
5070 -- Aliased_Present (Flag4)
5071 -- In_Present (Flag15)
5072 -- Out_Present (Flag17)
5073 -- Null_Exclusion_Present (Flag11)
5074 -- Parameter_Type (Node2) subtype mark or access definition
5075 -- Expression (Node3) (set to Empty if no default expression present)
5076 -- Do_Accessibility_Check (Flag13-Sem)
5077 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5078 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5079 -- Default_Expression (Node5-Sem)
5085 -- MODE ::= [in] | in out | out
5087 -- There is no explicit node in the tree for the Mode. Instead the
5088 -- In_Present and Out_Present flags are set in the parent node to
5089 -- record the presence of keywords specifying the mode.
5091 --------------------------
5092 -- 6.3 Subprogram Body --
5093 --------------------------
5095 -- SUBPROGRAM_BODY ::=
5096 -- SUBPROGRAM_SPECIFICATION [ASPECT_SPECIFICATIONS] is
5099 -- HANDLED_SEQUENCE_OF_STATEMENTS
5100 -- end [DESIGNATOR];
5102 -- N_Subprogram_Body
5103 -- Sloc points to FUNCTION or PROCEDURE
5104 -- Specification (Node1)
5105 -- Declarations (List2)
5106 -- Handled_Statement_Sequence (Node4)
5107 -- Activation_Chain_Entity (Node3-Sem)
5108 -- Corresponding_Spec (Node5-Sem)
5109 -- Acts_As_Spec (Flag4-Sem)
5110 -- Bad_Is_Detected (Flag15) used only by parser
5111 -- Do_Storage_Check (Flag17-Sem)
5112 -- Is_Protected_Subprogram_Body (Flag7-Sem)
5113 -- Is_Entry_Barrier_Function (Flag8-Sem)
5114 -- Is_Task_Master (Flag5-Sem)
5115 -- Was_Originally_Stub (Flag13-Sem)
5116 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5118 -------------------------
5119 -- Expression Function --
5120 -------------------------
5122 -- This is an Ada 2012 extension, we put it here for now, to be labeled
5123 -- and put in its proper section when we know exactly where that is.
5125 -- EXPRESSION_FUNCTION ::=
5126 -- FUNCTION SPECIFICATION IS (EXPRESSION)
5127 -- [ASPECT_SPECIFICATIONS];
5129 -- N_Expression_Function
5130 -- Sloc points to FUNCTION
5131 -- Specification (Node1)
5132 -- Expression (Node3)
5133 -- Corresponding_Spec (Node5-Sem)
5135 -----------------------------------
5136 -- 6.4 Procedure Call Statement --
5137 -----------------------------------
5139 -- PROCEDURE_CALL_STATEMENT ::=
5140 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
5142 -- Note: the reason that a procedure call has expression fields is that
5143 -- it semantically resembles an expression, e.g. overloading is allowed
5144 -- and a type is concocted for semantic processing purposes. Certain of
5145 -- these fields, such as Parens are not relevant, but it is easier to
5146 -- just supply all of them together.
5148 -- N_Procedure_Call_Statement
5149 -- Sloc points to first token of name or prefix
5150 -- Name (Node2) stores name or prefix
5151 -- Parameter_Associations (List3) (set to No_List if no
5152 -- actual parameter part)
5153 -- First_Named_Actual (Node4-Sem)
5154 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5155 -- Do_Tag_Check (Flag13-Sem)
5156 -- No_Elaboration_Check (Flag14-Sem)
5157 -- Parameter_List_Truncated (Flag17-Sem)
5158 -- ABE_Is_Certain (Flag18-Sem)
5159 -- plus fields for expression
5161 -- If any IN parameter requires a range check, then the corresponding
5162 -- argument expression has the Do_Range_Check flag set, and the range
5163 -- check is done against the formal type. Note that this argument
5164 -- expression may appear directly in the Parameter_Associations list,
5165 -- or may be a descendent of an N_Parameter_Association node that
5166 -- appears in this list.
5168 ------------------------
5169 -- 6.4 Function Call --
5170 ------------------------
5172 -- FUNCTION_CALL ::=
5173 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
5175 -- Note: the parser may generate an indexed component node or simply
5176 -- a name node instead of a function call node. The semantic pass must
5177 -- correct this misidentification.
5180 -- Sloc points to first token of name or prefix
5181 -- Name (Node2) stores name or prefix
5182 -- Parameter_Associations (List3) (set to No_List if no
5183 -- actual parameter part)
5184 -- First_Named_Actual (Node4-Sem)
5185 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5186 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
5187 -- Do_Tag_Check (Flag13-Sem)
5188 -- No_Elaboration_Check (Flag14-Sem)
5189 -- Parameter_List_Truncated (Flag17-Sem)
5190 -- ABE_Is_Certain (Flag18-Sem)
5191 -- plus fields for expression
5193 --------------------------------
5194 -- 6.4 Actual Parameter Part --
5195 --------------------------------
5197 -- ACTUAL_PARAMETER_PART ::=
5198 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
5200 --------------------------------
5201 -- 6.4 Parameter Association --
5202 --------------------------------
5204 -- PARAMETER_ASSOCIATION ::=
5205 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
5207 -- Note: the N_Parameter_Association node is built only if a formal
5208 -- parameter selector name is present, otherwise the parameter
5209 -- association appears in the tree simply as the node for the
5210 -- explicit actual parameter.
5212 -- N_Parameter_Association
5213 -- Sloc points to formal parameter
5214 -- Selector_Name (Node2) (always non-Empty)
5215 -- Explicit_Actual_Parameter (Node3)
5216 -- Next_Named_Actual (Node4-Sem)
5217 -- Is_Accessibility_Actual (Flag13-Sem)
5219 ---------------------------
5220 -- 6.4 Actual Parameter --
5221 ---------------------------
5223 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
5225 ---------------------------
5226 -- 6.5 Return Statement --
5227 ---------------------------
5229 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
5231 -- EXTENDED_RETURN_STATEMENT ::=
5232 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5233 -- [:= EXPRESSION] [do
5234 -- HANDLED_SEQUENCE_OF_STATEMENTS
5237 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
5239 -- The term "return statement" is defined in 6.5 to mean either a
5240 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT. We avoid
5241 -- the use of this term, since it used to mean someting else in earlier
5244 -- N_Simple_Return_Statement
5245 -- Sloc points to RETURN
5246 -- Return_Statement_Entity (Node5-Sem)
5247 -- Expression (Node3) (set to Empty if no expression present)
5248 -- Storage_Pool (Node1-Sem)
5249 -- Procedure_To_Call (Node2-Sem)
5250 -- Do_Tag_Check (Flag13-Sem)
5251 -- By_Ref (Flag5-Sem)
5252 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
5254 -- Note: Return_Statement_Entity points to an E_Return_Statement
5256 -- If a range check is required, then Do_Range_Check is set on the
5257 -- Expression. The check is against the return subtype of the function.
5259 -- N_Extended_Return_Statement
5260 -- Sloc points to RETURN
5261 -- Return_Statement_Entity (Node5-Sem)
5262 -- Return_Object_Declarations (List3)
5263 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
5264 -- Storage_Pool (Node1-Sem)
5265 -- Procedure_To_Call (Node2-Sem)
5266 -- Do_Tag_Check (Flag13-Sem)
5267 -- By_Ref (Flag5-Sem)
5269 -- Note: Return_Statement_Entity points to an E_Return_Statement.
5271 -- Note that Return_Object_Declarations is a list containing the
5272 -- N_Object_Declaration -- see comment on this field above.
5274 -- The declared object will have Is_Return_Object = True.
5276 -- There is no such syntactic category as return_object_declaration
5277 -- in the RM. Return_Object_Declarations represents this portion of
5278 -- the syntax for EXTENDED_RETURN_STATEMENT:
5279 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5282 -- There are two entities associated with an extended_return_statement:
5283 -- the Return_Statement_Entity represents the statement itself,
5284 -- and the Defining_Identifier of the Object_Declaration in
5285 -- Return_Object_Declarations represents the object being
5286 -- returned. N_Simple_Return_Statement has only the former.
5288 ------------------------------
5289 -- 7.1 Package Declaration --
5290 ------------------------------
5292 -- PACKAGE_DECLARATION ::=
5293 -- PACKAGE_SPECIFICATION;
5295 -- Note: the activation chain entity for a package spec is used for
5296 -- all tasks declared in the package spec, or in the package body.
5298 -- N_Package_Declaration
5299 -- Sloc points to PACKAGE
5300 -- Specification (Node1)
5301 -- Corresponding_Body (Node5-Sem)
5302 -- Parent_Spec (Node4-Sem)
5303 -- Activation_Chain_Entity (Node3-Sem)
5305 --------------------------------
5306 -- 7.1 Package Specification --
5307 --------------------------------
5309 -- PACKAGE_SPECIFICATION ::=
5310 -- package DEFINING_PROGRAM_UNIT_NAME
5311 -- [ASPECT_SPECIFICATIONS]
5313 -- {BASIC_DECLARATIVE_ITEM}
5315 -- {BASIC_DECLARATIVE_ITEM}]
5316 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
5318 -- N_Package_Specification
5319 -- Sloc points to PACKAGE
5320 -- Defining_Unit_Name (Node1)
5321 -- Visible_Declarations (List2)
5322 -- Private_Declarations (List3) (set to No_List if no private
5324 -- End_Label (Node4)
5325 -- Generic_Parent (Node5-Sem)
5326 -- Limited_View_Installed (Flag18-Sem)
5328 -----------------------
5329 -- 7.1 Package Body --
5330 -----------------------
5333 -- package body DEFINING_PROGRAM_UNIT_NAME
5334 -- [ASPECT_SPECIFICATIONS]
5338 -- HANDLED_SEQUENCE_OF_STATEMENTS]
5339 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
5342 -- Sloc points to PACKAGE
5343 -- Defining_Unit_Name (Node1)
5344 -- Declarations (List2)
5345 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
5346 -- Corresponding_Spec (Node5-Sem)
5347 -- Was_Originally_Stub (Flag13-Sem)
5349 -- Note: if a source level package does not contain a handled sequence
5350 -- of statements, then the parser supplies a dummy one with a null
5351 -- sequence of statements. Comes_From_Source will be False in this
5352 -- constructed sequence. The reason we need this is for the End_Label
5353 -- field in the HSS.
5355 -----------------------------------
5356 -- 7.4 Private Type Declaration --
5357 -----------------------------------
5359 -- PRIVATE_TYPE_DECLARATION ::=
5360 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5361 -- is [[abstract] tagged] [limited] private
5362 -- [ASPECT_SPECIFICATIONS];
5364 -- Note: TAGGED is not permitted in Ada 83 mode
5366 -- N_Private_Type_Declaration
5367 -- Sloc points to TYPE
5368 -- Defining_Identifier (Node1)
5369 -- Discriminant_Specifications (List4) (set to No_List if no
5370 -- discriminant part)
5371 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5372 -- Abstract_Present (Flag4)
5373 -- Tagged_Present (Flag15)
5374 -- Limited_Present (Flag17)
5376 ----------------------------------------
5377 -- 7.4 Private Extension Declaration --
5378 ----------------------------------------
5380 -- PRIVATE_EXTENSION_DECLARATION ::=
5381 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
5382 -- [abstract] [limited | synchronized]
5383 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
5384 -- with private [ASPECT_SPECIFICATIONS];
5386 -- Note: LIMITED, and private extension declarations are not allowed
5389 -- N_Private_Extension_Declaration
5390 -- Sloc points to TYPE
5391 -- Defining_Identifier (Node1)
5392 -- Uninitialized_Variable (Node3-Sem)
5393 -- Discriminant_Specifications (List4) (set to No_List if no
5394 -- discriminant part)
5395 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5396 -- Abstract_Present (Flag4)
5397 -- Limited_Present (Flag17)
5398 -- Synchronized_Present (Flag7)
5399 -- Subtype_Indication (Node5)
5400 -- Interface_List (List2) (set to No_List if none)
5402 ---------------------
5403 -- 8.4 Use Clause --
5404 ---------------------
5406 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
5408 -----------------------------
5409 -- 8.4 Use Package Clause --
5410 -----------------------------
5412 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
5414 -- N_Use_Package_Clause
5415 -- Sloc points to USE
5417 -- Next_Use_Clause (Node3-Sem)
5418 -- Hidden_By_Use_Clause (Elist4-Sem)
5420 --------------------------
5421 -- 8.4 Use Type Clause --
5422 --------------------------
5424 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
5426 -- Note: use type clause is not permitted in Ada 83 mode
5428 -- Note: the ALL keyword can appear only in Ada 2012 mode
5430 -- N_Use_Type_Clause
5431 -- Sloc points to USE
5432 -- Subtype_Marks (List2)
5433 -- Next_Use_Clause (Node3-Sem)
5434 -- Hidden_By_Use_Clause (Elist4-Sem)
5435 -- Used_Operations (Elist5-Sem)
5436 -- All_Present (Flag15)
5438 -------------------------------
5439 -- 8.5 Renaming Declaration --
5440 -------------------------------
5442 -- RENAMING_DECLARATION ::=
5443 -- OBJECT_RENAMING_DECLARATION
5444 -- | EXCEPTION_RENAMING_DECLARATION
5445 -- | PACKAGE_RENAMING_DECLARATION
5446 -- | SUBPROGRAM_RENAMING_DECLARATION
5447 -- | GENERIC_RENAMING_DECLARATION
5449 --------------------------------------
5450 -- 8.5 Object Renaming Declaration --
5451 --------------------------------------
5453 -- OBJECT_RENAMING_DECLARATION ::=
5454 -- DEFINING_IDENTIFIER :
5455 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME
5456 -- [ASPECT_SPECIFICATIONS];
5457 -- | DEFINING_IDENTIFIER :
5458 -- ACCESS_DEFINITION renames object_NAME
5459 -- [ASPECT_SPECIFICATIONS];
5461 -- Note: Access_Definition is an optional field that gives support to
5462 -- Ada 2005 (AI-230). The parser generates nodes that have either the
5463 -- Subtype_Indication field or else the Access_Definition field.
5465 -- N_Object_Renaming_Declaration
5466 -- Sloc points to first identifier
5467 -- Defining_Identifier (Node1)
5468 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5469 -- Subtype_Mark (Node4) (set to Empty if not present)
5470 -- Access_Definition (Node3) (set to Empty if not present)
5472 -- Corresponding_Generic_Association (Node5-Sem)
5474 -----------------------------------------
5475 -- 8.5 Exception Renaming Declaration --
5476 -----------------------------------------
5478 -- EXCEPTION_RENAMING_DECLARATION ::=
5479 -- DEFINING_IDENTIFIER : exception renames exception_NAME
5480 -- [ASPECT_SPECIFICATIONS];
5482 -- N_Exception_Renaming_Declaration
5483 -- Sloc points to first identifier
5484 -- Defining_Identifier (Node1)
5487 ---------------------------------------
5488 -- 8.5 Package Renaming Declaration --
5489 ---------------------------------------
5491 -- PACKAGE_RENAMING_DECLARATION ::=
5492 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME
5493 -- [ASPECT_SPECIFICATIONS];
5495 -- N_Package_Renaming_Declaration
5496 -- Sloc points to PACKAGE
5497 -- Defining_Unit_Name (Node1)
5499 -- Parent_Spec (Node4-Sem)
5501 ------------------------------------------
5502 -- 8.5 Subprogram Renaming Declaration --
5503 ------------------------------------------
5505 -- SUBPROGRAM_RENAMING_DECLARATION ::=
5506 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME
5507 -- [ASPECT_SPECIFICATIONS];
5509 -- N_Subprogram_Renaming_Declaration
5510 -- Sloc points to RENAMES
5511 -- Specification (Node1)
5513 -- Parent_Spec (Node4-Sem)
5514 -- Corresponding_Spec (Node5-Sem)
5515 -- Corresponding_Formal_Spec (Node3-Sem)
5516 -- From_Default (Flag6-Sem)
5518 -----------------------------------------
5519 -- 8.5.5 Generic Renaming Declaration --
5520 -----------------------------------------
5522 -- GENERIC_RENAMING_DECLARATION ::=
5523 -- generic package DEFINING_PROGRAM_UNIT_NAME
5524 -- renames generic_package_NAME
5525 -- [ASPECT_SPECIFICATIONS];
5526 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
5527 -- renames generic_procedure_NAME
5528 -- [ASPECT_SPECIFICATIONS];
5529 -- | generic function DEFINING_PROGRAM_UNIT_NAME
5530 -- renames generic_function_NAME
5531 -- [ASPECT_SPECIFICATIONS];
5533 -- N_Generic_Package_Renaming_Declaration
5534 -- Sloc points to GENERIC
5535 -- Defining_Unit_Name (Node1)
5537 -- Parent_Spec (Node4-Sem)
5539 -- N_Generic_Procedure_Renaming_Declaration
5540 -- Sloc points to GENERIC
5541 -- Defining_Unit_Name (Node1)
5543 -- Parent_Spec (Node4-Sem)
5545 -- N_Generic_Function_Renaming_Declaration
5546 -- Sloc points to GENERIC
5547 -- Defining_Unit_Name (Node1)
5549 -- Parent_Spec (Node4-Sem)
5551 --------------------------------
5552 -- 9.1 Task Type Declaration --
5553 --------------------------------
5555 -- TASK_TYPE_DECLARATION ::=
5556 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5557 -- [ASPECT_SPECIFICATIONS]
5558 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5560 -- N_Task_Type_Declaration
5561 -- Sloc points to TASK
5562 -- Defining_Identifier (Node1)
5563 -- Discriminant_Specifications (List4) (set to No_List if no
5564 -- discriminant part)
5565 -- Interface_List (List2) (set to No_List if none)
5566 -- Task_Definition (Node3) (set to Empty if not present)
5567 -- Corresponding_Body (Node5-Sem)
5569 ----------------------------------
5570 -- 9.1 Single Task Declaration --
5571 ----------------------------------
5573 -- SINGLE_TASK_DECLARATION ::=
5574 -- task DEFINING_IDENTIFIER
5575 -- [ASPECT_SPECIFICATIONS]
5576 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5578 -- N_Single_Task_Declaration
5579 -- Sloc points to TASK
5580 -- Defining_Identifier (Node1)
5581 -- Interface_List (List2) (set to No_List if none)
5582 -- Task_Definition (Node3) (set to Empty if not present)
5584 --------------------------
5585 -- 9.1 Task Definition --
5586 --------------------------
5588 -- TASK_DEFINITION ::=
5592 -- end [task_IDENTIFIER]
5594 -- Note: as a result of semantic analysis, the list of task items can
5595 -- include implicit type declarations resulting from entry families.
5597 -- N_Task_Definition
5598 -- Sloc points to first token of task definition
5599 -- Visible_Declarations (List2)
5600 -- Private_Declarations (List3) (set to No_List if no private part)
5601 -- End_Label (Node4)
5602 -- Has_Storage_Size_Pragma (Flag5-Sem)
5603 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5605 --------------------
5607 --------------------
5609 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5611 --------------------
5613 --------------------
5616 -- task body task_DEFINING_IDENTIFIER
5617 -- [ASPECT_SPECIFICATIONS]
5621 -- HANDLED_SEQUENCE_OF_STATEMENTS
5622 -- end [task_IDENTIFIER];
5624 -- Gigi restriction: This node never appears
5627 -- Sloc points to TASK
5628 -- Defining_Identifier (Node1)
5629 -- Declarations (List2)
5630 -- Handled_Statement_Sequence (Node4)
5631 -- Is_Task_Master (Flag5-Sem)
5632 -- Activation_Chain_Entity (Node3-Sem)
5633 -- Corresponding_Spec (Node5-Sem)
5634 -- Was_Originally_Stub (Flag13-Sem)
5636 -------------------------------------
5637 -- 9.4 Protected Type Declaration --
5638 -------------------------------------
5640 -- PROTECTED_TYPE_DECLARATION ::=
5641 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5642 -- [ASPECT_SPECIFICATIONS]
5643 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5645 -- Note: protected type declarations are not permitted in Ada 83 mode
5647 -- N_Protected_Type_Declaration
5648 -- Sloc points to PROTECTED
5649 -- Defining_Identifier (Node1)
5650 -- Discriminant_Specifications (List4) (set to No_List if no
5651 -- discriminant part)
5652 -- Interface_List (List2) (set to No_List if none)
5653 -- Protected_Definition (Node3)
5654 -- Corresponding_Body (Node5-Sem)
5656 ---------------------------------------
5657 -- 9.4 Single Protected Declaration --
5658 ---------------------------------------
5660 -- SINGLE_PROTECTED_DECLARATION ::=
5661 -- protected DEFINING_IDENTIFIER
5662 -- [ASPECT_SPECIFICATIONS]
5663 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5665 -- Note: single protected declarations are not allowed in Ada 83 mode
5667 -- N_Single_Protected_Declaration
5668 -- Sloc points to PROTECTED
5669 -- Defining_Identifier (Node1)
5670 -- Interface_List (List2) (set to No_List if none)
5671 -- Protected_Definition (Node3)
5673 -------------------------------
5674 -- 9.4 Protected Definition --
5675 -------------------------------
5677 -- PROTECTED_DEFINITION ::=
5678 -- {PROTECTED_OPERATION_DECLARATION}
5680 -- {PROTECTED_ELEMENT_DECLARATION}]
5681 -- end [protected_IDENTIFIER]
5683 -- N_Protected_Definition
5684 -- Sloc points to first token of protected definition
5685 -- Visible_Declarations (List2)
5686 -- Private_Declarations (List3) (set to No_List if no private part)
5687 -- End_Label (Node4)
5689 ------------------------------------------
5690 -- 9.4 Protected Operation Declaration --
5691 ------------------------------------------
5693 -- PROTECTED_OPERATION_DECLARATION ::=
5694 -- SUBPROGRAM_DECLARATION
5695 -- | ENTRY_DECLARATION
5696 -- | REPRESENTATION_CLAUSE
5698 ----------------------------------------
5699 -- 9.4 Protected Element Declaration --
5700 ----------------------------------------
5702 -- PROTECTED_ELEMENT_DECLARATION ::=
5703 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
5705 -------------------------
5706 -- 9.4 Protected Body --
5707 -------------------------
5709 -- PROTECTED_BODY ::=
5710 -- protected body DEFINING_IDENTIFIER
5711 -- [ASPECT_SPECIFICATIONS];
5713 -- {PROTECTED_OPERATION_ITEM}
5714 -- end [protected_IDENTIFIER];
5716 -- Note: protected bodies are not allowed in Ada 83 mode
5718 -- Gigi restriction: This node never appears
5721 -- Sloc points to PROTECTED
5722 -- Defining_Identifier (Node1)
5723 -- Declarations (List2) protected operation items (and pragmas)
5724 -- End_Label (Node4)
5725 -- Corresponding_Spec (Node5-Sem)
5726 -- Was_Originally_Stub (Flag13-Sem)
5728 -----------------------------------
5729 -- 9.4 Protected Operation Item --
5730 -----------------------------------
5732 -- PROTECTED_OPERATION_ITEM ::=
5733 -- SUBPROGRAM_DECLARATION
5734 -- | SUBPROGRAM_BODY
5736 -- | REPRESENTATION_CLAUSE
5738 ------------------------------
5739 -- 9.5.2 Entry Declaration --
5740 ------------------------------
5742 -- ENTRY_DECLARATION ::=
5743 -- [[not] overriding]
5744 -- entry DEFINING_IDENTIFIER
5745 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE
5746 -- [ASPECT_SPECIFICATIONS];
5748 -- N_Entry_Declaration
5749 -- Sloc points to ENTRY
5750 -- Defining_Identifier (Node1)
5751 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
5752 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5753 -- Corresponding_Body (Node5-Sem)
5754 -- Must_Override (Flag14) set if overriding indicator present
5755 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5757 -- Note: overriding indicator is an Ada 2005 feature
5759 -----------------------------
5760 -- 9.5.2 Accept statement --
5761 -----------------------------
5763 -- ACCEPT_STATEMENT ::=
5764 -- accept entry_DIRECT_NAME
5765 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
5766 -- HANDLED_SEQUENCE_OF_STATEMENTS
5767 -- end [entry_IDENTIFIER]];
5769 -- Gigi restriction: This node never appears
5771 -- Note: there are no explicit declarations allowed in an accept
5772 -- statement. However, the implicit declarations for any statement
5773 -- identifiers (labels and block/loop identifiers) are declarations
5774 -- that belong logically to the accept statement, and that is why
5775 -- there is a Declarations field in this node.
5777 -- N_Accept_Statement
5778 -- Sloc points to ACCEPT
5779 -- Entry_Direct_Name (Node1)
5780 -- Entry_Index (Node5) (set to Empty if not present)
5781 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5782 -- Handled_Statement_Sequence (Node4)
5783 -- Declarations (List2) (set to No_List if no declarations)
5785 ------------------------
5786 -- 9.5.2 Entry Index --
5787 ------------------------
5789 -- ENTRY_INDEX ::= EXPRESSION
5791 -----------------------
5792 -- 9.5.2 Entry Body --
5793 -----------------------
5796 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5799 -- HANDLED_SEQUENCE_OF_STATEMENTS
5800 -- end [entry_IDENTIFIER];
5802 -- ENTRY_BARRIER ::= when CONDITION
5804 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5805 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5806 -- too full (it would otherwise have too many fields)
5808 -- Gigi restriction: This node never appears
5811 -- Sloc points to ENTRY
5812 -- Defining_Identifier (Node1)
5813 -- Entry_Body_Formal_Part (Node5)
5814 -- Declarations (List2)
5815 -- Handled_Statement_Sequence (Node4)
5816 -- Activation_Chain_Entity (Node3-Sem)
5818 -----------------------------------
5819 -- 9.5.2 Entry Body Formal Part --
5820 -----------------------------------
5822 -- ENTRY_BODY_FORMAL_PART ::=
5823 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5825 -- Note that an entry body formal part node is present even if it is
5826 -- empty. This reflects the grammar, in which it is the components of
5827 -- the entry body formal part that are optional, not the entry body
5828 -- formal part itself. Also this means that the barrier condition
5829 -- always has somewhere to be stored.
5831 -- Gigi restriction: This node never appears
5833 -- N_Entry_Body_Formal_Part
5834 -- Sloc points to first token
5835 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5836 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5837 -- Condition (Node1) from entry barrier of entry body
5839 --------------------------
5840 -- 9.5.2 Entry Barrier --
5841 --------------------------
5843 -- ENTRY_BARRIER ::= when CONDITION
5845 --------------------------------------
5846 -- 9.5.2 Entry Index Specification --
5847 --------------------------------------
5849 -- ENTRY_INDEX_SPECIFICATION ::=
5850 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5852 -- Gigi restriction: This node never appears
5854 -- N_Entry_Index_Specification
5855 -- Sloc points to FOR
5856 -- Defining_Identifier (Node1)
5857 -- Discrete_Subtype_Definition (Node4)
5859 ---------------------------------
5860 -- 9.5.3 Entry Call Statement --
5861 ---------------------------------
5863 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5865 -- The parser may generate a procedure call for this construct. The
5866 -- semantic pass must correct this misidentification where needed.
5868 -- Gigi restriction: This node never appears
5870 -- N_Entry_Call_Statement
5871 -- Sloc points to first token of name
5873 -- Parameter_Associations (List3) (set to No_List if no
5874 -- actual parameter part)
5875 -- First_Named_Actual (Node4-Sem)
5877 ------------------------------
5878 -- 9.5.4 Requeue Statement --
5879 ------------------------------
5881 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5883 -- Note: requeue statements are not permitted in Ada 83 mode
5885 -- Gigi restriction: This node never appears
5887 -- N_Requeue_Statement
5888 -- Sloc points to REQUEUE
5890 -- Abort_Present (Flag15)
5892 --------------------------
5893 -- 9.6 Delay Statement --
5894 --------------------------
5896 -- DELAY_STATEMENT ::=
5897 -- DELAY_UNTIL_STATEMENT
5898 -- | DELAY_RELATIVE_STATEMENT
5900 --------------------------------
5901 -- 9.6 Delay Until Statement --
5902 --------------------------------
5904 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5906 -- Note: delay until statements are not permitted in Ada 83 mode
5908 -- Gigi restriction: This node never appears
5910 -- N_Delay_Until_Statement
5911 -- Sloc points to DELAY
5912 -- Expression (Node3)
5914 -----------------------------------
5915 -- 9.6 Delay Relative Statement --
5916 -----------------------------------
5918 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5920 -- Gigi restriction: This node never appears
5922 -- N_Delay_Relative_Statement
5923 -- Sloc points to DELAY
5924 -- Expression (Node3)
5926 ---------------------------
5927 -- 9.7 Select Statement --
5928 ---------------------------
5930 -- SELECT_STATEMENT ::=
5932 -- | TIMED_ENTRY_CALL
5933 -- | CONDITIONAL_ENTRY_CALL
5934 -- | ASYNCHRONOUS_SELECT
5936 -----------------------------
5937 -- 9.7.1 Selective Accept --
5938 -----------------------------
5940 -- SELECTIVE_ACCEPT ::=
5943 -- SELECT_ALTERNATIVE
5946 -- SELECT_ALTERNATIVE}
5948 -- SEQUENCE_OF_STATEMENTS]
5951 -- Gigi restriction: This node never appears
5953 -- Note: the guard expression, if present, appears in the node for
5954 -- the select alternative.
5956 -- N_Selective_Accept
5957 -- Sloc points to SELECT
5958 -- Select_Alternatives (List1)
5959 -- Else_Statements (List4) (set to No_List if no else part)
5965 -- GUARD ::= when CONDITION =>
5967 -- As noted above, the CONDITION that is part of a GUARD is included
5968 -- in the node for the select alternative for convenience.
5970 -------------------------------
5971 -- 9.7.1 Select Alternative --
5972 -------------------------------
5974 -- SELECT_ALTERNATIVE ::=
5975 -- ACCEPT_ALTERNATIVE
5976 -- | DELAY_ALTERNATIVE
5977 -- | TERMINATE_ALTERNATIVE
5979 -------------------------------
5980 -- 9.7.1 Accept Alternative --
5981 -------------------------------
5983 -- ACCEPT_ALTERNATIVE ::=
5984 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5986 -- Gigi restriction: This node never appears
5988 -- N_Accept_Alternative
5989 -- Sloc points to ACCEPT
5990 -- Accept_Statement (Node2)
5991 -- Condition (Node1) from the guard (set to Empty if no guard present)
5992 -- Statements (List3) (set to Empty_List if no statements)
5993 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5994 -- Accept_Handler_Records (List5-Sem)
5996 ------------------------------
5997 -- 9.7.1 Delay Alternative --
5998 ------------------------------
6000 -- DELAY_ALTERNATIVE ::=
6001 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
6003 -- Gigi restriction: This node never appears
6005 -- N_Delay_Alternative
6006 -- Sloc points to DELAY
6007 -- Delay_Statement (Node2)
6008 -- Condition (Node1) from the guard (set to Empty if no guard present)
6009 -- Statements (List3) (set to Empty_List if no statements)
6010 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6012 ----------------------------------
6013 -- 9.7.1 Terminate Alternative --
6014 ----------------------------------
6016 -- TERMINATE_ALTERNATIVE ::= terminate;
6018 -- Gigi restriction: This node never appears
6020 -- N_Terminate_Alternative
6021 -- Sloc points to TERMINATE
6022 -- Condition (Node1) from the guard (set to Empty if no guard present)
6023 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6024 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
6026 -----------------------------
6027 -- 9.7.2 Timed Entry Call --
6028 -----------------------------
6030 -- TIMED_ENTRY_CALL ::=
6032 -- ENTRY_CALL_ALTERNATIVE
6034 -- DELAY_ALTERNATIVE
6037 -- Gigi restriction: This node never appears
6039 -- N_Timed_Entry_Call
6040 -- Sloc points to SELECT
6041 -- Entry_Call_Alternative (Node1)
6042 -- Delay_Alternative (Node4)
6044 -----------------------------------
6045 -- 9.7.2 Entry Call Alternative --
6046 -----------------------------------
6048 -- ENTRY_CALL_ALTERNATIVE ::=
6049 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
6051 -- PROCEDURE_OR_ENTRY_CALL ::=
6052 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
6054 -- Gigi restriction: This node never appears
6056 -- N_Entry_Call_Alternative
6057 -- Sloc points to first token of entry call statement
6058 -- Entry_Call_Statement (Node1)
6059 -- Statements (List3) (set to Empty_List if no statements)
6060 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6062 -----------------------------------
6063 -- 9.7.3 Conditional Entry Call --
6064 -----------------------------------
6066 -- CONDITIONAL_ENTRY_CALL ::=
6068 -- ENTRY_CALL_ALTERNATIVE
6070 -- SEQUENCE_OF_STATEMENTS
6073 -- Gigi restriction: This node never appears
6075 -- N_Conditional_Entry_Call
6076 -- Sloc points to SELECT
6077 -- Entry_Call_Alternative (Node1)
6078 -- Else_Statements (List4)
6080 --------------------------------
6081 -- 9.7.4 Asynchronous Select --
6082 --------------------------------
6084 -- ASYNCHRONOUS_SELECT ::=
6086 -- TRIGGERING_ALTERNATIVE
6091 -- Note: asynchronous select is not permitted in Ada 83 mode
6093 -- Gigi restriction: This node never appears
6095 -- N_Asynchronous_Select
6096 -- Sloc points to SELECT
6097 -- Triggering_Alternative (Node1)
6098 -- Abortable_Part (Node2)
6100 -----------------------------------
6101 -- 9.7.4 Triggering Alternative --
6102 -----------------------------------
6104 -- TRIGGERING_ALTERNATIVE ::=
6105 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
6107 -- Gigi restriction: This node never appears
6109 -- N_Triggering_Alternative
6110 -- Sloc points to first token of triggering statement
6111 -- Triggering_Statement (Node1)
6112 -- Statements (List3) (set to Empty_List if no statements)
6113 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6115 ---------------------------------
6116 -- 9.7.4 Triggering Statement --
6117 ---------------------------------
6119 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
6121 ---------------------------
6122 -- 9.7.4 Abortable Part --
6123 ---------------------------
6125 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
6127 -- Gigi restriction: This node never appears
6130 -- Sloc points to ABORT
6131 -- Statements (List3)
6133 --------------------------
6134 -- 9.8 Abort Statement --
6135 --------------------------
6137 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
6139 -- Gigi restriction: This node never appears
6141 -- N_Abort_Statement
6142 -- Sloc points to ABORT
6145 -------------------------
6146 -- 10.1.1 Compilation --
6147 -------------------------
6149 -- COMPILATION ::= {COMPILATION_UNIT}
6151 -- There is no explicit node in the tree for a compilation, since in
6152 -- general the compiler is processing only a single compilation unit
6153 -- at a time. It is possible to parse multiple units in syntax check
6154 -- only mode, but the trees are discarded in that case.
6156 ------------------------------
6157 -- 10.1.1 Compilation Unit --
6158 ------------------------------
6160 -- COMPILATION_UNIT ::=
6161 -- CONTEXT_CLAUSE LIBRARY_ITEM
6162 -- | CONTEXT_CLAUSE SUBUNIT
6164 -- The N_Compilation_Unit node itself represents the above syntax.
6165 -- However, there are two additional items not reflected in the above
6166 -- syntax. First we have the global declarations that are added by the
6167 -- code generator. These are outer level declarations (so they cannot
6168 -- be represented as being inside the units). An example is the wrapper
6169 -- subprograms that are created to do ABE checking. As always a list of
6170 -- declarations can contain actions as well (i.e. statements), and such
6171 -- statements are executed as part of the elaboration of the unit. Note
6172 -- that all such declarations are elaborated before the library unit.
6174 -- Similarly, certain actions need to be elaborated at the completion
6175 -- of elaboration of the library unit (notably the statement that sets
6176 -- the Boolean flag indicating that elaboration is complete).
6178 -- The third item not reflected in the syntax is pragmas that appear
6179 -- after the compilation unit. As always pragmas are a problem since
6180 -- they are not part of the formal syntax, but can be stuck into the
6181 -- source following a set of ad hoc rules, and we have to find an ad
6182 -- hoc way of sticking them into the tree. For pragmas that appear
6183 -- before the library unit, we just consider them to be part of the
6184 -- context clause, and pragmas can appear in the Context_Items list
6185 -- of the compilation unit. However, pragmas can also appear after
6186 -- the library item.
6188 -- To deal with all these problems, we create an auxiliary node for
6189 -- a compilation unit, referenced from the N_Compilation_Unit node,
6190 -- that contains these items.
6192 -- N_Compilation_Unit
6193 -- Sloc points to first token of defining unit name
6194 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
6195 -- Context_Items (List1) context items and pragmas preceding unit
6196 -- Private_Present (Flag15) set if library unit has private keyword
6197 -- Unit (Node2) library item or subunit
6198 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
6199 -- Has_No_Elaboration_Code (Flag17-Sem)
6200 -- Body_Required (Flag13-Sem) set for spec if body is required
6201 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
6202 -- Context_Pending (Flag16-Sem)
6203 -- First_Inlined_Subprogram (Node3-Sem)
6204 -- Has_Pragma_Suppress_All (Flag14-Sem)
6206 -- N_Compilation_Unit_Aux
6207 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
6208 -- Declarations (List2) (set to No_List if no global declarations)
6209 -- Actions (List1) (set to No_List if no actions)
6210 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
6211 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
6212 -- Default_Storage_Pool (Node3-Sem)
6214 --------------------------
6215 -- 10.1.1 Library Item --
6216 --------------------------
6219 -- [private] LIBRARY_UNIT_DECLARATION
6220 -- | LIBRARY_UNIT_BODY
6221 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
6223 -- Note: PRIVATE is not allowed in Ada 83 mode
6225 -- There is no explicit node in the tree for library item, instead
6226 -- the declaration or body, and the flag for private if present,
6227 -- appear in the N_Compilation_Unit node.
6229 --------------------------------------
6230 -- 10.1.1 Library Unit Declaration --
6231 --------------------------------------
6233 -- LIBRARY_UNIT_DECLARATION ::=
6234 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
6235 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
6237 -----------------------------------------------
6238 -- 10.1.1 Library Unit Renaming Declaration --
6239 -----------------------------------------------
6241 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
6242 -- PACKAGE_RENAMING_DECLARATION
6243 -- | GENERIC_RENAMING_DECLARATION
6244 -- | SUBPROGRAM_RENAMING_DECLARATION
6246 -------------------------------
6247 -- 10.1.1 Library unit body --
6248 -------------------------------
6250 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
6252 ------------------------------
6253 -- 10.1.1 Parent Unit Name --
6254 ------------------------------
6256 -- PARENT_UNIT_NAME ::= NAME
6258 ----------------------------
6259 -- 10.1.2 Context clause --
6260 ----------------------------
6262 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
6264 -- The context clause can include pragmas, and any pragmas that appear
6265 -- before the context clause proper (i.e. all configuration pragmas,
6266 -- also appear at the front of this list).
6268 --------------------------
6269 -- 10.1.2 Context_Item --
6270 --------------------------
6272 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
6274 -------------------------
6275 -- 10.1.2 With clause --
6276 -------------------------
6279 -- with library_unit_NAME {,library_unit_NAME};
6281 -- A separate With clause is built for each name, so that we have
6282 -- a Corresponding_Spec field for each with'ed spec. The flags
6283 -- First_Name and Last_Name are used to reconstruct the exact
6284 -- source form. When a list of names appears in one with clause,
6285 -- the first name in the list has First_Name set, and the last
6286 -- has Last_Name set. If the with clause has only one name, then
6287 -- both of the flags First_Name and Last_Name are set in this name.
6289 -- Note: in the case of implicit with's that are installed by the
6290 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
6291 -- set to Standard_Location, but it is incorrect to test the Sloc
6292 -- to find out if a with clause is implicit, test the flag instead.
6295 -- Sloc points to first token of library unit name
6296 -- Withed_Body (Node1-Sem)
6298 -- Next_Implicit_With (Node3-Sem)
6299 -- Library_Unit (Node4-Sem)
6300 -- Corresponding_Spec (Node5-Sem)
6301 -- First_Name (Flag5) (set to True if first name or only one name)
6302 -- Last_Name (Flag6) (set to True if last name or only one name)
6303 -- Context_Installed (Flag13-Sem)
6304 -- Elaborate_Present (Flag4-Sem)
6305 -- Elaborate_All_Present (Flag14-Sem)
6306 -- Elaborate_All_Desirable (Flag9-Sem)
6307 -- Elaborate_Desirable (Flag11-Sem)
6308 -- Private_Present (Flag15) set if with_clause has private keyword
6309 -- Implicit_With (Flag16-Sem)
6310 -- Implicit_With_From_Instantiation (Flag12-Sem)
6311 -- Limited_Present (Flag17) set if LIMITED is present
6312 -- Limited_View_Installed (Flag18-Sem)
6313 -- Unreferenced_In_Spec (Flag7-Sem)
6314 -- No_Entities_Ref_In_Spec (Flag8-Sem)
6316 -- Note: Limited_Present and Limited_View_Installed are used to support
6317 -- the implementation of Ada 2005 (AI-50217).
6319 -- Similarly, Private_Present is used to support the implementation of
6320 -- Ada 2005 (AI-50262).
6322 ----------------------
6323 -- With_Type clause --
6324 ----------------------
6326 -- This is a GNAT extension, used to implement mutually recursive
6327 -- types declared in different packages.
6329 -- Note: this is now obsolete. The functionality of this construct
6330 -- is now implemented by the Ada 2005 limited_with_clause.
6332 ---------------------
6333 -- 10.2 Body stub --
6334 ---------------------
6337 -- SUBPROGRAM_BODY_STUB
6338 -- | PACKAGE_BODY_STUB
6340 -- | PROTECTED_BODY_STUB
6342 ----------------------------------
6343 -- 10.1.3 Subprogram Body Stub --
6344 ----------------------------------
6346 -- SUBPROGRAM_BODY_STUB ::=
6347 -- SUBPROGRAM_SPECIFICATION is separate
6348 -- [ASPECT_SPECIFICATION];
6350 -- N_Subprogram_Body_Stub
6351 -- Sloc points to FUNCTION or PROCEDURE
6352 -- Specification (Node1)
6353 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6354 -- Library_Unit (Node4-Sem) points to the subunit
6355 -- Corresponding_Body (Node5-Sem)
6357 -------------------------------
6358 -- 10.1.3 Package Body Stub --
6359 -------------------------------
6361 -- PACKAGE_BODY_STUB ::=
6362 -- package body DEFINING_IDENTIFIER is separate
6363 -- [ASPECT_SPECIFICATION];
6365 -- N_Package_Body_Stub
6366 -- Sloc points to PACKAGE
6367 -- Defining_Identifier (Node1)
6368 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6369 -- Library_Unit (Node4-Sem) points to the subunit
6370 -- Corresponding_Body (Node5-Sem)
6372 ----------------------------
6373 -- 10.1.3 Task Body Stub --
6374 ----------------------------
6376 -- TASK_BODY_STUB ::=
6377 -- task body DEFINING_IDENTIFIER is separate
6378 -- [ASPECT_SPECIFICATION];
6381 -- Sloc points to TASK
6382 -- Defining_Identifier (Node1)
6383 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6384 -- Library_Unit (Node4-Sem) points to the subunit
6385 -- Corresponding_Body (Node5-Sem)
6387 ---------------------------------
6388 -- 10.1.3 Protected Body Stub --
6389 ---------------------------------
6391 -- PROTECTED_BODY_STUB ::=
6392 -- protected body DEFINING_IDENTIFIER is separate
6393 -- [ASPECT_SPECIFICATION];
6395 -- Note: protected body stubs are not allowed in Ada 83 mode
6397 -- N_Protected_Body_Stub
6398 -- Sloc points to PROTECTED
6399 -- Defining_Identifier (Node1)
6400 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6401 -- Library_Unit (Node4-Sem) points to the subunit
6402 -- Corresponding_Body (Node5-Sem)
6404 ---------------------
6405 -- 10.1.3 Subunit --
6406 ---------------------
6408 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
6411 -- Sloc points to SEPARATE
6412 -- Name (Node2) is the name of the parent unit
6413 -- Proper_Body (Node1) is the subunit body
6414 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
6416 ---------------------------------
6417 -- 11.1 Exception Declaration --
6418 ---------------------------------
6420 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
6421 -- [ASPECT_SPECIFICATIONS];
6423 -- For consistency with object declarations etc., the parser converts
6424 -- the case of multiple identifiers being declared to a series of
6425 -- declarations in which the expression is copied, using the More_Ids
6426 -- and Prev_Ids flags to remember the source form as described in the
6427 -- section on "Handling of Defining Identifier Lists".
6429 -- N_Exception_Declaration
6430 -- Sloc points to EXCEPTION
6431 -- Defining_Identifier (Node1)
6432 -- Expression (Node3-Sem)
6433 -- Renaming_Exception (Node2-Sem)
6434 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6435 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6437 ------------------------------------------
6438 -- 11.2 Handled Sequence Of Statements --
6439 ------------------------------------------
6441 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
6442 -- SEQUENCE_OF_STATEMENTS
6444 -- EXCEPTION_HANDLER
6445 -- {EXCEPTION_HANDLER}]
6447 -- cleanup_procedure_call (param, param, param, ...);]
6449 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
6450 -- used only internally currently, but is considered to be syntactic.
6451 -- At the moment, the only cleanup action allowed is a single call to
6452 -- a parameterless procedure, and the Identifier field of the node is
6453 -- the procedure to be called. The cleanup action occurs whenever the
6454 -- sequence of statements is left for any reason. The possible reasons
6456 -- 1. reaching the end of the sequence
6457 -- 2. exit, return, or goto
6458 -- 3. exception or abort
6459 -- For some back ends, such as gcc with ZCX, "at end" is implemented
6460 -- entirely in the back end. In this case, a handled sequence of
6461 -- statements with an "at end" cannot also have exception handlers.
6462 -- For other back ends, such as gcc with SJLJ and .NET, the
6463 -- implementation is split between the front end and back end; the front
6464 -- end implements 3, and the back end implements 1 and 2. In this case,
6465 -- if there is an "at end", the front end inserts the appropriate
6466 -- exception handler, and this handler takes precedence over "at end"
6467 -- in case of exception.
6469 -- The inserted exception handler is of the form:
6471 -- when all others =>
6475 -- where cleanup is the procedure to be called. The reason we do this is
6476 -- so that the front end can handle the necessary entries in the
6477 -- exception tables, and other exception handler actions required as
6478 -- part of the normal handling for exception handlers.
6480 -- The AT END cleanup handler protects only the sequence of statements
6481 -- (not the associated declarations of the parent), just like exception
6482 -- handlers. The big difference is that the cleanup procedure is called
6483 -- on either a normal or an abnormal exit from the statement sequence.
6485 -- Note: the list of Exception_Handlers can contain pragmas as well
6486 -- as actual handlers. In practice these pragmas can only occur at
6487 -- the start of the list, since any pragmas occurring later on will
6488 -- be included in the statement list of the corresponding handler.
6490 -- Note: although in the Ada syntax, the sequence of statements in
6491 -- a handled sequence of statements can only contain statements, we
6492 -- allow free mixing of declarations and statements in the resulting
6493 -- expanded tree. This is for example used to deal with the case of
6494 -- a cleanup procedure that must handle declarations as well as the
6495 -- statements of a block.
6497 -- N_Handled_Sequence_Of_Statements
6498 -- Sloc points to first token of first statement
6499 -- Statements (List3)
6500 -- End_Label (Node4) (set to Empty if expander generated)
6501 -- Exception_Handlers (List5) (set to No_List if none present)
6502 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
6503 -- First_Real_Statement (Node2-Sem)
6505 -- Note: the parent always contains a Declarations field which contains
6506 -- declarations associated with the handled sequence of statements. This
6507 -- is true even in the case of an accept statement (see description of
6508 -- the N_Accept_Statement node).
6510 -- End_Label refers to the containing construct
6512 -----------------------------
6513 -- 11.2 Exception Handler --
6514 -----------------------------
6516 -- EXCEPTION_HANDLER ::=
6517 -- when [CHOICE_PARAMETER_SPECIFICATION :]
6518 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
6519 -- SEQUENCE_OF_STATEMENTS
6521 -- Note: choice parameter specification is not allowed in Ada 83 mode
6523 -- N_Exception_Handler
6524 -- Sloc points to WHEN
6525 -- Choice_Parameter (Node2) (set to Empty if not present)
6526 -- Exception_Choices (List4)
6527 -- Statements (List3)
6528 -- Exception_Label (Node5-Sem) (set to Empty of not present)
6529 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
6530 -- Local_Raise_Not_OK (Flag7-Sem)
6531 -- Has_Local_Raise (Flag8-Sem)
6533 ------------------------------------------
6534 -- 11.2 Choice parameter specification --
6535 ------------------------------------------
6537 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
6539 ----------------------------
6540 -- 11.2 Exception Choice --
6541 ----------------------------
6543 -- EXCEPTION_CHOICE ::= exception_NAME | others
6545 -- Except in the case of OTHERS, no explicit node appears in the tree
6546 -- for exception choice. Instead the exception name appears directly.
6547 -- An OTHERS choice is represented by a N_Others_Choice node (see
6550 -- Note: for the exception choice created for an at end handler, the
6551 -- exception choice is an N_Others_Choice node with All_Others set.
6553 ---------------------------
6554 -- 11.3 Raise Statement --
6555 ---------------------------
6557 -- RAISE_STATEMENT ::= raise [exception_NAME];
6559 -- In Ada 2005, we have
6561 -- RAISE_STATEMENT ::=
6562 -- raise; | raise exception_NAME [with string_EXPRESSION];
6564 -- N_Raise_Statement
6565 -- Sloc points to RAISE
6566 -- Name (Node2) (set to Empty if no exception name present)
6567 -- Expression (Node3) (set to Empty if no expression present)
6568 -- From_At_End (Flag4-Sem)
6570 ----------------------------
6571 -- 11.3 Raise Expression --
6572 ----------------------------
6574 -- RAISE_EXPRESSION ::= raise exception_NAME [with string_EXPRESSION]
6576 -- N_Raise_Expression
6577 -- Sloc points to RAISE
6578 -- Name (Node2) (always present)
6579 -- Expression (Node3) (set to Empty if no expression present)
6580 -- Convert_To_Return_False (Flag13-Sem)
6581 -- plus fields for expression
6583 -------------------------------
6584 -- 12.1 Generic Declaration --
6585 -------------------------------
6587 -- GENERIC_DECLARATION ::=
6588 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
6590 ------------------------------------------
6591 -- 12.1 Generic Subprogram Declaration --
6592 ------------------------------------------
6594 -- GENERIC_SUBPROGRAM_DECLARATION ::=
6595 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION
6596 -- [ASPECT_SPECIFICATIONS];
6598 -- Note: Generic_Formal_Declarations can include pragmas
6600 -- N_Generic_Subprogram_Declaration
6601 -- Sloc points to GENERIC
6602 -- Specification (Node1) subprogram specification
6603 -- Corresponding_Body (Node5-Sem)
6604 -- Generic_Formal_Declarations (List2) from generic formal part
6605 -- Parent_Spec (Node4-Sem)
6607 ---------------------------------------
6608 -- 12.1 Generic Package Declaration --
6609 ---------------------------------------
6611 -- GENERIC_PACKAGE_DECLARATION ::=
6612 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
6613 -- [ASPECT_SPECIFICATIONS];
6615 -- Note: when we do generics right, the Activation_Chain_Entity entry
6616 -- for this node can be removed (since the expander won't see generic
6617 -- units any more)???.
6619 -- Note: Generic_Formal_Declarations can include pragmas
6621 -- N_Generic_Package_Declaration
6622 -- Sloc points to GENERIC
6623 -- Specification (Node1) package specification
6624 -- Corresponding_Body (Node5-Sem)
6625 -- Generic_Formal_Declarations (List2) from generic formal part
6626 -- Parent_Spec (Node4-Sem)
6627 -- Activation_Chain_Entity (Node3-Sem)
6629 -------------------------------
6630 -- 12.1 Generic Formal Part --
6631 -------------------------------
6633 -- GENERIC_FORMAL_PART ::=
6634 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
6636 ------------------------------------------------
6637 -- 12.1 Generic Formal Parameter Declaration --
6638 ------------------------------------------------
6640 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
6641 -- FORMAL_OBJECT_DECLARATION
6642 -- | FORMAL_TYPE_DECLARATION
6643 -- | FORMAL_SUBPROGRAM_DECLARATION
6644 -- | FORMAL_PACKAGE_DECLARATION
6646 ---------------------------------
6647 -- 12.3 Generic Instantiation --
6648 ---------------------------------
6650 -- GENERIC_INSTANTIATION ::=
6651 -- package DEFINING_PROGRAM_UNIT_NAME is
6652 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
6653 -- [ASPECT_SPECIFICATIONS];
6654 -- | [[not] overriding]
6655 -- procedure DEFINING_PROGRAM_UNIT_NAME is
6656 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
6657 -- [ASPECT_SPECIFICATIONS];
6658 -- | [[not] overriding]
6659 -- function DEFINING_DESIGNATOR is
6660 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
6661 -- [ASPECT_SPECIFICATIONS];
6663 -- N_Package_Instantiation
6664 -- Sloc points to PACKAGE
6665 -- Defining_Unit_Name (Node1)
6667 -- Generic_Associations (List3) (set to No_List if no
6668 -- generic actual part)
6669 -- Parent_Spec (Node4-Sem)
6670 -- Instance_Spec (Node5-Sem)
6671 -- ABE_Is_Certain (Flag18-Sem)
6673 -- N_Procedure_Instantiation
6674 -- Sloc points to PROCEDURE
6675 -- Defining_Unit_Name (Node1)
6677 -- Parent_Spec (Node4-Sem)
6678 -- Generic_Associations (List3) (set to No_List if no
6679 -- generic actual part)
6680 -- Instance_Spec (Node5-Sem)
6681 -- Must_Override (Flag14) set if overriding indicator present
6682 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6683 -- ABE_Is_Certain (Flag18-Sem)
6685 -- N_Function_Instantiation
6686 -- Sloc points to FUNCTION
6687 -- Defining_Unit_Name (Node1)
6689 -- Generic_Associations (List3) (set to No_List if no
6690 -- generic actual part)
6691 -- Parent_Spec (Node4-Sem)
6692 -- Instance_Spec (Node5-Sem)
6693 -- Must_Override (Flag14) set if overriding indicator present
6694 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6695 -- ABE_Is_Certain (Flag18-Sem)
6697 -- Note: overriding indicator is an Ada 2005 feature
6699 -------------------------------
6700 -- 12.3 Generic Actual Part --
6701 -------------------------------
6703 -- GENERIC_ACTUAL_PART ::=
6704 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
6706 -------------------------------
6707 -- 12.3 Generic Association --
6708 -------------------------------
6710 -- GENERIC_ASSOCIATION ::=
6711 -- [generic_formal_parameter_SELECTOR_NAME =>]
6713 -- Note: unlike the procedure call case, a generic association node
6714 -- is generated for every association, even if no formal parameter
6715 -- selector name is present. In this case the parser will leave the
6716 -- Selector_Name field set to Empty, to be filled in later by the
6719 -- In Ada 2005, a formal may be associated with a box, if the
6720 -- association is part of the list of actuals for a formal package.
6721 -- If the association is given by OTHERS => <>, the association is
6722 -- an N_Others_Choice.
6724 -- N_Generic_Association
6725 -- Sloc points to first token of generic association
6726 -- Selector_Name (Node2) (set to Empty if no formal
6727 -- parameter selector name)
6728 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
6729 -- Box_Present (Flag15) (for formal_package associations with a box)
6731 ---------------------------------------------
6732 -- 12.3 Explicit Generic Actual Parameter --
6733 ---------------------------------------------
6735 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
6736 -- EXPRESSION | variable_NAME | subprogram_NAME
6737 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
6739 -------------------------------------
6740 -- 12.4 Formal Object Declaration --
6741 -------------------------------------
6743 -- FORMAL_OBJECT_DECLARATION ::=
6744 -- DEFINING_IDENTIFIER_LIST :
6745 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
6746 -- [ASPECT_SPECIFICATIONS];
6747 -- | DEFINING_IDENTIFIER_LIST :
6748 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
6749 -- [ASPECT_SPECIFICATIONS];
6751 -- Although the syntax allows multiple identifiers in the list, the
6752 -- semantics is as though successive declarations were given with
6753 -- identical type definition and expression components. To simplify
6754 -- semantic processing, the parser represents a multiple declaration
6755 -- case as a sequence of single declarations, using the More_Ids and
6756 -- Prev_Ids flags to preserve the original source form as described
6757 -- in the section on "Handling of Defining Identifier Lists".
6759 -- N_Formal_Object_Declaration
6760 -- Sloc points to first identifier
6761 -- Defining_Identifier (Node1)
6762 -- In_Present (Flag15)
6763 -- Out_Present (Flag17)
6764 -- Null_Exclusion_Present (Flag11) (set to False if not present)
6765 -- Subtype_Mark (Node4) (set to Empty if not present)
6766 -- Access_Definition (Node3) (set to Empty if not present)
6767 -- Default_Expression (Node5) (set to Empty if no default expression)
6768 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6769 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6771 -----------------------------------
6772 -- 12.5 Formal Type Declaration --
6773 -----------------------------------
6775 -- FORMAL_TYPE_DECLARATION ::=
6776 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
6777 -- is FORMAL_TYPE_DEFINITION
6778 -- [ASPECT_SPECIFICATIONS];
6779 -- | type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [is tagged]
6781 -- N_Formal_Type_Declaration
6782 -- Sloc points to TYPE
6783 -- Defining_Identifier (Node1)
6784 -- Formal_Type_Definition (Node3)
6785 -- Discriminant_Specifications (List4) (set to No_List if no
6786 -- discriminant part)
6787 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
6789 ----------------------------------
6790 -- 12.5 Formal type definition --
6791 ----------------------------------
6793 -- FORMAL_TYPE_DEFINITION ::=
6794 -- FORMAL_PRIVATE_TYPE_DEFINITION
6795 -- | FORMAL_DERIVED_TYPE_DEFINITION
6796 -- | FORMAL_DISCRETE_TYPE_DEFINITION
6797 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
6798 -- | FORMAL_MODULAR_TYPE_DEFINITION
6799 -- | FORMAL_FLOATING_POINT_DEFINITION
6800 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
6801 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
6802 -- | FORMAL_ARRAY_TYPE_DEFINITION
6803 -- | FORMAL_ACCESS_TYPE_DEFINITION
6804 -- | FORMAL_INTERFACE_TYPE_DEFINITION
6805 -- | FORMAL_INCOMPLETE_TYPE_DEFINITION
6807 -- The Ada 2012 syntax introduces two new non-terminals:
6808 -- Formal_{Complete,Incomplete}_Type_Declaration just to introduce
6809 -- the latter category. Here we introduce an incomplete type definition
6810 -- in order to preserve as much as possible the existing structure.
6812 ---------------------------------------------
6813 -- 12.5.1 Formal Private Type Definition --
6814 ---------------------------------------------
6816 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
6817 -- [[abstract] tagged] [limited] private
6819 -- Note: TAGGED is not allowed in Ada 83 mode
6821 -- N_Formal_Private_Type_Definition
6822 -- Sloc points to PRIVATE
6823 -- Uninitialized_Variable (Node3-Sem)
6824 -- Abstract_Present (Flag4)
6825 -- Tagged_Present (Flag15)
6826 -- Limited_Present (Flag17)
6828 --------------------------------------------
6829 -- 12.5.1 Formal Derived Type Definition --
6830 --------------------------------------------
6832 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6833 -- [abstract] [limited | synchronized]
6834 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6835 -- Note: this construct is not allowed in Ada 83 mode
6837 -- N_Formal_Derived_Type_Definition
6838 -- Sloc points to NEW
6839 -- Subtype_Mark (Node4)
6840 -- Private_Present (Flag15)
6841 -- Abstract_Present (Flag4)
6842 -- Limited_Present (Flag17)
6843 -- Synchronized_Present (Flag7)
6844 -- Interface_List (List2) (set to No_List if none)
6846 -----------------------------------------------
6847 -- 12.5.1 Formal Incomplete Type Definition --
6848 -----------------------------------------------
6850 -- FORMAL_INCOMPLETE_TYPE_DEFINITION ::= [tagged]
6852 -- N_Formal_Incomplete_Type_Definition
6853 -- Sloc points to identifier of parent
6854 -- Tagged_Present (Flag15)
6856 ---------------------------------------------
6857 -- 12.5.2 Formal Discrete Type Definition --
6858 ---------------------------------------------
6860 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6862 -- N_Formal_Discrete_Type_Definition
6865 ---------------------------------------------------
6866 -- 12.5.2 Formal Signed Integer Type Definition --
6867 ---------------------------------------------------
6869 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6871 -- N_Formal_Signed_Integer_Type_Definition
6872 -- Sloc points to RANGE
6874 --------------------------------------------
6875 -- 12.5.2 Formal Modular Type Definition --
6876 --------------------------------------------
6878 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6880 -- N_Formal_Modular_Type_Definition
6881 -- Sloc points to MOD
6883 ----------------------------------------------
6884 -- 12.5.2 Formal Floating Point Definition --
6885 ----------------------------------------------
6887 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6889 -- N_Formal_Floating_Point_Definition
6890 -- Sloc points to DIGITS
6892 ----------------------------------------------------
6893 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6894 ----------------------------------------------------
6896 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6898 -- N_Formal_Ordinary_Fixed_Point_Definition
6899 -- Sloc points to DELTA
6901 ---------------------------------------------------
6902 -- 12.5.2 Formal Decimal Fixed Point Definition --
6903 ---------------------------------------------------
6905 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6907 -- Note: formal decimal fixed point definition not allowed in Ada 83
6909 -- N_Formal_Decimal_Fixed_Point_Definition
6910 -- Sloc points to DELTA
6912 ------------------------------------------
6913 -- 12.5.3 Formal Array Type Definition --
6914 ------------------------------------------
6916 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6918 -------------------------------------------
6919 -- 12.5.4 Formal Access Type Definition --
6920 -------------------------------------------
6922 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6924 ----------------------------------------------
6925 -- 12.5.5 Formal Interface Type Definition --
6926 ----------------------------------------------
6928 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6930 -----------------------------------------
6931 -- 12.6 Formal Subprogram Declaration --
6932 -----------------------------------------
6934 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6935 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6936 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6938 --------------------------------------------------
6939 -- 12.6 Formal Concrete Subprogram Declaration --
6940 --------------------------------------------------
6942 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6943 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
6944 -- [ASPECT_SPECIFICATIONS];
6946 -- N_Formal_Concrete_Subprogram_Declaration
6947 -- Sloc points to WITH
6948 -- Specification (Node1)
6949 -- Default_Name (Node2) (set to Empty if no subprogram default)
6950 -- Box_Present (Flag15)
6952 -- Note: if no subprogram default is present, then Name is set
6953 -- to Empty, and Box_Present is False.
6955 --------------------------------------------------
6956 -- 12.6 Formal Abstract Subprogram Declaration --
6957 --------------------------------------------------
6959 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6960 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
6961 -- [ASPECT_SPECIFICATIONS];
6963 -- N_Formal_Abstract_Subprogram_Declaration
6964 -- Sloc points to WITH
6965 -- Specification (Node1)
6966 -- Default_Name (Node2) (set to Empty if no subprogram default)
6967 -- Box_Present (Flag15)
6969 -- Note: if no subprogram default is present, then Name is set
6970 -- to Empty, and Box_Present is False.
6972 ------------------------------
6973 -- 12.6 Subprogram Default --
6974 ------------------------------
6976 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6978 -- There is no separate node in the tree for a subprogram default.
6979 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6980 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6981 -- default name or box indication, as needed.
6983 ------------------------
6984 -- 12.6 Default Name --
6985 ------------------------
6987 -- DEFAULT_NAME ::= NAME
6989 --------------------------------------
6990 -- 12.7 Formal Package Declaration --
6991 --------------------------------------
6993 -- FORMAL_PACKAGE_DECLARATION ::=
6994 -- with package DEFINING_IDENTIFIER
6995 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
6996 -- [ASPECT_SPECIFICATIONS];
6998 -- Note: formal package declarations not allowed in Ada 83 mode
7000 -- N_Formal_Package_Declaration
7001 -- Sloc points to WITH
7002 -- Defining_Identifier (Node1)
7004 -- Generic_Associations (List3) (set to No_List if (<>) case or
7005 -- empty generic actual part)
7006 -- Box_Present (Flag15)
7007 -- Instance_Spec (Node5-Sem)
7008 -- ABE_Is_Certain (Flag18-Sem)
7010 --------------------------------------
7011 -- 12.7 Formal Package Actual Part --
7012 --------------------------------------
7014 -- FORMAL_PACKAGE_ACTUAL_PART ::=
7016 -- | [GENERIC_ACTUAL_PART]
7017 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
7019 -- FORMAL_PACKAGE_ASSOCIATION ::=
7020 -- GENERIC_ASSOCIATION
7021 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
7023 -- There is no explicit node in the tree for a formal package actual
7024 -- part. Instead the information appears in the parent node (i.e. the
7025 -- formal package declaration node itself).
7027 -- There is no explicit node for a formal package association. All of
7028 -- them are represented either by a generic association, possibly with
7029 -- Box_Present, or by an N_Others_Choice.
7031 ---------------------------------
7032 -- 13.1 Representation clause --
7033 ---------------------------------
7035 -- REPRESENTATION_CLAUSE ::=
7036 -- ATTRIBUTE_DEFINITION_CLAUSE
7037 -- | ENUMERATION_REPRESENTATION_CLAUSE
7038 -- | RECORD_REPRESENTATION_CLAUSE
7041 ----------------------
7042 -- 13.1 Local Name --
7043 ----------------------
7047 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
7048 -- | library_unit_NAME
7050 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
7051 -- as an attribute reference, which has essentially the same form.
7053 ---------------------------------------
7054 -- 13.3 Attribute definition clause --
7055 ---------------------------------------
7057 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
7058 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
7059 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
7061 -- In Ada 83, the expression must be a simple expression and the
7062 -- local name must be a direct name.
7064 -- Note: the only attribute definition clause that is processed by
7065 -- gigi is an address clause. For all other cases, the information
7066 -- is extracted by the front end and either results in setting entity
7067 -- information, e.g. Esize for the Size clause, or in appropriate
7068 -- expansion actions (e.g. in the case of Storage_Size).
7070 -- For an address clause, Gigi constructs the appropriate addressing
7071 -- code. It also ensures that no aliasing optimizations are made
7072 -- for the object for which the address clause appears.
7074 -- Note: for an address clause used to achieve an overlay:
7078 -- for B'Address use A'Address;
7080 -- the above rule means that Gigi will ensure that no optimizations
7081 -- will be made for B that would violate the implementation advice
7082 -- of RM 13.3(19). However, this advice applies only to B and not
7083 -- to A, which seems unfortunate. The GNAT front end will mark the
7084 -- object A as volatile to also prevent unwanted optimization
7085 -- assumptions based on no aliasing being made for B.
7087 -- N_Attribute_Definition_Clause
7088 -- Sloc points to FOR
7089 -- Name (Node2) the local name
7090 -- Chars (Name1) the identifier name from the attribute designator
7091 -- Expression (Node3) the expression or name
7092 -- Entity (Node4-Sem)
7093 -- Next_Rep_Item (Node5-Sem)
7094 -- From_At_Mod (Flag4-Sem)
7095 -- Check_Address_Alignment (Flag11-Sem)
7096 -- From_Aspect_Specification (Flag13-Sem)
7097 -- Is_Delayed_Aspect (Flag14-Sem)
7098 -- Address_Warning_Posted (Flag18-Sem)
7100 -- Note: if From_Aspect_Specification is set, then Sloc points to the
7101 -- aspect name, and Entity is resolved already to reference the entity
7102 -- to which the aspect applies.
7104 -----------------------------------
7105 -- 13.3.1 Aspect Specifications --
7106 -----------------------------------
7108 -- We modify the RM grammar here, the RM grammar is:
7110 -- ASPECT_SPECIFICATION ::=
7111 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {,
7112 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
7114 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7116 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7118 -- That's inconvenient, since there is no non-terminal name for a single
7119 -- entry in the list of aspects. So we use this grammar instead:
7121 -- ASPECT_SPECIFICATIONS ::=
7122 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
7124 -- ASPECT_SPECIFICATION =>
7125 -- ASPECT_MARK [=> ASPECT_DEFINITION]
7127 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7129 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7131 -- Note that for Annotate, the ASPECT_DEFINITION is a pure positional
7132 -- aggregate with the elements of the aggregate corresponding to the
7133 -- successive arguments of the corresponding pragma.
7135 -- See separate package Aspects for details on the incorporation of
7136 -- these nodes into the tree, and how aspect specifications for a given
7137 -- declaration node are associated with that node.
7139 -- N_Aspect_Specification
7140 -- Sloc points to aspect identifier
7141 -- Identifier (Node1) aspect identifier
7142 -- Aspect_Rep_Item (Node2-Sem)
7143 -- Expression (Node3) Aspect_Definition (set to Empty if none)
7144 -- Entity (Node4-Sem) entity to which the aspect applies
7145 -- Next_Rep_Item (Node5-Sem)
7146 -- Class_Present (Flag6) Set if 'Class present
7147 -- Is_Ignored (Flag9-Sem)
7148 -- Is_Checked (Flag11-Sem)
7149 -- Is_Delayed_Aspect (Flag14-Sem)
7150 -- Is_Disabled (Flag15-Sem)
7151 -- Is_Boolean_Aspect (Flag16-Sem)
7152 -- Split_PPC (Flag17) Set if split pre/post attribute
7154 -- Note: Aspect_Specification is an Ada 2012 feature
7156 -- Note: The Identifier serves to identify the aspect involved (it
7157 -- is the aspect whose name corresponds to the Chars field). This
7158 -- means that the other fields of this identifier are unused, and
7159 -- in particular we use the Entity field of this identifier to save
7160 -- a copy of the expression for visibility analysis, see spec of
7161 -- Sem_Ch13 for full details of this usage.
7163 -- In the case of aspects of the form xxx'Class, the aspect identifier
7164 -- is for xxx, and Class_Present is set to True.
7166 -- Note: When a Pre or Post aspect specification is processed, it is
7167 -- broken into AND THEN sections. The left most section has Split_PPC
7168 -- set to False, indicating that it is the original specification (e.g.
7169 -- for posting errors). For the other sections, Split_PPC is set True.
7171 ---------------------------------------------
7172 -- 13.4 Enumeration representation clause --
7173 ---------------------------------------------
7175 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
7176 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
7178 -- In Ada 83, the name must be a direct name
7180 -- N_Enumeration_Representation_Clause
7181 -- Sloc points to FOR
7182 -- Identifier (Node1) direct name
7183 -- Array_Aggregate (Node3)
7184 -- Next_Rep_Item (Node5-Sem)
7186 ---------------------------------
7187 -- 13.4 Enumeration aggregate --
7188 ---------------------------------
7190 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
7192 ------------------------------------------
7193 -- 13.5.1 Record representation clause --
7194 ------------------------------------------
7196 -- RECORD_REPRESENTATION_CLAUSE ::=
7197 -- for first_subtype_LOCAL_NAME use
7198 -- record [MOD_CLAUSE]
7199 -- {COMPONENT_CLAUSE}
7202 -- Gigi restriction: Mod_Clause is always Empty (if present it is
7203 -- replaced by a corresponding Alignment attribute definition clause).
7205 -- Note: Component_Clauses can include pragmas
7207 -- N_Record_Representation_Clause
7208 -- Sloc points to FOR
7209 -- Identifier (Node1) direct name
7210 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
7211 -- Component_Clauses (List3)
7212 -- Next_Rep_Item (Node5-Sem)
7214 ------------------------------
7215 -- 13.5.1 Component clause --
7216 ------------------------------
7218 -- COMPONENT_CLAUSE ::=
7219 -- component_LOCAL_NAME at POSITION
7220 -- range FIRST_BIT .. LAST_BIT;
7222 -- N_Component_Clause
7223 -- Sloc points to AT
7224 -- Component_Name (Node1) points to Name or Attribute_Reference
7226 -- First_Bit (Node3)
7229 ----------------------
7230 -- 13.5.1 Position --
7231 ----------------------
7233 -- POSITION ::= static_EXPRESSION
7235 -----------------------
7236 -- 13.5.1 First_Bit --
7237 -----------------------
7239 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
7241 ----------------------
7242 -- 13.5.1 Last_Bit --
7243 ----------------------
7245 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
7247 --------------------------
7248 -- 13.8 Code statement --
7249 --------------------------
7251 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
7253 -- Note: in GNAT, the qualified expression has the form
7255 -- Asm_Insn'(Asm (...));
7257 -- See package System.Machine_Code in file s-maccod.ads for details on
7258 -- the allowed parameters to Asm. There are two ways this node can
7259 -- arise, as a code statement, in which case the expression is the
7260 -- qualified expression, or as a result of the expansion of an intrinsic
7261 -- call to the Asm or Asm_Input procedure.
7264 -- Sloc points to first token of the expression
7265 -- Expression (Node3)
7267 -- Note: package Exp_Code contains an abstract functional interface
7268 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
7270 ------------------------
7271 -- 13.12 Restriction --
7272 ------------------------
7275 -- restriction_IDENTIFIER
7276 -- | restriction_parameter_IDENTIFIER => EXPRESSION
7278 -- There is no explicit node for restrictions. Instead the restriction
7279 -- appears in normal pragma syntax as a pragma argument association,
7280 -- which has the same syntactic form.
7282 --------------------------
7283 -- B.2 Shift Operators --
7284 --------------------------
7286 -- Calls to the intrinsic shift functions are converted to one of
7287 -- the following shift nodes, which have the form of normal binary
7288 -- operator names. Note that for a given shift operation, one node
7289 -- covers all possible types, as for normal operators.
7291 -- Note: it is perfectly permissible for the expander to generate
7292 -- shift operation nodes directly, in which case they will be analyzed
7293 -- and parsed in the usual manner.
7295 -- Sprint syntax: shift-function-name!(expr, count)
7297 -- Note: the Left_Opnd field holds the first argument (the value to
7298 -- be shifted). The Right_Opnd field holds the second argument (the
7299 -- shift count). The Chars field is the name of the intrinsic function.
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_Rotate_Right
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 -- N_Op_Shift_Right_Arithmetic
7320 -- Sloc points to the function name
7321 -- plus fields for binary operator
7322 -- plus fields for expression
7323 -- Shift_Count_OK (Flag4-Sem)
7326 -- Sloc points to the function name
7327 -- plus fields for binary operator
7328 -- plus fields for expression
7329 -- Shift_Count_OK (Flag4-Sem)
7331 -- Note: N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic
7332 -- never appear in the expanded tree if Modify_Tree_For_C mode is set.
7334 -- Note: For N_Op_Shift_Left and N_Op_Shift_Right, the right operand is
7335 -- always less than the word size if Modify_Tree_For_C mode is set.
7337 --------------------------
7338 -- Obsolescent Features --
7339 --------------------------
7341 -- The syntax descriptions and tree nodes for obsolescent features are
7342 -- grouped together, corresponding to their location in appendix I in
7343 -- the RM. However, parsing and semantic analysis for these constructs
7344 -- is located in an appropriate chapter (see individual notes).
7346 ---------------------------
7347 -- J.3 Delta Constraint --
7348 ---------------------------
7350 -- Note: the parse routine for this construct is located in section
7351 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
7352 -- where delta constraint logically belongs.
7354 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
7356 -- N_Delta_Constraint
7357 -- Sloc points to DELTA
7358 -- Delta_Expression (Node3)
7359 -- Range_Constraint (Node4) (set to Empty if not present)
7361 --------------------
7363 --------------------
7365 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
7367 -- Note: the parse routine for this construct is located in Par-Ch13,
7368 -- and the semantic analysis is in Sem_Ch13, where at clause logically
7369 -- belongs if it were not obsolescent.
7371 -- Note: in Ada 83 the expression must be a simple expression
7373 -- Gigi restriction: This node never appears, it is rewritten as an
7374 -- address attribute definition clause.
7377 -- Sloc points to FOR
7378 -- Identifier (Node1)
7379 -- Expression (Node3)
7381 ---------------------
7382 -- J.8 Mod clause --
7383 ---------------------
7385 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
7387 -- Note: the parse routine for this construct is located in Par-Ch13,
7388 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
7389 -- belongs if it were not obsolescent.
7391 -- Note: in Ada 83, the expression must be a simple expression
7393 -- Gigi restriction: this node never appears. It is replaced
7394 -- by a corresponding Alignment attribute definition clause.
7396 -- Note: pragmas can appear before and after the MOD_CLAUSE since
7397 -- its name has "clause" in it. This is rather strange, but is quite
7398 -- definitely specified. The pragmas before are collected in the
7399 -- Pragmas_Before field of the mod clause node itself, and pragmas
7400 -- after are simply swallowed up in the list of component clauses.
7403 -- Sloc points to AT
7404 -- Expression (Node3)
7405 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
7407 --------------------
7408 -- Semantic Nodes --
7409 --------------------
7411 -- These semantic nodes are used to hold additional semantic information.
7412 -- They are inserted into the tree as a result of semantic processing.
7413 -- Although there are no legitimate source syntax constructions that
7414 -- correspond directly to these nodes, we need a source syntax for the
7415 -- reconstructed tree printed by Sprint, and the node descriptions here
7416 -- show this syntax.
7418 ------------------------
7419 -- Compound Statement --
7420 ------------------------
7422 -- This node is created by the analyzer/expander to handle some
7423 -- expansion cases where a sequence of actions needs to be captured
7424 -- within a single node (which acts as a container and allows the
7425 -- entire list of actions to be moved around as a whole) appearing
7426 -- in a sequence of statements.
7428 -- This is the statement counterpart to the expression node
7429 -- N_Expression_With_Actions.
7431 -- The required semantics is that the set of actions is executed in
7432 -- the order in which it appears, as though they appeared by themselves
7433 -- in the enclosing list of declarations of statements. Unlike what
7434 -- happens when using an N_Block_Statement, no new scope is introduced.
7436 -- Note: for the time being, this is used only as a transient
7437 -- representation during expansion, and all compound statement nodes
7438 -- must be exploded back to their constituent statements before handing
7439 -- the tree to the back end.
7441 -- Sprint syntax: do
7448 -- N_Compound_Statement
7455 -- This node is used to hold the various parts of an entry, subprogram
7456 -- [body] or package [body] contract, in particular:
7457 -- Abstract states declared by a package declaration
7458 -- Contract cases that apply to a subprogram
7459 -- Dependency relations of inputs and output of a subprogram
7460 -- Global annotations classifying data as input or output
7461 -- Initialization sequences for a package declaration
7462 -- Pre- and postconditions that apply to a subprogram
7464 -- The node appears in an entry and [generic] subprogram [body] entity.
7466 -- Sprint syntax: <none> as the node should not appear in the tree, but
7467 -- only attached to an entry or [generic] subprogram
7471 -- Sloc points to the subprogram's name
7472 -- Pre_Post_Conditions (Node1) (set to Empty if none)
7473 -- Contract_Test_Cases (Node2) (set to Empty if none)
7474 -- Classifications (Node3) (set to Empty if none)
7476 -- Pre_Post_Conditions contains a collection of pragmas that correspond
7477 -- to pre- and postconditions associated with an entry or a subprogram
7478 -- [body or stub]. The pragmas can either come from source or be the
7479 -- byproduct of aspect expansion. Currently the following pragmas appear
7486 -- The ordering in the list is in LIFO fashion.
7488 -- Note that there might be multiple preconditions or postconditions
7489 -- in this list, either because they come from separate pragmas in the
7490 -- source, or because a Pre (resp. Post) aspect specification has been
7491 -- broken into AND THEN sections. See Split_PPC for details.
7493 -- Contract_Test_Cases contains a collection of pragmas that correspond
7494 -- to aspects/pragmas Contract_Cases and Test_Case. The ordering in the
7495 -- list is in LIFO fashion.
7497 -- Classifications contains pragmas that either declare, categorize or
7498 -- establish dependencies between subprogram or package inputs and
7499 -- outputs. Currently the following pragmas appear in this list:
7507 -- Initial_Condition
7513 -- The ordering is in LIFO fashion.
7519 -- The N_Expanded_Name node is used to represent a selected component
7520 -- name that has been resolved to an expanded name. The semantic phase
7521 -- replaces N_Selected_Component nodes that represent names by the use
7522 -- of this node, leaving the N_Selected_Component node used only when
7523 -- the prefix is a record or protected type.
7525 -- The fields of the N_Expanded_Name node are layed out identically
7526 -- to those of the N_Selected_Component node, allowing conversion of
7527 -- an expanded name node to a selected component node to be done
7528 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
7530 -- There is no special sprint syntax for an expanded name
7533 -- Sloc points to the period
7534 -- Chars (Name1) copy of Chars field of selector name
7536 -- Selector_Name (Node2)
7537 -- Entity (Node4-Sem)
7538 -- Associated_Node (Node4-Sem)
7539 -- Has_Private_View (Flag11-Sem) set in generic units.
7540 -- Redundant_Use (Flag13-Sem)
7541 -- Atomic_Sync_Required (Flag14-Sem)
7542 -- plus fields for expression
7544 -----------------------------
7545 -- Expression With Actions --
7546 -----------------------------
7548 -- This node is created by the analyzer/expander to handle some
7549 -- expansion cases, notably short circuit forms where there are
7550 -- actions associated with the right-hand side operand.
7552 -- The N_Expression_With_Actions node represents an expression with
7553 -- an associated set of actions (which are executable statements and
7554 -- declarations, as might occur in a handled statement sequence).
7556 -- The required semantics is that the set of actions is executed in
7557 -- the order in which it appears just before the expression is
7558 -- evaluated (and these actions must only be executed if the value
7559 -- of the expression is evaluated). The node is considered to be
7560 -- a subexpression, whose value is the value of the Expression after
7561 -- executing all the actions.
7563 -- If the actions contain declarations, then these declarations may
7564 -- be referenced within the expression. However note that there is
7565 -- no proper scope associated with the expression-with-action, so the
7566 -- back-end will elaborate them in the context of the enclosing scope.
7568 -- Sprint syntax: do
7573 -- in expression end
7575 -- N_Expression_With_Actions
7577 -- Expression (Node3)
7578 -- plus fields for expression
7580 -- Note: In the final generated tree presented to the code generator,
7581 -- the actions list is always non-null, since there is no point in this
7582 -- node if the actions are Empty. During semantic analysis there are
7583 -- cases where it is convenient to temporarily generate an empty actions
7584 -- list. This arises in cases where we create such an empty actions
7585 -- list, and it may or may not end up being a place where additional
7586 -- actions are inserted. The expander removes such empty cases after
7587 -- the expression of the node is fully analyzed and expanded, at which
7588 -- point it is safe to remove it, since no more actions can be inserted.
7590 -- Note: In Modify_Tree_For_C, we never generate any declarations in
7591 -- the action list, which can contain only non-declarative statements.
7593 --------------------
7594 -- Free Statement --
7595 --------------------
7597 -- The N_Free_Statement node is generated as a result of a call to an
7598 -- instantiation of Unchecked_Deallocation. The instantiation of this
7599 -- generic is handled specially and generates this node directly.
7601 -- Sprint syntax: free expression
7604 -- Sloc is copied from the unchecked deallocation call
7605 -- Expression (Node3) argument to unchecked deallocation call
7606 -- Storage_Pool (Node1-Sem)
7607 -- Procedure_To_Call (Node2-Sem)
7608 -- Actual_Designated_Subtype (Node4-Sem)
7610 -- Note: in the case where a debug source file is generated, the Sloc
7611 -- for this node points to the FREE keyword in the Sprint file output.
7617 -- This node marks the point in a declarative part at which an entity
7618 -- declared therein becomes frozen. The expander places initialization
7619 -- procedures for types at those points. Gigi uses the freezing point
7620 -- to elaborate entities that may depend on previous private types.
7622 -- See the section in Einfo "Delayed Freezing and Elaboration" for
7623 -- a full description of the use of this node.
7625 -- The Entity field points back to the entity for the type (whose
7626 -- Freeze_Node field points back to this freeze node).
7628 -- The Actions field contains a list of declarations and statements
7629 -- generated by the expander which are associated with the freeze
7630 -- node, and are elaborated as though the freeze node were replaced
7631 -- by this sequence of actions.
7633 -- Note: the Sloc field in the freeze node references a construct
7634 -- associated with the freezing point. This is used for posting
7635 -- messages in some error/warning situations, e.g. the case where
7636 -- a primitive operation of a tagged type is declared too late.
7638 -- Sprint syntax: freeze entity-name [
7643 -- Sloc points near freeze point (see above special note)
7644 -- Entity (Node4-Sem)
7645 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
7646 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
7647 -- Actions (List1) (set to No_List if no freeze actions)
7648 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
7650 -- The Actions field holds actions associated with the freeze. These
7651 -- actions are elaborated at the point where the type is frozen.
7653 -- Note: in the case where a debug source file is generated, the Sloc
7654 -- for this node points to the FREEZE keyword in the Sprint file output.
7656 ---------------------------
7657 -- Freeze Generic Entity --
7658 ---------------------------
7660 -- The freeze point of an entity indicates the point at which the
7661 -- information needed to generate code for the entity is complete.
7662 -- The freeze node for an entity triggers expander activities, such as
7663 -- build initialization procedures, and backend activities, such as
7664 -- completing the elaboration of packages.
7666 -- For entities declared within a generic unit, for which no code is
7667 -- generated, the freeze point is not equally meaningful. However, in
7668 -- Ada 2012 several semantic checks on declarations must be delayed to
7669 -- the freeze point, and we need to include such a mark in the tree to
7670 -- trigger these checks. The Freeze_Generic_Entity node plays no other
7671 -- role, and is ignored by the expander and the back-end.
7673 -- Sprint syntax: freeze_generic entity-name
7675 -- N_Freeze_Generic_Entity
7676 -- Sloc points near freeze point
7677 -- Entity (Node4-Sem)
7679 --------------------------------
7680 -- Implicit Label Declaration --
7681 --------------------------------
7683 -- An implicit label declaration is created for every occurrence of a
7684 -- label on a statement or a label on a block or loop. It is chained
7685 -- in the declarations of the innermost enclosing block as specified
7686 -- in RM section 5.1 (3).
7688 -- The Defining_Identifier is the actual identifier for the statement
7689 -- identifier. Note that the occurrence of the label is a reference, NOT
7690 -- the defining occurrence. The defining occurrence occurs at the head
7691 -- of the innermost enclosing block, and is represented by this node.
7693 -- Note: from the grammar, this might better be called an implicit
7694 -- statement identifier declaration, but the term we choose seems
7695 -- friendlier, since at least informally statement identifiers are
7696 -- called labels in both cases (i.e. when used in labels, and when
7697 -- used as the identifiers of blocks and loops).
7699 -- Note: although this is logically a semantic node, since it does not
7700 -- correspond directly to a source syntax construction, these nodes are
7701 -- actually created by the parser in a post pass done just after parsing
7702 -- is complete, before semantic analysis is started (see Par.Labl).
7704 -- Sprint syntax: labelname : label;
7706 -- N_Implicit_Label_Declaration
7707 -- Sloc points to the << token for a statement identifier, or to the
7708 -- LOOP, DECLARE, or BEGIN token for a loop or block identifier
7709 -- Defining_Identifier (Node1)
7710 -- Label_Construct (Node2-Sem)
7712 -- Note: in the case where a debug source file is generated, the Sloc
7713 -- for this node points to the label name in the generated declaration.
7715 ---------------------
7716 -- Itype Reference --
7717 ---------------------
7719 -- This node is used to create a reference to an Itype. The only purpose
7720 -- is to make sure the Itype is defined if this is the first reference.
7722 -- A typical use of this node is when an Itype is to be referenced in
7723 -- two branches of an IF statement. In this case it is important that
7724 -- the first use of the Itype not be inside the conditional, since then
7725 -- it might not be defined if the other branch of the IF is taken, in
7726 -- the case where the definition generates elaboration code.
7728 -- The Itype field points to the referenced Itype
7730 -- Sprint syntax: reference itype-name
7732 -- N_Itype_Reference
7733 -- Sloc points to the node generating the reference
7734 -- Itype (Node1-Sem)
7736 -- Note: in the case where a debug source file is generated, the Sloc
7737 -- for this node points to the REFERENCE keyword in the file output.
7739 ---------------------
7740 -- Raise xxx Error --
7741 ---------------------
7743 -- One of these nodes is created during semantic analysis to replace
7744 -- a node for an expression that is determined to definitely raise
7745 -- the corresponding exception.
7747 -- The N_Raise_xxx_Error node may also stand alone in place
7748 -- of a declaration or statement, in which case it simply causes
7749 -- the exception to be raised (i.e. it is equivalent to a raise
7750 -- statement that raises the corresponding exception). This use
7751 -- is distinguished by the fact that the Etype in this case is
7752 -- Standard_Void_Type; in the subexpression case, the Etype is the
7753 -- same as the type of the subexpression which it replaces.
7755 -- If Condition is empty, then the raise is unconditional. If the
7756 -- Condition field is non-empty, it is a boolean expression which
7757 -- is first evaluated, and the exception is raised only if the
7758 -- value of the expression is True. In the unconditional case, the
7759 -- creation of this node is usually accompanied by a warning message
7760 -- error. The creation of this node will usually be accompanied by a
7761 -- message (unless it appears within the right operand of a short
7762 -- circuit form whose left argument is static and decisively
7763 -- eliminates elaboration of the raise operation. The condition field
7764 -- can ONLY be present when the node is used as a statement form, it
7765 -- may NOT be present in the case where the node appears within an
7768 -- The exception is generated with a message that contains the
7769 -- file name and line number, and then appended text. The Reason
7770 -- code shows the text to be added. The Reason code is an element
7771 -- of the type Types.RT_Exception_Code, and indicates both the
7772 -- message to be added, and the exception to be raised (which must
7773 -- match the node type). The value is stored by storing a Uint which
7774 -- is the Pos value of the enumeration element in this type.
7776 -- Gigi restriction: This expander ensures that the type of the
7777 -- Condition field is always Standard.Boolean, even if the type
7778 -- in the source is some non-standard boolean type.
7780 -- Sprint syntax: [xxx_error "msg"]
7781 -- or: [xxx_error when condition "msg"]
7783 -- N_Raise_Constraint_Error
7784 -- Sloc references related construct
7785 -- Condition (Node1) (set to Empty if no condition)
7787 -- plus fields for expression
7789 -- N_Raise_Program_Error
7790 -- Sloc references related construct
7791 -- Condition (Node1) (set to Empty if no condition)
7793 -- plus fields for expression
7795 -- N_Raise_Storage_Error
7796 -- Sloc references related construct
7797 -- Condition (Node1) (set to Empty if no condition)
7799 -- plus fields for expression
7801 -- Note: Sloc is copied from the expression generating the exception.
7802 -- In the case where a debug source file is generated, the Sloc for
7803 -- this node points to the left bracket in the Sprint file output.
7805 -- Note: the back end may be required to translate these nodes into
7806 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
7808 ---------------------------------------------
7809 -- Optimization of Exception Raise to Goto --
7810 ---------------------------------------------
7812 -- In some cases, the front end will determine that any exception raised
7813 -- by the back end for a certain exception should be transformed into a
7816 -- There are three kinds of exceptions raised by the back end (note that
7817 -- for this purpose we consider gigi to be part of the back end in the
7820 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
7821 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
7822 -- 3. Other cases not specifically marked by the front end
7824 -- Normally all such exceptions are translated into calls to the proper
7825 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
7826 -- and the exception message.
7828 -- The front end may determine that for a particular sequence of code,
7829 -- exceptions in any of these three categories for a particular builtin
7830 -- exception should result in a goto, rather than a call to Rcheck_xx.
7831 -- The exact sequence to be generated is:
7833 -- Local_Raise (exception'Identity);
7836 -- The front end marks such a sequence of code by bracketing it with
7837 -- push and pop nodes:
7839 -- N_Push_xxx_Label (referencing the label)
7841 -- (code where transformation is expected for exception xxx)
7845 -- The use of push/pop reflects the fact that such regions can properly
7846 -- nest, and one special case is a subregion in which no transformation
7847 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
7848 -- Exception_Label field is Empty.
7850 -- N_Push_Constraint_Error_Label
7851 -- Sloc references first statement in region covered
7852 -- Exception_Label (Node5-Sem)
7854 -- N_Push_Program_Error_Label
7855 -- Sloc references first statement in region covered
7856 -- Exception_Label (Node5-Sem)
7858 -- N_Push_Storage_Error_Label
7859 -- Sloc references first statement in region covered
7860 -- Exception_Label (Node5-Sem)
7862 -- N_Pop_Constraint_Error_Label
7863 -- Sloc references last statement in region covered
7865 -- N_Pop_Program_Error_Label
7866 -- Sloc references last statement in region covered
7868 -- N_Pop_Storage_Error_Label
7869 -- Sloc references last statement in region covered
7875 -- For a number of purposes, we need to construct references to objects.
7876 -- These references are subsequently treated as normal access values.
7877 -- An example is the construction of the parameter block passed to a
7878 -- task entry. The N_Reference node is provided for this purpose. It is
7879 -- similar in effect to the use of the Unrestricted_Access attribute,
7880 -- and like Unrestricted_Access can be applied to objects which would
7881 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
7882 -- objects which are not aliased, and slices). In addition it can be
7883 -- applied to composite type values as well as objects, including string
7884 -- values and aggregates.
7886 -- Note: we use the Prefix field for this expression so that the
7887 -- resulting node can be treated using common code with the attribute
7888 -- nodes for the 'Access and related attributes. Logically it would make
7889 -- more sense to call it an Expression field, but then we would have to
7890 -- special case the treatment of the N_Reference node.
7892 -- Note: evaluating a N_Reference node is guaranteed to yield a non-null
7893 -- value at run time. Therefore, it is valid to set Is_Known_Non_Null on
7894 -- a temporary initialized to a N_Reference node in order to eliminate
7895 -- superfluous access checks.
7897 -- Sprint syntax: prefix'reference
7900 -- Sloc is copied from the expression
7902 -- plus fields for expression
7904 -- Note: in the case where a debug source file is generated, the Sloc
7905 -- for this node points to the quote in the Sprint file output.
7911 -- SCIL nodes are special nodes added to the tree when the CodePeer mode
7912 -- is active. They are only generated if SCIL generation is enabled.
7913 -- A standard tree-walk will not encounter these nodes even if they
7914 -- are present; these nodes are only accessible via the function
7915 -- SCIL_LL.Get_SCIL_Node. These nodes have no associated dynamic
7918 -- Sprint syntax: [ <node kind> ]
7919 -- No semantic field values are displayed.
7921 -- N_SCIL_Dispatch_Table_Tag_Init
7922 -- Sloc references a node for a tag initialization
7923 -- SCIL_Entity (Node4-Sem)
7925 -- An N_SCIL_Dispatch_Table_Tag_Init node may be associated (via
7926 -- Get_SCIL_Node) with the N_Object_Declaration node corresponding to
7927 -- the declaration of the dispatch table for a tagged type.
7929 -- N_SCIL_Dispatching_Call
7930 -- Sloc references the node of a dispatching call
7931 -- SCIL_Target_Prim (Node2-Sem)
7932 -- SCIL_Entity (Node4-Sem)
7933 -- SCIL_Controlling_Tag (Node5-Sem)
7935 -- An N_Scil_Dispatching call node may be associated (via Get_SCIL_Node)
7936 -- with the N_Procedure_Call or N_Function_Call node (or a rewriting
7937 -- thereof) corresponding to a dispatching call.
7939 -- N_SCIL_Membership_Test
7940 -- Sloc references the node of a membership test
7941 -- SCIL_Tag_Value (Node5-Sem)
7942 -- SCIL_Entity (Node4-Sem)
7944 -- An N_Scil_Membership_Test node may be associated (via Get_SCIL_Node)
7945 -- with the N_In node (or a rewriting thereof) corresponding to a
7946 -- classwide membership test.
7948 --------------------------
7949 -- Unchecked Expression --
7950 --------------------------
7952 -- An unchecked expression is one that must be analyzed and resolved
7953 -- with all checks off, regardless of the current setting of scope
7956 -- Sprint syntax: `(expression)
7958 -- Note: this node is always removed from the tree (and replaced by
7959 -- its constituent expression) on completion of analysis, so it only
7960 -- appears in intermediate trees, and will never be seen by Gigi.
7962 -- N_Unchecked_Expression
7963 -- Sloc is a copy of the Sloc of the expression
7964 -- Expression (Node3)
7965 -- plus fields for expression
7967 -- Note: in the case where a debug source file is generated, the Sloc
7968 -- for this node points to the back quote in the Sprint file output.
7970 -------------------------------
7971 -- Unchecked Type Conversion --
7972 -------------------------------
7974 -- An unchecked type conversion node represents the semantic action
7975 -- corresponding to a call to an instantiation of Unchecked_Conversion.
7976 -- It is generated as a result of actual use of Unchecked_Conversion
7977 -- and also the expander generates unchecked type conversion nodes
7978 -- directly for expansion of complex semantic actions.
7980 -- Note: an unchecked type conversion is a variable as far as the
7981 -- semantics are concerned, which is convenient for the expander.
7982 -- This does not change what Ada source programs are legal, since
7983 -- clearly a function call to an instantiation of Unchecked_Conversion
7984 -- is not a variable in any case.
7986 -- Sprint syntax: subtype-mark!(expression)
7988 -- N_Unchecked_Type_Conversion
7989 -- Sloc points to related node in source
7990 -- Subtype_Mark (Node4)
7991 -- Expression (Node3)
7992 -- Kill_Range_Check (Flag11-Sem)
7993 -- No_Truncation (Flag17-Sem)
7994 -- plus fields for expression
7996 -- Note: in the case where a debug source file is generated, the Sloc
7997 -- for this node points to the exclamation in the Sprint file output.
7999 -----------------------------------
8000 -- Validate_Unchecked_Conversion --
8001 -----------------------------------
8003 -- The front end does most of the validation of unchecked conversion,
8004 -- including checking sizes (this is done after the back end is called
8005 -- to take advantage of back-annotation of calculated sizes).
8007 -- The front end also deals with specific cases that are not allowed
8008 -- e.g. involving unconstrained array types.
8010 -- For the case of the standard gigi backend, this means that all
8011 -- checks are done in the front end.
8013 -- However, in the case of specialized back-ends, notably the JVM
8014 -- backend for JGNAT, additional requirements and restrictions apply
8015 -- to unchecked conversion, and these are most conveniently performed
8016 -- in the specialized back-end.
8018 -- To accommodate this requirement, for such back ends, the following
8019 -- special node is generated recording an unchecked conversion that
8020 -- needs to be validated. The back end should post an appropriate
8021 -- error message if the unchecked conversion is invalid or warrants
8022 -- a special warning message.
8024 -- Source_Type and Target_Type point to the entities for the two
8025 -- types involved in the unchecked conversion instantiation that
8026 -- is to be validated.
8028 -- Sprint syntax: validate Unchecked_Conversion (source, target);
8030 -- N_Validate_Unchecked_Conversion
8031 -- Sloc points to instantiation (location for warning message)
8032 -- Source_Type (Node1-Sem)
8033 -- Target_Type (Node2-Sem)
8035 -- Note: in the case where a debug source file is generated, the Sloc
8036 -- for this node points to the VALIDATE keyword in the file output.
8042 -- Used as the contents of the Nkind field of the dummy Empty node
8043 -- and in some other situations to indicate an uninitialized value.
8046 -- Chars (Name1) is set to No_Name
8052 -- Used as the contents of the Nkind field of the dummy Error node.
8053 -- Has an Etype field, which gets set to Any_Type later on, to help
8054 -- error recovery (Error_Posted is also set in the Error node).
8057 -- Chars (Name1) is set to Error_Name
8058 -- Etype (Node5-Sem)
8060 --------------------------
8061 -- Node Type Definition --
8062 --------------------------
8064 -- The following is the definition of the Node_Kind type. As previously
8065 -- discussed, this is separated off to allow rearrangement of the order to
8066 -- facilitate definition of subtype ranges. The comments show the subtype
8067 -- classes which apply to each set of node kinds. The first entry in the
8068 -- comment characterizes the following list of nodes.
8073 -- N_Representation_Clause
8077 N_Enumeration_Representation_Clause,
8079 N_Record_Representation_Clause,
8081 -- N_Representation_Clause, N_Has_Chars
8083 N_Attribute_Definition_Clause,
8088 N_Pragma_Argument_Association,
8090 -- N_Has_Etype, N_Has_Chars
8092 -- Note: of course N_Error does not really have Etype or Chars fields,
8093 -- and any attempt to access these fields in N_Error will cause an
8094 -- error, but historically this always has been positioned so that an
8095 -- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
8096 -- Most likely this makes coding easier somewhere but still seems
8097 -- undesirable. To be investigated some time ???
8101 -- N_Entity, N_Has_Etype, N_Has_Chars
8103 N_Defining_Character_Literal,
8104 N_Defining_Identifier,
8105 N_Defining_Operator_Symbol,
8107 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
8111 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8112 -- N_Has_Chars, N_Has_Entity
8117 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8118 -- N_Has_Chars, N_Has_Entity
8120 N_Character_Literal,
8122 -- N_Binary_Op, N_Op, N_Subexpr,
8123 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
8130 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
8131 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
8138 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8139 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8143 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8144 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
8153 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8154 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8159 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
8160 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
8166 N_Op_Shift_Right_Arithmetic,
8168 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
8169 -- N_Has_Chars, N_Has_Entity
8176 -- N_Subexpr, N_Has_Etype, N_Has_Entity
8178 N_Attribute_Reference,
8180 -- N_Subexpr, N_Has_Etype, N_Membership_Test
8185 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
8190 -- N_Subexpr, N_Has_Etype, N_Subprogram_Call
8193 N_Procedure_Call_Statement,
8195 -- N_Subexpr, N_Has_Etype, N_Raise_xxx_Error
8197 N_Raise_Constraint_Error,
8198 N_Raise_Program_Error,
8199 N_Raise_Storage_Error,
8201 -- N_Subexpr, N_Has_Etype, N_Numeric_Or_String_Literal
8207 -- N_Subexpr, N_Has_Etype
8209 N_Explicit_Dereference,
8210 N_Expression_With_Actions,
8212 N_Indexed_Component,
8214 N_Qualified_Expression,
8215 N_Quantified_Expression,
8219 N_Extension_Aggregate,
8223 N_Selected_Component,
8226 N_Unchecked_Expression,
8227 N_Unchecked_Type_Conversion,
8231 N_Subtype_Indication,
8235 N_Component_Declaration,
8236 N_Entry_Declaration,
8237 N_Expression_Function,
8238 N_Formal_Object_Declaration,
8239 N_Formal_Type_Declaration,
8240 N_Full_Type_Declaration,
8241 N_Incomplete_Type_Declaration,
8242 N_Iterator_Specification,
8243 N_Loop_Parameter_Specification,
8244 N_Object_Declaration,
8245 N_Protected_Type_Declaration,
8246 N_Private_Extension_Declaration,
8247 N_Private_Type_Declaration,
8248 N_Subtype_Declaration,
8250 -- N_Subprogram_Specification, N_Declaration
8252 N_Function_Specification,
8253 N_Procedure_Specification,
8255 -- N_Access_To_Subprogram_Definition
8257 N_Access_Function_Definition,
8258 N_Access_Procedure_Definition,
8260 -- N_Later_Decl_Item
8262 N_Task_Type_Declaration,
8264 -- N_Body_Stub, N_Later_Decl_Item
8266 N_Package_Body_Stub,
8267 N_Protected_Body_Stub,
8268 N_Subprogram_Body_Stub,
8271 -- N_Generic_Instantiation, N_Later_Decl_Item
8272 -- N_Subprogram_Instantiation
8274 N_Function_Instantiation,
8275 N_Procedure_Instantiation,
8277 -- N_Generic_Instantiation, N_Later_Decl_Item
8279 N_Package_Instantiation,
8281 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
8286 -- N_Later_Decl_Item, N_Proper_Body
8291 -- N_Later_Decl_Item
8293 N_Implicit_Label_Declaration,
8294 N_Package_Declaration,
8295 N_Single_Task_Declaration,
8296 N_Subprogram_Declaration,
8297 N_Use_Package_Clause,
8299 -- N_Generic_Declaration, N_Later_Decl_Item
8301 N_Generic_Package_Declaration,
8302 N_Generic_Subprogram_Declaration,
8304 -- N_Array_Type_Definition
8306 N_Constrained_Array_Definition,
8307 N_Unconstrained_Array_Definition,
8309 -- N_Renaming_Declaration
8311 N_Exception_Renaming_Declaration,
8312 N_Object_Renaming_Declaration,
8313 N_Package_Renaming_Declaration,
8314 N_Subprogram_Renaming_Declaration,
8316 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
8318 N_Generic_Function_Renaming_Declaration,
8319 N_Generic_Package_Renaming_Declaration,
8320 N_Generic_Procedure_Renaming_Declaration,
8322 -- N_Statement_Other_Than_Procedure_Call
8326 N_Assignment_Statement,
8327 N_Asynchronous_Select,
8331 N_Compound_Statement,
8332 N_Conditional_Entry_Call,
8334 -- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
8336 N_Delay_Relative_Statement,
8337 N_Delay_Until_Statement,
8339 -- N_Statement_Other_Than_Procedure_Call
8341 N_Entry_Call_Statement,
8347 N_Requeue_Statement,
8348 N_Simple_Return_Statement,
8349 N_Extended_Return_Statement,
8353 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
8360 N_Accept_Alternative,
8361 N_Delay_Alternative,
8363 N_Entry_Body_Formal_Part,
8365 N_Terminate_Alternative,
8367 -- N_Formal_Subprogram_Declaration
8369 N_Formal_Abstract_Subprogram_Declaration,
8370 N_Formal_Concrete_Subprogram_Declaration,
8372 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
8374 N_Push_Constraint_Error_Label,
8375 N_Push_Program_Error_Label,
8376 N_Push_Storage_Error_Label,
8378 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
8380 N_Pop_Constraint_Error_Label,
8381 N_Pop_Program_Error_Label,
8382 N_Pop_Storage_Error_Label,
8386 N_SCIL_Dispatch_Table_Tag_Init,
8387 N_SCIL_Dispatching_Call,
8388 N_SCIL_Membership_Test,
8390 -- Other nodes (not part of any subtype class)
8393 N_Abstract_Subprogram_Declaration,
8394 N_Access_Definition,
8395 N_Access_To_Object_Definition,
8396 N_Aspect_Specification,
8397 N_Case_Expression_Alternative,
8398 N_Case_Statement_Alternative,
8400 N_Compilation_Unit_Aux,
8401 N_Component_Association,
8402 N_Component_Definition,
8405 N_Derived_Type_Definition,
8406 N_Decimal_Fixed_Point_Definition,
8407 N_Defining_Program_Unit_Name,
8410 N_Digits_Constraint,
8411 N_Discriminant_Association,
8412 N_Discriminant_Specification,
8413 N_Enumeration_Type_Definition,
8415 N_Entry_Call_Alternative,
8416 N_Entry_Index_Specification,
8417 N_Exception_Declaration,
8418 N_Exception_Handler,
8419 N_Floating_Point_Definition,
8420 N_Formal_Decimal_Fixed_Point_Definition,
8421 N_Formal_Derived_Type_Definition,
8422 N_Formal_Discrete_Type_Definition,
8423 N_Formal_Floating_Point_Definition,
8424 N_Formal_Modular_Type_Definition,
8425 N_Formal_Ordinary_Fixed_Point_Definition,
8426 N_Formal_Package_Declaration,
8427 N_Formal_Private_Type_Definition,
8428 N_Formal_Incomplete_Type_Definition,
8429 N_Formal_Signed_Integer_Type_Definition,
8431 N_Freeze_Generic_Entity,
8432 N_Generic_Association,
8433 N_Handled_Sequence_Of_Statements,
8434 N_Index_Or_Discriminant_Constraint,
8437 N_Modular_Type_Definition,
8438 N_Number_Declaration,
8439 N_Ordinary_Fixed_Point_Definition,
8441 N_Package_Specification,
8442 N_Parameter_Association,
8443 N_Parameter_Specification,
8445 N_Protected_Definition,
8447 N_Real_Range_Specification,
8448 N_Record_Definition,
8449 N_Signed_Integer_Type_Definition,
8450 N_Single_Protected_Declaration,
8453 N_Triggering_Alternative,
8455 N_Validate_Unchecked_Conversion,
8461 for Node_Kind'Size use 8;
8462 -- The data structures in Atree assume this
8464 ----------------------------
8465 -- Node Class Definitions --
8466 ----------------------------
8468 subtype N_Access_To_Subprogram_Definition is Node_Kind range
8469 N_Access_Function_Definition ..
8470 N_Access_Procedure_Definition;
8472 subtype N_Array_Type_Definition is Node_Kind range
8473 N_Constrained_Array_Definition ..
8474 N_Unconstrained_Array_Definition;
8476 subtype N_Binary_Op is Node_Kind range
8478 N_Op_Shift_Right_Arithmetic;
8480 subtype N_Body_Stub is Node_Kind range
8481 N_Package_Body_Stub ..
8484 subtype N_Declaration is Node_Kind range
8485 N_Component_Declaration ..
8486 N_Procedure_Specification;
8487 -- Note: this includes all constructs normally thought of as declarations
8488 -- except those which are separately grouped as later declarations.
8490 subtype N_Delay_Statement is Node_Kind range
8491 N_Delay_Relative_Statement ..
8492 N_Delay_Until_Statement;
8494 subtype N_Direct_Name is Node_Kind range
8496 N_Character_Literal;
8498 subtype N_Entity is Node_Kind range
8499 N_Defining_Character_Literal ..
8500 N_Defining_Operator_Symbol;
8502 subtype N_Formal_Subprogram_Declaration is Node_Kind range
8503 N_Formal_Abstract_Subprogram_Declaration ..
8504 N_Formal_Concrete_Subprogram_Declaration;
8506 subtype N_Generic_Declaration is Node_Kind range
8507 N_Generic_Package_Declaration ..
8508 N_Generic_Subprogram_Declaration;
8510 subtype N_Generic_Instantiation is Node_Kind range
8511 N_Function_Instantiation ..
8512 N_Package_Instantiation;
8514 subtype N_Generic_Renaming_Declaration is Node_Kind range
8515 N_Generic_Function_Renaming_Declaration ..
8516 N_Generic_Procedure_Renaming_Declaration;
8518 subtype N_Has_Chars is Node_Kind range
8519 N_Attribute_Definition_Clause ..
8522 subtype N_Has_Entity is Node_Kind range
8524 N_Attribute_Reference;
8525 -- Nodes that have Entity fields
8526 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
8527 -- N_Aspect_Specification, or N_Attribute_Definition_Clause.
8529 subtype N_Has_Etype is Node_Kind range
8531 N_Subtype_Indication;
8533 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
8537 subtype N_Multiplying_Operator is Node_Kind range
8541 subtype N_Later_Decl_Item is Node_Kind range
8542 N_Task_Type_Declaration ..
8543 N_Generic_Subprogram_Declaration;
8544 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
8545 -- only those items which can appear as later declarative items. This also
8546 -- includes N_Implicit_Label_Declaration which is not specifically in the
8547 -- grammar but may appear as a valid later declarative items. It does NOT
8548 -- include N_Pragma which can also appear among later declarative items.
8549 -- It does however include N_Protected_Body, which is a bit peculiar, but
8550 -- harmless since this cannot appear in Ada 83 mode anyway.
8552 subtype N_Membership_Test is Node_Kind range
8556 subtype N_Numeric_Or_String_Literal is Node_Kind range
8557 N_Integer_Literal ..
8560 subtype N_Op is Node_Kind range
8564 subtype N_Op_Boolean is Node_Kind range
8567 -- Binary operators which take operands of a boolean type, and yield
8568 -- a result of a boolean type.
8570 subtype N_Op_Compare is Node_Kind range
8574 subtype N_Op_Shift is Node_Kind range
8576 N_Op_Shift_Right_Arithmetic;
8578 subtype N_Proper_Body is Node_Kind range
8582 subtype N_Push_xxx_Label is Node_Kind range
8583 N_Push_Constraint_Error_Label ..
8584 N_Push_Storage_Error_Label;
8586 subtype N_Pop_xxx_Label is Node_Kind range
8587 N_Pop_Constraint_Error_Label ..
8588 N_Pop_Storage_Error_Label;
8590 subtype N_Push_Pop_xxx_Label is Node_Kind range
8591 N_Push_Constraint_Error_Label ..
8592 N_Pop_Storage_Error_Label;
8594 subtype N_Raise_xxx_Error is Node_Kind range
8595 N_Raise_Constraint_Error ..
8596 N_Raise_Storage_Error;
8598 subtype N_Renaming_Declaration is Node_Kind range
8599 N_Exception_Renaming_Declaration ..
8600 N_Generic_Procedure_Renaming_Declaration;
8602 subtype N_Representation_Clause is Node_Kind range
8604 N_Attribute_Definition_Clause;
8606 subtype N_Short_Circuit is Node_Kind range
8610 subtype N_SCIL_Node is Node_Kind range
8611 N_SCIL_Dispatch_Table_Tag_Init ..
8612 N_SCIL_Membership_Test;
8614 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
8615 N_Abort_Statement ..
8617 -- Note that this includes all statement types except for the cases of the
8618 -- N_Procedure_Call_Statement which is considered to be a subexpression
8619 -- (since overloading is possible, so it needs to go through the normal
8620 -- overloading resolution for expressions).
8622 subtype N_Subprogram_Call is Node_Kind range
8624 N_Procedure_Call_Statement;
8626 subtype N_Subprogram_Instantiation is Node_Kind range
8627 N_Function_Instantiation ..
8628 N_Procedure_Instantiation;
8630 subtype N_Has_Condition is Node_Kind range
8632 N_Terminate_Alternative;
8633 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
8635 subtype N_Subexpr is Node_Kind range
8637 N_Unchecked_Type_Conversion;
8638 -- Nodes with expression fields
8640 subtype N_Subprogram_Specification is Node_Kind range
8641 N_Function_Specification ..
8642 N_Procedure_Specification;
8644 subtype N_Unary_Op is Node_Kind range
8648 subtype N_Unit_Body is Node_Kind range
8652 ---------------------------
8653 -- Node Access Functions --
8654 ---------------------------
8656 -- The following functions return the contents of the indicated field of
8657 -- the node referenced by the argument, which is a Node_Id. They provide
8658 -- logical access to fields in the node which could be accessed using the
8659 -- Atree.Unchecked_Access package, but the idea is always to use these
8660 -- higher level routines which preserve strong typing. In debug mode,
8661 -- these routines check that they are being applied to an appropriate
8662 -- node, as well as checking that the node is in range.
8664 function ABE_Is_Certain
8665 (N : Node_Id) return Boolean; -- Flag18
8667 function Abort_Present
8668 (N : Node_Id) return Boolean; -- Flag15
8670 function Abortable_Part
8671 (N : Node_Id) return Node_Id; -- Node2
8673 function Abstract_Present
8674 (N : Node_Id) return Boolean; -- Flag4
8676 function Accept_Handler_Records
8677 (N : Node_Id) return List_Id; -- List5
8679 function Accept_Statement
8680 (N : Node_Id) return Node_Id; -- Node2
8682 function Access_Definition
8683 (N : Node_Id) return Node_Id; -- Node3
8685 function Access_To_Subprogram_Definition
8686 (N : Node_Id) return Node_Id; -- Node3
8688 function Access_Types_To_Process
8689 (N : Node_Id) return Elist_Id; -- Elist2
8692 (N : Node_Id) return List_Id; -- List1
8694 function Activation_Chain_Entity
8695 (N : Node_Id) return Node_Id; -- Node3
8697 function Acts_As_Spec
8698 (N : Node_Id) return Boolean; -- Flag4
8700 function Actual_Designated_Subtype
8701 (N : Node_Id) return Node_Id; -- Node4
8703 function Address_Warning_Posted
8704 (N : Node_Id) return Boolean; -- Flag18
8706 function Aggregate_Bounds
8707 (N : Node_Id) return Node_Id; -- Node3
8709 function Aliased_Present
8710 (N : Node_Id) return Boolean; -- Flag4
8713 (N : Node_Id) return Boolean; -- Flag11
8715 function All_Present
8716 (N : Node_Id) return Boolean; -- Flag15
8718 function Alternatives
8719 (N : Node_Id) return List_Id; -- List4
8721 function Ancestor_Part
8722 (N : Node_Id) return Node_Id; -- Node3
8724 function Atomic_Sync_Required
8725 (N : Node_Id) return Boolean; -- Flag14
8727 function Array_Aggregate
8728 (N : Node_Id) return Node_Id; -- Node3
8730 function Aspect_Rep_Item
8731 (N : Node_Id) return Node_Id; -- Node2
8733 function Assignment_OK
8734 (N : Node_Id) return Boolean; -- Flag15
8736 function Associated_Node
8737 (N : Node_Id) return Node_Id; -- Node4
8739 function At_End_Proc
8740 (N : Node_Id) return Node_Id; -- Node1
8742 function Attribute_Name
8743 (N : Node_Id) return Name_Id; -- Name2
8745 function Aux_Decls_Node
8746 (N : Node_Id) return Node_Id; -- Node5
8748 function Backwards_OK
8749 (N : Node_Id) return Boolean; -- Flag6
8751 function Bad_Is_Detected
8752 (N : Node_Id) return Boolean; -- Flag15
8755 (N : Node_Id) return Boolean; -- Flag5
8757 function Body_Required
8758 (N : Node_Id) return Boolean; -- Flag13
8760 function Body_To_Inline
8761 (N : Node_Id) return Node_Id; -- Node3
8763 function Box_Present
8764 (N : Node_Id) return Boolean; -- Flag15
8766 function Char_Literal_Value
8767 (N : Node_Id) return Uint; -- Uint2
8770 (N : Node_Id) return Name_Id; -- Name1
8772 function Check_Address_Alignment
8773 (N : Node_Id) return Boolean; -- Flag11
8775 function Choice_Parameter
8776 (N : Node_Id) return Node_Id; -- Node2
8779 (N : Node_Id) return List_Id; -- List1
8781 function Class_Present
8782 (N : Node_Id) return Boolean; -- Flag6
8784 function Classifications
8785 (N : Node_Id) return Node_Id; -- Node3
8787 function Cleanup_Actions
8788 (N : Node_Id) return List_Id; -- List5
8790 function Comes_From_Extended_Return_Statement
8791 (N : Node_Id) return Boolean; -- Flag18
8793 function Compile_Time_Known_Aggregate
8794 (N : Node_Id) return Boolean; -- Flag18
8796 function Component_Associations
8797 (N : Node_Id) return List_Id; -- List2
8799 function Component_Clauses
8800 (N : Node_Id) return List_Id; -- List3
8802 function Component_Definition
8803 (N : Node_Id) return Node_Id; -- Node4
8805 function Component_Items
8806 (N : Node_Id) return List_Id; -- List3
8808 function Component_List
8809 (N : Node_Id) return Node_Id; -- Node1
8811 function Component_Name
8812 (N : Node_Id) return Node_Id; -- Node1
8814 function Componentwise_Assignment
8815 (N : Node_Id) return Boolean; -- Flag14
8818 (N : Node_Id) return Node_Id; -- Node1
8820 function Condition_Actions
8821 (N : Node_Id) return List_Id; -- List3
8823 function Config_Pragmas
8824 (N : Node_Id) return List_Id; -- List4
8826 function Constant_Present
8827 (N : Node_Id) return Boolean; -- Flag17
8830 (N : Node_Id) return Node_Id; -- Node3
8832 function Constraints
8833 (N : Node_Id) return List_Id; -- List1
8835 function Context_Installed
8836 (N : Node_Id) return Boolean; -- Flag13
8838 function Context_Pending
8839 (N : Node_Id) return Boolean; -- Flag16
8841 function Context_Items
8842 (N : Node_Id) return List_Id; -- List1
8844 function Contract_Test_Cases
8845 (N : Node_Id) return Node_Id; -- Node2
8847 function Controlling_Argument
8848 (N : Node_Id) return Node_Id; -- Node1
8850 function Conversion_OK
8851 (N : Node_Id) return Boolean; -- Flag14
8853 function Convert_To_Return_False
8854 (N : Node_Id) return Boolean; -- Flag13
8856 function Corresponding_Aspect
8857 (N : Node_Id) return Node_Id; -- Node3
8859 function Corresponding_Body
8860 (N : Node_Id) return Node_Id; -- Node5
8862 function Corresponding_Formal_Spec
8863 (N : Node_Id) return Node_Id; -- Node3
8865 function Corresponding_Generic_Association
8866 (N : Node_Id) return Node_Id; -- Node5
8868 function Corresponding_Integer_Value
8869 (N : Node_Id) return Uint; -- Uint4
8871 function Corresponding_Spec
8872 (N : Node_Id) return Node_Id; -- Node5
8874 function Corresponding_Spec_Of_Stub
8875 (N : Node_Id) return Node_Id; -- Node2
8877 function Corresponding_Stub
8878 (N : Node_Id) return Node_Id; -- Node3
8880 function Dcheck_Function
8881 (N : Node_Id) return Entity_Id; -- Node5
8883 function Declarations
8884 (N : Node_Id) return List_Id; -- List2
8886 function Default_Expression
8887 (N : Node_Id) return Node_Id; -- Node5
8889 function Default_Storage_Pool
8890 (N : Node_Id) return Node_Id; -- Node3
8892 function Default_Name
8893 (N : Node_Id) return Node_Id; -- Node2
8895 function Defining_Identifier
8896 (N : Node_Id) return Entity_Id; -- Node1
8898 function Defining_Unit_Name
8899 (N : Node_Id) return Node_Id; -- Node1
8901 function Delay_Alternative
8902 (N : Node_Id) return Node_Id; -- Node4
8904 function Delay_Statement
8905 (N : Node_Id) return Node_Id; -- Node2
8907 function Delta_Expression
8908 (N : Node_Id) return Node_Id; -- Node3
8910 function Digits_Expression
8911 (N : Node_Id) return Node_Id; -- Node2
8913 function Discr_Check_Funcs_Built
8914 (N : Node_Id) return Boolean; -- Flag11
8916 function Discrete_Choices
8917 (N : Node_Id) return List_Id; -- List4
8919 function Discrete_Range
8920 (N : Node_Id) return Node_Id; -- Node4
8922 function Discrete_Subtype_Definition
8923 (N : Node_Id) return Node_Id; -- Node4
8925 function Discrete_Subtype_Definitions
8926 (N : Node_Id) return List_Id; -- List2
8928 function Discriminant_Specifications
8929 (N : Node_Id) return List_Id; -- List4
8931 function Discriminant_Type
8932 (N : Node_Id) return Node_Id; -- Node5
8934 function Do_Accessibility_Check
8935 (N : Node_Id) return Boolean; -- Flag13
8937 function Do_Discriminant_Check
8938 (N : Node_Id) return Boolean; -- Flag1
8940 function Do_Division_Check
8941 (N : Node_Id) return Boolean; -- Flag13
8943 function Do_Length_Check
8944 (N : Node_Id) return Boolean; -- Flag4
8946 function Do_Overflow_Check
8947 (N : Node_Id) return Boolean; -- Flag17
8949 function Do_Range_Check
8950 (N : Node_Id) return Boolean; -- Flag9
8952 function Do_Storage_Check
8953 (N : Node_Id) return Boolean; -- Flag17
8955 function Do_Tag_Check
8956 (N : Node_Id) return Boolean; -- Flag13
8958 function Elaborate_All_Desirable
8959 (N : Node_Id) return Boolean; -- Flag9
8961 function Elaborate_All_Present
8962 (N : Node_Id) return Boolean; -- Flag14
8964 function Elaborate_Desirable
8965 (N : Node_Id) return Boolean; -- Flag11
8967 function Elaborate_Present
8968 (N : Node_Id) return Boolean; -- Flag4
8970 function Elaboration_Boolean
8971 (N : Node_Id) return Node_Id; -- Node2
8973 function Else_Actions
8974 (N : Node_Id) return List_Id; -- List3
8976 function Else_Statements
8977 (N : Node_Id) return List_Id; -- List4
8979 function Elsif_Parts
8980 (N : Node_Id) return List_Id; -- List3
8982 function Enclosing_Variant
8983 (N : Node_Id) return Node_Id; -- Node2
8986 (N : Node_Id) return Node_Id; -- Node4
8989 (N : Node_Id) return Uint; -- Uint5
8992 (N : Node_Id) return Node_Id; -- Node4
8994 function Entity_Or_Associated_Node
8995 (N : Node_Id) return Node_Id; -- Node4
8997 function Entry_Body_Formal_Part
8998 (N : Node_Id) return Node_Id; -- Node5
9000 function Entry_Call_Alternative
9001 (N : Node_Id) return Node_Id; -- Node1
9003 function Entry_Call_Statement
9004 (N : Node_Id) return Node_Id; -- Node1
9006 function Entry_Direct_Name
9007 (N : Node_Id) return Node_Id; -- Node1
9009 function Entry_Index
9010 (N : Node_Id) return Node_Id; -- Node5
9012 function Entry_Index_Specification
9013 (N : Node_Id) return Node_Id; -- Node4
9016 (N : Node_Id) return Node_Id; -- Node5
9018 function Exception_Choices
9019 (N : Node_Id) return List_Id; -- List4
9021 function Exception_Handlers
9022 (N : Node_Id) return List_Id; -- List5
9024 function Exception_Junk
9025 (N : Node_Id) return Boolean; -- Flag8
9027 function Exception_Label
9028 (N : Node_Id) return Node_Id; -- Node5
9030 function Explicit_Actual_Parameter
9031 (N : Node_Id) return Node_Id; -- Node3
9033 function Expansion_Delayed
9034 (N : Node_Id) return Boolean; -- Flag11
9036 function Explicit_Generic_Actual_Parameter
9037 (N : Node_Id) return Node_Id; -- Node1
9040 (N : Node_Id) return Node_Id; -- Node3
9042 function Expressions
9043 (N : Node_Id) return List_Id; -- List1
9046 (N : Node_Id) return Node_Id; -- Node3
9048 function First_Inlined_Subprogram
9049 (N : Node_Id) return Entity_Id; -- Node3
9052 (N : Node_Id) return Boolean; -- Flag5
9054 function First_Named_Actual
9055 (N : Node_Id) return Node_Id; -- Node4
9057 function First_Real_Statement
9058 (N : Node_Id) return Node_Id; -- Node2
9060 function First_Subtype_Link
9061 (N : Node_Id) return Entity_Id; -- Node5
9063 function Float_Truncate
9064 (N : Node_Id) return Boolean; -- Flag11
9066 function Formal_Type_Definition
9067 (N : Node_Id) return Node_Id; -- Node3
9069 function Forwards_OK
9070 (N : Node_Id) return Boolean; -- Flag5
9072 function From_Aspect_Specification
9073 (N : Node_Id) return Boolean; -- Flag13
9075 function From_At_End
9076 (N : Node_Id) return Boolean; -- Flag4
9078 function From_At_Mod
9079 (N : Node_Id) return Boolean; -- Flag4
9081 function From_Conditional_Expression
9082 (N : Node_Id) return Boolean; -- Flag1
9084 function From_Default
9085 (N : Node_Id) return Boolean; -- Flag6
9087 function Generalized_Indexing
9088 (N : Node_Id) return Node_Id; -- Node4
9089 function Generic_Associations
9090 (N : Node_Id) return List_Id; -- List3
9092 function Generic_Formal_Declarations
9093 (N : Node_Id) return List_Id; -- List2
9095 function Generic_Parent
9096 (N : Node_Id) return Node_Id; -- Node5
9098 function Generic_Parent_Type
9099 (N : Node_Id) return Node_Id; -- Node4
9101 function Handled_Statement_Sequence
9102 (N : Node_Id) return Node_Id; -- Node4
9104 function Handler_List_Entry
9105 (N : Node_Id) return Node_Id; -- Node2
9107 function Has_Created_Identifier
9108 (N : Node_Id) return Boolean; -- Flag15
9110 function Has_Dereference_Action
9111 (N : Node_Id) return Boolean; -- Flag13
9113 function Has_Dynamic_Length_Check
9114 (N : Node_Id) return Boolean; -- Flag10
9116 function Has_Dynamic_Range_Check
9117 (N : Node_Id) return Boolean; -- Flag12
9119 function Has_Init_Expression
9120 (N : Node_Id) return Boolean; -- Flag14
9122 function Has_Local_Raise
9123 (N : Node_Id) return Boolean; -- Flag8
9125 function Has_No_Elaboration_Code
9126 (N : Node_Id) return Boolean; -- Flag17
9128 function Has_Pragma_Suppress_All
9129 (N : Node_Id) return Boolean; -- Flag14
9131 function Has_Private_View
9132 (N : Node_Id) return Boolean; -- Flag11
9134 function Has_Relative_Deadline_Pragma
9135 (N : Node_Id) return Boolean; -- Flag9
9137 function Has_Self_Reference
9138 (N : Node_Id) return Boolean; -- Flag13
9140 function Has_SP_Choice
9141 (N : Node_Id) return Boolean; -- Flag15
9143 function Has_Storage_Size_Pragma
9144 (N : Node_Id) return Boolean; -- Flag5
9146 function Has_Wide_Character
9147 (N : Node_Id) return Boolean; -- Flag11
9149 function Has_Wide_Wide_Character
9150 (N : Node_Id) return Boolean; -- Flag13
9152 function Header_Size_Added
9153 (N : Node_Id) return Boolean; -- Flag11
9155 function Hidden_By_Use_Clause
9156 (N : Node_Id) return Elist_Id; -- Elist4
9159 (N : Node_Id) return Node_Id; -- Node2
9162 (N : Node_Id) return Node_Id; -- Node1
9164 function Interface_List
9165 (N : Node_Id) return List_Id; -- List2
9167 function Interface_Present
9168 (N : Node_Id) return Boolean; -- Flag16
9170 function Implicit_With
9171 (N : Node_Id) return Boolean; -- Flag16
9173 function Implicit_With_From_Instantiation
9174 (N : Node_Id) return Boolean; -- Flag12
9176 function Import_Interface_Present
9177 (N : Node_Id) return Boolean; -- Flag16
9180 (N : Node_Id) return Boolean; -- Flag15
9182 function Includes_Infinities
9183 (N : Node_Id) return Boolean; -- Flag11
9185 function Incomplete_View
9186 (N : Node_Id) return Node_Id; -- Node2
9188 function Inherited_Discriminant
9189 (N : Node_Id) return Boolean; -- Flag13
9191 function Instance_Spec
9192 (N : Node_Id) return Node_Id; -- Node5
9195 (N : Node_Id) return Uint; -- Uint3
9197 function Is_Accessibility_Actual
9198 (N : Node_Id) return Boolean; -- Flag13
9200 function Is_Asynchronous_Call_Block
9201 (N : Node_Id) return Boolean; -- Flag7
9203 function Is_Boolean_Aspect
9204 (N : Node_Id) return Boolean; -- Flag16
9207 (N : Node_Id) return Boolean; -- Flag11
9209 function Is_Component_Left_Opnd
9210 (N : Node_Id) return Boolean; -- Flag13
9212 function Is_Component_Right_Opnd
9213 (N : Node_Id) return Boolean; -- Flag14
9215 function Is_Controlling_Actual
9216 (N : Node_Id) return Boolean; -- Flag16
9218 function Is_Delayed_Aspect
9219 (N : Node_Id) return Boolean; -- Flag14
9221 function Is_Disabled
9222 (N : Node_Id) return Boolean; -- Flag15
9224 function Is_Dynamic_Coextension
9225 (N : Node_Id) return Boolean; -- Flag18
9228 (N : Node_Id) return Boolean; -- Flag13
9230 function Is_Entry_Barrier_Function
9231 (N : Node_Id) return Boolean; -- Flag8
9233 function Is_Expanded_Build_In_Place_Call
9234 (N : Node_Id) return Boolean; -- Flag11
9236 function Is_Finalization_Wrapper
9237 (N : Node_Id) return Boolean; -- Flag9
9239 function Is_Folded_In_Parser
9240 (N : Node_Id) return Boolean; -- Flag4
9243 (N : Node_Id) return Boolean; -- Flag9
9245 function Is_In_Discriminant_Check
9246 (N : Node_Id) return Boolean; -- Flag11
9248 function Is_Machine_Number
9249 (N : Node_Id) return Boolean; -- Flag11
9251 function Is_Null_Loop
9252 (N : Node_Id) return Boolean; -- Flag16
9254 function Is_Overloaded
9255 (N : Node_Id) return Boolean; -- Flag5
9257 function Is_Power_Of_2_For_Shift
9258 (N : Node_Id) return Boolean; -- Flag13
9260 function Is_Prefixed_Call
9261 (N : Node_Id) return Boolean; -- Flag17
9263 function Is_Protected_Subprogram_Body
9264 (N : Node_Id) return Boolean; -- Flag7
9266 function Is_Static_Coextension
9267 (N : Node_Id) return Boolean; -- Flag14
9269 function Is_Static_Expression
9270 (N : Node_Id) return Boolean; -- Flag6
9272 function Is_Subprogram_Descriptor
9273 (N : Node_Id) return Boolean; -- Flag16
9275 function Is_Task_Allocation_Block
9276 (N : Node_Id) return Boolean; -- Flag6
9278 function Is_Task_Master
9279 (N : Node_Id) return Boolean; -- Flag5
9281 function Iteration_Scheme
9282 (N : Node_Id) return Node_Id; -- Node2
9284 function Iterator_Specification
9285 (N : Node_Id) return Node_Id; -- Node2
9288 (N : Node_Id) return Entity_Id; -- Node1
9290 function Kill_Range_Check
9291 (N : Node_Id) return Boolean; -- Flag11
9293 function Label_Construct
9294 (N : Node_Id) return Node_Id; -- Node2
9297 (N : Node_Id) return Node_Id; -- Node2
9300 (N : Node_Id) return Node_Id; -- Node4
9303 (N : Node_Id) return Boolean; -- Flag6
9305 function Library_Unit
9306 (N : Node_Id) return Node_Id; -- Node4
9308 function Limited_View_Installed
9309 (N : Node_Id) return Boolean; -- Flag18
9311 function Limited_Present
9312 (N : Node_Id) return Boolean; -- Flag17
9315 (N : Node_Id) return List_Id; -- List1
9317 function Local_Raise_Not_OK
9318 (N : Node_Id) return Boolean; -- Flag7
9320 function Local_Raise_Statements
9321 (N : Node_Id) return Elist_Id; -- Elist1
9323 function Loop_Actions
9324 (N : Node_Id) return List_Id; -- List2
9326 function Loop_Parameter_Specification
9327 (N : Node_Id) return Node_Id; -- Node4
9330 (N : Node_Id) return Node_Id; -- Node1
9333 (N : Node_Id) return Node_Id; -- Node2
9336 (N : Node_Id) return Boolean; -- Flag5
9338 function Must_Be_Byte_Aligned
9339 (N : Node_Id) return Boolean; -- Flag14
9341 function Must_Not_Freeze
9342 (N : Node_Id) return Boolean; -- Flag8
9344 function Must_Not_Override
9345 (N : Node_Id) return Boolean; -- Flag15
9347 function Must_Override
9348 (N : Node_Id) return Boolean; -- Flag14
9351 (N : Node_Id) return Node_Id; -- Node2
9354 (N : Node_Id) return List_Id; -- List2
9356 function Next_Entity
9357 (N : Node_Id) return Node_Id; -- Node2
9359 function Next_Exit_Statement
9360 (N : Node_Id) return Node_Id; -- Node3
9362 function Next_Implicit_With
9363 (N : Node_Id) return Node_Id; -- Node3
9365 function Next_Named_Actual
9366 (N : Node_Id) return Node_Id; -- Node4
9368 function Next_Pragma
9369 (N : Node_Id) return Node_Id; -- Node1
9371 function Next_Rep_Item
9372 (N : Node_Id) return Node_Id; -- Node5
9374 function Next_Use_Clause
9375 (N : Node_Id) return Node_Id; -- Node3
9377 function No_Ctrl_Actions
9378 (N : Node_Id) return Boolean; -- Flag7
9380 function No_Elaboration_Check
9381 (N : Node_Id) return Boolean; -- Flag14
9383 function No_Entities_Ref_In_Spec
9384 (N : Node_Id) return Boolean; -- Flag8
9386 function No_Initialization
9387 (N : Node_Id) return Boolean; -- Flag13
9389 function No_Minimize_Eliminate
9390 (N : Node_Id) return Boolean; -- Flag17
9392 function No_Truncation
9393 (N : Node_Id) return Boolean; -- Flag17
9395 function Non_Aliased_Prefix
9396 (N : Node_Id) return Boolean; -- Flag18
9398 function Null_Present
9399 (N : Node_Id) return Boolean; -- Flag13
9401 function Null_Excluding_Subtype
9402 (N : Node_Id) return Boolean; -- Flag16
9404 function Null_Exclusion_Present
9405 (N : Node_Id) return Boolean; -- Flag11
9407 function Null_Exclusion_In_Return_Present
9408 (N : Node_Id) return Boolean; -- Flag14
9410 function Null_Record_Present
9411 (N : Node_Id) return Boolean; -- Flag17
9413 function Object_Definition
9414 (N : Node_Id) return Node_Id; -- Node4
9417 (N : Node_Id) return Boolean; -- Flag16
9419 function Original_Discriminant
9420 (N : Node_Id) return Node_Id; -- Node2
9422 function Original_Entity
9423 (N : Node_Id) return Entity_Id; -- Node2
9425 function Others_Discrete_Choices
9426 (N : Node_Id) return List_Id; -- List1
9428 function Out_Present
9429 (N : Node_Id) return Boolean; -- Flag17
9431 function Parameter_Associations
9432 (N : Node_Id) return List_Id; -- List3
9434 function Parameter_List_Truncated
9435 (N : Node_Id) return Boolean; -- Flag17
9437 function Parameter_Specifications
9438 (N : Node_Id) return List_Id; -- List3
9440 function Parameter_Type
9441 (N : Node_Id) return Node_Id; -- Node2
9443 function Parent_Spec
9444 (N : Node_Id) return Node_Id; -- Node4
9447 (N : Node_Id) return Node_Id; -- Node2
9449 function Pragma_Argument_Associations
9450 (N : Node_Id) return List_Id; -- List2
9452 function Pragma_Identifier
9453 (N : Node_Id) return Node_Id; -- Node4
9455 function Pragmas_After
9456 (N : Node_Id) return List_Id; -- List5
9458 function Pragmas_Before
9459 (N : Node_Id) return List_Id; -- List4
9461 function Pre_Post_Conditions
9462 (N : Node_Id) return Node_Id; -- Node1
9465 (N : Node_Id) return Node_Id; -- Node3
9467 function Premature_Use
9468 (N : Node_Id) return Node_Id; -- Node5
9470 function Present_Expr
9471 (N : Node_Id) return Uint; -- Uint3
9474 (N : Node_Id) return Boolean; -- Flag6
9476 function Print_In_Hex
9477 (N : Node_Id) return Boolean; -- Flag13
9479 function Private_Declarations
9480 (N : Node_Id) return List_Id; -- List3
9482 function Private_Present
9483 (N : Node_Id) return Boolean; -- Flag15
9485 function Procedure_To_Call
9486 (N : Node_Id) return Node_Id; -- Node2
9488 function Proper_Body
9489 (N : Node_Id) return Node_Id; -- Node1
9491 function Protected_Definition
9492 (N : Node_Id) return Node_Id; -- Node3
9494 function Protected_Present
9495 (N : Node_Id) return Boolean; -- Flag6
9497 function Raises_Constraint_Error
9498 (N : Node_Id) return Boolean; -- Flag7
9500 function Range_Constraint
9501 (N : Node_Id) return Node_Id; -- Node4
9503 function Range_Expression
9504 (N : Node_Id) return Node_Id; -- Node4
9506 function Real_Range_Specification
9507 (N : Node_Id) return Node_Id; -- Node4
9510 (N : Node_Id) return Ureal; -- Ureal3
9513 (N : Node_Id) return Uint; -- Uint3
9515 function Record_Extension_Part
9516 (N : Node_Id) return Node_Id; -- Node3
9518 function Redundant_Use
9519 (N : Node_Id) return Boolean; -- Flag13
9521 function Renaming_Exception
9522 (N : Node_Id) return Node_Id; -- Node2
9524 function Result_Definition
9525 (N : Node_Id) return Node_Id; -- Node4
9527 function Return_Object_Declarations
9528 (N : Node_Id) return List_Id; -- List3
9530 function Return_Statement_Entity
9531 (N : Node_Id) return Node_Id; -- Node5
9533 function Reverse_Present
9534 (N : Node_Id) return Boolean; -- Flag15
9537 (N : Node_Id) return Node_Id; -- Node3
9539 function Rounded_Result
9540 (N : Node_Id) return Boolean; -- Flag18
9542 function SCIL_Controlling_Tag
9543 (N : Node_Id) return Node_Id; -- Node5
9545 function SCIL_Entity
9546 (N : Node_Id) return Node_Id; -- Node4
9548 function SCIL_Tag_Value
9549 (N : Node_Id) return Node_Id; -- Node5
9551 function SCIL_Target_Prim
9552 (N : Node_Id) return Node_Id; -- Node2
9555 (N : Node_Id) return Node_Id; -- Node3
9557 function Select_Alternatives
9558 (N : Node_Id) return List_Id; -- List1
9560 function Selector_Name
9561 (N : Node_Id) return Node_Id; -- Node2
9563 function Selector_Names
9564 (N : Node_Id) return List_Id; -- List1
9566 function Shift_Count_OK
9567 (N : Node_Id) return Boolean; -- Flag4
9569 function Source_Type
9570 (N : Node_Id) return Entity_Id; -- Node1
9572 function Specification
9573 (N : Node_Id) return Node_Id; -- Node1
9576 (N : Node_Id) return Boolean; -- Flag17
9579 (N : Node_Id) return List_Id; -- List3
9581 function Storage_Pool
9582 (N : Node_Id) return Node_Id; -- Node1
9584 function Subpool_Handle_Name
9585 (N : Node_Id) return Node_Id; -- Node4
9588 (N : Node_Id) return String_Id; -- Str3
9590 function Subtype_Indication
9591 (N : Node_Id) return Node_Id; -- Node5
9593 function Subtype_Mark
9594 (N : Node_Id) return Node_Id; -- Node4
9596 function Subtype_Marks
9597 (N : Node_Id) return List_Id; -- List2
9599 function Suppress_Assignment_Checks
9600 (N : Node_Id) return Boolean; -- Flag18
9602 function Suppress_Loop_Warnings
9603 (N : Node_Id) return Boolean; -- Flag17
9605 function Synchronized_Present
9606 (N : Node_Id) return Boolean; -- Flag7
9608 function Tagged_Present
9609 (N : Node_Id) return Boolean; -- Flag15
9611 function Target_Type
9612 (N : Node_Id) return Entity_Id; -- Node2
9614 function Task_Definition
9615 (N : Node_Id) return Node_Id; -- Node3
9617 function Task_Present
9618 (N : Node_Id) return Boolean; -- Flag5
9620 function Then_Actions
9621 (N : Node_Id) return List_Id; -- List2
9623 function Then_Statements
9624 (N : Node_Id) return List_Id; -- List2
9626 function Treat_Fixed_As_Integer
9627 (N : Node_Id) return Boolean; -- Flag14
9629 function Triggering_Alternative
9630 (N : Node_Id) return Node_Id; -- Node1
9632 function Triggering_Statement
9633 (N : Node_Id) return Node_Id; -- Node1
9636 (N : Node_Id) return Elist_Id; -- Elist3
9638 function Type_Definition
9639 (N : Node_Id) return Node_Id; -- Node3
9641 function Uneval_Old_Accept
9642 (N : Node_Id) return Boolean; -- Flag7
9644 function Uneval_Old_Warn
9645 (N : Node_Id) return Boolean; -- Flag18
9648 (N : Node_Id) return Node_Id; -- Node2
9650 function Unknown_Discriminants_Present
9651 (N : Node_Id) return Boolean; -- Flag13
9653 function Unreferenced_In_Spec
9654 (N : Node_Id) return Boolean; -- Flag7
9656 function Variant_Part
9657 (N : Node_Id) return Node_Id; -- Node4
9660 (N : Node_Id) return List_Id; -- List1
9662 function Visible_Declarations
9663 (N : Node_Id) return List_Id; -- List2
9665 function Uninitialized_Variable
9666 (N : Node_Id) return Node_Id; -- Node3
9668 function Used_Operations
9669 (N : Node_Id) return Elist_Id; -- Elist5
9671 function Was_Originally_Stub
9672 (N : Node_Id) return Boolean; -- Flag13
9674 function Withed_Body
9675 (N : Node_Id) return Node_Id; -- Node1
9677 -- End functions (note used by xsinfo utility program to end processing)
9679 ----------------------------
9680 -- Node Update Procedures --
9681 ----------------------------
9683 -- These are the corresponding node update routines, which again provide
9684 -- a high level logical access with type checking. In addition to setting
9685 -- the indicated field of the node N to the given Val, in the case of
9686 -- tree pointers (List1-4), the parent pointer of the Val node is set to
9687 -- point back to node N. This automates the setting of the parent pointer.
9689 procedure Set_ABE_Is_Certain
9690 (N : Node_Id; Val : Boolean := True); -- Flag18
9692 procedure Set_Abort_Present
9693 (N : Node_Id; Val : Boolean := True); -- Flag15
9695 procedure Set_Abortable_Part
9696 (N : Node_Id; Val : Node_Id); -- Node2
9698 procedure Set_Abstract_Present
9699 (N : Node_Id; Val : Boolean := True); -- Flag4
9701 procedure Set_Accept_Handler_Records
9702 (N : Node_Id; Val : List_Id); -- List5
9704 procedure Set_Accept_Statement
9705 (N : Node_Id; Val : Node_Id); -- Node2
9707 procedure Set_Access_Definition
9708 (N : Node_Id; Val : Node_Id); -- Node3
9710 procedure Set_Access_To_Subprogram_Definition
9711 (N : Node_Id; Val : Node_Id); -- Node3
9713 procedure Set_Access_Types_To_Process
9714 (N : Node_Id; Val : Elist_Id); -- Elist2
9716 procedure Set_Actions
9717 (N : Node_Id; Val : List_Id); -- List1
9719 procedure Set_Activation_Chain_Entity
9720 (N : Node_Id; Val : Node_Id); -- Node3
9722 procedure Set_Acts_As_Spec
9723 (N : Node_Id; Val : Boolean := True); -- Flag4
9725 procedure Set_Actual_Designated_Subtype
9726 (N : Node_Id; Val : Node_Id); -- Node4
9728 procedure Set_Address_Warning_Posted
9729 (N : Node_Id; Val : Boolean := True); -- Flag18
9731 procedure Set_Aggregate_Bounds
9732 (N : Node_Id; Val : Node_Id); -- Node3
9734 procedure Set_Aliased_Present
9735 (N : Node_Id; Val : Boolean := True); -- Flag4
9737 procedure Set_All_Others
9738 (N : Node_Id; Val : Boolean := True); -- Flag11
9740 procedure Set_All_Present
9741 (N : Node_Id; Val : Boolean := True); -- Flag15
9743 procedure Set_Alternatives
9744 (N : Node_Id; Val : List_Id); -- List4
9746 procedure Set_Ancestor_Part
9747 (N : Node_Id; Val : Node_Id); -- Node3
9749 procedure Set_Atomic_Sync_Required
9750 (N : Node_Id; Val : Boolean := True); -- Flag14
9752 procedure Set_Array_Aggregate
9753 (N : Node_Id; Val : Node_Id); -- Node3
9755 procedure Set_Aspect_Rep_Item
9756 (N : Node_Id; Val : Node_Id); -- Node2
9758 procedure Set_Assignment_OK
9759 (N : Node_Id; Val : Boolean := True); -- Flag15
9761 procedure Set_Associated_Node
9762 (N : Node_Id; Val : Node_Id); -- Node4
9764 procedure Set_Attribute_Name
9765 (N : Node_Id; Val : Name_Id); -- Name2
9767 procedure Set_At_End_Proc
9768 (N : Node_Id; Val : Node_Id); -- Node1
9770 procedure Set_Aux_Decls_Node
9771 (N : Node_Id; Val : Node_Id); -- Node5
9773 procedure Set_Backwards_OK
9774 (N : Node_Id; Val : Boolean := True); -- Flag6
9776 procedure Set_Bad_Is_Detected
9777 (N : Node_Id; Val : Boolean := True); -- Flag15
9779 procedure Set_Body_Required
9780 (N : Node_Id; Val : Boolean := True); -- Flag13
9782 procedure Set_Body_To_Inline
9783 (N : Node_Id; Val : Node_Id); -- Node3
9785 procedure Set_Box_Present
9786 (N : Node_Id; Val : Boolean := True); -- Flag15
9788 procedure Set_By_Ref
9789 (N : Node_Id; Val : Boolean := True); -- Flag5
9791 procedure Set_Char_Literal_Value
9792 (N : Node_Id; Val : Uint); -- Uint2
9795 (N : Node_Id; Val : Name_Id); -- Name1
9797 procedure Set_Check_Address_Alignment
9798 (N : Node_Id; Val : Boolean := True); -- Flag11
9800 procedure Set_Choice_Parameter
9801 (N : Node_Id; Val : Node_Id); -- Node2
9803 procedure Set_Choices
9804 (N : Node_Id; Val : List_Id); -- List1
9806 procedure Set_Class_Present
9807 (N : Node_Id; Val : Boolean := True); -- Flag6
9809 procedure Set_Classifications
9810 (N : Node_Id; Val : Node_Id); -- Node3
9812 procedure Set_Cleanup_Actions
9813 (N : Node_Id; Val : List_Id); -- List5
9815 procedure Set_Comes_From_Extended_Return_Statement
9816 (N : Node_Id; Val : Boolean := True); -- Flag18
9818 procedure Set_Compile_Time_Known_Aggregate
9819 (N : Node_Id; Val : Boolean := True); -- Flag18
9821 procedure Set_Component_Associations
9822 (N : Node_Id; Val : List_Id); -- List2
9824 procedure Set_Component_Clauses
9825 (N : Node_Id; Val : List_Id); -- List3
9827 procedure Set_Component_Definition
9828 (N : Node_Id; Val : Node_Id); -- Node4
9830 procedure Set_Component_Items
9831 (N : Node_Id; Val : List_Id); -- List3
9833 procedure Set_Component_List
9834 (N : Node_Id; Val : Node_Id); -- Node1
9836 procedure Set_Component_Name
9837 (N : Node_Id; Val : Node_Id); -- Node1
9839 procedure Set_Componentwise_Assignment
9840 (N : Node_Id; Val : Boolean := True); -- Flag14
9842 procedure Set_Condition
9843 (N : Node_Id; Val : Node_Id); -- Node1
9845 procedure Set_Condition_Actions
9846 (N : Node_Id; Val : List_Id); -- List3
9848 procedure Set_Config_Pragmas
9849 (N : Node_Id; Val : List_Id); -- List4
9851 procedure Set_Constant_Present
9852 (N : Node_Id; Val : Boolean := True); -- Flag17
9854 procedure Set_Constraint
9855 (N : Node_Id; Val : Node_Id); -- Node3
9857 procedure Set_Constraints
9858 (N : Node_Id; Val : List_Id); -- List1
9860 procedure Set_Context_Installed
9861 (N : Node_Id; Val : Boolean := True); -- Flag13
9863 procedure Set_Context_Items
9864 (N : Node_Id; Val : List_Id); -- List1
9866 procedure Set_Context_Pending
9867 (N : Node_Id; Val : Boolean := True); -- Flag16
9869 procedure Set_Contract_Test_Cases
9870 (N : Node_Id; Val : Node_Id); -- Node2
9872 procedure Set_Controlling_Argument
9873 (N : Node_Id; Val : Node_Id); -- Node1
9875 procedure Set_Conversion_OK
9876 (N : Node_Id; Val : Boolean := True); -- Flag14
9878 procedure Set_Convert_To_Return_False
9879 (N : Node_Id; Val : Boolean := True); -- Flag13
9881 procedure Set_Corresponding_Aspect
9882 (N : Node_Id; Val : Node_Id); -- Node3
9884 procedure Set_Corresponding_Body
9885 (N : Node_Id; Val : Node_Id); -- Node5
9887 procedure Set_Corresponding_Formal_Spec
9888 (N : Node_Id; Val : Node_Id); -- Node3
9890 procedure Set_Corresponding_Generic_Association
9891 (N : Node_Id; Val : Node_Id); -- Node5
9893 procedure Set_Corresponding_Integer_Value
9894 (N : Node_Id; Val : Uint); -- Uint4
9896 procedure Set_Corresponding_Spec
9897 (N : Node_Id; Val : Node_Id); -- Node5
9899 procedure Set_Corresponding_Spec_Of_Stub
9900 (N : Node_Id; Val : Node_Id); -- Node2
9902 procedure Set_Corresponding_Stub
9903 (N : Node_Id; Val : Node_Id); -- Node3
9905 procedure Set_Dcheck_Function
9906 (N : Node_Id; Val : Entity_Id); -- Node5
9908 procedure Set_Declarations
9909 (N : Node_Id; Val : List_Id); -- List2
9911 procedure Set_Default_Expression
9912 (N : Node_Id; Val : Node_Id); -- Node5
9914 procedure Set_Default_Storage_Pool
9915 (N : Node_Id; Val : Node_Id); -- Node3
9917 procedure Set_Default_Name
9918 (N : Node_Id; Val : Node_Id); -- Node2
9920 procedure Set_Defining_Identifier
9921 (N : Node_Id; Val : Entity_Id); -- Node1
9923 procedure Set_Defining_Unit_Name
9924 (N : Node_Id; Val : Node_Id); -- Node1
9926 procedure Set_Delay_Alternative
9927 (N : Node_Id; Val : Node_Id); -- Node4
9929 procedure Set_Delay_Statement
9930 (N : Node_Id; Val : Node_Id); -- Node2
9932 procedure Set_Delta_Expression
9933 (N : Node_Id; Val : Node_Id); -- Node3
9935 procedure Set_Digits_Expression
9936 (N : Node_Id; Val : Node_Id); -- Node2
9938 procedure Set_Discr_Check_Funcs_Built
9939 (N : Node_Id; Val : Boolean := True); -- Flag11
9941 procedure Set_Discrete_Choices
9942 (N : Node_Id; Val : List_Id); -- List4
9944 procedure Set_Discrete_Range
9945 (N : Node_Id; Val : Node_Id); -- Node4
9947 procedure Set_Discrete_Subtype_Definition
9948 (N : Node_Id; Val : Node_Id); -- Node4
9950 procedure Set_Discrete_Subtype_Definitions
9951 (N : Node_Id; Val : List_Id); -- List2
9953 procedure Set_Discriminant_Specifications
9954 (N : Node_Id; Val : List_Id); -- List4
9956 procedure Set_Discriminant_Type
9957 (N : Node_Id; Val : Node_Id); -- Node5
9959 procedure Set_Do_Accessibility_Check
9960 (N : Node_Id; Val : Boolean := True); -- Flag13
9962 procedure Set_Do_Discriminant_Check
9963 (N : Node_Id; Val : Boolean := True); -- Flag1
9965 procedure Set_Do_Division_Check
9966 (N : Node_Id; Val : Boolean := True); -- Flag13
9968 procedure Set_Do_Length_Check
9969 (N : Node_Id; Val : Boolean := True); -- Flag4
9971 procedure Set_Do_Overflow_Check
9972 (N : Node_Id; Val : Boolean := True); -- Flag17
9974 procedure Set_Do_Range_Check
9975 (N : Node_Id; Val : Boolean := True); -- Flag9
9977 procedure Set_Do_Storage_Check
9978 (N : Node_Id; Val : Boolean := True); -- Flag17
9980 procedure Set_Do_Tag_Check
9981 (N : Node_Id; Val : Boolean := True); -- Flag13
9983 procedure Set_Elaborate_All_Desirable
9984 (N : Node_Id; Val : Boolean := True); -- Flag9
9986 procedure Set_Elaborate_All_Present
9987 (N : Node_Id; Val : Boolean := True); -- Flag14
9989 procedure Set_Elaborate_Desirable
9990 (N : Node_Id; Val : Boolean := True); -- Flag11
9992 procedure Set_Elaborate_Present
9993 (N : Node_Id; Val : Boolean := True); -- Flag4
9995 procedure Set_Elaboration_Boolean
9996 (N : Node_Id; Val : Node_Id); -- Node2
9998 procedure Set_Else_Actions
9999 (N : Node_Id; Val : List_Id); -- List3
10001 procedure Set_Else_Statements
10002 (N : Node_Id; Val : List_Id); -- List4
10004 procedure Set_Elsif_Parts
10005 (N : Node_Id; Val : List_Id); -- List3
10007 procedure Set_Enclosing_Variant
10008 (N : Node_Id; Val : Node_Id); -- Node2
10010 procedure Set_End_Label
10011 (N : Node_Id; Val : Node_Id); -- Node4
10013 procedure Set_End_Span
10014 (N : Node_Id; Val : Uint); -- Uint5
10016 procedure Set_Entity
10017 (N : Node_Id; Val : Node_Id); -- Node4
10019 procedure Set_Entry_Body_Formal_Part
10020 (N : Node_Id; Val : Node_Id); -- Node5
10022 procedure Set_Entry_Call_Alternative
10023 (N : Node_Id; Val : Node_Id); -- Node1
10025 procedure Set_Entry_Call_Statement
10026 (N : Node_Id; Val : Node_Id); -- Node1
10028 procedure Set_Entry_Direct_Name
10029 (N : Node_Id; Val : Node_Id); -- Node1
10031 procedure Set_Entry_Index
10032 (N : Node_Id; Val : Node_Id); -- Node5
10034 procedure Set_Entry_Index_Specification
10035 (N : Node_Id; Val : Node_Id); -- Node4
10037 procedure Set_Etype
10038 (N : Node_Id; Val : Node_Id); -- Node5
10040 procedure Set_Exception_Choices
10041 (N : Node_Id; Val : List_Id); -- List4
10043 procedure Set_Exception_Handlers
10044 (N : Node_Id; Val : List_Id); -- List5
10046 procedure Set_Exception_Junk
10047 (N : Node_Id; Val : Boolean := True); -- Flag8
10049 procedure Set_Exception_Label
10050 (N : Node_Id; Val : Node_Id); -- Node5
10052 procedure Set_Expansion_Delayed
10053 (N : Node_Id; Val : Boolean := True); -- Flag11
10055 procedure Set_Explicit_Actual_Parameter
10056 (N : Node_Id; Val : Node_Id); -- Node3
10058 procedure Set_Explicit_Generic_Actual_Parameter
10059 (N : Node_Id; Val : Node_Id); -- Node1
10061 procedure Set_Expression
10062 (N : Node_Id; Val : Node_Id); -- Node3
10064 procedure Set_Expressions
10065 (N : Node_Id; Val : List_Id); -- List1
10067 procedure Set_First_Bit
10068 (N : Node_Id; Val : Node_Id); -- Node3
10070 procedure Set_First_Inlined_Subprogram
10071 (N : Node_Id; Val : Entity_Id); -- Node3
10073 procedure Set_First_Name
10074 (N : Node_Id; Val : Boolean := True); -- Flag5
10076 procedure Set_First_Named_Actual
10077 (N : Node_Id; Val : Node_Id); -- Node4
10079 procedure Set_First_Real_Statement
10080 (N : Node_Id; Val : Node_Id); -- Node2
10082 procedure Set_First_Subtype_Link
10083 (N : Node_Id; Val : Entity_Id); -- Node5
10085 procedure Set_Float_Truncate
10086 (N : Node_Id; Val : Boolean := True); -- Flag11
10088 procedure Set_Formal_Type_Definition
10089 (N : Node_Id; Val : Node_Id); -- Node3
10091 procedure Set_Forwards_OK
10092 (N : Node_Id; Val : Boolean := True); -- Flag5
10094 procedure Set_From_Aspect_Specification
10095 (N : Node_Id; Val : Boolean := True); -- Flag13
10097 procedure Set_From_At_End
10098 (N : Node_Id; Val : Boolean := True); -- Flag4
10100 procedure Set_From_At_Mod
10101 (N : Node_Id; Val : Boolean := True); -- Flag4
10103 procedure Set_From_Conditional_Expression
10104 (N : Node_Id; Val : Boolean := True); -- Flag1
10106 procedure Set_From_Default
10107 (N : Node_Id; Val : Boolean := True); -- Flag6
10109 procedure Set_Generalized_Indexing
10110 (N : Node_Id; Val : Node_Id); -- Node4
10112 procedure Set_Generic_Associations
10113 (N : Node_Id; Val : List_Id); -- List3
10115 procedure Set_Generic_Formal_Declarations
10116 (N : Node_Id; Val : List_Id); -- List2
10118 procedure Set_Generic_Parent
10119 (N : Node_Id; Val : Node_Id); -- Node5
10121 procedure Set_Generic_Parent_Type
10122 (N : Node_Id; Val : Node_Id); -- Node4
10124 procedure Set_Handled_Statement_Sequence
10125 (N : Node_Id; Val : Node_Id); -- Node4
10127 procedure Set_Handler_List_Entry
10128 (N : Node_Id; Val : Node_Id); -- Node2
10130 procedure Set_Has_Created_Identifier
10131 (N : Node_Id; Val : Boolean := True); -- Flag15
10133 procedure Set_Has_Dereference_Action
10134 (N : Node_Id; Val : Boolean := True); -- Flag13
10136 procedure Set_Has_Dynamic_Length_Check
10137 (N : Node_Id; Val : Boolean := True); -- Flag10
10139 procedure Set_Has_Dynamic_Range_Check
10140 (N : Node_Id; Val : Boolean := True); -- Flag12
10142 procedure Set_Has_Init_Expression
10143 (N : Node_Id; Val : Boolean := True); -- Flag14
10145 procedure Set_Has_Local_Raise
10146 (N : Node_Id; Val : Boolean := True); -- Flag8
10148 procedure Set_Has_No_Elaboration_Code
10149 (N : Node_Id; Val : Boolean := True); -- Flag17
10151 procedure Set_Has_Pragma_Suppress_All
10152 (N : Node_Id; Val : Boolean := True); -- Flag14
10154 procedure Set_Has_Private_View
10155 (N : Node_Id; Val : Boolean := True); -- Flag11
10157 procedure Set_Has_Relative_Deadline_Pragma
10158 (N : Node_Id; Val : Boolean := True); -- Flag9
10160 procedure Set_Has_Self_Reference
10161 (N : Node_Id; Val : Boolean := True); -- Flag13
10163 procedure Set_Has_SP_Choice
10164 (N : Node_Id; Val : Boolean := True); -- Flag15
10166 procedure Set_Has_Storage_Size_Pragma
10167 (N : Node_Id; Val : Boolean := True); -- Flag5
10169 procedure Set_Has_Wide_Character
10170 (N : Node_Id; Val : Boolean := True); -- Flag11
10172 procedure Set_Has_Wide_Wide_Character
10173 (N : Node_Id; Val : Boolean := True); -- Flag13
10175 procedure Set_Header_Size_Added
10176 (N : Node_Id; Val : Boolean := True); -- Flag11
10178 procedure Set_Hidden_By_Use_Clause
10179 (N : Node_Id; Val : Elist_Id); -- Elist4
10181 procedure Set_High_Bound
10182 (N : Node_Id; Val : Node_Id); -- Node2
10184 procedure Set_Identifier
10185 (N : Node_Id; Val : Node_Id); -- Node1
10187 procedure Set_Interface_List
10188 (N : Node_Id; Val : List_Id); -- List2
10190 procedure Set_Interface_Present
10191 (N : Node_Id; Val : Boolean := True); -- Flag16
10193 procedure Set_Implicit_With
10194 (N : Node_Id; Val : Boolean := True); -- Flag16
10196 procedure Set_Implicit_With_From_Instantiation
10197 (N : Node_Id; Val : Boolean := True); -- Flag12
10199 procedure Set_Import_Interface_Present
10200 (N : Node_Id; Val : Boolean := True); -- Flag16
10202 procedure Set_In_Present
10203 (N : Node_Id; Val : Boolean := True); -- Flag15
10205 procedure Set_Includes_Infinities
10206 (N : Node_Id; Val : Boolean := True); -- Flag11
10208 procedure Set_Incomplete_View
10209 (N : Node_Id; Val : Node_Id); -- Node2
10211 procedure Set_Inherited_Discriminant
10212 (N : Node_Id; Val : Boolean := True); -- Flag13
10214 procedure Set_Instance_Spec
10215 (N : Node_Id; Val : Node_Id); -- Node5
10217 procedure Set_Intval
10218 (N : Node_Id; Val : Uint); -- Uint3
10220 procedure Set_Is_Accessibility_Actual
10221 (N : Node_Id; Val : Boolean := True); -- Flag13
10223 procedure Set_Is_Asynchronous_Call_Block
10224 (N : Node_Id; Val : Boolean := True); -- Flag7
10226 procedure Set_Is_Boolean_Aspect
10227 (N : Node_Id; Val : Boolean := True); -- Flag16
10229 procedure Set_Is_Checked
10230 (N : Node_Id; Val : Boolean := True); -- Flag11
10232 procedure Set_Is_Component_Left_Opnd
10233 (N : Node_Id; Val : Boolean := True); -- Flag13
10235 procedure Set_Is_Component_Right_Opnd
10236 (N : Node_Id; Val : Boolean := True); -- Flag14
10238 procedure Set_Is_Controlling_Actual
10239 (N : Node_Id; Val : Boolean := True); -- Flag16
10241 procedure Set_Is_Delayed_Aspect
10242 (N : Node_Id; Val : Boolean := True); -- Flag14
10244 procedure Set_Is_Disabled
10245 (N : Node_Id; Val : Boolean := True); -- Flag15
10247 procedure Set_Is_Ignored
10248 (N : Node_Id; Val : Boolean := True); -- Flag9
10250 procedure Set_Is_Dynamic_Coextension
10251 (N : Node_Id; Val : Boolean := True); -- Flag18
10253 procedure Set_Is_Elsif
10254 (N : Node_Id; Val : Boolean := True); -- Flag13
10256 procedure Set_Is_Entry_Barrier_Function
10257 (N : Node_Id; Val : Boolean := True); -- Flag8
10259 procedure Set_Is_Expanded_Build_In_Place_Call
10260 (N : Node_Id; Val : Boolean := True); -- Flag11
10262 procedure Set_Is_Finalization_Wrapper
10263 (N : Node_Id; Val : Boolean := True); -- Flag9
10265 procedure Set_Is_Folded_In_Parser
10266 (N : Node_Id; Val : Boolean := True); -- Flag4
10268 procedure Set_Is_In_Discriminant_Check
10269 (N : Node_Id; Val : Boolean := True); -- Flag11
10271 procedure Set_Is_Machine_Number
10272 (N : Node_Id; Val : Boolean := True); -- Flag11
10274 procedure Set_Is_Null_Loop
10275 (N : Node_Id; Val : Boolean := True); -- Flag16
10277 procedure Set_Is_Overloaded
10278 (N : Node_Id; Val : Boolean := True); -- Flag5
10280 procedure Set_Is_Power_Of_2_For_Shift
10281 (N : Node_Id; Val : Boolean := True); -- Flag13
10283 procedure Set_Is_Prefixed_Call
10284 (N : Node_Id; Val : Boolean := True); -- Flag17
10286 procedure Set_Is_Protected_Subprogram_Body
10287 (N : Node_Id; Val : Boolean := True); -- Flag7
10289 procedure Set_Is_Static_Coextension
10290 (N : Node_Id; Val : Boolean := True); -- Flag14
10292 procedure Set_Is_Static_Expression
10293 (N : Node_Id; Val : Boolean := True); -- Flag6
10295 procedure Set_Is_Subprogram_Descriptor
10296 (N : Node_Id; Val : Boolean := True); -- Flag16
10298 procedure Set_Is_Task_Allocation_Block
10299 (N : Node_Id; Val : Boolean := True); -- Flag6
10301 procedure Set_Is_Task_Master
10302 (N : Node_Id; Val : Boolean := True); -- Flag5
10304 procedure Set_Iteration_Scheme
10305 (N : Node_Id; Val : Node_Id); -- Node2
10307 procedure Set_Iterator_Specification
10308 (N : Node_Id; Val : Node_Id); -- Node2
10310 procedure Set_Itype
10311 (N : Node_Id; Val : Entity_Id); -- Node1
10313 procedure Set_Kill_Range_Check
10314 (N : Node_Id; Val : Boolean := True); -- Flag11
10316 procedure Set_Last_Bit
10317 (N : Node_Id; Val : Node_Id); -- Node4
10319 procedure Set_Last_Name
10320 (N : Node_Id; Val : Boolean := True); -- Flag6
10322 procedure Set_Library_Unit
10323 (N : Node_Id; Val : Node_Id); -- Node4
10325 procedure Set_Label_Construct
10326 (N : Node_Id; Val : Node_Id); -- Node2
10328 procedure Set_Left_Opnd
10329 (N : Node_Id; Val : Node_Id); -- Node2
10331 procedure Set_Limited_View_Installed
10332 (N : Node_Id; Val : Boolean := True); -- Flag18
10334 procedure Set_Limited_Present
10335 (N : Node_Id; Val : Boolean := True); -- Flag17
10337 procedure Set_Literals
10338 (N : Node_Id; Val : List_Id); -- List1
10340 procedure Set_Local_Raise_Not_OK
10341 (N : Node_Id; Val : Boolean := True); -- Flag7
10343 procedure Set_Local_Raise_Statements
10344 (N : Node_Id; Val : Elist_Id); -- Elist1
10346 procedure Set_Loop_Actions
10347 (N : Node_Id; Val : List_Id); -- List2
10349 procedure Set_Loop_Parameter_Specification
10350 (N : Node_Id; Val : Node_Id); -- Node4
10352 procedure Set_Low_Bound
10353 (N : Node_Id; Val : Node_Id); -- Node1
10355 procedure Set_Mod_Clause
10356 (N : Node_Id; Val : Node_Id); -- Node2
10358 procedure Set_More_Ids
10359 (N : Node_Id; Val : Boolean := True); -- Flag5
10361 procedure Set_Must_Be_Byte_Aligned
10362 (N : Node_Id; Val : Boolean := True); -- Flag14
10364 procedure Set_Must_Not_Freeze
10365 (N : Node_Id; Val : Boolean := True); -- Flag8
10367 procedure Set_Must_Not_Override
10368 (N : Node_Id; Val : Boolean := True); -- Flag15
10370 procedure Set_Must_Override
10371 (N : Node_Id; Val : Boolean := True); -- Flag14
10374 (N : Node_Id; Val : Node_Id); -- Node2
10376 procedure Set_Names
10377 (N : Node_Id; Val : List_Id); -- List2
10379 procedure Set_Next_Entity
10380 (N : Node_Id; Val : Node_Id); -- Node2
10382 procedure Set_Next_Exit_Statement
10383 (N : Node_Id; Val : Node_Id); -- Node3
10385 procedure Set_Next_Implicit_With
10386 (N : Node_Id; Val : Node_Id); -- Node3
10388 procedure Set_Next_Named_Actual
10389 (N : Node_Id; Val : Node_Id); -- Node4
10391 procedure Set_Next_Pragma
10392 (N : Node_Id; Val : Node_Id); -- Node1
10394 procedure Set_Next_Rep_Item
10395 (N : Node_Id; Val : Node_Id); -- Node5
10397 procedure Set_Next_Use_Clause
10398 (N : Node_Id; Val : Node_Id); -- Node3
10400 procedure Set_No_Ctrl_Actions
10401 (N : Node_Id; Val : Boolean := True); -- Flag7
10403 procedure Set_No_Elaboration_Check
10404 (N : Node_Id; Val : Boolean := True); -- Flag14
10406 procedure Set_No_Entities_Ref_In_Spec
10407 (N : Node_Id; Val : Boolean := True); -- Flag8
10409 procedure Set_No_Initialization
10410 (N : Node_Id; Val : Boolean := True); -- Flag13
10412 procedure Set_No_Minimize_Eliminate
10413 (N : Node_Id; Val : Boolean := True); -- Flag17
10415 procedure Set_No_Truncation
10416 (N : Node_Id; Val : Boolean := True); -- Flag17
10418 procedure Set_Non_Aliased_Prefix
10419 (N : Node_Id; Val : Boolean := True); -- Flag18
10421 procedure Set_Null_Present
10422 (N : Node_Id; Val : Boolean := True); -- Flag13
10424 procedure Set_Null_Excluding_Subtype
10425 (N : Node_Id; Val : Boolean := True); -- Flag16
10427 procedure Set_Null_Exclusion_Present
10428 (N : Node_Id; Val : Boolean := True); -- Flag11
10430 procedure Set_Null_Exclusion_In_Return_Present
10431 (N : Node_Id; Val : Boolean := True); -- Flag14
10433 procedure Set_Null_Record_Present
10434 (N : Node_Id; Val : Boolean := True); -- Flag17
10436 procedure Set_Object_Definition
10437 (N : Node_Id; Val : Node_Id); -- Node4
10439 procedure Set_Of_Present
10440 (N : Node_Id; Val : Boolean := True); -- Flag16
10442 procedure Set_Original_Discriminant
10443 (N : Node_Id; Val : Node_Id); -- Node2
10445 procedure Set_Original_Entity
10446 (N : Node_Id; Val : Entity_Id); -- Node2
10448 procedure Set_Others_Discrete_Choices
10449 (N : Node_Id; Val : List_Id); -- List1
10451 procedure Set_Out_Present
10452 (N : Node_Id; Val : Boolean := True); -- Flag17
10454 procedure Set_Parameter_Associations
10455 (N : Node_Id; Val : List_Id); -- List3
10457 procedure Set_Parameter_List_Truncated
10458 (N : Node_Id; Val : Boolean := True); -- Flag17
10460 procedure Set_Parameter_Specifications
10461 (N : Node_Id; Val : List_Id); -- List3
10463 procedure Set_Parameter_Type
10464 (N : Node_Id; Val : Node_Id); -- Node2
10466 procedure Set_Parent_Spec
10467 (N : Node_Id; Val : Node_Id); -- Node4
10469 procedure Set_Position
10470 (N : Node_Id; Val : Node_Id); -- Node2
10472 procedure Set_Pragma_Argument_Associations
10473 (N : Node_Id; Val : List_Id); -- List2
10475 procedure Set_Pragma_Identifier
10476 (N : Node_Id; Val : Node_Id); -- Node4
10478 procedure Set_Pragmas_After
10479 (N : Node_Id; Val : List_Id); -- List5
10481 procedure Set_Pragmas_Before
10482 (N : Node_Id; Val : List_Id); -- List4
10484 procedure Set_Pre_Post_Conditions
10485 (N : Node_Id; Val : Node_Id); -- Node1
10487 procedure Set_Prefix
10488 (N : Node_Id; Val : Node_Id); -- Node3
10490 procedure Set_Premature_Use
10491 (N : Node_Id; Val : Node_Id); -- Node5
10493 procedure Set_Present_Expr
10494 (N : Node_Id; Val : Uint); -- Uint3
10496 procedure Set_Prev_Ids
10497 (N : Node_Id; Val : Boolean := True); -- Flag6
10499 procedure Set_Print_In_Hex
10500 (N : Node_Id; Val : Boolean := True); -- Flag13
10502 procedure Set_Private_Declarations
10503 (N : Node_Id; Val : List_Id); -- List3
10505 procedure Set_Private_Present
10506 (N : Node_Id; Val : Boolean := True); -- Flag15
10508 procedure Set_Procedure_To_Call
10509 (N : Node_Id; Val : Node_Id); -- Node2
10511 procedure Set_Proper_Body
10512 (N : Node_Id; Val : Node_Id); -- Node1
10514 procedure Set_Protected_Definition
10515 (N : Node_Id; Val : Node_Id); -- Node3
10517 procedure Set_Protected_Present
10518 (N : Node_Id; Val : Boolean := True); -- Flag6
10520 procedure Set_Raises_Constraint_Error
10521 (N : Node_Id; Val : Boolean := True); -- Flag7
10523 procedure Set_Range_Constraint
10524 (N : Node_Id; Val : Node_Id); -- Node4
10526 procedure Set_Range_Expression
10527 (N : Node_Id; Val : Node_Id); -- Node4
10529 procedure Set_Real_Range_Specification
10530 (N : Node_Id; Val : Node_Id); -- Node4
10532 procedure Set_Realval
10533 (N : Node_Id; Val : Ureal); -- Ureal3
10535 procedure Set_Reason
10536 (N : Node_Id; Val : Uint); -- Uint3
10538 procedure Set_Record_Extension_Part
10539 (N : Node_Id; Val : Node_Id); -- Node3
10541 procedure Set_Redundant_Use
10542 (N : Node_Id; Val : Boolean := True); -- Flag13
10544 procedure Set_Renaming_Exception
10545 (N : Node_Id; Val : Node_Id); -- Node2
10547 procedure Set_Result_Definition
10548 (N : Node_Id; Val : Node_Id); -- Node4
10550 procedure Set_Return_Object_Declarations
10551 (N : Node_Id; Val : List_Id); -- List3
10553 procedure Set_Return_Statement_Entity
10554 (N : Node_Id; Val : Node_Id); -- Node5
10556 procedure Set_Reverse_Present
10557 (N : Node_Id; Val : Boolean := True); -- Flag15
10559 procedure Set_Right_Opnd
10560 (N : Node_Id; Val : Node_Id); -- Node3
10562 procedure Set_Rounded_Result
10563 (N : Node_Id; Val : Boolean := True); -- Flag18
10565 procedure Set_SCIL_Controlling_Tag
10566 (N : Node_Id; Val : Node_Id); -- Node5
10568 procedure Set_SCIL_Entity
10569 (N : Node_Id; Val : Node_Id); -- Node4
10571 procedure Set_SCIL_Tag_Value
10572 (N : Node_Id; Val : Node_Id); -- Node5
10574 procedure Set_SCIL_Target_Prim
10575 (N : Node_Id; Val : Node_Id); -- Node2
10577 procedure Set_Scope
10578 (N : Node_Id; Val : Node_Id); -- Node3
10580 procedure Set_Select_Alternatives
10581 (N : Node_Id; Val : List_Id); -- List1
10583 procedure Set_Selector_Name
10584 (N : Node_Id; Val : Node_Id); -- Node2
10586 procedure Set_Selector_Names
10587 (N : Node_Id; Val : List_Id); -- List1
10589 procedure Set_Shift_Count_OK
10590 (N : Node_Id; Val : Boolean := True); -- Flag4
10592 procedure Set_Source_Type
10593 (N : Node_Id; Val : Entity_Id); -- Node1
10595 procedure Set_Specification
10596 (N : Node_Id; Val : Node_Id); -- Node1
10598 procedure Set_Split_PPC
10599 (N : Node_Id; Val : Boolean); -- Flag17
10601 procedure Set_Statements
10602 (N : Node_Id; Val : List_Id); -- List3
10604 procedure Set_Storage_Pool
10605 (N : Node_Id; Val : Node_Id); -- Node1
10607 procedure Set_Subpool_Handle_Name
10608 (N : Node_Id; Val : Node_Id); -- Node4
10610 procedure Set_Strval
10611 (N : Node_Id; Val : String_Id); -- Str3
10613 procedure Set_Subtype_Indication
10614 (N : Node_Id; Val : Node_Id); -- Node5
10616 procedure Set_Subtype_Mark
10617 (N : Node_Id; Val : Node_Id); -- Node4
10619 procedure Set_Subtype_Marks
10620 (N : Node_Id; Val : List_Id); -- List2
10622 procedure Set_Suppress_Assignment_Checks
10623 (N : Node_Id; Val : Boolean := True); -- Flag18
10625 procedure Set_Suppress_Loop_Warnings
10626 (N : Node_Id; Val : Boolean := True); -- Flag17
10628 procedure Set_Synchronized_Present
10629 (N : Node_Id; Val : Boolean := True); -- Flag7
10631 procedure Set_Tagged_Present
10632 (N : Node_Id; Val : Boolean := True); -- Flag15
10634 procedure Set_Target_Type
10635 (N : Node_Id; Val : Entity_Id); -- Node2
10637 procedure Set_Task_Definition
10638 (N : Node_Id; Val : Node_Id); -- Node3
10640 procedure Set_Task_Present
10641 (N : Node_Id; Val : Boolean := True); -- Flag5
10643 procedure Set_Then_Actions
10644 (N : Node_Id; Val : List_Id); -- List2
10646 procedure Set_Then_Statements
10647 (N : Node_Id; Val : List_Id); -- List2
10649 procedure Set_Treat_Fixed_As_Integer
10650 (N : Node_Id; Val : Boolean := True); -- Flag14
10652 procedure Set_Triggering_Alternative
10653 (N : Node_Id; Val : Node_Id); -- Node1
10655 procedure Set_Triggering_Statement
10656 (N : Node_Id; Val : Node_Id); -- Node1
10658 procedure Set_TSS_Elist
10659 (N : Node_Id; Val : Elist_Id); -- Elist3
10661 procedure Set_Type_Definition
10662 (N : Node_Id; Val : Node_Id); -- Node3
10664 procedure Set_Uneval_Old_Accept
10665 (N : Node_Id; Val : Boolean := True); -- Flag7
10667 procedure Set_Uneval_Old_Warn
10668 (N : Node_Id; Val : Boolean := True); -- Flag18
10671 (N : Node_Id; Val : Node_Id); -- Node2
10673 procedure Set_Unknown_Discriminants_Present
10674 (N : Node_Id; Val : Boolean := True); -- Flag13
10676 procedure Set_Unreferenced_In_Spec
10677 (N : Node_Id; Val : Boolean := True); -- Flag7
10679 procedure Set_Variant_Part
10680 (N : Node_Id; Val : Node_Id); -- Node4
10682 procedure Set_Variants
10683 (N : Node_Id; Val : List_Id); -- List1
10685 procedure Set_Visible_Declarations
10686 (N : Node_Id; Val : List_Id); -- List2
10688 procedure Set_Uninitialized_Variable
10689 (N : Node_Id; Val : Node_Id); -- Node3
10691 procedure Set_Used_Operations
10692 (N : Node_Id; Val : Elist_Id); -- Elist5
10694 procedure Set_Was_Originally_Stub
10695 (N : Node_Id; Val : Boolean := True); -- Flag13
10697 procedure Set_Withed_Body
10698 (N : Node_Id; Val : Node_Id); -- Node1
10700 -------------------------
10701 -- Iterator Procedures --
10702 -------------------------
10704 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
10706 procedure Next_Entity (N : in out Node_Id);
10707 procedure Next_Named_Actual (N : in out Node_Id);
10708 procedure Next_Rep_Item (N : in out Node_Id);
10709 procedure Next_Use_Clause (N : in out Node_Id);
10711 -------------------------------------------
10712 -- Miscellaneous Tree Access Subprograms --
10713 -------------------------------------------
10715 function End_Location (N : Node_Id) return Source_Ptr;
10716 -- N is an N_If_Statement or N_Case_Statement node, and this function
10717 -- returns the location of the IF token in the END IF sequence by
10718 -- translating the value of the End_Span field.
10720 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
10721 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
10722 -- the End_Span field to correspond to the given value S. In other words,
10723 -- End_Span is set to the difference between S and Sloc (N), the starting
10726 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
10727 -- Given an argument to a pragma Arg, this function returns the expression
10728 -- for the argument. This is Arg itself, or, in the case where Arg is a
10729 -- pragma argument association node, the expression from this node.
10731 --------------------------------
10732 -- Node_Kind Membership Tests --
10733 --------------------------------
10735 -- The following functions allow a convenient notation for testing whether
10736 -- a Node_Kind value matches any one of a list of possible values. In each
10737 -- case True is returned if the given T argument is equal to any of the V
10738 -- arguments. Note that there is a similar set of functions defined in
10739 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
10744 V2 : Node_Kind) return Boolean;
10750 V3 : Node_Kind) return Boolean;
10757 V4 : Node_Kind) return Boolean;
10765 V5 : Node_Kind) return Boolean;
10774 V6 : Node_Kind) return Boolean;
10784 V7 : Node_Kind) return Boolean;
10795 V8 : Node_Kind) return Boolean;
10807 V9 : Node_Kind) return Boolean;
10809 pragma Inline (Nkind_In);
10810 -- Inline all above functions
10812 -----------------------
10813 -- Utility Functions --
10814 -----------------------
10816 function Pragma_Name (N : Node_Id) return Name_Id;
10817 pragma Inline (Pragma_Name);
10818 -- Convenient function to obtain Chars field of Pragma_Identifier
10820 -----------------------------
10821 -- Syntactic Parent Tables --
10822 -----------------------------
10824 -- These tables show for each node, and for each of the five fields,
10825 -- whether the corresponding field is syntactic (True) or semantic (False).
10826 -- Unused entries are also set to False.
10828 subtype Field_Num is Natural range 1 .. 5;
10830 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
10832 -- Following entries can be built automatically from the sinfo sources
10833 -- using the makeisf utility (currently this program is in spitbol).
10836 (1 => True, -- Chars (Name1)
10837 2 => False, -- Original_Discriminant (Node2-Sem)
10838 3 => False, -- unused
10839 4 => False, -- Entity (Node4-Sem)
10840 5 => False), -- Etype (Node5-Sem)
10842 N_Integer_Literal =>
10843 (1 => False, -- unused
10844 2 => False, -- Original_Entity (Node2-Sem)
10845 3 => True, -- Intval (Uint3)
10846 4 => False, -- unused
10847 5 => False), -- Etype (Node5-Sem)
10850 (1 => False, -- unused
10851 2 => False, -- Original_Entity (Node2-Sem)
10852 3 => True, -- Realval (Ureal3)
10853 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
10854 5 => False), -- Etype (Node5-Sem)
10856 N_Character_Literal =>
10857 (1 => True, -- Chars (Name1)
10858 2 => True, -- Char_Literal_Value (Uint2)
10859 3 => False, -- unused
10860 4 => False, -- Entity (Node4-Sem)
10861 5 => False), -- Etype (Node5-Sem)
10863 N_String_Literal =>
10864 (1 => False, -- unused
10865 2 => False, -- unused
10866 3 => True, -- Strval (Str3)
10867 4 => False, -- unused
10868 5 => False), -- Etype (Node5-Sem)
10871 (1 => False, -- Next_Pragma (Node1-Sem)
10872 2 => True, -- Pragma_Argument_Associations (List2)
10873 3 => False, -- unused
10874 4 => True, -- Pragma_Identifier (Node4)
10875 5 => False), -- Next_Rep_Item (Node5-Sem)
10877 N_Pragma_Argument_Association =>
10878 (1 => True, -- Chars (Name1)
10879 2 => False, -- unused
10880 3 => True, -- Expression (Node3)
10881 4 => False, -- unused
10882 5 => False), -- unused
10884 N_Defining_Identifier =>
10885 (1 => True, -- Chars (Name1)
10886 2 => False, -- Next_Entity (Node2-Sem)
10887 3 => False, -- Scope (Node3-Sem)
10888 4 => False, -- unused
10889 5 => False), -- Etype (Node5-Sem)
10891 N_Full_Type_Declaration =>
10892 (1 => True, -- Defining_Identifier (Node1)
10893 2 => False, -- Incomplete_View (Node2-Sem)
10894 3 => True, -- Type_Definition (Node3)
10895 4 => True, -- Discriminant_Specifications (List4)
10896 5 => False), -- unused
10898 N_Subtype_Declaration =>
10899 (1 => True, -- Defining_Identifier (Node1)
10900 2 => False, -- unused
10901 3 => False, -- unused
10902 4 => False, -- Generic_Parent_Type (Node4-Sem)
10903 5 => True), -- Subtype_Indication (Node5)
10905 N_Subtype_Indication =>
10906 (1 => False, -- unused
10907 2 => False, -- unused
10908 3 => True, -- Constraint (Node3)
10909 4 => True, -- Subtype_Mark (Node4)
10910 5 => False), -- Etype (Node5-Sem)
10912 N_Object_Declaration =>
10913 (1 => True, -- Defining_Identifier (Node1)
10914 2 => False, -- Handler_List_Entry (Node2-Sem)
10915 3 => True, -- Expression (Node3)
10916 4 => True, -- Object_Definition (Node4)
10917 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10919 N_Number_Declaration =>
10920 (1 => True, -- Defining_Identifier (Node1)
10921 2 => False, -- unused
10922 3 => True, -- Expression (Node3)
10923 4 => False, -- unused
10924 5 => False), -- unused
10926 N_Derived_Type_Definition =>
10927 (1 => False, -- unused
10928 2 => True, -- Interface_List (List2)
10929 3 => True, -- Record_Extension_Part (Node3)
10930 4 => False, -- unused
10931 5 => True), -- Subtype_Indication (Node5)
10933 N_Range_Constraint =>
10934 (1 => False, -- unused
10935 2 => False, -- unused
10936 3 => False, -- unused
10937 4 => True, -- Range_Expression (Node4)
10938 5 => False), -- unused
10941 (1 => True, -- Low_Bound (Node1)
10942 2 => True, -- High_Bound (Node2)
10943 3 => False, -- unused
10944 4 => False, -- unused
10945 5 => False), -- Etype (Node5-Sem)
10947 N_Enumeration_Type_Definition =>
10948 (1 => True, -- Literals (List1)
10949 2 => False, -- unused
10950 3 => False, -- unused
10951 4 => True, -- End_Label (Node4)
10952 5 => False), -- unused
10954 N_Defining_Character_Literal =>
10955 (1 => True, -- Chars (Name1)
10956 2 => False, -- Next_Entity (Node2-Sem)
10957 3 => False, -- Scope (Node3-Sem)
10958 4 => False, -- unused
10959 5 => False), -- Etype (Node5-Sem)
10961 N_Signed_Integer_Type_Definition =>
10962 (1 => True, -- Low_Bound (Node1)
10963 2 => True, -- High_Bound (Node2)
10964 3 => False, -- unused
10965 4 => False, -- unused
10966 5 => False), -- unused
10968 N_Modular_Type_Definition =>
10969 (1 => False, -- unused
10970 2 => False, -- unused
10971 3 => True, -- Expression (Node3)
10972 4 => False, -- unused
10973 5 => False), -- unused
10975 N_Floating_Point_Definition =>
10976 (1 => False, -- unused
10977 2 => True, -- Digits_Expression (Node2)
10978 3 => False, -- unused
10979 4 => True, -- Real_Range_Specification (Node4)
10980 5 => False), -- unused
10982 N_Real_Range_Specification =>
10983 (1 => True, -- Low_Bound (Node1)
10984 2 => True, -- High_Bound (Node2)
10985 3 => False, -- unused
10986 4 => False, -- unused
10987 5 => False), -- unused
10989 N_Ordinary_Fixed_Point_Definition =>
10990 (1 => False, -- unused
10991 2 => False, -- unused
10992 3 => True, -- Delta_Expression (Node3)
10993 4 => True, -- Real_Range_Specification (Node4)
10994 5 => False), -- unused
10996 N_Decimal_Fixed_Point_Definition =>
10997 (1 => False, -- unused
10998 2 => True, -- Digits_Expression (Node2)
10999 3 => True, -- Delta_Expression (Node3)
11000 4 => True, -- Real_Range_Specification (Node4)
11001 5 => False), -- unused
11003 N_Digits_Constraint =>
11004 (1 => False, -- unused
11005 2 => True, -- Digits_Expression (Node2)
11006 3 => False, -- unused
11007 4 => True, -- Range_Constraint (Node4)
11008 5 => False), -- unused
11010 N_Unconstrained_Array_Definition =>
11011 (1 => False, -- unused
11012 2 => True, -- Subtype_Marks (List2)
11013 3 => False, -- unused
11014 4 => True, -- Component_Definition (Node4)
11015 5 => False), -- unused
11017 N_Constrained_Array_Definition =>
11018 (1 => False, -- unused
11019 2 => True, -- Discrete_Subtype_Definitions (List2)
11020 3 => False, -- unused
11021 4 => True, -- Component_Definition (Node4)
11022 5 => False), -- unused
11024 N_Component_Definition =>
11025 (1 => False, -- unused
11026 2 => False, -- unused
11027 3 => True, -- Access_Definition (Node3)
11028 4 => False, -- unused
11029 5 => True), -- Subtype_Indication (Node5)
11031 N_Discriminant_Specification =>
11032 (1 => True, -- Defining_Identifier (Node1)
11033 2 => False, -- unused
11034 3 => True, -- Expression (Node3)
11035 4 => False, -- unused
11036 5 => True), -- Discriminant_Type (Node5)
11038 N_Index_Or_Discriminant_Constraint =>
11039 (1 => True, -- Constraints (List1)
11040 2 => False, -- unused
11041 3 => False, -- unused
11042 4 => False, -- unused
11043 5 => False), -- unused
11045 N_Discriminant_Association =>
11046 (1 => True, -- Selector_Names (List1)
11047 2 => False, -- unused
11048 3 => True, -- Expression (Node3)
11049 4 => False, -- unused
11050 5 => False), -- unused
11052 N_Record_Definition =>
11053 (1 => True, -- Component_List (Node1)
11054 2 => True, -- Interface_List (List2)
11055 3 => False, -- unused
11056 4 => True, -- End_Label (Node4)
11057 5 => False), -- unused
11059 N_Component_List =>
11060 (1 => False, -- unused
11061 2 => False, -- unused
11062 3 => True, -- Component_Items (List3)
11063 4 => True, -- Variant_Part (Node4)
11064 5 => False), -- unused
11066 N_Component_Declaration =>
11067 (1 => True, -- Defining_Identifier (Node1)
11068 2 => False, -- unused
11069 3 => True, -- Expression (Node3)
11070 4 => True, -- Component_Definition (Node4)
11071 5 => False), -- unused
11074 (1 => True, -- Variants (List1)
11075 2 => True, -- Name (Node2)
11076 3 => False, -- unused
11077 4 => False, -- unused
11078 5 => False), -- unused
11081 (1 => True, -- Component_List (Node1)
11082 2 => False, -- Enclosing_Variant (Node2-Sem)
11083 3 => False, -- Present_Expr (Uint3-Sem)
11084 4 => True, -- Discrete_Choices (List4)
11085 5 => False), -- Dcheck_Function (Node5-Sem)
11088 (1 => False, -- Others_Discrete_Choices (List1-Sem)
11089 2 => False, -- unused
11090 3 => False, -- unused
11091 4 => False, -- unused
11092 5 => False), -- unused
11094 N_Access_To_Object_Definition =>
11095 (1 => False, -- unused
11096 2 => False, -- unused
11097 3 => False, -- unused
11098 4 => False, -- unused
11099 5 => True), -- Subtype_Indication (Node5)
11101 N_Access_Function_Definition =>
11102 (1 => False, -- unused
11103 2 => False, -- unused
11104 3 => True, -- Parameter_Specifications (List3)
11105 4 => True, -- Result_Definition (Node4)
11106 5 => False), -- unused
11108 N_Access_Procedure_Definition =>
11109 (1 => False, -- unused
11110 2 => False, -- unused
11111 3 => True, -- Parameter_Specifications (List3)
11112 4 => False, -- unused
11113 5 => False), -- unused
11115 N_Access_Definition =>
11116 (1 => False, -- unused
11117 2 => False, -- unused
11118 3 => True, -- Access_To_Subprogram_Definition (Node3)
11119 4 => True, -- Subtype_Mark (Node4)
11120 5 => False), -- unused
11122 N_Incomplete_Type_Declaration =>
11123 (1 => True, -- Defining_Identifier (Node1)
11124 2 => False, -- unused
11125 3 => False, -- unused
11126 4 => True, -- Discriminant_Specifications (List4)
11127 5 => False), -- Premature_Use
11129 N_Explicit_Dereference =>
11130 (1 => False, -- unused
11131 2 => False, -- unused
11132 3 => True, -- Prefix (Node3)
11133 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11134 5 => False), -- Etype (Node5-Sem)
11136 N_Indexed_Component =>
11137 (1 => True, -- Expressions (List1)
11138 2 => False, -- unused
11139 3 => True, -- Prefix (Node3)
11140 4 => False, -- Generalized_Indexing (Node4-Sem)
11141 5 => False), -- Etype (Node5-Sem)
11144 (1 => False, -- unused
11145 2 => False, -- unused
11146 3 => True, -- Prefix (Node3)
11147 4 => True, -- Discrete_Range (Node4)
11148 5 => False), -- Etype (Node5-Sem)
11150 N_Selected_Component =>
11151 (1 => False, -- unused
11152 2 => True, -- Selector_Name (Node2)
11153 3 => True, -- Prefix (Node3)
11154 4 => False, -- unused
11155 5 => False), -- Etype (Node5-Sem)
11157 N_Attribute_Reference =>
11158 (1 => True, -- Expressions (List1)
11159 2 => True, -- Attribute_Name (Name2)
11160 3 => True, -- Prefix (Node3)
11161 4 => False, -- Entity (Node4-Sem)
11162 5 => False), -- Etype (Node5-Sem)
11165 (1 => True, -- Expressions (List1)
11166 2 => True, -- Component_Associations (List2)
11167 3 => False, -- Aggregate_Bounds (Node3-Sem)
11168 4 => False, -- unused
11169 5 => False), -- Etype (Node5-Sem)
11171 N_Component_Association =>
11172 (1 => True, -- Choices (List1)
11173 2 => False, -- Loop_Actions (List2-Sem)
11174 3 => True, -- Expression (Node3)
11175 4 => False, -- unused
11176 5 => False), -- unused
11178 N_Extension_Aggregate =>
11179 (1 => True, -- Expressions (List1)
11180 2 => True, -- Component_Associations (List2)
11181 3 => True, -- Ancestor_Part (Node3)
11182 4 => False, -- unused
11183 5 => False), -- Etype (Node5-Sem)
11186 (1 => False, -- unused
11187 2 => False, -- unused
11188 3 => False, -- unused
11189 4 => False, -- unused
11190 5 => False), -- Etype (Node5-Sem)
11193 (1 => False, -- Actions (List1-Sem)
11194 2 => True, -- Left_Opnd (Node2)
11195 3 => True, -- Right_Opnd (Node3)
11196 4 => False, -- unused
11197 5 => False), -- Etype (Node5-Sem)
11200 (1 => False, -- Actions (List1-Sem)
11201 2 => True, -- Left_Opnd (Node2)
11202 3 => True, -- Right_Opnd (Node3)
11203 4 => False, -- unused
11204 5 => False), -- Etype (Node5-Sem)
11207 (1 => False, -- unused
11208 2 => True, -- Left_Opnd (Node2)
11209 3 => True, -- Right_Opnd (Node3)
11210 4 => True, -- Alternatives (List4)
11211 5 => False), -- Etype (Node5-Sem)
11214 (1 => False, -- unused
11215 2 => True, -- Left_Opnd (Node2)
11216 3 => True, -- Right_Opnd (Node3)
11217 4 => True, -- Alternatives (List4)
11218 5 => False), -- Etype (Node5-Sem)
11221 (1 => True, -- Chars (Name1)
11222 2 => True, -- Left_Opnd (Node2)
11223 3 => True, -- Right_Opnd (Node3)
11224 4 => False, -- Entity (Node4-Sem)
11225 5 => False), -- Etype (Node5-Sem)
11228 (1 => True, -- Chars (Name1)
11229 2 => True, -- Left_Opnd (Node2)
11230 3 => True, -- Right_Opnd (Node3)
11231 4 => False, -- Entity (Node4-Sem)
11232 5 => False), -- Etype (Node5-Sem)
11235 (1 => True, -- Chars (Name1)
11236 2 => True, -- Left_Opnd (Node2)
11237 3 => True, -- Right_Opnd (Node3)
11238 4 => False, -- Entity (Node4-Sem)
11239 5 => False), -- Etype (Node5-Sem)
11242 (1 => True, -- Chars (Name1)
11243 2 => True, -- Left_Opnd (Node2)
11244 3 => True, -- Right_Opnd (Node3)
11245 4 => False, -- Entity (Node4-Sem)
11246 5 => False), -- Etype (Node5-Sem)
11249 (1 => True, -- Chars (Name1)
11250 2 => True, -- Left_Opnd (Node2)
11251 3 => True, -- Right_Opnd (Node3)
11252 4 => False, -- Entity (Node4-Sem)
11253 5 => False), -- Etype (Node5-Sem)
11256 (1 => True, -- Chars (Name1)
11257 2 => True, -- Left_Opnd (Node2)
11258 3 => True, -- Right_Opnd (Node3)
11259 4 => False, -- Entity (Node4-Sem)
11260 5 => False), -- Etype (Node5-Sem)
11263 (1 => True, -- Chars (Name1)
11264 2 => True, -- Left_Opnd (Node2)
11265 3 => True, -- Right_Opnd (Node3)
11266 4 => False, -- Entity (Node4-Sem)
11267 5 => False), -- Etype (Node5-Sem)
11270 (1 => True, -- Chars (Name1)
11271 2 => True, -- Left_Opnd (Node2)
11272 3 => True, -- Right_Opnd (Node3)
11273 4 => False, -- Entity (Node4-Sem)
11274 5 => False), -- Etype (Node5-Sem)
11277 (1 => True, -- Chars (Name1)
11278 2 => True, -- Left_Opnd (Node2)
11279 3 => True, -- Right_Opnd (Node3)
11280 4 => False, -- Entity (Node4-Sem)
11281 5 => False), -- Etype (Node5-Sem)
11284 (1 => True, -- Chars (Name1)
11285 2 => True, -- Left_Opnd (Node2)
11286 3 => True, -- Right_Opnd (Node3)
11287 4 => False, -- Entity (Node4-Sem)
11288 5 => False), -- Etype (Node5-Sem)
11291 (1 => True, -- Chars (Name1)
11292 2 => True, -- Left_Opnd (Node2)
11293 3 => True, -- Right_Opnd (Node3)
11294 4 => False, -- Entity (Node4-Sem)
11295 5 => False), -- Etype (Node5-Sem)
11298 (1 => True, -- Chars (Name1)
11299 2 => True, -- Left_Opnd (Node2)
11300 3 => True, -- Right_Opnd (Node3)
11301 4 => False, -- Entity (Node4-Sem)
11302 5 => False), -- Etype (Node5-Sem)
11305 (1 => True, -- Chars (Name1)
11306 2 => True, -- Left_Opnd (Node2)
11307 3 => True, -- Right_Opnd (Node3)
11308 4 => False, -- Entity (Node4-Sem)
11309 5 => False), -- Etype (Node5-Sem)
11312 (1 => True, -- Chars (Name1)
11313 2 => True, -- Left_Opnd (Node2)
11314 3 => True, -- Right_Opnd (Node3)
11315 4 => False, -- Entity (Node4-Sem)
11316 5 => False), -- Etype (Node5-Sem)
11319 (1 => True, -- Chars (Name1)
11320 2 => True, -- Left_Opnd (Node2)
11321 3 => True, -- Right_Opnd (Node3)
11322 4 => False, -- Entity (Node4-Sem)
11323 5 => False), -- Etype (Node5-Sem)
11326 (1 => True, -- Chars (Name1)
11327 2 => True, -- Left_Opnd (Node2)
11328 3 => True, -- Right_Opnd (Node3)
11329 4 => False, -- Entity (Node4-Sem)
11330 5 => False), -- Etype (Node5-Sem)
11333 (1 => True, -- Chars (Name1)
11334 2 => True, -- Left_Opnd (Node2)
11335 3 => True, -- Right_Opnd (Node3)
11336 4 => False, -- Entity (Node4-Sem)
11337 5 => False), -- Etype (Node5-Sem)
11340 (1 => True, -- Chars (Name1)
11341 2 => False, -- unused
11342 3 => True, -- Right_Opnd (Node3)
11343 4 => False, -- Entity (Node4-Sem)
11344 5 => False), -- Etype (Node5-Sem)
11347 (1 => True, -- Chars (Name1)
11348 2 => False, -- unused
11349 3 => True, -- Right_Opnd (Node3)
11350 4 => False, -- Entity (Node4-Sem)
11351 5 => False), -- Etype (Node5-Sem)
11354 (1 => True, -- Chars (Name1)
11355 2 => False, -- unused
11356 3 => True, -- Right_Opnd (Node3)
11357 4 => False, -- Entity (Node4-Sem)
11358 5 => False), -- Etype (Node5-Sem)
11361 (1 => True, -- Chars (Name1)
11362 2 => False, -- unused
11363 3 => True, -- Right_Opnd (Node3)
11364 4 => False, -- Entity (Node4-Sem)
11365 5 => False), -- Etype (Node5-Sem)
11367 N_Type_Conversion =>
11368 (1 => False, -- unused
11369 2 => False, -- unused
11370 3 => True, -- Expression (Node3)
11371 4 => True, -- Subtype_Mark (Node4)
11372 5 => False), -- Etype (Node5-Sem)
11374 N_Qualified_Expression =>
11375 (1 => False, -- unused
11376 2 => False, -- unused
11377 3 => True, -- Expression (Node3)
11378 4 => True, -- Subtype_Mark (Node4)
11379 5 => False), -- Etype (Node5-Sem)
11381 N_Quantified_Expression =>
11382 (1 => True, -- Condition (Node1)
11383 2 => True, -- Iterator_Specification
11384 3 => False, -- unused
11385 4 => True, -- Loop_Parameter_Specification (Node4)
11386 5 => False), -- Etype (Node5-Sem)
11389 (1 => False, -- Storage_Pool (Node1-Sem)
11390 2 => False, -- Procedure_To_Call (Node2-Sem)
11391 3 => True, -- Expression (Node3)
11392 4 => True, -- Subpool_Handle_Name (Node4)
11393 5 => False), -- Etype (Node5-Sem)
11395 N_Null_Statement =>
11396 (1 => False, -- unused
11397 2 => False, -- unused
11398 3 => False, -- unused
11399 4 => False, -- unused
11400 5 => False), -- unused
11403 (1 => True, -- Identifier (Node1)
11404 2 => False, -- unused
11405 3 => False, -- unused
11406 4 => False, -- unused
11407 5 => False), -- unused
11409 N_Assignment_Statement =>
11410 (1 => False, -- unused
11411 2 => True, -- Name (Node2)
11412 3 => True, -- Expression (Node3)
11413 4 => False, -- unused
11414 5 => False), -- unused
11417 (1 => True, -- Condition (Node1)
11418 2 => True, -- Then_Statements (List2)
11419 3 => True, -- Elsif_Parts (List3)
11420 4 => True, -- Else_Statements (List4)
11421 5 => True), -- End_Span (Uint5)
11424 (1 => True, -- Condition (Node1)
11425 2 => True, -- Then_Statements (List2)
11426 3 => False, -- Condition_Actions (List3-Sem)
11427 4 => False, -- unused
11428 5 => False), -- unused
11430 N_Case_Expression =>
11431 (1 => False, -- unused
11432 2 => False, -- unused
11433 3 => True, -- Expression (Node3)
11434 4 => True, -- Alternatives (List4)
11435 5 => False), -- unused
11437 N_Case_Expression_Alternative =>
11438 (1 => False, -- Actions (List1-Sem)
11439 2 => False, -- unused
11440 3 => True, -- Statements (List3)
11441 4 => True, -- Expression (Node4)
11442 5 => False), -- unused
11444 N_Case_Statement =>
11445 (1 => False, -- unused
11446 2 => False, -- unused
11447 3 => True, -- Expression (Node3)
11448 4 => True, -- Alternatives (List4)
11449 5 => True), -- End_Span (Uint5)
11451 N_Case_Statement_Alternative =>
11452 (1 => False, -- unused
11453 2 => False, -- unused
11454 3 => True, -- Statements (List3)
11455 4 => True, -- Discrete_Choices (List4)
11456 5 => False), -- unused
11458 N_Loop_Statement =>
11459 (1 => True, -- Identifier (Node1)
11460 2 => True, -- Iteration_Scheme (Node2)
11461 3 => True, -- Statements (List3)
11462 4 => True, -- End_Label (Node4)
11463 5 => False), -- unused
11465 N_Iteration_Scheme =>
11466 (1 => True, -- Condition (Node1)
11467 2 => True, -- Iterator_Specification (Node2)
11468 3 => False, -- Condition_Actions (List3-Sem)
11469 4 => True, -- Loop_Parameter_Specification (Node4)
11470 5 => False), -- unused
11472 N_Loop_Parameter_Specification =>
11473 (1 => True, -- Defining_Identifier (Node1)
11474 2 => False, -- unused
11475 3 => False, -- unused
11476 4 => True, -- Discrete_Subtype_Definition (Node4)
11477 5 => False), -- unused
11479 N_Iterator_Specification =>
11480 (1 => True, -- Defining_Identifier (Node1)
11481 2 => True, -- Name (Node2)
11482 3 => False, -- Unused
11483 4 => False, -- Unused
11484 5 => True), -- Subtype_Indication (Node5)
11486 N_Block_Statement =>
11487 (1 => True, -- Identifier (Node1)
11488 2 => True, -- Declarations (List2)
11489 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11490 4 => True, -- Handled_Statement_Sequence (Node4)
11491 5 => False), -- unused
11493 N_Exit_Statement =>
11494 (1 => True, -- Condition (Node1)
11495 2 => True, -- Name (Node2)
11496 3 => False, -- unused
11497 4 => False, -- unused
11498 5 => False), -- unused
11500 N_Goto_Statement =>
11501 (1 => False, -- unused
11502 2 => True, -- Name (Node2)
11503 3 => False, -- unused
11504 4 => False, -- unused
11505 5 => False), -- unused
11507 N_Subprogram_Declaration =>
11508 (1 => True, -- Specification (Node1)
11509 2 => False, -- unused
11510 3 => False, -- Body_To_Inline (Node3-Sem)
11511 4 => False, -- Parent_Spec (Node4-Sem)
11512 5 => False), -- Corresponding_Body (Node5-Sem)
11514 N_Abstract_Subprogram_Declaration =>
11515 (1 => True, -- Specification (Node1)
11516 2 => False, -- unused
11517 3 => False, -- unused
11518 4 => False, -- unused
11519 5 => False), -- unused
11521 N_Function_Specification =>
11522 (1 => True, -- Defining_Unit_Name (Node1)
11523 2 => False, -- Elaboration_Boolean (Node2-Sem)
11524 3 => True, -- Parameter_Specifications (List3)
11525 4 => True, -- Result_Definition (Node4)
11526 5 => False), -- Generic_Parent (Node5-Sem)
11528 N_Procedure_Specification =>
11529 (1 => True, -- Defining_Unit_Name (Node1)
11530 2 => False, -- Elaboration_Boolean (Node2-Sem)
11531 3 => True, -- Parameter_Specifications (List3)
11532 4 => False, -- unused
11533 5 => False), -- Generic_Parent (Node5-Sem)
11536 (1 => True, -- Identifier (Node1)
11537 2 => True, -- Name (Node2)
11538 3 => False, -- unused
11539 4 => False, -- unused
11540 5 => False), -- unused
11542 N_Defining_Program_Unit_Name =>
11543 (1 => True, -- Defining_Identifier (Node1)
11544 2 => True, -- Name (Node2)
11545 3 => False, -- unused
11546 4 => False, -- unused
11547 5 => False), -- unused
11549 N_Operator_Symbol =>
11550 (1 => True, -- Chars (Name1)
11551 2 => False, -- unused
11552 3 => True, -- Strval (Str3)
11553 4 => False, -- Entity (Node4-Sem)
11554 5 => False), -- Etype (Node5-Sem)
11556 N_Defining_Operator_Symbol =>
11557 (1 => True, -- Chars (Name1)
11558 2 => False, -- Next_Entity (Node2-Sem)
11559 3 => False, -- Scope (Node3-Sem)
11560 4 => False, -- unused
11561 5 => False), -- Etype (Node5-Sem)
11563 N_Parameter_Specification =>
11564 (1 => True, -- Defining_Identifier (Node1)
11565 2 => True, -- Parameter_Type (Node2)
11566 3 => True, -- Expression (Node3)
11567 4 => False, -- unused
11568 5 => False), -- Default_Expression (Node5-Sem)
11570 N_Subprogram_Body =>
11571 (1 => True, -- Specification (Node1)
11572 2 => True, -- Declarations (List2)
11573 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11574 4 => True, -- Handled_Statement_Sequence (Node4)
11575 5 => False), -- Corresponding_Spec (Node5-Sem)
11577 N_Expression_Function =>
11578 (1 => True, -- Specification (Node1)
11579 2 => False, -- unused
11580 3 => True, -- Expression (Node3)
11581 4 => False, -- unused
11582 5 => False), -- unused
11584 N_Procedure_Call_Statement =>
11585 (1 => False, -- Controlling_Argument (Node1-Sem)
11586 2 => True, -- Name (Node2)
11587 3 => True, -- Parameter_Associations (List3)
11588 4 => False, -- First_Named_Actual (Node4-Sem)
11589 5 => False), -- Etype (Node5-Sem)
11592 (1 => False, -- Controlling_Argument (Node1-Sem)
11593 2 => True, -- Name (Node2)
11594 3 => True, -- Parameter_Associations (List3)
11595 4 => False, -- First_Named_Actual (Node4-Sem)
11596 5 => False), -- Etype (Node5-Sem)
11598 N_Parameter_Association =>
11599 (1 => False, -- unused
11600 2 => True, -- Selector_Name (Node2)
11601 3 => True, -- Explicit_Actual_Parameter (Node3)
11602 4 => False, -- Next_Named_Actual (Node4-Sem)
11603 5 => False), -- unused
11605 N_Simple_Return_Statement =>
11606 (1 => False, -- Storage_Pool (Node1-Sem)
11607 2 => False, -- Procedure_To_Call (Node2-Sem)
11608 3 => True, -- Expression (Node3)
11609 4 => False, -- unused
11610 5 => False), -- Return_Statement_Entity (Node5-Sem)
11612 N_Extended_Return_Statement =>
11613 (1 => False, -- Storage_Pool (Node1-Sem)
11614 2 => False, -- Procedure_To_Call (Node2-Sem)
11615 3 => True, -- Return_Object_Declarations (List3)
11616 4 => True, -- Handled_Statement_Sequence (Node4)
11617 5 => False), -- Return_Statement_Entity (Node5-Sem)
11619 N_Package_Declaration =>
11620 (1 => True, -- Specification (Node1)
11621 2 => False, -- unused
11622 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11623 4 => False, -- Parent_Spec (Node4-Sem)
11624 5 => False), -- Corresponding_Body (Node5-Sem)
11626 N_Package_Specification =>
11627 (1 => True, -- Defining_Unit_Name (Node1)
11628 2 => True, -- Visible_Declarations (List2)
11629 3 => True, -- Private_Declarations (List3)
11630 4 => True, -- End_Label (Node4)
11631 5 => False), -- Generic_Parent (Node5-Sem)
11634 (1 => True, -- Defining_Unit_Name (Node1)
11635 2 => True, -- Declarations (List2)
11636 3 => False, -- unused
11637 4 => True, -- Handled_Statement_Sequence (Node4)
11638 5 => False), -- Corresponding_Spec (Node5-Sem)
11640 N_Private_Type_Declaration =>
11641 (1 => True, -- Defining_Identifier (Node1)
11642 2 => False, -- unused
11643 3 => False, -- unused
11644 4 => True, -- Discriminant_Specifications (List4)
11645 5 => False), -- unused
11647 N_Private_Extension_Declaration =>
11648 (1 => True, -- Defining_Identifier (Node1)
11649 2 => True, -- Interface_List (List2)
11650 3 => False, -- unused
11651 4 => True, -- Discriminant_Specifications (List4)
11652 5 => True), -- Subtype_Indication (Node5)
11654 N_Use_Package_Clause =>
11655 (1 => False, -- unused
11656 2 => True, -- Names (List2)
11657 3 => False, -- Next_Use_Clause (Node3-Sem)
11658 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
11659 5 => False), -- unused
11661 N_Use_Type_Clause =>
11662 (1 => False, -- unused
11663 2 => True, -- Subtype_Marks (List2)
11664 3 => False, -- Next_Use_Clause (Node3-Sem)
11665 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
11666 5 => False), -- unused
11668 N_Object_Renaming_Declaration =>
11669 (1 => True, -- Defining_Identifier (Node1)
11670 2 => True, -- Name (Node2)
11671 3 => True, -- Access_Definition (Node3)
11672 4 => True, -- Subtype_Mark (Node4)
11673 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
11675 N_Exception_Renaming_Declaration =>
11676 (1 => True, -- Defining_Identifier (Node1)
11677 2 => True, -- Name (Node2)
11678 3 => False, -- unused
11679 4 => False, -- unused
11680 5 => False), -- unused
11682 N_Package_Renaming_Declaration =>
11683 (1 => True, -- Defining_Unit_Name (Node1)
11684 2 => True, -- Name (Node2)
11685 3 => False, -- unused
11686 4 => False, -- Parent_Spec (Node4-Sem)
11687 5 => False), -- unused
11689 N_Subprogram_Renaming_Declaration =>
11690 (1 => True, -- Specification (Node1)
11691 2 => True, -- Name (Node2)
11692 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
11693 4 => False, -- Parent_Spec (Node4-Sem)
11694 5 => False), -- Corresponding_Spec (Node5-Sem)
11696 N_Generic_Package_Renaming_Declaration =>
11697 (1 => True, -- Defining_Unit_Name (Node1)
11698 2 => True, -- Name (Node2)
11699 3 => False, -- unused
11700 4 => False, -- Parent_Spec (Node4-Sem)
11701 5 => False), -- unused
11703 N_Generic_Procedure_Renaming_Declaration =>
11704 (1 => True, -- Defining_Unit_Name (Node1)
11705 2 => True, -- Name (Node2)
11706 3 => False, -- unused
11707 4 => False, -- Parent_Spec (Node4-Sem)
11708 5 => False), -- unused
11710 N_Generic_Function_Renaming_Declaration =>
11711 (1 => True, -- Defining_Unit_Name (Node1)
11712 2 => True, -- Name (Node2)
11713 3 => False, -- unused
11714 4 => False, -- Parent_Spec (Node4-Sem)
11715 5 => False), -- unused
11717 N_Task_Type_Declaration =>
11718 (1 => True, -- Defining_Identifier (Node1)
11719 2 => True, -- Interface_List (List2)
11720 3 => True, -- Task_Definition (Node3)
11721 4 => True, -- Discriminant_Specifications (List4)
11722 5 => False), -- Corresponding_Body (Node5-Sem)
11724 N_Single_Task_Declaration =>
11725 (1 => True, -- Defining_Identifier (Node1)
11726 2 => True, -- Interface_List (List2)
11727 3 => True, -- Task_Definition (Node3)
11728 4 => False, -- unused
11729 5 => False), -- unused
11731 N_Task_Definition =>
11732 (1 => False, -- unused
11733 2 => True, -- Visible_Declarations (List2)
11734 3 => True, -- Private_Declarations (List3)
11735 4 => True, -- End_Label (Node4)
11736 5 => False), -- unused
11739 (1 => True, -- Defining_Identifier (Node1)
11740 2 => True, -- Declarations (List2)
11741 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11742 4 => True, -- Handled_Statement_Sequence (Node4)
11743 5 => False), -- Corresponding_Spec (Node5-Sem)
11745 N_Protected_Type_Declaration =>
11746 (1 => True, -- Defining_Identifier (Node1)
11747 2 => True, -- Interface_List (List2)
11748 3 => True, -- Protected_Definition (Node3)
11749 4 => True, -- Discriminant_Specifications (List4)
11750 5 => False), -- Corresponding_Body (Node5-Sem)
11752 N_Single_Protected_Declaration =>
11753 (1 => True, -- Defining_Identifier (Node1)
11754 2 => True, -- Interface_List (List2)
11755 3 => True, -- Protected_Definition (Node3)
11756 4 => False, -- unused
11757 5 => False), -- unused
11759 N_Protected_Definition =>
11760 (1 => False, -- unused
11761 2 => True, -- Visible_Declarations (List2)
11762 3 => True, -- Private_Declarations (List3)
11763 4 => True, -- End_Label (Node4)
11764 5 => False), -- unused
11766 N_Protected_Body =>
11767 (1 => True, -- Defining_Identifier (Node1)
11768 2 => True, -- Declarations (List2)
11769 3 => False, -- unused
11770 4 => True, -- End_Label (Node4)
11771 5 => False), -- Corresponding_Spec (Node5-Sem)
11773 N_Entry_Declaration =>
11774 (1 => True, -- Defining_Identifier (Node1)
11775 2 => False, -- unused
11776 3 => True, -- Parameter_Specifications (List3)
11777 4 => True, -- Discrete_Subtype_Definition (Node4)
11778 5 => False), -- Corresponding_Body (Node5-Sem)
11780 N_Accept_Statement =>
11781 (1 => True, -- Entry_Direct_Name (Node1)
11782 2 => True, -- Declarations (List2)
11783 3 => True, -- Parameter_Specifications (List3)
11784 4 => True, -- Handled_Statement_Sequence (Node4)
11785 5 => True), -- Entry_Index (Node5)
11788 (1 => True, -- Defining_Identifier (Node1)
11789 2 => True, -- Declarations (List2)
11790 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11791 4 => True, -- Handled_Statement_Sequence (Node4)
11792 5 => True), -- Entry_Body_Formal_Part (Node5)
11794 N_Entry_Body_Formal_Part =>
11795 (1 => True, -- Condition (Node1)
11796 2 => False, -- unused
11797 3 => True, -- Parameter_Specifications (List3)
11798 4 => True, -- Entry_Index_Specification (Node4)
11799 5 => False), -- unused
11801 N_Entry_Index_Specification =>
11802 (1 => True, -- Defining_Identifier (Node1)
11803 2 => False, -- unused
11804 3 => False, -- unused
11805 4 => True, -- Discrete_Subtype_Definition (Node4)
11806 5 => False), -- unused
11808 N_Entry_Call_Statement =>
11809 (1 => False, -- unused
11810 2 => True, -- Name (Node2)
11811 3 => True, -- Parameter_Associations (List3)
11812 4 => False, -- First_Named_Actual (Node4-Sem)
11813 5 => False), -- unused
11815 N_Requeue_Statement =>
11816 (1 => False, -- unused
11817 2 => True, -- Name (Node2)
11818 3 => False, -- unused
11819 4 => False, -- unused
11820 5 => False), -- unused
11822 N_Delay_Until_Statement =>
11823 (1 => False, -- unused
11824 2 => False, -- unused
11825 3 => True, -- Expression (Node3)
11826 4 => False, -- unused
11827 5 => False), -- unused
11829 N_Delay_Relative_Statement =>
11830 (1 => False, -- unused
11831 2 => False, -- unused
11832 3 => True, -- Expression (Node3)
11833 4 => False, -- unused
11834 5 => False), -- unused
11836 N_Selective_Accept =>
11837 (1 => True, -- Select_Alternatives (List1)
11838 2 => False, -- unused
11839 3 => False, -- unused
11840 4 => True, -- Else_Statements (List4)
11841 5 => False), -- unused
11843 N_Accept_Alternative =>
11844 (1 => True, -- Condition (Node1)
11845 2 => True, -- Accept_Statement (Node2)
11846 3 => True, -- Statements (List3)
11847 4 => True, -- Pragmas_Before (List4)
11848 5 => False), -- Accept_Handler_Records (List5-Sem)
11850 N_Delay_Alternative =>
11851 (1 => True, -- Condition (Node1)
11852 2 => True, -- Delay_Statement (Node2)
11853 3 => True, -- Statements (List3)
11854 4 => True, -- Pragmas_Before (List4)
11855 5 => False), -- unused
11857 N_Terminate_Alternative =>
11858 (1 => True, -- Condition (Node1)
11859 2 => False, -- unused
11860 3 => False, -- unused
11861 4 => True, -- Pragmas_Before (List4)
11862 5 => True), -- Pragmas_After (List5)
11864 N_Timed_Entry_Call =>
11865 (1 => True, -- Entry_Call_Alternative (Node1)
11866 2 => False, -- unused
11867 3 => False, -- unused
11868 4 => True, -- Delay_Alternative (Node4)
11869 5 => False), -- unused
11871 N_Entry_Call_Alternative =>
11872 (1 => True, -- Entry_Call_Statement (Node1)
11873 2 => False, -- unused
11874 3 => True, -- Statements (List3)
11875 4 => True, -- Pragmas_Before (List4)
11876 5 => False), -- unused
11878 N_Conditional_Entry_Call =>
11879 (1 => True, -- Entry_Call_Alternative (Node1)
11880 2 => False, -- unused
11881 3 => False, -- unused
11882 4 => True, -- Else_Statements (List4)
11883 5 => False), -- unused
11885 N_Asynchronous_Select =>
11886 (1 => True, -- Triggering_Alternative (Node1)
11887 2 => True, -- Abortable_Part (Node2)
11888 3 => False, -- unused
11889 4 => False, -- unused
11890 5 => False), -- unused
11892 N_Triggering_Alternative =>
11893 (1 => True, -- Triggering_Statement (Node1)
11894 2 => False, -- unused
11895 3 => True, -- Statements (List3)
11896 4 => True, -- Pragmas_Before (List4)
11897 5 => False), -- unused
11899 N_Abortable_Part =>
11900 (1 => False, -- unused
11901 2 => False, -- unused
11902 3 => True, -- Statements (List3)
11903 4 => False, -- unused
11904 5 => False), -- unused
11906 N_Abort_Statement =>
11907 (1 => False, -- unused
11908 2 => True, -- Names (List2)
11909 3 => False, -- unused
11910 4 => False, -- unused
11911 5 => False), -- unused
11913 N_Compilation_Unit =>
11914 (1 => True, -- Context_Items (List1)
11915 2 => True, -- Unit (Node2)
11916 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
11917 4 => False, -- Library_Unit (Node4-Sem)
11918 5 => True), -- Aux_Decls_Node (Node5)
11920 N_Compilation_Unit_Aux =>
11921 (1 => True, -- Actions (List1)
11922 2 => True, -- Declarations (List2)
11923 3 => False, -- Default_Storage_Pool (Node3)
11924 4 => True, -- Config_Pragmas (List4)
11925 5 => True), -- Pragmas_After (List5)
11928 (1 => False, -- unused
11929 2 => True, -- Name (Node2)
11930 3 => False, -- unused
11931 4 => False, -- Library_Unit (Node4-Sem)
11932 5 => False), -- Corresponding_Spec (Node5-Sem)
11934 N_Subprogram_Body_Stub =>
11935 (1 => True, -- Specification (Node1)
11936 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11937 3 => False, -- unused
11938 4 => False, -- Library_Unit (Node4-Sem)
11939 5 => False), -- Corresponding_Body (Node5-Sem)
11941 N_Package_Body_Stub =>
11942 (1 => True, -- Defining_Identifier (Node1)
11943 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11944 3 => False, -- unused
11945 4 => False, -- Library_Unit (Node4-Sem)
11946 5 => False), -- Corresponding_Body (Node5-Sem)
11948 N_Task_Body_Stub =>
11949 (1 => True, -- Defining_Identifier (Node1)
11950 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11951 3 => False, -- unused
11952 4 => False, -- Library_Unit (Node4-Sem)
11953 5 => False), -- Corresponding_Body (Node5-Sem)
11955 N_Protected_Body_Stub =>
11956 (1 => True, -- Defining_Identifier (Node1)
11957 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11958 3 => False, -- unused
11959 4 => False, -- Library_Unit (Node4-Sem)
11960 5 => False), -- Corresponding_Body (Node5-Sem)
11963 (1 => True, -- Proper_Body (Node1)
11964 2 => True, -- Name (Node2)
11965 3 => False, -- Corresponding_Stub (Node3-Sem)
11966 4 => False, -- unused
11967 5 => False), -- unused
11969 N_Exception_Declaration =>
11970 (1 => True, -- Defining_Identifier (Node1)
11971 2 => False, -- unused
11972 3 => False, -- Expression (Node3-Sem)
11973 4 => False, -- unused
11974 5 => False), -- unused
11976 N_Handled_Sequence_Of_Statements =>
11977 (1 => True, -- At_End_Proc (Node1)
11978 2 => False, -- First_Real_Statement (Node2-Sem)
11979 3 => True, -- Statements (List3)
11980 4 => True, -- End_Label (Node4)
11981 5 => True), -- Exception_Handlers (List5)
11983 N_Exception_Handler =>
11984 (1 => False, -- Local_Raise_Statements (Elist1)
11985 2 => True, -- Choice_Parameter (Node2)
11986 3 => True, -- Statements (List3)
11987 4 => True, -- Exception_Choices (List4)
11988 5 => False), -- Exception_Label (Node5)
11990 N_Raise_Statement =>
11991 (1 => False, -- unused
11992 2 => True, -- Name (Node2)
11993 3 => True, -- Expression (Node3)
11994 4 => False, -- unused
11995 5 => False), -- unused
11997 N_Raise_Expression =>
11998 (1 => False, -- unused
11999 2 => True, -- Name (Node2)
12000 3 => True, -- Expression (Node3)
12001 4 => False, -- unused
12002 5 => False), -- Etype (Node5-Sem)
12004 N_Generic_Subprogram_Declaration =>
12005 (1 => True, -- Specification (Node1)
12006 2 => True, -- Generic_Formal_Declarations (List2)
12007 3 => False, -- unused
12008 4 => False, -- Parent_Spec (Node4-Sem)
12009 5 => False), -- Corresponding_Body (Node5-Sem)
12011 N_Generic_Package_Declaration =>
12012 (1 => True, -- Specification (Node1)
12013 2 => True, -- Generic_Formal_Declarations (List2)
12014 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12015 4 => False, -- Parent_Spec (Node4-Sem)
12016 5 => False), -- Corresponding_Body (Node5-Sem)
12018 N_Package_Instantiation =>
12019 (1 => True, -- Defining_Unit_Name (Node1)
12020 2 => True, -- Name (Node2)
12021 3 => True, -- Generic_Associations (List3)
12022 4 => False, -- Parent_Spec (Node4-Sem)
12023 5 => False), -- Instance_Spec (Node5-Sem)
12025 N_Procedure_Instantiation =>
12026 (1 => True, -- Defining_Unit_Name (Node1)
12027 2 => True, -- Name (Node2)
12028 3 => True, -- Generic_Associations (List3)
12029 4 => False, -- Parent_Spec (Node4-Sem)
12030 5 => False), -- Instance_Spec (Node5-Sem)
12032 N_Function_Instantiation =>
12033 (1 => True, -- Defining_Unit_Name (Node1)
12034 2 => True, -- Name (Node2)
12035 3 => True, -- Generic_Associations (List3)
12036 4 => False, -- Parent_Spec (Node4-Sem)
12037 5 => False), -- Instance_Spec (Node5-Sem)
12039 N_Generic_Association =>
12040 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
12041 2 => True, -- Selector_Name (Node2)
12042 3 => False, -- unused
12043 4 => False, -- unused
12044 5 => False), -- unused
12046 N_Formal_Object_Declaration =>
12047 (1 => True, -- Defining_Identifier (Node1)
12048 2 => False, -- unused
12049 3 => True, -- Access_Definition (Node3)
12050 4 => True, -- Subtype_Mark (Node4)
12051 5 => True), -- Default_Expression (Node5)
12053 N_Formal_Type_Declaration =>
12054 (1 => True, -- Defining_Identifier (Node1)
12055 2 => False, -- unused
12056 3 => True, -- Formal_Type_Definition (Node3)
12057 4 => True, -- Discriminant_Specifications (List4)
12058 5 => False), -- unused
12060 N_Formal_Private_Type_Definition =>
12061 (1 => False, -- unused
12062 2 => False, -- unused
12063 3 => False, -- unused
12064 4 => False, -- unused
12065 5 => False), -- unused
12067 N_Formal_Incomplete_Type_Definition =>
12068 (1 => False, -- unused
12069 2 => False, -- unused
12070 3 => False, -- unused
12071 4 => False, -- unused
12072 5 => False), -- unused
12074 N_Formal_Derived_Type_Definition =>
12075 (1 => False, -- unused
12076 2 => True, -- Interface_List (List2)
12077 3 => False, -- unused
12078 4 => True, -- Subtype_Mark (Node4)
12079 5 => False), -- unused
12081 N_Formal_Discrete_Type_Definition =>
12082 (1 => False, -- unused
12083 2 => False, -- unused
12084 3 => False, -- unused
12085 4 => False, -- unused
12086 5 => False), -- unused
12088 N_Formal_Signed_Integer_Type_Definition =>
12089 (1 => False, -- unused
12090 2 => False, -- unused
12091 3 => False, -- unused
12092 4 => False, -- unused
12093 5 => False), -- unused
12095 N_Formal_Modular_Type_Definition =>
12096 (1 => False, -- unused
12097 2 => False, -- unused
12098 3 => False, -- unused
12099 4 => False, -- unused
12100 5 => False), -- unused
12102 N_Formal_Floating_Point_Definition =>
12103 (1 => False, -- unused
12104 2 => False, -- unused
12105 3 => False, -- unused
12106 4 => False, -- unused
12107 5 => False), -- unused
12109 N_Formal_Ordinary_Fixed_Point_Definition =>
12110 (1 => False, -- unused
12111 2 => False, -- unused
12112 3 => False, -- unused
12113 4 => False, -- unused
12114 5 => False), -- unused
12116 N_Formal_Decimal_Fixed_Point_Definition =>
12117 (1 => False, -- unused
12118 2 => False, -- unused
12119 3 => False, -- unused
12120 4 => False, -- unused
12121 5 => False), -- unused
12123 N_Formal_Concrete_Subprogram_Declaration =>
12124 (1 => True, -- Specification (Node1)
12125 2 => True, -- Default_Name (Node2)
12126 3 => False, -- unused
12127 4 => False, -- unused
12128 5 => False), -- unused
12130 N_Formal_Abstract_Subprogram_Declaration =>
12131 (1 => True, -- Specification (Node1)
12132 2 => True, -- Default_Name (Node2)
12133 3 => False, -- unused
12134 4 => False, -- unused
12135 5 => False), -- unused
12137 N_Formal_Package_Declaration =>
12138 (1 => True, -- Defining_Identifier (Node1)
12139 2 => True, -- Name (Node2)
12140 3 => True, -- Generic_Associations (List3)
12141 4 => False, -- unused
12142 5 => False), -- Instance_Spec (Node5-Sem)
12144 N_Attribute_Definition_Clause =>
12145 (1 => True, -- Chars (Name1)
12146 2 => True, -- Name (Node2)
12147 3 => True, -- Expression (Node3)
12148 4 => False, -- unused
12149 5 => False), -- Next_Rep_Item (Node5-Sem)
12151 N_Aspect_Specification =>
12152 (1 => True, -- Identifier (Node1)
12153 2 => False, -- Aspect_Rep_Item (Node2-Sem)
12154 3 => True, -- Expression (Node3)
12155 4 => False, -- Entity (Node4-Sem)
12156 5 => False), -- Next_Rep_Item (Node5-Sem)
12158 N_Enumeration_Representation_Clause =>
12159 (1 => True, -- Identifier (Node1)
12160 2 => False, -- unused
12161 3 => True, -- Array_Aggregate (Node3)
12162 4 => False, -- unused
12163 5 => False), -- Next_Rep_Item (Node5-Sem)
12165 N_Record_Representation_Clause =>
12166 (1 => True, -- Identifier (Node1)
12167 2 => True, -- Mod_Clause (Node2)
12168 3 => True, -- Component_Clauses (List3)
12169 4 => False, -- unused
12170 5 => False), -- Next_Rep_Item (Node5-Sem)
12172 N_Component_Clause =>
12173 (1 => True, -- Component_Name (Node1)
12174 2 => True, -- Position (Node2)
12175 3 => True, -- First_Bit (Node3)
12176 4 => True, -- Last_Bit (Node4)
12177 5 => False), -- unused
12179 N_Code_Statement =>
12180 (1 => False, -- unused
12181 2 => False, -- unused
12182 3 => True, -- Expression (Node3)
12183 4 => False, -- unused
12184 5 => False), -- unused
12186 N_Op_Rotate_Left =>
12187 (1 => True, -- Chars (Name1)
12188 2 => True, -- Left_Opnd (Node2)
12189 3 => True, -- Right_Opnd (Node3)
12190 4 => False, -- Entity (Node4-Sem)
12191 5 => False), -- Etype (Node5-Sem)
12193 N_Op_Rotate_Right =>
12194 (1 => True, -- Chars (Name1)
12195 2 => True, -- Left_Opnd (Node2)
12196 3 => True, -- Right_Opnd (Node3)
12197 4 => False, -- Entity (Node4-Sem)
12198 5 => False), -- Etype (Node5-Sem)
12201 (1 => True, -- Chars (Name1)
12202 2 => True, -- Left_Opnd (Node2)
12203 3 => True, -- Right_Opnd (Node3)
12204 4 => False, -- Entity (Node4-Sem)
12205 5 => False), -- Etype (Node5-Sem)
12207 N_Op_Shift_Right_Arithmetic =>
12208 (1 => True, -- Chars (Name1)
12209 2 => True, -- Left_Opnd (Node2)
12210 3 => True, -- Right_Opnd (Node3)
12211 4 => False, -- Entity (Node4-Sem)
12212 5 => False), -- Etype (Node5-Sem)
12214 N_Op_Shift_Right =>
12215 (1 => True, -- Chars (Name1)
12216 2 => True, -- Left_Opnd (Node2)
12217 3 => True, -- Right_Opnd (Node3)
12218 4 => False, -- Entity (Node4-Sem)
12219 5 => False), -- Etype (Node5-Sem)
12221 N_Delta_Constraint =>
12222 (1 => False, -- unused
12223 2 => False, -- unused
12224 3 => True, -- Delta_Expression (Node3)
12225 4 => True, -- Range_Constraint (Node4)
12226 5 => False), -- unused
12229 (1 => True, -- Identifier (Node1)
12230 2 => False, -- unused
12231 3 => True, -- Expression (Node3)
12232 4 => False, -- unused
12233 5 => False), -- unused
12236 (1 => False, -- unused
12237 2 => False, -- unused
12238 3 => True, -- Expression (Node3)
12239 4 => True, -- Pragmas_Before (List4)
12240 5 => False), -- unused
12243 (1 => True, -- Expressions (List1)
12244 2 => False, -- Then_Actions (List2-Sem)
12245 3 => False, -- Else_Actions (List3-Sem)
12246 4 => False, -- unused
12247 5 => False), -- Etype (Node5-Sem)
12249 N_Compound_Statement =>
12250 (1 => True, -- Actions (List1)
12251 2 => False, -- unused
12252 3 => False, -- unused
12253 4 => False, -- unused
12254 5 => False), -- unused
12257 (1 => False, -- Pre_Post_Conditions (Node1)
12258 2 => False, -- Contract_Test_Cases (Node2)
12259 3 => False, -- Classifications (Node3)
12260 4 => False, -- unused
12261 5 => False), -- unused
12264 (1 => True, -- Chars (Name1)
12265 2 => True, -- Selector_Name (Node2)
12266 3 => True, -- Prefix (Node3)
12267 4 => False, -- Entity (Node4-Sem)
12268 5 => False), -- Etype (Node5-Sem)
12270 N_Expression_With_Actions =>
12271 (1 => True, -- Actions (List1)
12272 2 => False, -- unused
12273 3 => True, -- Expression (Node3)
12274 4 => False, -- unused
12275 5 => False), -- unused
12277 N_Free_Statement =>
12278 (1 => False, -- Storage_Pool (Node1-Sem)
12279 2 => False, -- Procedure_To_Call (Node2-Sem)
12280 3 => True, -- Expression (Node3)
12281 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
12282 5 => False), -- unused
12285 (1 => True, -- Actions (List1)
12286 2 => False, -- Access_Types_To_Process (Elist2-Sem)
12287 3 => False, -- TSS_Elist (Elist3-Sem)
12288 4 => False, -- Entity (Node4-Sem)
12289 5 => False), -- First_Subtype_Link (Node5-Sem)
12291 N_Freeze_Generic_Entity =>
12292 (1 => False, -- unused
12293 2 => False, -- unused
12294 3 => False, -- unused
12295 4 => False, -- Entity (Node4-Sem)
12296 5 => False), -- unused
12298 N_Implicit_Label_Declaration =>
12299 (1 => True, -- Defining_Identifier (Node1)
12300 2 => False, -- Label_Construct (Node2-Sem)
12301 3 => False, -- unused
12302 4 => False, -- unused
12303 5 => False), -- unused
12305 N_Itype_Reference =>
12306 (1 => False, -- Itype (Node1-Sem)
12307 2 => False, -- unused
12308 3 => False, -- unused
12309 4 => False, -- unused
12310 5 => False), -- unused
12312 N_Raise_Constraint_Error =>
12313 (1 => True, -- Condition (Node1)
12314 2 => False, -- unused
12315 3 => True, -- Reason (Uint3)
12316 4 => False, -- unused
12317 5 => False), -- Etype (Node5-Sem)
12319 N_Raise_Program_Error =>
12320 (1 => True, -- Condition (Node1)
12321 2 => False, -- unused
12322 3 => True, -- Reason (Uint3)
12323 4 => False, -- unused
12324 5 => False), -- Etype (Node5-Sem)
12326 N_Raise_Storage_Error =>
12327 (1 => True, -- Condition (Node1)
12328 2 => False, -- unused
12329 3 => True, -- Reason (Uint3)
12330 4 => False, -- unused
12331 5 => False), -- Etype (Node5-Sem)
12333 N_Push_Constraint_Error_Label =>
12334 (1 => False, -- unused
12335 2 => False, -- unused
12336 3 => False, -- unused
12337 4 => False, -- unused
12338 5 => False), -- unused
12340 N_Push_Program_Error_Label =>
12341 (1 => False, -- Exception_Label
12342 2 => False, -- unused
12343 3 => False, -- unused
12344 4 => False, -- unused
12345 5 => False), -- Exception_Label
12347 N_Push_Storage_Error_Label =>
12348 (1 => False, -- Exception_Label
12349 2 => False, -- unused
12350 3 => False, -- unused
12351 4 => False, -- unused
12352 5 => False), -- Exception_Label
12354 N_Pop_Constraint_Error_Label =>
12355 (1 => False, -- unused
12356 2 => False, -- unused
12357 3 => False, -- unused
12358 4 => False, -- unused
12359 5 => False), -- unused
12361 N_Pop_Program_Error_Label =>
12362 (1 => False, -- unused
12363 2 => False, -- unused
12364 3 => False, -- unused
12365 4 => False, -- unused
12366 5 => False), -- unused
12368 N_Pop_Storage_Error_Label =>
12369 (1 => False, -- unused
12370 2 => False, -- unused
12371 3 => False, -- unused
12372 4 => False, -- unused
12373 5 => False), -- unused
12376 (1 => False, -- unused
12377 2 => False, -- unused
12378 3 => True, -- Prefix (Node3)
12379 4 => False, -- unused
12380 5 => False), -- Etype (Node5-Sem)
12382 N_Unchecked_Expression =>
12383 (1 => False, -- unused
12384 2 => False, -- unused
12385 3 => True, -- Expression (Node3)
12386 4 => False, -- unused
12387 5 => False), -- Etype (Node5-Sem)
12389 N_Unchecked_Type_Conversion =>
12390 (1 => False, -- unused
12391 2 => False, -- unused
12392 3 => True, -- Expression (Node3)
12393 4 => True, -- Subtype_Mark (Node4)
12394 5 => False), -- Etype (Node5-Sem)
12396 N_Validate_Unchecked_Conversion =>
12397 (1 => False, -- Source_Type (Node1-Sem)
12398 2 => False, -- Target_Type (Node2-Sem)
12399 3 => False, -- unused
12400 4 => False, -- unused
12401 5 => False), -- unused
12403 -- Entries for SCIL nodes
12405 N_SCIL_Dispatch_Table_Tag_Init =>
12406 (1 => False, -- unused
12407 2 => False, -- unused
12408 3 => False, -- unused
12409 4 => False, -- SCIL_Entity (Node4-Sem)
12410 5 => False), -- unused
12412 N_SCIL_Dispatching_Call =>
12413 (1 => False, -- unused
12414 2 => False, -- SCIL_Target_Prim (Node2-Sem)
12415 3 => False, -- unused
12416 4 => False, -- SCIL_Entity (Node4-Sem)
12417 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
12419 N_SCIL_Membership_Test =>
12420 (1 => False, -- unused
12421 2 => False, -- unused
12422 3 => False, -- unused
12423 4 => False, -- SCIL_Entity (Node4-Sem)
12424 5 => False), -- SCIL_Tag_Value (Node5-Sem)
12426 -- Entries for Empty, Error and Unused. Even thought these have a Chars
12427 -- field for debugging purposes, they are not really syntactic fields, so
12428 -- we mark all fields as unused.
12431 (1 => False, -- unused
12432 2 => False, -- unused
12433 3 => False, -- unused
12434 4 => False, -- unused
12435 5 => False), -- unused
12438 (1 => False, -- unused
12439 2 => False, -- unused
12440 3 => False, -- unused
12441 4 => False, -- unused
12442 5 => False), -- unused
12444 N_Unused_At_Start =>
12445 (1 => False, -- unused
12446 2 => False, -- unused
12447 3 => False, -- unused
12448 4 => False, -- unused
12449 5 => False), -- unused
12452 (1 => False, -- unused
12453 2 => False, -- unused
12454 3 => False, -- unused
12455 4 => False, -- unused
12456 5 => False)); -- unused
12458 --------------------
12459 -- Inline Pragmas --
12460 --------------------
12462 pragma Inline (ABE_Is_Certain);
12463 pragma Inline (Abort_Present);
12464 pragma Inline (Abortable_Part);
12465 pragma Inline (Abstract_Present);
12466 pragma Inline (Accept_Handler_Records);
12467 pragma Inline (Accept_Statement);
12468 pragma Inline (Access_Definition);
12469 pragma Inline (Access_To_Subprogram_Definition);
12470 pragma Inline (Access_Types_To_Process);
12471 pragma Inline (Actions);
12472 pragma Inline (Activation_Chain_Entity);
12473 pragma Inline (Acts_As_Spec);
12474 pragma Inline (Actual_Designated_Subtype);
12475 pragma Inline (Address_Warning_Posted);
12476 pragma Inline (Aggregate_Bounds);
12477 pragma Inline (Aliased_Present);
12478 pragma Inline (All_Others);
12479 pragma Inline (All_Present);
12480 pragma Inline (Alternatives);
12481 pragma Inline (Ancestor_Part);
12482 pragma Inline (Atomic_Sync_Required);
12483 pragma Inline (Array_Aggregate);
12484 pragma Inline (Aspect_Rep_Item);
12485 pragma Inline (Assignment_OK);
12486 pragma Inline (Associated_Node);
12487 pragma Inline (At_End_Proc);
12488 pragma Inline (Attribute_Name);
12489 pragma Inline (Aux_Decls_Node);
12490 pragma Inline (Backwards_OK);
12491 pragma Inline (Bad_Is_Detected);
12492 pragma Inline (Body_To_Inline);
12493 pragma Inline (Body_Required);
12494 pragma Inline (By_Ref);
12495 pragma Inline (Box_Present);
12496 pragma Inline (Char_Literal_Value);
12497 pragma Inline (Chars);
12498 pragma Inline (Check_Address_Alignment);
12499 pragma Inline (Choice_Parameter);
12500 pragma Inline (Choices);
12501 pragma Inline (Class_Present);
12502 pragma Inline (Classifications);
12503 pragma Inline (Cleanup_Actions);
12504 pragma Inline (Comes_From_Extended_Return_Statement);
12505 pragma Inline (Compile_Time_Known_Aggregate);
12506 pragma Inline (Component_Associations);
12507 pragma Inline (Component_Clauses);
12508 pragma Inline (Component_Definition);
12509 pragma Inline (Component_Items);
12510 pragma Inline (Component_List);
12511 pragma Inline (Component_Name);
12512 pragma Inline (Componentwise_Assignment);
12513 pragma Inline (Condition);
12514 pragma Inline (Condition_Actions);
12515 pragma Inline (Config_Pragmas);
12516 pragma Inline (Constant_Present);
12517 pragma Inline (Constraint);
12518 pragma Inline (Constraints);
12519 pragma Inline (Context_Installed);
12520 pragma Inline (Context_Items);
12521 pragma Inline (Context_Pending);
12522 pragma Inline (Contract_Test_Cases);
12523 pragma Inline (Controlling_Argument);
12524 pragma Inline (Convert_To_Return_False);
12525 pragma Inline (Conversion_OK);
12526 pragma Inline (Corresponding_Aspect);
12527 pragma Inline (Corresponding_Body);
12528 pragma Inline (Corresponding_Formal_Spec);
12529 pragma Inline (Corresponding_Generic_Association);
12530 pragma Inline (Corresponding_Integer_Value);
12531 pragma Inline (Corresponding_Spec);
12532 pragma Inline (Corresponding_Spec_Of_Stub);
12533 pragma Inline (Corresponding_Stub);
12534 pragma Inline (Dcheck_Function);
12535 pragma Inline (Declarations);
12536 pragma Inline (Default_Expression);
12537 pragma Inline (Default_Storage_Pool);
12538 pragma Inline (Default_Name);
12539 pragma Inline (Defining_Identifier);
12540 pragma Inline (Defining_Unit_Name);
12541 pragma Inline (Delay_Alternative);
12542 pragma Inline (Delay_Statement);
12543 pragma Inline (Delta_Expression);
12544 pragma Inline (Digits_Expression);
12545 pragma Inline (Discr_Check_Funcs_Built);
12546 pragma Inline (Discrete_Choices);
12547 pragma Inline (Discrete_Range);
12548 pragma Inline (Discrete_Subtype_Definition);
12549 pragma Inline (Discrete_Subtype_Definitions);
12550 pragma Inline (Discriminant_Specifications);
12551 pragma Inline (Discriminant_Type);
12552 pragma Inline (Do_Accessibility_Check);
12553 pragma Inline (Do_Discriminant_Check);
12554 pragma Inline (Do_Length_Check);
12555 pragma Inline (Do_Division_Check);
12556 pragma Inline (Do_Overflow_Check);
12557 pragma Inline (Do_Range_Check);
12558 pragma Inline (Do_Storage_Check);
12559 pragma Inline (Do_Tag_Check);
12560 pragma Inline (Elaborate_Present);
12561 pragma Inline (Elaborate_All_Desirable);
12562 pragma Inline (Elaborate_All_Present);
12563 pragma Inline (Elaborate_Desirable);
12564 pragma Inline (Elaboration_Boolean);
12565 pragma Inline (Else_Actions);
12566 pragma Inline (Else_Statements);
12567 pragma Inline (Elsif_Parts);
12568 pragma Inline (Enclosing_Variant);
12569 pragma Inline (End_Label);
12570 pragma Inline (End_Span);
12571 pragma Inline (Entity);
12572 pragma Inline (Entity_Or_Associated_Node);
12573 pragma Inline (Entry_Body_Formal_Part);
12574 pragma Inline (Entry_Call_Alternative);
12575 pragma Inline (Entry_Call_Statement);
12576 pragma Inline (Entry_Direct_Name);
12577 pragma Inline (Entry_Index);
12578 pragma Inline (Entry_Index_Specification);
12579 pragma Inline (Etype);
12580 pragma Inline (Exception_Choices);
12581 pragma Inline (Exception_Handlers);
12582 pragma Inline (Exception_Junk);
12583 pragma Inline (Exception_Label);
12584 pragma Inline (Expansion_Delayed);
12585 pragma Inline (Explicit_Actual_Parameter);
12586 pragma Inline (Explicit_Generic_Actual_Parameter);
12587 pragma Inline (Expression);
12588 pragma Inline (Expressions);
12589 pragma Inline (First_Bit);
12590 pragma Inline (First_Inlined_Subprogram);
12591 pragma Inline (First_Name);
12592 pragma Inline (First_Named_Actual);
12593 pragma Inline (First_Real_Statement);
12594 pragma Inline (First_Subtype_Link);
12595 pragma Inline (Float_Truncate);
12596 pragma Inline (Formal_Type_Definition);
12597 pragma Inline (Forwards_OK);
12598 pragma Inline (From_Aspect_Specification);
12599 pragma Inline (From_At_End);
12600 pragma Inline (From_At_Mod);
12601 pragma Inline (From_Conditional_Expression);
12602 pragma Inline (From_Default);
12603 pragma Inline (Generalized_Indexing);
12604 pragma Inline (Generic_Associations);
12605 pragma Inline (Generic_Formal_Declarations);
12606 pragma Inline (Generic_Parent);
12607 pragma Inline (Generic_Parent_Type);
12608 pragma Inline (Handled_Statement_Sequence);
12609 pragma Inline (Handler_List_Entry);
12610 pragma Inline (Has_Created_Identifier);
12611 pragma Inline (Has_Dereference_Action);
12612 pragma Inline (Has_Dynamic_Length_Check);
12613 pragma Inline (Has_Dynamic_Range_Check);
12614 pragma Inline (Has_Init_Expression);
12615 pragma Inline (Has_Local_Raise);
12616 pragma Inline (Has_Self_Reference);
12617 pragma Inline (Has_SP_Choice);
12618 pragma Inline (Has_No_Elaboration_Code);
12619 pragma Inline (Has_Pragma_Suppress_All);
12620 pragma Inline (Has_Private_View);
12621 pragma Inline (Has_Relative_Deadline_Pragma);
12622 pragma Inline (Has_Storage_Size_Pragma);
12623 pragma Inline (Has_Wide_Character);
12624 pragma Inline (Has_Wide_Wide_Character);
12625 pragma Inline (Header_Size_Added);
12626 pragma Inline (Hidden_By_Use_Clause);
12627 pragma Inline (High_Bound);
12628 pragma Inline (Identifier);
12629 pragma Inline (Implicit_With);
12630 pragma Inline (Implicit_With_From_Instantiation);
12631 pragma Inline (Interface_List);
12632 pragma Inline (Interface_Present);
12633 pragma Inline (Includes_Infinities);
12634 pragma Inline (Import_Interface_Present);
12635 pragma Inline (In_Present);
12636 pragma Inline (Incomplete_View);
12637 pragma Inline (Inherited_Discriminant);
12638 pragma Inline (Instance_Spec);
12639 pragma Inline (Intval);
12640 pragma Inline (Iterator_Specification);
12641 pragma Inline (Is_Accessibility_Actual);
12642 pragma Inline (Is_Asynchronous_Call_Block);
12643 pragma Inline (Is_Boolean_Aspect);
12644 pragma Inline (Is_Checked);
12645 pragma Inline (Is_Component_Left_Opnd);
12646 pragma Inline (Is_Component_Right_Opnd);
12647 pragma Inline (Is_Controlling_Actual);
12648 pragma Inline (Is_Delayed_Aspect);
12649 pragma Inline (Is_Disabled);
12650 pragma Inline (Is_Dynamic_Coextension);
12651 pragma Inline (Is_Elsif);
12652 pragma Inline (Is_Entry_Barrier_Function);
12653 pragma Inline (Is_Expanded_Build_In_Place_Call);
12654 pragma Inline (Is_Finalization_Wrapper);
12655 pragma Inline (Is_Folded_In_Parser);
12656 pragma Inline (Is_Ignored);
12657 pragma Inline (Is_In_Discriminant_Check);
12658 pragma Inline (Is_Machine_Number);
12659 pragma Inline (Is_Null_Loop);
12660 pragma Inline (Is_Overloaded);
12661 pragma Inline (Is_Power_Of_2_For_Shift);
12662 pragma Inline (Is_Prefixed_Call);
12663 pragma Inline (Is_Protected_Subprogram_Body);
12664 pragma Inline (Is_Static_Coextension);
12665 pragma Inline (Is_Static_Expression);
12666 pragma Inline (Is_Subprogram_Descriptor);
12667 pragma Inline (Is_Task_Allocation_Block);
12668 pragma Inline (Is_Task_Master);
12669 pragma Inline (Iteration_Scheme);
12670 pragma Inline (Itype);
12671 pragma Inline (Kill_Range_Check);
12672 pragma Inline (Last_Bit);
12673 pragma Inline (Last_Name);
12674 pragma Inline (Library_Unit);
12675 pragma Inline (Label_Construct);
12676 pragma Inline (Left_Opnd);
12677 pragma Inline (Limited_View_Installed);
12678 pragma Inline (Limited_Present);
12679 pragma Inline (Literals);
12680 pragma Inline (Local_Raise_Not_OK);
12681 pragma Inline (Local_Raise_Statements);
12682 pragma Inline (Loop_Actions);
12683 pragma Inline (Loop_Parameter_Specification);
12684 pragma Inline (Low_Bound);
12685 pragma Inline (Mod_Clause);
12686 pragma Inline (More_Ids);
12687 pragma Inline (Must_Be_Byte_Aligned);
12688 pragma Inline (Must_Not_Freeze);
12689 pragma Inline (Must_Not_Override);
12690 pragma Inline (Must_Override);
12691 pragma Inline (Name);
12692 pragma Inline (Names);
12693 pragma Inline (Next_Entity);
12694 pragma Inline (Next_Exit_Statement);
12695 pragma Inline (Next_Implicit_With);
12696 pragma Inline (Next_Named_Actual);
12697 pragma Inline (Next_Pragma);
12698 pragma Inline (Next_Rep_Item);
12699 pragma Inline (Next_Use_Clause);
12700 pragma Inline (No_Ctrl_Actions);
12701 pragma Inline (No_Elaboration_Check);
12702 pragma Inline (No_Entities_Ref_In_Spec);
12703 pragma Inline (No_Initialization);
12704 pragma Inline (No_Minimize_Eliminate);
12705 pragma Inline (No_Truncation);
12706 pragma Inline (Non_Aliased_Prefix);
12707 pragma Inline (Null_Present);
12708 pragma Inline (Null_Excluding_Subtype);
12709 pragma Inline (Null_Exclusion_Present);
12710 pragma Inline (Null_Exclusion_In_Return_Present);
12711 pragma Inline (Null_Record_Present);
12712 pragma Inline (Object_Definition);
12713 pragma Inline (Of_Present);
12714 pragma Inline (Original_Discriminant);
12715 pragma Inline (Original_Entity);
12716 pragma Inline (Others_Discrete_Choices);
12717 pragma Inline (Out_Present);
12718 pragma Inline (Parameter_Associations);
12719 pragma Inline (Parameter_Specifications);
12720 pragma Inline (Parameter_List_Truncated);
12721 pragma Inline (Parameter_Type);
12722 pragma Inline (Parent_Spec);
12723 pragma Inline (Position);
12724 pragma Inline (Pragma_Argument_Associations);
12725 pragma Inline (Pragma_Identifier);
12726 pragma Inline (Pragmas_After);
12727 pragma Inline (Pragmas_Before);
12728 pragma Inline (Pre_Post_Conditions);
12729 pragma Inline (Prefix);
12730 pragma Inline (Premature_Use);
12731 pragma Inline (Present_Expr);
12732 pragma Inline (Prev_Ids);
12733 pragma Inline (Print_In_Hex);
12734 pragma Inline (Private_Declarations);
12735 pragma Inline (Private_Present);
12736 pragma Inline (Procedure_To_Call);
12737 pragma Inline (Proper_Body);
12738 pragma Inline (Protected_Definition);
12739 pragma Inline (Protected_Present);
12740 pragma Inline (Raises_Constraint_Error);
12741 pragma Inline (Range_Constraint);
12742 pragma Inline (Range_Expression);
12743 pragma Inline (Real_Range_Specification);
12744 pragma Inline (Realval);
12745 pragma Inline (Reason);
12746 pragma Inline (Record_Extension_Part);
12747 pragma Inline (Redundant_Use);
12748 pragma Inline (Renaming_Exception);
12749 pragma Inline (Result_Definition);
12750 pragma Inline (Return_Object_Declarations);
12751 pragma Inline (Return_Statement_Entity);
12752 pragma Inline (Reverse_Present);
12753 pragma Inline (Right_Opnd);
12754 pragma Inline (Rounded_Result);
12755 pragma Inline (SCIL_Controlling_Tag);
12756 pragma Inline (SCIL_Entity);
12757 pragma Inline (SCIL_Tag_Value);
12758 pragma Inline (SCIL_Target_Prim);
12759 pragma Inline (Scope);
12760 pragma Inline (Select_Alternatives);
12761 pragma Inline (Selector_Name);
12762 pragma Inline (Selector_Names);
12763 pragma Inline (Shift_Count_OK);
12764 pragma Inline (Source_Type);
12765 pragma Inline (Specification);
12766 pragma Inline (Split_PPC);
12767 pragma Inline (Statements);
12768 pragma Inline (Storage_Pool);
12769 pragma Inline (Subpool_Handle_Name);
12770 pragma Inline (Strval);
12771 pragma Inline (Subtype_Indication);
12772 pragma Inline (Subtype_Mark);
12773 pragma Inline (Subtype_Marks);
12774 pragma Inline (Suppress_Assignment_Checks);
12775 pragma Inline (Suppress_Loop_Warnings);
12776 pragma Inline (Synchronized_Present);
12777 pragma Inline (Tagged_Present);
12778 pragma Inline (Target_Type);
12779 pragma Inline (Task_Definition);
12780 pragma Inline (Task_Present);
12781 pragma Inline (Then_Actions);
12782 pragma Inline (Then_Statements);
12783 pragma Inline (Triggering_Alternative);
12784 pragma Inline (Triggering_Statement);
12785 pragma Inline (Treat_Fixed_As_Integer);
12786 pragma Inline (TSS_Elist);
12787 pragma Inline (Type_Definition);
12788 pragma Inline (Uneval_Old_Accept);
12789 pragma Inline (Uneval_Old_Warn);
12790 pragma Inline (Unit);
12791 pragma Inline (Uninitialized_Variable);
12792 pragma Inline (Unknown_Discriminants_Present);
12793 pragma Inline (Unreferenced_In_Spec);
12794 pragma Inline (Variant_Part);
12795 pragma Inline (Variants);
12796 pragma Inline (Visible_Declarations);
12797 pragma Inline (Used_Operations);
12798 pragma Inline (Was_Originally_Stub);
12799 pragma Inline (Withed_Body);
12801 pragma Inline (Set_ABE_Is_Certain);
12802 pragma Inline (Set_Abort_Present);
12803 pragma Inline (Set_Abortable_Part);
12804 pragma Inline (Set_Abstract_Present);
12805 pragma Inline (Set_Accept_Handler_Records);
12806 pragma Inline (Set_Accept_Statement);
12807 pragma Inline (Set_Access_Definition);
12808 pragma Inline (Set_Access_To_Subprogram_Definition);
12809 pragma Inline (Set_Access_Types_To_Process);
12810 pragma Inline (Set_Actions);
12811 pragma Inline (Set_Activation_Chain_Entity);
12812 pragma Inline (Set_Acts_As_Spec);
12813 pragma Inline (Set_Actual_Designated_Subtype);
12814 pragma Inline (Set_Address_Warning_Posted);
12815 pragma Inline (Set_Aggregate_Bounds);
12816 pragma Inline (Set_Aliased_Present);
12817 pragma Inline (Set_All_Others);
12818 pragma Inline (Set_All_Present);
12819 pragma Inline (Set_Alternatives);
12820 pragma Inline (Set_Ancestor_Part);
12821 pragma Inline (Set_Array_Aggregate);
12822 pragma Inline (Set_Aspect_Rep_Item);
12823 pragma Inline (Set_Assignment_OK);
12824 pragma Inline (Set_Associated_Node);
12825 pragma Inline (Set_At_End_Proc);
12826 pragma Inline (Set_Atomic_Sync_Required);
12827 pragma Inline (Set_Attribute_Name);
12828 pragma Inline (Set_Aux_Decls_Node);
12829 pragma Inline (Set_Backwards_OK);
12830 pragma Inline (Set_Bad_Is_Detected);
12831 pragma Inline (Set_Body_Required);
12832 pragma Inline (Set_Body_To_Inline);
12833 pragma Inline (Set_Box_Present);
12834 pragma Inline (Set_By_Ref);
12835 pragma Inline (Set_Char_Literal_Value);
12836 pragma Inline (Set_Chars);
12837 pragma Inline (Set_Check_Address_Alignment);
12838 pragma Inline (Set_Choice_Parameter);
12839 pragma Inline (Set_Choices);
12840 pragma Inline (Set_Class_Present);
12841 pragma Inline (Set_Classifications);
12842 pragma Inline (Set_Cleanup_Actions);
12843 pragma Inline (Set_Comes_From_Extended_Return_Statement);
12844 pragma Inline (Set_Compile_Time_Known_Aggregate);
12845 pragma Inline (Set_Component_Associations);
12846 pragma Inline (Set_Component_Clauses);
12847 pragma Inline (Set_Component_Definition);
12848 pragma Inline (Set_Component_Items);
12849 pragma Inline (Set_Component_List);
12850 pragma Inline (Set_Component_Name);
12851 pragma Inline (Set_Componentwise_Assignment);
12852 pragma Inline (Set_Condition);
12853 pragma Inline (Set_Condition_Actions);
12854 pragma Inline (Set_Config_Pragmas);
12855 pragma Inline (Set_Constant_Present);
12856 pragma Inline (Set_Constraint);
12857 pragma Inline (Set_Constraints);
12858 pragma Inline (Set_Context_Installed);
12859 pragma Inline (Set_Context_Items);
12860 pragma Inline (Set_Context_Pending);
12861 pragma Inline (Set_Contract_Test_Cases);
12862 pragma Inline (Set_Controlling_Argument);
12863 pragma Inline (Set_Conversion_OK);
12864 pragma Inline (Set_Convert_To_Return_False);
12865 pragma Inline (Set_Corresponding_Aspect);
12866 pragma Inline (Set_Corresponding_Body);
12867 pragma Inline (Set_Corresponding_Formal_Spec);
12868 pragma Inline (Set_Corresponding_Generic_Association);
12869 pragma Inline (Set_Corresponding_Integer_Value);
12870 pragma Inline (Set_Corresponding_Spec);
12871 pragma Inline (Set_Corresponding_Spec_Of_Stub);
12872 pragma Inline (Set_Corresponding_Stub);
12873 pragma Inline (Set_Dcheck_Function);
12874 pragma Inline (Set_Declarations);
12875 pragma Inline (Set_Default_Expression);
12876 pragma Inline (Set_Default_Name);
12877 pragma Inline (Set_Default_Storage_Pool);
12878 pragma Inline (Set_Defining_Identifier);
12879 pragma Inline (Set_Defining_Unit_Name);
12880 pragma Inline (Set_Delay_Alternative);
12881 pragma Inline (Set_Delay_Statement);
12882 pragma Inline (Set_Delta_Expression);
12883 pragma Inline (Set_Digits_Expression);
12884 pragma Inline (Set_Discr_Check_Funcs_Built);
12885 pragma Inline (Set_Discrete_Choices);
12886 pragma Inline (Set_Discrete_Range);
12887 pragma Inline (Set_Discrete_Subtype_Definition);
12888 pragma Inline (Set_Discrete_Subtype_Definitions);
12889 pragma Inline (Set_Discriminant_Specifications);
12890 pragma Inline (Set_Discriminant_Type);
12891 pragma Inline (Set_Do_Accessibility_Check);
12892 pragma Inline (Set_Do_Discriminant_Check);
12893 pragma Inline (Set_Do_Division_Check);
12894 pragma Inline (Set_Do_Length_Check);
12895 pragma Inline (Set_Do_Overflow_Check);
12896 pragma Inline (Set_Do_Range_Check);
12897 pragma Inline (Set_Do_Storage_Check);
12898 pragma Inline (Set_Do_Tag_Check);
12899 pragma Inline (Set_Elaborate_All_Desirable);
12900 pragma Inline (Set_Elaborate_All_Present);
12901 pragma Inline (Set_Elaborate_Desirable);
12902 pragma Inline (Set_Elaborate_Present);
12903 pragma Inline (Set_Elaboration_Boolean);
12904 pragma Inline (Set_Else_Actions);
12905 pragma Inline (Set_Else_Statements);
12906 pragma Inline (Set_Elsif_Parts);
12907 pragma Inline (Set_Enclosing_Variant);
12908 pragma Inline (Set_End_Label);
12909 pragma Inline (Set_End_Span);
12910 pragma Inline (Set_Entity);
12911 pragma Inline (Set_Entry_Body_Formal_Part);
12912 pragma Inline (Set_Entry_Call_Alternative);
12913 pragma Inline (Set_Entry_Call_Statement);
12914 pragma Inline (Set_Entry_Direct_Name);
12915 pragma Inline (Set_Entry_Index);
12916 pragma Inline (Set_Entry_Index_Specification);
12917 pragma Inline (Set_Etype);
12918 pragma Inline (Set_Exception_Choices);
12919 pragma Inline (Set_Exception_Handlers);
12920 pragma Inline (Set_Exception_Junk);
12921 pragma Inline (Set_Exception_Label);
12922 pragma Inline (Set_Expansion_Delayed);
12923 pragma Inline (Set_Explicit_Actual_Parameter);
12924 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
12925 pragma Inline (Set_Expression);
12926 pragma Inline (Set_Expressions);
12927 pragma Inline (Set_First_Bit);
12928 pragma Inline (Set_First_Inlined_Subprogram);
12929 pragma Inline (Set_First_Name);
12930 pragma Inline (Set_First_Named_Actual);
12931 pragma Inline (Set_First_Real_Statement);
12932 pragma Inline (Set_First_Subtype_Link);
12933 pragma Inline (Set_Float_Truncate);
12934 pragma Inline (Set_Formal_Type_Definition);
12935 pragma Inline (Set_Forwards_OK);
12936 pragma Inline (Set_From_Aspect_Specification);
12937 pragma Inline (Set_From_At_End);
12938 pragma Inline (Set_From_At_Mod);
12939 pragma Inline (Set_From_Conditional_Expression);
12940 pragma Inline (Set_From_Default);
12941 pragma Inline (Set_Generalized_Indexing);
12942 pragma Inline (Set_Generic_Associations);
12943 pragma Inline (Set_Generic_Formal_Declarations);
12944 pragma Inline (Set_Generic_Parent);
12945 pragma Inline (Set_Generic_Parent_Type);
12946 pragma Inline (Set_Handled_Statement_Sequence);
12947 pragma Inline (Set_Handler_List_Entry);
12948 pragma Inline (Set_Has_Created_Identifier);
12949 pragma Inline (Set_Has_Dereference_Action);
12950 pragma Inline (Set_Has_Dynamic_Length_Check);
12951 pragma Inline (Set_Has_Dynamic_Range_Check);
12952 pragma Inline (Set_Has_Init_Expression);
12953 pragma Inline (Set_Has_Local_Raise);
12954 pragma Inline (Set_Has_No_Elaboration_Code);
12955 pragma Inline (Set_Has_Pragma_Suppress_All);
12956 pragma Inline (Set_Has_Private_View);
12957 pragma Inline (Set_Has_Relative_Deadline_Pragma);
12958 pragma Inline (Set_Has_Self_Reference);
12959 pragma Inline (Set_Has_SP_Choice);
12960 pragma Inline (Set_Has_Storage_Size_Pragma);
12961 pragma Inline (Set_Has_Wide_Character);
12962 pragma Inline (Set_Has_Wide_Wide_Character);
12963 pragma Inline (Set_Header_Size_Added);
12964 pragma Inline (Set_Hidden_By_Use_Clause);
12965 pragma Inline (Set_High_Bound);
12966 pragma Inline (Set_Identifier);
12967 pragma Inline (Set_Implicit_With);
12968 pragma Inline (Set_Import_Interface_Present);
12969 pragma Inline (Set_In_Present);
12970 pragma Inline (Set_Includes_Infinities);
12971 pragma Inline (Set_Incomplete_View);
12972 pragma Inline (Set_Inherited_Discriminant);
12973 pragma Inline (Set_Instance_Spec);
12974 pragma Inline (Set_Interface_List);
12975 pragma Inline (Set_Interface_Present);
12976 pragma Inline (Set_Intval);
12977 pragma Inline (Set_Is_Accessibility_Actual);
12978 pragma Inline (Set_Is_Asynchronous_Call_Block);
12979 pragma Inline (Set_Is_Boolean_Aspect);
12980 pragma Inline (Set_Is_Checked);
12981 pragma Inline (Set_Is_Component_Left_Opnd);
12982 pragma Inline (Set_Is_Component_Right_Opnd);
12983 pragma Inline (Set_Is_Controlling_Actual);
12984 pragma Inline (Set_Is_Delayed_Aspect);
12985 pragma Inline (Set_Is_Disabled);
12986 pragma Inline (Set_Is_Dynamic_Coextension);
12987 pragma Inline (Set_Is_Elsif);
12988 pragma Inline (Set_Is_Entry_Barrier_Function);
12989 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
12990 pragma Inline (Set_Is_Finalization_Wrapper);
12991 pragma Inline (Set_Is_Folded_In_Parser);
12992 pragma Inline (Set_Is_Ignored);
12993 pragma Inline (Set_Is_In_Discriminant_Check);
12994 pragma Inline (Set_Is_Machine_Number);
12995 pragma Inline (Set_Is_Null_Loop);
12996 pragma Inline (Set_Is_Overloaded);
12997 pragma Inline (Set_Is_Power_Of_2_For_Shift);
12998 pragma Inline (Set_Is_Prefixed_Call);
12999 pragma Inline (Set_Is_Protected_Subprogram_Body);
13000 pragma Inline (Set_Is_Static_Coextension);
13001 pragma Inline (Set_Is_Static_Expression);
13002 pragma Inline (Set_Is_Subprogram_Descriptor);
13003 pragma Inline (Set_Is_Task_Allocation_Block);
13004 pragma Inline (Set_Is_Task_Master);
13005 pragma Inline (Set_Iteration_Scheme);
13006 pragma Inline (Set_Iterator_Specification);
13007 pragma Inline (Set_Itype);
13008 pragma Inline (Set_Kill_Range_Check);
13009 pragma Inline (Set_Label_Construct);
13010 pragma Inline (Set_Last_Bit);
13011 pragma Inline (Set_Last_Name);
13012 pragma Inline (Set_Left_Opnd);
13013 pragma Inline (Set_Library_Unit);
13014 pragma Inline (Set_Limited_Present);
13015 pragma Inline (Set_Limited_View_Installed);
13016 pragma Inline (Set_Literals);
13017 pragma Inline (Set_Local_Raise_Not_OK);
13018 pragma Inline (Set_Local_Raise_Statements);
13019 pragma Inline (Set_Loop_Actions);
13020 pragma Inline (Set_Loop_Parameter_Specification);
13021 pragma Inline (Set_Low_Bound);
13022 pragma Inline (Set_Mod_Clause);
13023 pragma Inline (Set_More_Ids);
13024 pragma Inline (Set_Must_Be_Byte_Aligned);
13025 pragma Inline (Set_Must_Not_Freeze);
13026 pragma Inline (Set_Must_Not_Override);
13027 pragma Inline (Set_Must_Override);
13028 pragma Inline (Set_Name);
13029 pragma Inline (Set_Names);
13030 pragma Inline (Set_Next_Entity);
13031 pragma Inline (Set_Next_Exit_Statement);
13032 pragma Inline (Set_Next_Implicit_With);
13033 pragma Inline (Set_Next_Named_Actual);
13034 pragma Inline (Set_Next_Pragma);
13035 pragma Inline (Set_Next_Rep_Item);
13036 pragma Inline (Set_Next_Use_Clause);
13037 pragma Inline (Set_No_Ctrl_Actions);
13038 pragma Inline (Set_No_Elaboration_Check);
13039 pragma Inline (Set_No_Entities_Ref_In_Spec);
13040 pragma Inline (Set_No_Initialization);
13041 pragma Inline (Set_No_Minimize_Eliminate);
13042 pragma Inline (Set_No_Truncation);
13043 pragma Inline (Set_Non_Aliased_Prefix);
13044 pragma Inline (Set_Null_Excluding_Subtype);
13045 pragma Inline (Set_Null_Exclusion_Present);
13046 pragma Inline (Set_Null_Exclusion_In_Return_Present);
13047 pragma Inline (Set_Null_Present);
13048 pragma Inline (Set_Null_Record_Present);
13049 pragma Inline (Set_Object_Definition);
13050 pragma Inline (Set_Of_Present);
13051 pragma Inline (Set_Original_Discriminant);
13052 pragma Inline (Set_Original_Entity);
13053 pragma Inline (Set_Others_Discrete_Choices);
13054 pragma Inline (Set_Out_Present);
13055 pragma Inline (Set_Parameter_Associations);
13056 pragma Inline (Set_Parameter_List_Truncated);
13057 pragma Inline (Set_Parameter_Specifications);
13058 pragma Inline (Set_Parameter_Type);
13059 pragma Inline (Set_Parent_Spec);
13060 pragma Inline (Set_Position);
13061 pragma Inline (Set_Pragma_Argument_Associations);
13062 pragma Inline (Set_Pragma_Identifier);
13063 pragma Inline (Set_Pragmas_After);
13064 pragma Inline (Set_Pragmas_Before);
13065 pragma Inline (Set_Pre_Post_Conditions);
13066 pragma Inline (Set_Prefix);
13067 pragma Inline (Set_Premature_Use);
13068 pragma Inline (Set_Present_Expr);
13069 pragma Inline (Set_Prev_Ids);
13070 pragma Inline (Set_Print_In_Hex);
13071 pragma Inline (Set_Private_Declarations);
13072 pragma Inline (Set_Private_Present);
13073 pragma Inline (Set_Procedure_To_Call);
13074 pragma Inline (Set_Proper_Body);
13075 pragma Inline (Set_Protected_Definition);
13076 pragma Inline (Set_Protected_Present);
13077 pragma Inline (Set_Raises_Constraint_Error);
13078 pragma Inline (Set_Range_Constraint);
13079 pragma Inline (Set_Range_Expression);
13080 pragma Inline (Set_Real_Range_Specification);
13081 pragma Inline (Set_Realval);
13082 pragma Inline (Set_Reason);
13083 pragma Inline (Set_Record_Extension_Part);
13084 pragma Inline (Set_Redundant_Use);
13085 pragma Inline (Set_Renaming_Exception);
13086 pragma Inline (Set_Result_Definition);
13087 pragma Inline (Set_Return_Object_Declarations);
13088 pragma Inline (Set_Reverse_Present);
13089 pragma Inline (Set_Right_Opnd);
13090 pragma Inline (Set_Rounded_Result);
13091 pragma Inline (Set_SCIL_Controlling_Tag);
13092 pragma Inline (Set_SCIL_Entity);
13093 pragma Inline (Set_SCIL_Tag_Value);
13094 pragma Inline (Set_SCIL_Target_Prim);
13095 pragma Inline (Set_Scope);
13096 pragma Inline (Set_Select_Alternatives);
13097 pragma Inline (Set_Selector_Name);
13098 pragma Inline (Set_Selector_Names);
13099 pragma Inline (Set_Shift_Count_OK);
13100 pragma Inline (Set_Source_Type);
13101 pragma Inline (Set_Split_PPC);
13102 pragma Inline (Set_Statements);
13103 pragma Inline (Set_Storage_Pool);
13104 pragma Inline (Set_Strval);
13105 pragma Inline (Set_Subpool_Handle_Name);
13106 pragma Inline (Set_Subtype_Indication);
13107 pragma Inline (Set_Subtype_Mark);
13108 pragma Inline (Set_Subtype_Marks);
13109 pragma Inline (Set_Suppress_Assignment_Checks);
13110 pragma Inline (Set_Suppress_Loop_Warnings);
13111 pragma Inline (Set_Synchronized_Present);
13112 pragma Inline (Set_TSS_Elist);
13113 pragma Inline (Set_Tagged_Present);
13114 pragma Inline (Set_Target_Type);
13115 pragma Inline (Set_Task_Definition);
13116 pragma Inline (Set_Task_Present);
13117 pragma Inline (Set_Then_Actions);
13118 pragma Inline (Set_Then_Statements);
13119 pragma Inline (Set_Treat_Fixed_As_Integer);
13120 pragma Inline (Set_Triggering_Alternative);
13121 pragma Inline (Set_Triggering_Statement);
13122 pragma Inline (Set_Type_Definition);
13123 pragma Inline (Set_Uneval_Old_Accept);
13124 pragma Inline (Set_Uneval_Old_Warn);
13125 pragma Inline (Set_Unit);
13126 pragma Inline (Set_Uninitialized_Variable);
13127 pragma Inline (Set_Unknown_Discriminants_Present);
13128 pragma Inline (Set_Unreferenced_In_Spec);
13129 pragma Inline (Set_Used_Operations);
13130 pragma Inline (Set_Variant_Part);
13131 pragma Inline (Set_Variants);
13132 pragma Inline (Set_Visible_Declarations);
13133 pragma Inline (Set_Was_Originally_Stub);
13134 pragma Inline (Set_Withed_Body);