2015-01-06 Ed Schonberg <schonberg@adacore.com>
[official-gcc.git] / gcc / ada / sinfo.ads
blobae7813593a17d9ffa2acd8390aaad6ad531a9336
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 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. --
17 -- --
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. --
21 -- --
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/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
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;
54 package Sinfo is
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:
64 -- In sinfo.ads:
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
72 -- In sinfo.adb:
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
78 -- fields.
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
120 -- in sinfo.ads.
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
124 -- nodes.
126 -- The above steps are done automatically by the build scripts when you do
127 -- a full bootstrap.
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
140 -- are as follows:
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
208 -- ..
209 -- -- processing for case statement alternative Alt
210 -- ..
211 -- Alt := Next (Alt);
212 -- end loop;
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.
224 -------------
225 -- Pragmas --
226 -------------
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
230 -- processed.
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
252 -- ...
253 -- Variant := Next (Variant);
254 -- end loop;
256 -- or
258 -- Variant := First_Non_Pragma (Variants (N));
259 -- while Present (Variant) loop
260 -- ...
261 -- Variant := Next_Non_Pragma (Variant);
262 -- end loop;
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
301 -- manner.
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
308 -- declaration.
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.
324 -- So, to summarize:
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.
352 -- N_Unused_At_Start
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).
357 -- N_Unused_At_End
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
459 -- destroy the tree.
461 ---------------
462 -- ASIS Mode --
463 ---------------
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
467 -- requirements.
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
504 -- ASIS tree.
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.
524 --------------------
525 -- GNATprove Mode --
526 --------------------
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 front end 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
574 -- verification.
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 -- 4. Unconstrained types are not replaced by constrained types whose
581 -- bounds are generated from an expression: Expand_Subtype_From_Expr
582 -- should be a no-op.
584 -- 5. Errors (instead of warnings) are issued on compile-time-known
585 -- constraint errors even though such cases do not correspond to
586 -- illegalities in the Ada RM (this is simply another case where
587 -- GNATprove implements a subset of the full language).
589 -- However, there are a few exceptions to this rule for cases where
590 -- we want to allow the GNATprove analysis to proceed (e.g. range
591 -- checks on empty ranges, which typically appear in deactivated
592 -- code in a particular configuration).
594 -----------------------
595 -- Check Flag Fields --
596 -----------------------
598 -- The following flag fields appear in expression nodes:
600 -- Do_Division_Check
601 -- Do_Overflow_Check
602 -- Do_Range_Check
604 -- These three flags are always set by the front end during semantic
605 -- analysis, on expression nodes that may trigger the corresponding
606 -- check. The front end then inserts or not the check during expansion. In
607 -- particular, these flags should also be correctly set in ASIS mode and
608 -- GNATprove mode.
610 -- Note: the expander always takes care of the Do_Range check case,
611 -- so this flag will never be set in the expanded tree passed to the
612 -- back end code generator.
614 -- Note that this accounts for all nodes that trigger the corresponding
615 -- checks, except for range checks on subtype_indications, which may be
616 -- required to check that a range_constraint is compatible with the given
617 -- subtype (RM 3.2.2(11)).
619 -- The following flag fields appear in various nodes:
621 -- Do_Accessibility_Check
622 -- Do_Discriminant_Check
623 -- Do_Length_Check
624 -- Do_Storage_Check
625 -- Do_Tag_Check
627 -- These flags are used in some specific cases by the front end, either
628 -- during semantic analysis or during expansion, and cannot be expected
629 -- to be set on all nodes that trigger the corresponding check.
631 ------------------------
632 -- Common Flag Fields --
633 ------------------------
635 -- The following flag fields appear in all nodes:
637 -- Analyzed
638 -- This flag is used to indicate that a node (and all its children have
639 -- been analyzed. It is used to avoid reanalysis of a node that has
640 -- already been analyzed, both for efficiency and functional correctness
641 -- reasons.
643 -- Comes_From_Source
644 -- This flag is set if the node comes directly from an explicit construct
645 -- in the source. It is normally on for any nodes built by the scanner or
646 -- parser from the source program, with the exception that in a few cases
647 -- the parser adds nodes to normalize the representation (in particular
648 -- a null statement is added to a package body if there is no begin/end
649 -- initialization section.
651 -- Most nodes inserted by the analyzer or expander are not considered
652 -- as coming from source, so the flag is off for such nodes. In a few
653 -- cases, the expander constructs nodes closely equivalent to nodes
654 -- from the source program (e.g. the allocator built for build-in-place
655 -- case), and the Comes_From_Source flag is deliberately set.
657 -- Error_Posted
658 -- This flag is used to avoid multiple error messages being posted on or
659 -- referring to the same node. This flag is set if an error message
660 -- refers to a node or is posted on its source location, and has the
661 -- effect of inhibiting further messages involving this same node.
663 -----------------------
664 -- Modify_Tree_For_C --
665 -----------------------
667 -- If the flag Opt.Modify_Tree_For_C is set True, then the tree is modified
668 -- in ways that help match the semantics better with C, easing the task of
669 -- interfacing to C code generators (other than GCC, where the work is done
670 -- in gigi, and there is no point in changing that), and also making life
671 -- easier for Cprint in generating C source code.
673 -- The current modifications implemented are as follows:
675 -- N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic nodes
676 -- are eliminated from the tree (since these operations do not exist in
677 -- C), and the operations are rewritten in terms of logical shifts and
678 -- other logical operations that do exist in C. See Exp_Ch4 expansion
679 -- routines for these operators for details of the transformations made.
681 -- The right operand of N_Op_Shift_Right and N_Op_Shift_Left is always
682 -- less than the word size (since other values are not well-defined in
683 -- C). This is done using an explicit test if necessary.
685 -- Min and Max attributes are expanded into equivalent if expressions,
686 -- dealing properly with side effect issues.
688 -- Mod for signed integer types is expanded into equivalent expressions
689 -- using Rem (which is % in C) and other C-available operators.
691 -- The Actions list of an Expression_With_Actions node does not contain
692 -- any declarations,(so that DO X, .. Y IN Z becomes (X, .. Y, Z) in C).
694 ------------------------------------
695 -- Description of Semantic Fields --
696 ------------------------------------
698 -- The meaning of the syntactic fields is generally clear from their names
699 -- without any further description, since the names are chosen to
700 -- correspond very closely to the syntax in the reference manual. This
701 -- section describes the usage of the semantic fields, which are used to
702 -- contain additional information determined during semantic analysis.
704 -- ABE_Is_Certain (Flag18-Sem)
705 -- This flag is set in an instantiation node or a call node is determined
706 -- to be sure to raise an ABE. This is used to trigger special handling
707 -- of such cases, particularly in the instantiation case where we avoid
708 -- instantiating the body if this flag is set. This flag is also present
709 -- in an N_Formal_Package_Declaration_Node since formal package
710 -- declarations are treated like instantiations, but it is always set to
711 -- False in this context.
713 -- Accept_Handler_Records (List5-Sem)
714 -- This field is present only in an N_Accept_Alternative node. It is used
715 -- to temporarily hold the exception handler records from an accept
716 -- statement in a selective accept. These exception handlers will
717 -- eventually be placed in the Handler_Records list of the procedure
718 -- built for this accept (see Expand_N_Selective_Accept procedure in
719 -- Exp_Ch9 for further details).
721 -- Access_Types_To_Process (Elist2-Sem)
722 -- Present in N_Freeze_Entity nodes for Incomplete or private types.
723 -- Contains the list of access types which may require specific treatment
724 -- when the nature of the type completion is completely known. An example
725 -- of such treatment is the generation of the associated_final_chain.
727 -- Actions (List1-Sem)
728 -- This field contains a sequence of actions that are associated with the
729 -- node holding the field. See the individual node types for details of
730 -- how this field is used, as well as the description of the specific use
731 -- for a particular node type.
733 -- Activation_Chain_Entity (Node3-Sem)
734 -- This is used in tree nodes representing task activators (blocks,
735 -- subprogram bodies, package declarations, and task bodies). It is
736 -- initially Empty, and then gets set to point to the entity for the
737 -- declared Activation_Chain variable when the first task is declared.
738 -- When tasks are declared in the corresponding declarative region this
739 -- entity is located by name (its name is always _Chain) and the declared
740 -- tasks are added to the chain. Note that N_Extended_Return_Statement
741 -- does not have this attribute, although it does have an activation
742 -- chain. This chain is used to store the tasks temporarily, and is not
743 -- used for activating them. On successful completion of the return
744 -- statement, the tasks are moved to the caller's chain, and the caller
745 -- activates them.
747 -- Acts_As_Spec (Flag4-Sem)
748 -- A flag set in the N_Subprogram_Body node for a subprogram body which
749 -- is acting as its own spec, except in the case of a library level
750 -- subprogram, in which case the flag is set on the parent compilation
751 -- unit node instead.
753 -- Actual_Designated_Subtype (Node4-Sem)
754 -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
755 -- needs to known the dynamic constrained subtype of the designated
756 -- object, this attribute is set to that type. This is done for
757 -- N_Free_Statements for access-to-classwide types and access to
758 -- unconstrained packed array types, and for N_Explicit_Dereference when
759 -- the designated type is an unconstrained packed array and the
760 -- dereference is the prefix of a 'Size attribute reference.
762 -- Address_Warning_Posted (Flag18-Sem)
763 -- Present in N_Attribute_Definition nodes. Set to indicate that we have
764 -- posted a warning for the address clause regarding size or alignment
765 -- issues. Used to inhibit multiple redundant messages.
767 -- Aggregate_Bounds (Node3-Sem)
768 -- Present in array N_Aggregate nodes. If the bounds of the aggregate are
769 -- known at compile time, this field points to an N_Range node with those
770 -- bounds. Otherwise Empty.
772 -- All_Others (Flag11-Sem)
773 -- Present in an N_Others_Choice node. This flag is set for an others
774 -- exception where all exceptions are to be caught, even those that are
775 -- not normally handled (in particular the tasking abort signal). This
776 -- is used for translation of the at end handler into a normal exception
777 -- handler.
779 -- Aspect_Rep_Item (Node2-Sem)
780 -- Present in N_Aspect_Specification nodes. Points to the corresponding
781 -- pragma/attribute definition node used to process the aspect.
783 -- Assignment_OK (Flag15-Sem)
784 -- This flag is set in a subexpression node for an object, indicating
785 -- that the associated object can be modified, even if this would not
786 -- normally be permissible (either by direct assignment, or by being
787 -- passed as an out or in-out parameter). This is used by the expander
788 -- for a number of purposes, including initialization of constants and
789 -- limited type objects (such as tasks), setting discriminant fields,
790 -- setting tag values, etc. N_Object_Declaration nodes also have this
791 -- flag defined. Here it is used to indicate that an initialization
792 -- expression is valid, even where it would normally not be allowed
793 -- (e.g. where the type involved is limited).
795 -- Associated_Node (Node4-Sem)
796 -- Present in nodes that can denote an entity: identifiers, character
797 -- literals, operator symbols, expanded names, operator nodes, and
798 -- attribute reference nodes (all these nodes have an Entity field).
799 -- This field is also present in N_Aggregate, N_Selected_Component, and
800 -- N_Extension_Aggregate nodes. This field is used in generic processing
801 -- to create links between the generic template and the generic copy.
802 -- See Sem_Ch12.Get_Associated_Node for full details. Note that this
803 -- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
804 -- the normal function of Entity is not required at the point where the
805 -- Associated_Node is set. Note also, that in generic templates, this
806 -- means that the Entity field does not necessarily point to an Entity.
807 -- Since the back end is expected to ignore generic templates, this is
808 -- harmless.
810 -- Atomic_Sync_Required (Flag14-Sem)
811 -- This flag is set on a node for which atomic synchronization is
812 -- required for the corresponding reference or modification.
814 -- At_End_Proc (Node1)
815 -- This field is present in an N_Handled_Sequence_Of_Statements node.
816 -- It contains an identifier reference for the cleanup procedure to be
817 -- called. See description of this node for further details.
819 -- Backwards_OK (Flag6-Sem)
820 -- A flag present in the N_Assignment_Statement node. It is used only
821 -- if the type being assigned is an array type, and is set if analysis
822 -- determines that it is definitely safe to do the copy backwards, i.e.
823 -- starting at the highest addressed element. This is the case if either
824 -- the operands do not overlap, or they may overlap, but if they do,
825 -- then the left operand is at a higher address than the right operand.
827 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
828 -- means that the front end could not determine that either direction is
829 -- definitely safe, and a runtime check may be required if the backend
830 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
831 -- set, it means that the front end can assure no overlap of operands.
833 -- Body_To_Inline (Node3-Sem)
834 -- Present in subprogram declarations. Denotes analyzed but unexpanded
835 -- body of subprogram, to be used when inlining calls. Present when the
836 -- subprogram has an Inline pragma and inlining is enabled. If the
837 -- declaration is completed by a renaming_as_body, and the renamed en-
838 -- tity is a subprogram, the Body_To_Inline is the name of that entity,
839 -- which is used directly in later calls to the original subprogram.
841 -- Body_Required (Flag13-Sem)
842 -- A flag that appears in the N_Compilation_Unit node indicating that
843 -- the corresponding unit requires a body. For the package case, this
844 -- indicates that a completion is required. In Ada 95, if the flag is not
845 -- set for the package case, then a body may not be present. In Ada 83,
846 -- if the flag is not set for the package case, then body is optional.
847 -- For a subprogram declaration, the flag is set except in the case where
848 -- a pragma Import or Interface applies, in which case no body is
849 -- permitted (in Ada 83 or Ada 95).
851 -- By_Ref (Flag5-Sem)
852 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
853 -- this flag is set when the returned expression is already allocated on
854 -- the secondary stack and thus the result is passed by reference rather
855 -- than copied another time.
857 -- Cleanup_Actions (List5-Sem)
858 -- Present in block statements created for transient blocks, contains
859 -- additional cleanup actions carried over from the transient scope.
861 -- Check_Address_Alignment (Flag11-Sem)
862 -- A flag present in N_Attribute_Definition clause for a 'Address
863 -- attribute definition. This flag is set if a dynamic check should be
864 -- generated at the freeze point for the entity to which this address
865 -- clause applies. The reason that we need this flag is that we want to
866 -- check for range checks being suppressed at the point where the
867 -- attribute definition clause is given, rather than testing this at the
868 -- freeze point.
870 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
871 -- Present in N_Simple_Return_Statement nodes. True if this node was
872 -- constructed as part of the N_Extended_Return_Statement expansion.
874 -- Compile_Time_Known_Aggregate (Flag18-Sem)
875 -- Present in N_Aggregate nodes. Set for aggregates which can be fully
876 -- evaluated at compile time without raising constraint error. Such
877 -- aggregates can be passed as is the back end without any expansion.
878 -- See Exp_Aggr for specific conditions under which this flag gets set.
880 -- Componentwise_Assignment (Flag14-Sem)
881 -- Present in N_Assignment_Statement nodes. Set for a record assignment
882 -- where all that needs doing is to expand it into component-by-component
883 -- assignments. This is used internally for the case of tagged types with
884 -- rep clauses, where we need to avoid recursion (we don't want to try to
885 -- generate a call to the primitive operation, because this is the case
886 -- where we are compiling the primitive operation). Note that when we are
887 -- expanding component assignments in this case, we never assign the _tag
888 -- field, but we recursively assign components of the parent type.
890 -- Condition_Actions (List3-Sem)
891 -- This field appears in else-if nodes and in the iteration scheme node
892 -- for while loops. This field is only used during semantic processing to
893 -- temporarily hold actions inserted into the tree. In the tree passed
894 -- to gigi, the condition actions field is always set to No_List. For
895 -- details on how this field is used, see the routine Insert_Actions in
896 -- package Exp_Util, and also the expansion routines for the relevant
897 -- nodes.
899 -- Context_Pending (Flag16-Sem)
900 -- This field appears in Compilation_Unit nodes, to indicate that the
901 -- context of the unit is being compiled. Used to detect circularities
902 -- that are not otherwise detected by the loading mechanism. Such
903 -- circularities can occur in the presence of limited and non-limited
904 -- with_clauses that mention the same units.
906 -- Controlling_Argument (Node1-Sem)
907 -- This field is set in procedure and function call nodes if the call
908 -- is a dispatching call (it is Empty for a non-dispatching call). It
909 -- indicates the source of the call's controlling tag. For procedure
910 -- calls, the Controlling_Argument is one of the actuals. For function
911 -- that has a dispatching result, it is an entity in the context of the
912 -- call that can provide a tag, or else it is the tag of the root type
913 -- of the class. It can also specify a tag directly rather than being a
914 -- tagged object. The latter is needed by the implementations of AI-239
915 -- and AI-260.
917 -- Conversion_OK (Flag14-Sem)
918 -- A flag set on type conversion nodes to indicate that the conversion
919 -- is to be considered as being valid, even though it is the case that
920 -- the conversion is not valid Ada. This is used for attributes Enum_Rep,
921 -- Fixed_Value and Integer_Value, for internal conversions done for
922 -- fixed-point operations, and for certain conversions for calls to
923 -- initialization procedures. If Conversion_OK is set, then Etype must be
924 -- set (the analyzer assumes that Etype has been set). For the case of
925 -- fixed-point operands, it also indicates that the conversion is to be
926 -- direct conversion of the underlying integer result, with no regard to
927 -- the small operand.
929 -- Convert_To_Return_False (Flag13-Sem)
930 -- Present in N_Raise_Expression nodes that appear in the body of the
931 -- special predicateM function used to test a predicate in the context
932 -- of a membership test, where raise expression results in returning a
933 -- value of False rather than raising an exception.
935 -- Corresponding_Aspect (Node3-Sem)
936 -- Present in N_Pragma node. Used to point back to the source aspect from
937 -- the corresponding pragma. This field is Empty for source pragmas.
939 -- Corresponding_Body (Node5-Sem)
940 -- This field is set in subprogram declarations, package declarations,
941 -- entry declarations of protected types, and in generic units. It points
942 -- to the defining entity for the corresponding body (NOT the node for
943 -- the body itself).
945 -- Corresponding_Formal_Spec (Node3-Sem)
946 -- This field is set in subprogram renaming declarations, where it points
947 -- to the defining entity for a formal subprogram in the case where the
948 -- renaming corresponds to a generic formal subprogram association in an
949 -- instantiation. The field is Empty if the renaming does not correspond
950 -- to such a formal association.
952 -- Corresponding_Generic_Association (Node5-Sem)
953 -- This field is defined for object declarations and object renaming
954 -- declarations. It is set for the declarations within an instance that
955 -- map generic formals to their actuals. If set, the field points to
956 -- a generic_association which is the original parent of the expression
957 -- or name appearing in the declaration. This simplifies ASIS queries.
959 -- Corresponding_Integer_Value (Uint4-Sem)
960 -- This field is set in real literals of fixed-point types (it is not
961 -- used for floating-point types). It contains the integer value used
962 -- to represent the fixed-point value. It is also set on the universal
963 -- real literals used to represent bounds of fixed-point base types
964 -- and their first named subtypes.
966 -- Corresponding_Spec (Node5-Sem)
967 -- This field is set in subprogram, package, task, and protected body
968 -- nodes, where it points to the defining entity in the corresponding
969 -- spec. The attribute is also set in N_With_Clause nodes where it points
970 -- to the defining entity for the with'ed spec, and in a subprogram
971 -- renaming declaration when it is a Renaming_As_Body. The field is Empty
972 -- if there is no corresponding spec, as in the case of a subprogram body
973 -- that serves as its own spec.
975 -- In Ada 2012, Corresponding_Spec is set on expression functions that
976 -- complete a subprogram declaration.
978 -- Corresponding_Spec_Of_Stub (Node2-Sem)
979 -- This field is present in subprogram, package, task and protected body
980 -- stubs where it points to the corresponding spec of the stub. Due to
981 -- clashes in the structure of nodes, we cannot use Corresponding_Spec.
983 -- Corresponding_Stub (Node3-Sem)
984 -- This field is present in an N_Subunit node. It holds the node in
985 -- the parent unit that is the stub declaration for the subunit. It is
986 -- set when analysis of the stub forces loading of the proper body. If
987 -- expansion of the proper body creates new declarative nodes, they are
988 -- inserted at the point of the corresponding_stub.
990 -- Dcheck_Function (Node5-Sem)
991 -- This field is present in an N_Variant node, It references the entity
992 -- for the discriminant checking function for the variant.
994 -- Default_Expression (Node5-Sem)
995 -- This field is Empty if there is no default expression. If there is a
996 -- simple default expression (one with no side effects), then this field
997 -- simply contains a copy of the Expression field (both point to the tree
998 -- for the default expression). Default_Expression is used for
999 -- conformance checking.
1001 -- Default_Storage_Pool (Node3-Sem)
1002 -- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
1003 -- copy of Opt.Default_Pool at the end of the compilation unit. See
1004 -- package Opt for details. This is used for inheriting the
1005 -- Default_Storage_Pool in child units.
1007 -- Discr_Check_Funcs_Built (Flag11-Sem)
1008 -- This flag is present in N_Full_Type_Declaration nodes. It is set when
1009 -- discriminant checking functions are constructed. The purpose is to
1010 -- avoid attempting to set these functions more than once.
1012 -- Do_Accessibility_Check (Flag13-Sem)
1013 -- This flag is set on N_Parameter_Specification nodes to indicate
1014 -- that an accessibility check is required for the parameter. It is
1015 -- not yet decided who takes care of this check (TBD ???).
1017 -- Do_Discriminant_Check (Flag1-Sem)
1018 -- This flag is set on N_Selected_Component nodes to indicate that a
1019 -- discriminant check is required using the discriminant check routine
1020 -- associated with the selector. The actual check is generated by the
1021 -- expander when processing selected components. In the case of
1022 -- Unchecked_Union, the flag is also set, but no discriminant check
1023 -- routine is associated with the selector, and the expander does not
1024 -- generate a check. This flag is also present in assignment statements
1025 -- (and set if the assignment requires a discriminant check), and in type
1026 -- conversion nodes (and set if the conversion requires a check).
1028 -- Do_Division_Check (Flag13-Sem)
1029 -- This flag is set on a division operator (/ mod rem) to indicate
1030 -- that a zero divide check is required. The actual check is dealt
1031 -- with by the backend (all the front end does is to set the flag).
1033 -- Do_Length_Check (Flag4-Sem)
1034 -- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
1035 -- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
1036 -- is required. It is not determined who deals with this flag (???).
1038 -- Do_Overflow_Check (Flag17-Sem)
1039 -- This flag is set on an operator where an overflow check is required on
1040 -- the operation. The actual check is dealt with by the backend (all the
1041 -- front end does is to set the flag). The other cases where this flag is
1042 -- used is on a Type_Conversion node and for attribute reference nodes.
1043 -- For a type conversion, it means that the conversion is from one base
1044 -- type to another, and the value may not fit in the target base type.
1045 -- See also the description of Do_Range_Check for this case. The only
1046 -- attribute references which use this flag are Pred and Succ, where it
1047 -- means that the result should be checked for going outside the base
1048 -- range. Note that this flag is not set for modular types. This flag is
1049 -- also set on if and case expression nodes if we are operating in either
1050 -- MINIMIZED or ELIMINATED overflow checking mode (to make sure that we
1051 -- properly process overflow checking for dependent expressions).
1053 -- Do_Range_Check (Flag9-Sem)
1054 -- This flag is set on an expression which appears in a context where a
1055 -- range check is required. The target type is clear from the context.
1056 -- The contexts in which this flag can appear are the following:
1058 -- Right side of an assignment. In this case the target type is
1059 -- taken from the left side of the assignment, which is referenced
1060 -- by the Name of the N_Assignment_Statement node.
1062 -- Subscript expressions in an indexed component. In this case the
1063 -- target type is determined from the type of the array, which is
1064 -- referenced by the Prefix of the N_Indexed_Component node.
1066 -- Argument expression for a parameter, appearing either directly in
1067 -- the Parameter_Associations list of a call or as the Expression of an
1068 -- N_Parameter_Association node that appears in this list. In either
1069 -- case, the check is against the type of the formal. Note that the
1070 -- flag is relevant only in IN and IN OUT parameters, and will be
1071 -- ignored for OUT parameters, where no check is required in the call,
1072 -- and if a check is required on the return, it is generated explicitly
1073 -- with a type conversion.
1075 -- Initialization expression for the initial value in an object
1076 -- declaration. In this case the Do_Range_Check flag is set on
1077 -- the initialization expression, and the check is against the
1078 -- range of the type of the object being declared. This includes the
1079 -- cases of expressions providing default discriminant values, and
1080 -- expressions used to initialize record components.
1082 -- The expression of a type conversion. In this case the range check is
1083 -- against the target type of the conversion. See also the use of
1084 -- Do_Overflow_Check on a type conversion. The distinction is that the
1085 -- overflow check protects against a value that is outside the range of
1086 -- the target base type, whereas a range check checks that the
1087 -- resulting value (which is a value of the base type of the target
1088 -- type), satisfies the range constraint of the target type.
1090 -- Note: when a range check is required in contexts other than those
1091 -- listed above (e.g. in a return statement), an additional type
1092 -- conversion node is introduced to represent the required check.
1094 -- A special case arises for the arguments of the Pred/Succ attributes.
1095 -- Here the range check needed is against First + 1 .. Last (Pred) or
1096 -- First .. Last - 1 (Succ) of the corresponding base type. Essentially
1097 -- these checks are what would be performed within the implicit body of
1098 -- the functions that correspond to these attributes. In these cases,
1099 -- the Do_Range check flag is set on the argument to the attribute
1100 -- function, and the back end must special case the appropriate range
1101 -- to check against.
1103 -- Do_Storage_Check (Flag17-Sem)
1104 -- This flag is set in an N_Allocator node to indicate that a storage
1105 -- check is required for the allocation, or in an N_Subprogram_Body node
1106 -- to indicate that a stack check is required in the subprogram prologue.
1107 -- The N_Allocator case is handled by the routine that expands the call
1108 -- to the runtime routine. The N_Subprogram_Body case is handled by the
1109 -- backend, and all the semantics does is set the flag.
1111 -- Do_Tag_Check (Flag13-Sem)
1112 -- This flag is set on an N_Assignment_Statement, N_Function_Call,
1113 -- N_Procedure_Call_Statement, N_Type_Conversion,
1114 -- N_Simple_Return_Statement, or N_Extended_Return_Statement
1115 -- node to indicate that the tag check can be suppressed. It is not
1116 -- yet decided how this flag is used (TBD ???).
1118 -- Elaborate_Present (Flag4-Sem)
1119 -- This flag is set in the N_With_Clause node to indicate that pragma
1120 -- Elaborate pragma appears for the with'ed units.
1122 -- Elaborate_All_Desirable (Flag9-Sem)
1123 -- This flag is set in the N_With_Clause mode to indicate that the static
1124 -- elaboration processing has determined that an Elaborate_All pragma is
1125 -- desirable for correct elaboration for this unit.
1127 -- Elaborate_All_Present (Flag14-Sem)
1128 -- This flag is set in the N_With_Clause node to indicate that a
1129 -- pragma Elaborate_All pragma appears for the with'ed units.
1131 -- Elaborate_Desirable (Flag11-Sem)
1132 -- This flag is set in the N_With_Clause mode to indicate that the static
1133 -- elaboration processing has determined that an Elaborate pragma is
1134 -- desirable for correct elaboration for this unit.
1136 -- Else_Actions (List3-Sem)
1137 -- This field is present in if expression nodes. During code
1138 -- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
1139 -- actions at an appropriate place in the tree to get elaborated at the
1140 -- right time. For if expressions, we have to be sure that the actions
1141 -- for the Else branch are only elaborated if the condition is False.
1142 -- The Else_Actions field is used as a temporary parking place for
1143 -- these actions. The final tree is always rewritten to eliminate the
1144 -- need for this field, so in the tree passed to Gigi, this field is
1145 -- always set to No_List.
1147 -- Enclosing_Variant (Node2-Sem)
1148 -- This field is present in the N_Variant node and identifies the Node_Id
1149 -- corresponding to the immediately enclosing variant when the variant is
1150 -- nested, and N_Empty otherwise. Set during semantic processing of the
1151 -- variant part of a record type.
1153 -- Entity (Node4-Sem)
1154 -- Appears in all direct names (identifiers, character literals, and
1155 -- operator symbols), as well as expanded names, and attributes that
1156 -- denote entities, such as 'Class. Points to entity for corresponding
1157 -- defining occurrence. Set after name resolution. For identifiers in a
1158 -- WITH list, the corresponding defining occurrence is in a separately
1159 -- compiled file, and Entity must be set by the library Load procedure.
1161 -- Note: During name resolution, the value in Entity may be temporarily
1162 -- incorrect (e.g. during overload resolution, Entity is initially set to
1163 -- the first possible correct interpretation, and then later modified if
1164 -- necessary to contain the correct value after resolution).
1166 -- Note: This field overlaps Associated_Node, which is used during
1167 -- generic processing (see Sem_Ch12 for details). Note also that in
1168 -- generic templates, this means that the Entity field does not always
1169 -- point to an Entity. Since the back end is expected to ignore generic
1170 -- templates, this is harmless.
1172 -- Note: This field also appears in N_Attribute_Definition_Clause nodes.
1173 -- It is used only for stream attributes definition clauses. In this
1174 -- case, it denotes a (possibly dummy) subprogram entity that is declared
1175 -- conceptually at the point of the clause. Thus the visibility of the
1176 -- attribute definition clause (in the sense of 8.3(23) as amended by
1177 -- AI-195) can be checked by testing the visibility of that subprogram.
1179 -- Note: Normally the Entity field of an identifier points to the entity
1180 -- for the corresponding defining identifier, and hence the Chars field
1181 -- of an identifier will match the Chars field of the entity. However,
1182 -- there is no requirement that these match, and there are obscure cases
1183 -- of generated code where they do not match.
1185 -- Note: Ada 2012 aspect specifications require additional links between
1186 -- identifiers and various attributes. These attributes can be of
1187 -- arbitrary types, and the entity field of identifiers that denote
1188 -- aspects must be used to store arbitrary expressions for later semantic
1189 -- checks. See section on aspect specifications for details.
1191 -- Entity_Or_Associated_Node (Node4-Sem)
1192 -- A synonym for both Entity and Associated_Node. Used by convention in
1193 -- the code when referencing this field in cases where it is not known
1194 -- whether the field contains an Entity or an Associated_Node.
1196 -- Etype (Node5-Sem)
1197 -- Appears in all expression nodes, all direct names, and all entities.
1198 -- Points to the entity for the related type. Set after type resolution.
1199 -- Normally this is the actual subtype of the expression. However, in
1200 -- certain contexts such as the right side of an assignment, subscripts,
1201 -- arguments to calls, returned value in a function, initial value etc.
1202 -- it is the desired target type. In the event that this is different
1203 -- from the actual type, the Do_Range_Check flag will be set if a range
1204 -- check is required. Note: if the Is_Overloaded flag is set, then Etype
1205 -- points to an essentially arbitrary choice from the possible set of
1206 -- types.
1208 -- Exception_Junk (Flag8-Sem)
1209 -- This flag is set in a various nodes appearing in a statement sequence
1210 -- to indicate that the corresponding node is an artifact of the
1211 -- generated code for exception handling, and should be ignored when
1212 -- analyzing the control flow of the relevant sequence of statements
1213 -- (e.g. to check that it does not end with a bad return statement).
1215 -- Exception_Label (Node5-Sem)
1216 -- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
1217 -- to be used for transforming the corresponding exception into a goto,
1218 -- or contains Empty, if this exception is not to be transformed. Also
1219 -- appears in N_Exception_Handler nodes, where, if set, it indicates
1220 -- that there may be a local raise for the handler, so that expansion
1221 -- to allow a goto is required (and this field contains the label for
1222 -- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
1224 -- Expansion_Delayed (Flag11-Sem)
1225 -- Set on aggregates and extension aggregates that need a top-down rather
1226 -- than bottom-up expansion. Typically aggregate expansion happens bottom
1227 -- up. For nested aggregates the expansion is delayed until the enclosing
1228 -- aggregate itself is expanded, e.g. in the context of a declaration. To
1229 -- delay it we set this flag. This is done to avoid creating a temporary
1230 -- for each level of a nested aggregates, and also to prevent the
1231 -- premature generation of constraint checks. This is also a requirement
1232 -- if we want to generate the proper attachment to the internal
1233 -- finalization lists (for record with controlled components). Top down
1234 -- expansion of aggregates is also used for in-place array aggregate
1235 -- assignment or initialization. When the full context is known, the
1236 -- target of the assignment or initialization is used to generate the
1237 -- left-hand side of individual assignment to each sub-component.
1239 -- First_Inlined_Subprogram (Node3-Sem)
1240 -- Present in the N_Compilation_Unit node for the main program. Points
1241 -- to a chain of entities for subprograms that are to be inlined. The
1242 -- Next_Inlined_Subprogram field of these entities is used as a link
1243 -- pointer with Empty marking the end of the list. This field is Empty
1244 -- if there are no inlined subprograms or inlining is not active.
1246 -- First_Named_Actual (Node4-Sem)
1247 -- Present in procedure call statement and function call nodes, and also
1248 -- in Intrinsic nodes. Set during semantic analysis to point to the first
1249 -- named parameter where parameters are ordered by declaration order (as
1250 -- opposed to the actual order in the call which may be different due to
1251 -- named associations). Note: this field points to the explicit actual
1252 -- parameter itself, not the N_Parameter_Association node (its parent).
1254 -- First_Real_Statement (Node2-Sem)
1255 -- Present in N_Handled_Sequence_Of_Statements node. Normally set to
1256 -- Empty. Used only when declarations are moved into the statement part
1257 -- of a construct as a result of wrapping an AT END handler that is
1258 -- required to cover the declarations. In this case, this field is used
1259 -- to remember the location in the statements list of the first real
1260 -- statement, i.e. the statement that used to be first in the statement
1261 -- list before the declarations were prepended.
1263 -- First_Subtype_Link (Node5-Sem)
1264 -- Present in N_Freeze_Entity node for an anonymous base type that is
1265 -- implicitly created by the declaration of a first subtype. It points
1266 -- to the entity for the first subtype.
1268 -- Float_Truncate (Flag11-Sem)
1269 -- A flag present in type conversion nodes. This is used for float to
1270 -- integer conversions where truncation is required rather than rounding.
1272 -- Forwards_OK (Flag5-Sem)
1273 -- A flag present in the N_Assignment_Statement node. It is used only
1274 -- if the type being assigned is an array type, and is set if analysis
1275 -- determines that it is definitely safe to do the copy forwards, i.e.
1276 -- starting at the lowest addressed element. This is the case if either
1277 -- the operands do not overlap, or they may overlap, but if they do,
1278 -- then the left operand is at a lower address than the right operand.
1280 -- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
1281 -- means that the front end could not determine that either direction is
1282 -- definitely safe, and a runtime check may be required if the backend
1283 -- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
1284 -- set, it means that the front end can assure no overlap of operands.
1286 -- From_Aspect_Specification (Flag13-Sem)
1287 -- Processing of aspect specifications typically results in insertion in
1288 -- the tree of corresponding pragma or attribute definition clause nodes.
1289 -- These generated nodes have the From_Aspect_Specification flag set to
1290 -- indicate that they came from aspect specifications originally.
1292 -- From_At_End (Flag4-Sem)
1293 -- This flag is set on an N_Raise_Statement node if it corresponds to
1294 -- the reraise statement generated as the last statement of an AT END
1295 -- handler when SJLJ exception handling is active. It is used to stop
1296 -- a bogus violation of restriction (No_Exception_Propagation), bogus
1297 -- because if the restriction is set, the reraise is not generated.
1299 -- From_At_Mod (Flag4-Sem)
1300 -- This flag is set on the attribute definition clause node that is
1301 -- generated by a transformation of an at mod phrase in a record
1302 -- representation clause. This is used to give slightly different (Ada 83
1303 -- compatible) semantics to such a clause, namely it is used to specify a
1304 -- minimum acceptable alignment for the base type and all subtypes. In
1305 -- Ada 95 terms, the actual alignment of the base type and all subtypes
1306 -- must be a multiple of the given value, and the representation clause
1307 -- is considered to be type specific instead of subtype specific.
1309 -- From_Conditional_Expression (Flag1-Sem)
1310 -- This flag is set on if and case statements generated by the expansion
1311 -- of if and case expressions respectively. The flag is used to suppress
1312 -- any finalization of controlled objects found within these statements.
1314 -- From_Default (Flag6-Sem)
1315 -- This flag is set on the subprogram renaming declaration created in an
1316 -- instance for a formal subprogram, when the formal is declared with a
1317 -- box, and there is no explicit actual. If the flag is present, the
1318 -- declaration is treated as an implicit reference to the formal in the
1319 -- ali file.
1321 -- Generalized_Indexing (Node4-Sem)
1322 -- Present in N_Indexed_Component nodes. Set for Indexed_Component nodes
1323 -- that are Ada 2012 container indexing operations. The value of the
1324 -- attribute is a function call (possibly dereferenced) that corresponds
1325 -- to the proper expansion of the source indexing operation. Before
1326 -- expansion, the source node is rewritten as the resolved generalized
1327 -- indexing. In ASIS mode, the expansion does not take place, so that
1328 -- the source is preserved and properly annotated with types.
1330 -- Generic_Parent (Node5-Sem)
1331 -- Generic_Parent is defined on declaration nodes that are instances. The
1332 -- value of Generic_Parent is the generic entity from which the instance
1333 -- is obtained. Generic_Parent is also defined for the renaming
1334 -- declarations and object declarations created for the actuals in an
1335 -- instantiation. The generic parent of such a declaration is the
1336 -- corresponding generic association in the Instantiation node.
1338 -- Generic_Parent_Type (Node4-Sem)
1339 -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
1340 -- actuals of formal private and derived types. Within the instance, the
1341 -- operations on the actual are those inherited from the parent. For a
1342 -- formal private type, the parent type is the generic type itself. The
1343 -- Generic_Parent_Type is also used in an instance to determine whether a
1344 -- private operation overrides an inherited one.
1346 -- Handler_List_Entry (Node2-Sem)
1347 -- This field is present in N_Object_Declaration nodes. It is set only
1348 -- for the Handler_Record entry generated for an exception in zero cost
1349 -- exception handling mode. It references the corresponding item in the
1350 -- handler list, and is used to delete this entry if the corresponding
1351 -- handler is deleted during optimization. For further details on why
1352 -- this is required, see Exp_Ch11.Remove_Handler_Entries.
1354 -- Has_Dereference_Action (Flag13-Sem)
1355 -- This flag is present in N_Explicit_Dereference nodes. It is set to
1356 -- indicate that the expansion has aready produced a call to primitive
1357 -- Dereference of a System.Checked_Pools.Checked_Pool implementation.
1358 -- Such dereference actions are produced for debugging purposes.
1360 -- Has_Dynamic_Length_Check (Flag10-Sem)
1361 -- This flag is present in all expression nodes. It is set to indicate
1362 -- that one of the routines in unit Checks has generated a length check
1363 -- action which has been inserted at the flagged node. This is used to
1364 -- avoid the generation of duplicate checks.
1366 -- Has_Dynamic_Range_Check (Flag12-Sem)
1367 -- This flag is present in N_Subtype_Declaration nodes and on all
1368 -- expression nodes. It is set to indicate that one of the routines in
1369 -- unit Checks has generated a range check action which has been inserted
1370 -- at the flagged node. This is used to avoid the generation of duplicate
1371 -- checks. Why does this occur on N_Subtype_Declaration nodes, what does
1372 -- it mean in that context???
1374 -- Has_Local_Raise (Flag8-Sem)
1375 -- Present in exception handler nodes. Set if the handler can be entered
1376 -- via a local raise that gets transformed to a goto statement. This will
1377 -- always be set if Local_Raise_Statements is non-empty, but can also be
1378 -- set as a result of generation of N_Raise_xxx nodes, or flags set in
1379 -- nodes requiring generation of back end checks.
1381 -- Has_No_Elaboration_Code (Flag17-Sem)
1382 -- A flag that appears in the N_Compilation_Unit node to indicate whether
1383 -- or not elaboration code is present for this unit. It is initially set
1384 -- true for subprogram specs and bodies and for all generic units and
1385 -- false for non-generic package specs and bodies. Gigi may set the flag
1386 -- in the non-generic package case if it determines that no elaboration
1387 -- code is generated. Note that this flag is not related to the
1388 -- Is_Preelaborated status, there can be preelaborated packages that
1389 -- generate elaboration code, and non-preelaborated packages which do
1390 -- not generate elaboration code.
1392 -- Has_Pragma_Suppress_All (Flag14-Sem)
1393 -- This flag is set in an N_Compilation_Unit node if the Suppress_All
1394 -- pragma appears anywhere in the unit. This accommodates the rather
1395 -- strange placement rules of other compilers (DEC permits it at the
1396 -- end of a unit, and Rational allows it as a program unit pragma). We
1397 -- allow it anywhere at all, and consider it equivalent to a pragma
1398 -- Suppress (All_Checks) appearing at the start of the configuration
1399 -- pragmas for the unit.
1401 -- Has_Private_View (Flag11-Sem)
1402 -- A flag present in generic nodes that have an entity, to indicate that
1403 -- the node has a private type. Used to exchange private and full
1404 -- declarations if the visibility at instantiation is different from the
1405 -- visibility at generic definition.
1407 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
1408 -- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
1409 -- flag the presence of a pragma Relative_Deadline.
1411 -- Has_Self_Reference (Flag13-Sem)
1412 -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
1413 -- of the expressions contains an access attribute reference to the
1414 -- enclosing type. Such a self-reference can only appear in default-
1415 -- initialized aggregate for a record type.
1417 -- Has_SP_Choice (Flag15-Sem)
1418 -- Present in all nodes containing a Discrete_Choices field (N_Variant,
1419 -- N_Case_Expression_Alternative, N_Case_Statement_Alternative). Set to
1420 -- True if the Discrete_Choices list has at least one occurrence of a
1421 -- statically predicated subtype.
1423 -- Has_Storage_Size_Pragma (Flag5-Sem)
1424 -- A flag present in an N_Task_Definition node to flag the presence of a
1425 -- Storage_Size pragma.
1427 -- Has_Wide_Character (Flag11-Sem)
1428 -- Present in string literals, set if any wide character (i.e. character
1429 -- code outside the Character range but within Wide_Character range)
1430 -- appears in the string. Used to implement pragma preference rules.
1432 -- Has_Wide_Wide_Character (Flag13-Sem)
1433 -- Present in string literals, set if any wide character (i.e. character
1434 -- code outside the Wide_Character range) appears in the string. Used to
1435 -- implement pragma preference rules.
1437 -- Header_Size_Added (Flag11-Sem)
1438 -- Present in N_Attribute_Reference nodes, set only for attribute
1439 -- Max_Size_In_Storage_Elements. The flag indicates that the size of the
1440 -- hidden list header used by the runtime finalization support has been
1441 -- added to the size of the prefix. The flag also prevents the infinite
1442 -- expansion of the same attribute in the said context.
1444 -- Hidden_By_Use_Clause (Elist4-Sem)
1445 -- An entity list present in use clauses that appear within
1446 -- instantiations. For the resolution of local entities, entities
1447 -- introduced by these use clauses have priority over global ones, and
1448 -- outer entities must be explicitly hidden/restored on exit.
1450 -- Implicit_With (Flag16-Sem)
1451 -- This flag is set in the N_With_Clause node that is implicitly
1452 -- generated for runtime units that are loaded by the expander, and also
1453 -- for package System, if it is loaded implicitly by a use of the
1454 -- 'Address or 'Tag attribute. ???There are other implicit with clauses
1455 -- as well.
1457 -- Implicit_With_From_Instantiation (Flag12-Sem)
1458 -- Set in N_With_Clause nodes from generic instantiations.
1460 -- Import_Interface_Present (Flag16-Sem)
1461 -- This flag is set in an Interface or Import pragma if a matching
1462 -- pragma of the other kind is also present. This is used to avoid
1463 -- generating some unwanted error messages.
1465 -- Includes_Infinities (Flag11-Sem)
1466 -- This flag is present in N_Range nodes. It is set for the range of
1467 -- unconstrained float types defined in Standard, which include not only
1468 -- the given range of values, but also legitimately can include infinite
1469 -- values. This flag is false for any float type for which an explicit
1470 -- range is given by the programmer, even if that range is identical to
1471 -- the range for Float.
1473 -- Incomplete_View (Node2-Sem)
1474 -- Present in full type declarations that are completions of incomplete
1475 -- type declarations. Denotes the corresponding incomplete type
1476 -- declaration. Used to simplify the retrieval of primitive operations
1477 -- that may be declared between the partial and the full view of an
1478 -- untagged type.
1480 -- Inherited_Discriminant (Flag13-Sem)
1481 -- This flag is present in N_Component_Association nodes. It indicates
1482 -- that a given component association in an extension aggregate is the
1483 -- value obtained from a constraint on an ancestor. Used to prevent
1484 -- double expansion when the aggregate has expansion delayed.
1486 -- Instance_Spec (Node5-Sem)
1487 -- This field is present in generic instantiation nodes, and also in
1488 -- formal package declaration nodes (formal package declarations are
1489 -- treated in a manner very similar to package instantiations). It points
1490 -- to the node for the spec of the instance, inserted as part of the
1491 -- semantic processing for instantiations in Sem_Ch12.
1493 -- Is_Accessibility_Actual (Flag13-Sem)
1494 -- Present in N_Parameter_Association nodes. True if the parameter is
1495 -- an extra actual that carries the accessibility level of the actual
1496 -- for an access parameter, in a function that dispatches on result and
1497 -- is called in a dispatching context. Used to prevent a formal/actual
1498 -- mismatch when the call is rewritten as a dispatching call.
1500 -- Is_Asynchronous_Call_Block (Flag7-Sem)
1501 -- A flag set in a Block_Statement node to indicate that it is the
1502 -- expansion of an asynchronous entry call. Such a block needs cleanup
1503 -- handler to assure that the call is cancelled.
1505 -- Is_Boolean_Aspect (Flag16-Sem)
1506 -- Present in N_Aspect_Specification node. Set if the aspect is for a
1507 -- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
1509 -- Is_Checked (Flag11-Sem)
1510 -- Present in N_Aspect_Specification and N_Pragma nodes. Set for an
1511 -- assertion aspect or pragma, or check pragma for an assertion, that
1512 -- is to be checked at run time. If either Is_Checked or Is_Ignored
1513 -- is set (they cannot both be set), then this means that the status of
1514 -- the pragma has been checked at the appropriate point and should not
1515 -- be further modified (in some cases these flags are copied when a
1516 -- pragma is rewritten).
1518 -- Is_Component_Left_Opnd (Flag13-Sem)
1519 -- Is_Component_Right_Opnd (Flag14-Sem)
1520 -- Present in concatenation nodes, to indicate that the corresponding
1521 -- operand is of the component type of the result. Used in resolving
1522 -- concatenation nodes in instances.
1524 -- Is_Delayed_Aspect (Flag14-Sem)
1525 -- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
1526 -- come from aspect specifications, where the evaluation of the aspect
1527 -- must be delayed to the freeze point. This flag is also set True in
1528 -- the corresponding N_Aspect_Specification node.
1530 -- Is_Controlling_Actual (Flag16-Sem)
1531 -- This flag is set on in an expression that is a controlling argument in
1532 -- a dispatching call. It is off in all other cases. See Sem_Disp for
1533 -- details of its use.
1535 -- Is_Disabled (Flag15-Sem)
1536 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1537 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1538 -- a Debug_Policy pragma that resulted in totally disabling the flagged
1539 -- aspect or policy as a result of using the GNAT-defined policy DISABLE.
1540 -- If this flag is set, the aspect or policy is not analyzed for semantic
1541 -- correctness, so any expressions etc will not be marked as analyzed.
1543 -- Is_Dynamic_Coextension (Flag18-Sem)
1544 -- Present in allocator nodes, to indicate that this is an allocator
1545 -- for an access discriminant of a dynamically allocated object. The
1546 -- coextension must be deallocated and finalized at the same time as
1547 -- the enclosing object.
1549 -- Is_Entry_Barrier_Function (Flag8-Sem)
1550 -- This flag is set in an N_Subprogram_Body node which is the expansion
1551 -- of an entry barrier from a protected entry body. It is used for the
1552 -- circuitry checking for incorrect use of Current_Task.
1554 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
1555 -- This flag is set in an N_Function_Call node to indicate that the extra
1556 -- actuals to support a build-in-place style of call have been added to
1557 -- the call.
1559 -- Is_Finalization_Wrapper (Flag9-Sem);
1560 -- This flag is present in N_Block_Statement nodes. It is set when the
1561 -- block acts as a wrapper of a handled construct which has controlled
1562 -- objects. The wrapper prevents interference between exception handlers
1563 -- and At_End handlers.
1565 -- Is_Ignored (Flag9-Sem)
1566 -- A flag set in an N_Aspect_Specification or N_Pragma node if there was
1567 -- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
1568 -- a Debug_Policy pragma that specified a policy of IGNORE, DISABLE, or
1569 -- OFF, for the pragma/aspect. If there was a Policy pragma specifying
1570 -- a Policy of ON or CHECK, then this flag is reset. If no Policy pragma
1571 -- gives a policy for the aspect or pragma, then there are two cases. For
1572 -- an assertion aspect or pragma (one of the assertion kinds allowed in
1573 -- an Assertion_Policy pragma), then Is_Ignored is set if assertions are
1574 -- ignored because of the absence of a -gnata switch. For any other
1575 -- aspects or pragmas, the flag is off. If this flag is set, the
1576 -- aspect/pragma is fully analyzed and checked for other syntactic
1577 -- and semantic errors, but it does not have any semantic effect.
1579 -- Is_In_Discriminant_Check (Flag11-Sem)
1580 -- This flag is present in a selected component, and is used to indicate
1581 -- that the reference occurs within a discriminant check. The
1582 -- significance is that optimizations based on assuming that the
1583 -- discriminant check has a correct value cannot be performed in this
1584 -- case (or the discriminant check may be optimized away).
1586 -- Is_Inherited (Flag4-Sem)
1587 -- This flag is set in an N_Pragma node that appears in a N_Contract node
1588 -- to indicate that the pragma has been inherited from a parent context.
1590 -- Is_Machine_Number (Flag11-Sem)
1591 -- This flag is set in an N_Real_Literal node to indicate that the value
1592 -- is a machine number. This avoids some unnecessary cases of converting
1593 -- real literals to machine numbers.
1595 -- Is_Null_Loop (Flag16-Sem)
1596 -- This flag is set in an N_Loop_Statement node if the corresponding loop
1597 -- can be determined to be null at compile time. This is used to remove
1598 -- the loop entirely at expansion time.
1600 -- Is_Overloaded (Flag5-Sem)
1601 -- A flag present in all expression nodes. Used temporarily during
1602 -- overloading determination. The setting of this flag is not relevant
1603 -- once overloading analysis is complete.
1605 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
1606 -- A flag present only in N_Op_Expon nodes. It is set when the
1607 -- exponentiation is of the form 2 ** N, where the type of N is an
1608 -- unsigned integral subtype whose size does not exceed the size of
1609 -- Standard_Integer (i.e. a type that can be safely converted to
1610 -- Natural), and the exponentiation appears as the right operand of an
1611 -- integer multiplication or an integer division where the dividend is
1612 -- unsigned. It is also required that overflow checking is off for both
1613 -- the exponentiation and the multiply/divide node. If this set of
1614 -- conditions holds, and the flag is set, then the division or
1615 -- multiplication can be (and is) converted to a shift.
1617 -- Is_Prefixed_Call (Flag17-Sem)
1618 -- This flag is set in a selected component within a generic unit, if
1619 -- it resolves to a prefixed call to a primitive operation. The flag
1620 -- is used to prevent accidental overloadings in an instance, when a
1621 -- primitive operation and a private record component may be homographs.
1623 -- Is_Protected_Subprogram_Body (Flag7-Sem)
1624 -- A flag set in a Subprogram_Body block to indicate that it is the
1625 -- implementation of a protected subprogram. Such a body needs cleanup
1626 -- handler to make sure that the associated protected object is unlocked
1627 -- when the subprogram completes.
1629 -- Is_Static_Coextension (Flag14-Sem)
1630 -- Present in N_Allocator nodes. Set if the allocator is a coextension
1631 -- of an object allocated on the stack rather than the heap.
1633 -- Is_Static_Expression (Flag6-Sem)
1634 -- Indicates that an expression is a static expression according to the
1635 -- rules in (RM 4.9). Note that it is possible for this flag to be set
1636 -- when Raises_Constraint_Error is also set. In practice almost all cases
1637 -- where a static expression is required do not allow an expression which
1638 -- raises Constraint_Error, so almost always, callers should call the
1639 -- Is_Ok_Static_Expression routine instead of testing this flag. See
1640 -- spec of package Sem_Eval for full details on the use of this flag.
1642 -- Is_Subprogram_Descriptor (Flag16-Sem)
1643 -- Present in N_Object_Declaration, and set only for the object
1644 -- declaration generated for a subprogram descriptor in fast exception
1645 -- mode. See Exp_Ch11 for details of use.
1647 -- Is_Task_Allocation_Block (Flag6-Sem)
1648 -- A flag set in a Block_Statement node to indicate that it is the
1649 -- expansion of a task allocator, or the allocator of an object
1650 -- containing tasks. Such a block requires a cleanup handler to call
1651 -- Expunge_Unactivated_Tasks to complete any tasks that have been
1652 -- allocated but not activated when the allocator completes abnormally.
1654 -- Is_Task_Master (Flag5-Sem)
1655 -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
1656 -- indicate that the construct is a task master (i.e. has declared tasks
1657 -- or declares an access to a task type).
1659 -- Itype (Node1-Sem)
1660 -- Used in N_Itype_Reference node to reference an itype for which it is
1661 -- important to ensure that it is defined. See description of this node
1662 -- for further details.
1664 -- Kill_Range_Check (Flag11-Sem)
1665 -- Used in an N_Unchecked_Type_Conversion node to indicate that the
1666 -- result should not be subjected to range checks. This is used for the
1667 -- implementation of Normalize_Scalars.
1669 -- Label_Construct (Node2-Sem)
1670 -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
1671 -- N_Block_Statement or N_Loop_Statement node to which the label
1672 -- declaration applies. This attribute is used both in the compiler and
1673 -- in the implementation of ASIS queries. The field is left empty for the
1674 -- special labels generated as part of expanding raise statements with a
1675 -- local exception handler.
1677 -- Library_Unit (Node4-Sem)
1678 -- In a stub node, Library_Unit points to the compilation unit node of
1679 -- the corresponding subunit.
1681 -- In a with clause node, Library_Unit points to the spec of the with'ed
1682 -- unit.
1684 -- In a compilation unit node, the usage depends on the unit type:
1686 -- For a library unit body, Library_Unit points to the compilation unit
1687 -- node of the corresponding spec, unless it's a subprogram body with
1688 -- Acts_As_Spec set, in which case it points to itself.
1690 -- For a spec, Library_Unit points to the compilation unit node of the
1691 -- corresponding body, if present. The body will be present if the spec
1692 -- is or contains generics that we needed to instantiate. Similarly, the
1693 -- body will be present if we needed it for inlining purposes. Thus, if
1694 -- we have a spec/body pair, both of which are present, they point to
1695 -- each other via Library_Unit.
1697 -- For a subunit, Library_Unit points to the compilation unit node of
1698 -- the parent body.
1699 -- ??? not (always) true, in (at least some, maybe all?) cases it points
1700 -- to the corresponding spec for the parent body.
1702 -- Note that this field is not used to hold the parent pointer for child
1703 -- unit (which might in any case need to use it for some other purpose as
1704 -- described above). Instead for a child unit, implicit with's are
1705 -- generated for all parents.
1707 -- Local_Raise_Statements (Elist1)
1708 -- This field is present in exception handler nodes. It is set to
1709 -- No_Elist in the normal case. If there is at least one raise statement
1710 -- which can potentially be handled as a local raise, then this field
1711 -- points to a list of raise nodes, which are calls to a routine to raise
1712 -- an exception. These are raise nodes which can be optimized into gotos
1713 -- if the handler turns out to meet the conditions which permit this
1714 -- transformation. Note that this does NOT include instances of the
1715 -- N_Raise_xxx_Error nodes since the transformation of these nodes is
1716 -- handled by the back end (using the N_Push/N_Pop mechanism).
1718 -- Loop_Actions (List2-Sem)
1719 -- A list present in Component_Association nodes in array aggregates.
1720 -- Used to collect actions that must be executed within the loop because
1721 -- they may need to be evaluated anew each time through.
1723 -- Limited_View_Installed (Flag18-Sem)
1724 -- Present in With_Clauses and in package specifications. If set on
1725 -- with_clause, it indicates that this clause has created the current
1726 -- limited view of the designated package. On a package specification, it
1727 -- indicates that the limited view has already been created because the
1728 -- package is mentioned in a limited_with_clause in the closure of the
1729 -- unit being compiled.
1731 -- Local_Raise_Not_OK (Flag7-Sem)
1732 -- Present in N_Exception_Handler nodes. Set if the handler contains
1733 -- a construct (reraise statement, or call to subprogram in package
1734 -- GNAT.Current_Exception) that makes the handler unsuitable as a target
1735 -- for a local raise (one that could otherwise be converted to a goto).
1737 -- Must_Be_Byte_Aligned (Flag14-Sem)
1738 -- This flag is present in N_Attribute_Reference nodes. It can be set
1739 -- only for the Address and Unrestricted_Access attributes. If set it
1740 -- means that the object for which the address/access is given must be on
1741 -- a byte (more accurately a storage unit) boundary. If necessary, a copy
1742 -- of the object is to be made before taking the address (this copy is in
1743 -- the current scope on the stack frame). This is used for certain cases
1744 -- of code generated by the expander that passes parameters by address.
1746 -- The reason the copy is not made by the front end is that the back end
1747 -- has more information about type layout and may be able to (but is not
1748 -- guaranteed to) prevent making unnecessary copies.
1750 -- Must_Not_Freeze (Flag8-Sem)
1751 -- A flag present in all expression nodes. Normally expressions cause
1752 -- freezing as described in the RM. If this flag is set, then this is
1753 -- inhibited. This is used by the analyzer and expander to label nodes
1754 -- that are created by semantic analysis or expansion and which must not
1755 -- cause freezing even though they normally would. This flag is also
1756 -- present in an N_Subtype_Indication node, since we also use these in
1757 -- calls to Freeze_Expression.
1759 -- Next_Entity (Node2-Sem)
1760 -- Present in defining identifiers, defining character literals and
1761 -- defining operator symbols (i.e. in all entities). The entities of a
1762 -- scope are chained, and this field is used as the forward pointer for
1763 -- this list. See Einfo for further details.
1765 -- Next_Exit_Statement (Node3-Sem)
1766 -- Present in N_Exit_Statement nodes. The exit statements for a loop are
1767 -- chained (in reverse order of appearance) from the First_Exit_Statement
1768 -- field of the E_Loop entity for the loop. Next_Exit_Statement points to
1769 -- the next entry on this chain (Empty = end of list).
1771 -- Next_Implicit_With (Node3-Sem)
1772 -- Present in N_With_Clause. Part of a chain of with_clauses generated
1773 -- in rtsfind to indicate implicit dependencies on predefined units. Used
1774 -- to prevent multiple with_clauses for the same unit in a given context.
1775 -- A postorder traversal of the tree whose nodes are units and whose
1776 -- links are with_clauses defines the order in which CodePeer must
1777 -- examine a compiled unit and its full context. This ordering ensures
1778 -- that any subprogram call is examined after the subprogram declaration
1779 -- has been seen.
1781 -- Next_Named_Actual (Node4-Sem)
1782 -- Present in parameter association nodes. Set during semantic analysis
1783 -- to point to the next named parameter, where parameters are ordered by
1784 -- declaration order (as opposed to the actual order in the call, which
1785 -- may be different due to named associations). Not that this field
1786 -- points to the explicit actual parameter itself, not to the
1787 -- N_Parameter_Association node (its parent).
1789 -- Next_Pragma (Node1-Sem)
1790 -- Present in N_Pragma nodes. Used to create a linked list of pragma
1791 -- nodes. Currently used for two purposes:
1793 -- Create a list of linked Check_Policy pragmas. The head of this list
1794 -- is stored in Opt.Check_Policy_List (which has further details).
1796 -- Used by processing for Pre/Postcondition pragmas to store a list of
1797 -- pragmas associated with the spec of a subprogram (see Sem_Prag for
1798 -- details).
1800 -- Used by processing for pragma SPARK_Mode to store multiple pragmas
1801 -- the apply to the same construct. These are visible/private mode for
1802 -- a package spec and declarative/statement mode for package body.
1804 -- Next_Rep_Item (Node5-Sem)
1805 -- Present in pragma nodes, attribute definition nodes, enumeration rep
1806 -- clauses, record rep clauses, aspect specification nodes. Used to link
1807 -- representation items that apply to an entity. See full description of
1808 -- First_Rep_Item field in Einfo for further details.
1810 -- Next_Use_Clause (Node3-Sem)
1811 -- While use clauses are active during semantic processing, they are
1812 -- chained from the scope stack entry, using Next_Use_Clause as a link
1813 -- pointer, with Empty marking the end of the list. The head pointer is
1814 -- in the scope stack entry (First_Use_Clause). At the end of semantic
1815 -- processing (i.e. when Gigi sees the tree, the contents of this field
1816 -- is undefined and should not be read).
1818 -- No_Ctrl_Actions (Flag7-Sem)
1819 -- Present in N_Assignment_Statement to indicate that no Finalize nor
1820 -- Adjust should take place on this assignment even though the RHS is
1821 -- controlled. Also indicates that the primitive _assign should not be
1822 -- used for a tagged assignment. This is used in init procs and aggregate
1823 -- expansions where the generated assignments are initializations, not
1824 -- real assignments.
1826 -- No_Elaboration_Check (Flag14-Sem)
1827 -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
1828 -- that no elaboration check is needed on the call, because it appears in
1829 -- the context of a local Suppress pragma. This is used on calls within
1830 -- task bodies, where the actual elaboration checks are applied after
1831 -- analysis, when the local scope stack is not present.
1833 -- No_Entities_Ref_In_Spec (Flag8-Sem)
1834 -- Present in N_With_Clause nodes. Set if the with clause is on the
1835 -- package or subprogram spec where the main unit is the corresponding
1836 -- body, and no entities of the with'ed unit are referenced by the spec
1837 -- (an entity may still be referenced in the body, so this flag is used
1838 -- to generate the proper message (see Sem_Util.Check_Unused_Withs for
1839 -- full details)
1841 -- No_Initialization (Flag13-Sem)
1842 -- Present in N_Object_Declaration and N_Allocator to indicate that the
1843 -- object must not be initialized (by Initialize or call to an init
1844 -- proc). This is needed for controlled aggregates. When the Object
1845 -- declaration has an expression, this flag means that this expression
1846 -- should not be taken into account (needed for in place initialization
1847 -- with aggregates, and for object with an address clause, which are
1848 -- initialized with an assignment at freeze time).
1850 -- No_Minimize_Eliminate (Flag17-Sem)
1851 -- This flag is present in membership operator nodes (N_In/N_Not_In).
1852 -- It is used to indicate that processing for extended overflow checking
1853 -- modes is not required (this is used to prevent infinite recursion).
1855 -- No_Truncation (Flag17-Sem)
1856 -- Present in N_Unchecked_Type_Conversion node. This flag has an effect
1857 -- only if the RM_Size of the source is greater than the RM_Size of the
1858 -- target for scalar operands. Normally in such a case we truncate some
1859 -- higher order bits of the source, and then sign/zero extend the result
1860 -- to form the output value. But if this flag is set, then we do not do
1861 -- any truncation, so for example, if an 8 bit input is converted to 5
1862 -- bit result which is in fact stored in 8 bits, then the high order
1863 -- three bits of the target result will be copied from the source. This
1864 -- is used for properly setting out of range values for use by pragmas
1865 -- Initialize_Scalars and Normalize_Scalars.
1867 -- Non_Aliased_Prefix (Flag18-Sem)
1868 -- Present in N_Attribute_Reference nodes. Set only for the case of an
1869 -- Unrestricted_Access reference whose prefix is non-aliased, which is
1870 -- the case that is permitted for Unrestricted_Access except when the
1871 -- expected type is a thin pointer to unconstrained array. This flag is
1872 -- to assist in detecting this illegal use of Unrestricted_Access.
1874 -- Null_Excluding_Subtype (Flag16)
1875 -- Present in N_Access_To_Object_Definition. Indicates that the subtype
1876 -- indication carries a null-exclusion indicator, which is distinct from
1877 -- the null-exclusion indicator that may precede the access keyword.
1879 -- Original_Discriminant (Node2-Sem)
1880 -- Present in identifiers. Used in references to discriminants that
1881 -- appear in generic units. Because the names of the discriminants may be
1882 -- different in an instance, we use this field to recover the position of
1883 -- the discriminant in the original type, and replace it with the
1884 -- discriminant at the same position in the instantiated type.
1886 -- Original_Entity (Node2-Sem)
1887 -- Present in numeric literals. Used to denote the named number that has
1888 -- been constant-folded into the given literal. If literal is from
1889 -- source, or the result of some other constant-folding operation, then
1890 -- Original_Entity is empty. This field is needed to handle properly
1891 -- named numbers in generic units, where the Associated_Node field
1892 -- interferes with the Entity field, making it impossible to preserve the
1893 -- original entity at the point of instantiation (ASIS problem).
1895 -- Others_Discrete_Choices (List1-Sem)
1896 -- When a case statement or variant is analyzed, the semantic checks
1897 -- determine the actual list of choices that correspond to an others
1898 -- choice. This list is materialized for later use by the expander and
1899 -- the Others_Discrete_Choices field of an N_Others_Choice node points to
1900 -- this materialized list of choices, which is in standard format for a
1901 -- list of discrete choices, except that of course it cannot contain an
1902 -- N_Others_Choice entry.
1904 -- Parent_Spec (Node4-Sem)
1905 -- For a library unit that is a child unit spec (package or subprogram
1906 -- declaration, generic declaration or instantiation, or library level
1907 -- rename, this field points to the compilation unit node for the parent
1908 -- package specification. This field is Empty for library bodies (the
1909 -- parent spec in this case can be found from the corresponding spec).
1911 -- Premature_Use (Node5-Sem)
1912 -- Present in N_Incomplete_Type_Declaration node. Used for improved
1913 -- error diagnostics: if there is a premature usage of an incomplete
1914 -- type, a subsequently generated error message indicates the position
1915 -- of its full declaration.
1917 -- Present_Expr (Uint3-Sem)
1918 -- Present in an N_Variant node. This has a meaningful value only after
1919 -- Gigi has back annotated the tree with representation information. At
1920 -- this point, it contains a reference to a gcc expression that depends
1921 -- on the values of one or more discriminants. Give a set of discriminant
1922 -- values, this expression evaluates to False (zero) if variant is not
1923 -- present, and True (non-zero) if it is present. See unit Repinfo for
1924 -- further details on gigi back annotation. This field is used during
1925 -- ASIS processing (data decomposition annex) to determine if a field is
1926 -- present or not.
1928 -- Print_In_Hex (Flag13-Sem)
1929 -- Set on an N_Integer_Literal node to indicate that the value should be
1930 -- printed in hexadecimal in the sprint listing. Has no effect on
1931 -- legality or semantics of program, only on the displayed output. This
1932 -- is used to clarify output from the packed array cases.
1934 -- Procedure_To_Call (Node2-Sem)
1935 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
1936 -- and N_Extended_Return_Statement nodes. References the entity for the
1937 -- declaration of the procedure to be called to accomplish the required
1938 -- operation (i.e. for the Allocate procedure in the case of N_Allocator
1939 -- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
1940 -- allocating the return value), and for the Deallocate procedure in the
1941 -- case of N_Free_Statement.
1943 -- Raises_Constraint_Error (Flag7-Sem)
1944 -- Set on an expression whose evaluation will definitely fail constraint
1945 -- error check. In the case of static expressions, this flag must be set
1946 -- accurately (and if it is set, the expression is typically illegal
1947 -- unless it appears as a non-elaborated branch of a short-circuit form).
1948 -- For a non-static expression, this flag may be set whenever an
1949 -- expression (e.g. an aggregate) is known to raise constraint error. If
1950 -- set, the expression definitely will raise CE if elaborated at runtime.
1951 -- If not set, the expression may or may not raise CE. In other words, on
1952 -- static expressions, the flag is set accurately, on non-static
1953 -- expressions it is set conservatively.
1955 -- Redundant_Use (Flag13-Sem)
1956 -- Present in nodes that can appear as an operand in a use clause or use
1957 -- type clause (identifiers, expanded names, attribute references). Set
1958 -- to indicate that a use is redundant (and therefore need not be undone
1959 -- on scope exit).
1961 -- Renaming_Exception (Node2-Sem)
1962 -- Present in N_Exception_Declaration node. Used to point back to the
1963 -- exception renaming for an exception declared within a subprogram.
1964 -- What happens is that an exception declared in a subprogram is moved
1965 -- to the library level with a unique name, and the original exception
1966 -- becomes a renaming. This link from the library level exception to the
1967 -- renaming declaration allows registering of the proper exception name.
1969 -- Return_Statement_Entity (Node5-Sem)
1970 -- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
1971 -- Points to an E_Return_Statement representing the return statement.
1973 -- Return_Object_Declarations (List3)
1974 -- Present in N_Extended_Return_Statement. Points to a list initially
1975 -- containing a single N_Object_Declaration representing the return
1976 -- object. We use a list (instead of just a pointer to the object decl)
1977 -- because Analyze wants to insert extra actions on this list.
1979 -- Rounded_Result (Flag18-Sem)
1980 -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
1981 -- Used in the fixed-point cases to indicate that the result must be
1982 -- rounded as a result of the use of the 'Round attribute. Also used for
1983 -- integer N_Op_Divide nodes to indicate that the result should be
1984 -- rounded to the nearest integer (breaking ties away from zero), rather
1985 -- than truncated towards zero as usual. These rounded integer operations
1986 -- are the result of expansion of rounded fixed-point divide, conversion
1987 -- and multiplication operations.
1989 -- SCIL_Entity (Node4-Sem)
1990 -- Present in SCIL nodes. References the specific tagged type associated
1991 -- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
1992 -- the controlling type of the call; for an N_SCIL_Membership_Test node
1993 -- generated as part of testing membership in T'Class, this is T; for an
1994 -- N_SCIL_Dispatch_Table_Tag_Init node, this is the type being declared).
1996 -- SCIL_Controlling_Tag (Node5-Sem)
1997 -- Present in N_SCIL_Dispatching_Call nodes. References the controlling
1998 -- tag of a dispatching call. This is usually an N_Selected_Component
1999 -- node (for a _tag component), but may be an N_Object_Declaration or
2000 -- N_Parameter_Specification node in some cases (e.g., for a call to
2001 -- a classwide streaming operation or a call to an instance of
2002 -- Ada.Tags.Generic_Dispatching_Constructor).
2004 -- SCIL_Tag_Value (Node5-Sem)
2005 -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
2006 -- of the value that is being tested.
2008 -- SCIL_Target_Prim (Node2-Sem)
2009 -- Present in N_SCIL_Dispatching_Call nodes. References the primitive
2010 -- operation named (statically) in a dispatching call.
2012 -- Scope (Node3-Sem)
2013 -- Present in defining identifiers, defining character literals and
2014 -- defining operator symbols (i.e. in all entities). The entities of a
2015 -- scope all use this field to reference the corresponding scope entity.
2016 -- See Einfo for further details.
2018 -- Shift_Count_OK (Flag4-Sem)
2019 -- A flag present in shift nodes to indicate that the shift count is
2020 -- known to be in range, i.e. is in the range from zero to word length
2021 -- minus one. If this flag is not set, then the shift count may be
2022 -- outside this range, i.e. larger than the word length, and the code
2023 -- must ensure that such shift counts give the appropriate result.
2025 -- Source_Type (Node1-Sem)
2026 -- Used in an N_Validate_Unchecked_Conversion node to point to the
2027 -- source type entity for the unchecked conversion instantiation
2028 -- which gigi must do size validation for.
2030 -- Split_PPC (Flag17)
2031 -- When a Pre or Post aspect specification is processed, it is broken
2032 -- into AND THEN sections. The left most section has Split_PPC set to
2033 -- False, indicating that it is the original specification (e.g. for
2034 -- posting errors). For other sections, Split_PPC is set to True.
2035 -- This flag is set in both the N_Aspect_Specification node itself,
2036 -- and in the pragma which is generated from this node.
2038 -- Storage_Pool (Node1-Sem)
2039 -- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
2040 -- and N_Extended_Return_Statement nodes. References the entity for the
2041 -- storage pool to be used for the allocate or free call or for the
2042 -- allocation of the returned value from function. Empty indicates that
2043 -- the global default pool is to be used. Note that in the case
2044 -- of a return statement, this field is set only if the function returns
2045 -- value of a type whose size is not known at compile time on the
2046 -- secondary stack.
2048 -- Suppress_Assignment_Checks (Flag18-Sem)
2049 -- Used in generated N_Assignment_Statement nodes to suppress predicate
2050 -- and range checks in cases where the generated code knows that the
2051 -- value being assigned is in range and satisfies any predicate. Also
2052 -- can be set in N_Object_Declaration nodes, to similarly suppress any
2053 -- checks on the initializing value. In assignment statements it also
2054 -- suppresses access checks in the generated code for out- and in-out
2055 -- parameters in entry calls.
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
2091 -- Etype value.
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
2176 -- is present.
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.
2246 -- N_Identifier
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)
2297 -- N_Real_Literal
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]
2313 -- BASE ::= NUMERAL
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.
2361 -- N_String_Literal
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
2369 ------------------
2370 -- 2.7 Comment --
2371 ------------------
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.
2381 -----------------
2382 -- 2.8 Pragma --
2383 -----------------
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.
2392 -- N_Pragma
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 -- Import_Interface_Present (Flag16-Sem)
2402 -- Is_Checked (Flag11-Sem)
2403 -- Is_Delayed_Aspect (Flag14-Sem)
2404 -- Is_Disabled (Flag15-Sem)
2405 -- Is_Ignored (Flag9-Sem)
2406 -- Is_Inherited (Flag4-Sem)
2407 -- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
2408 -- Uneval_Old_Accept (Flag7-Sem)
2409 -- Uneval_Old_Warn (Flag18-Sem)
2411 -- Note: we should have a section on what pragmas are passed on to
2412 -- the back end to be processed. This section should note that pragma
2413 -- Psect_Object is always converted to Common_Object, but there are
2414 -- undoubtedly many other similar notes required ???
2416 -- Note: a utility function Pragma_Name may be applied to pragma nodes
2417 -- to conveniently obtain the Chars field of the Pragma_Identifier.
2419 -- Note: if From_Aspect_Specification is set, then Sloc points to the
2420 -- aspect name, as does the Pragma_Identifier. In this case if the
2421 -- pragma has a local name argument (such as pragma Inline), it is
2422 -- resolved to point to the specific entity affected by the pragma.
2424 --------------------------------------
2425 -- 2.8 Pragma Argument Association --
2426 --------------------------------------
2428 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2429 -- [pragma_argument_IDENTIFIER =>] NAME
2430 -- | [pragma_argument_IDENTIFIER =>] EXPRESSION
2432 -- In Ada 2012, there are two more possibilities:
2434 -- PRAGMA_ARGUMENT_ASSOCIATION ::=
2435 -- [pragma_argument_ASPECT_MARK =>] NAME
2436 -- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
2438 -- where the interesting allowed cases (which do not fit the syntax of
2439 -- the first alternative above) are
2441 -- ASPECT_MARK => Pre'Class |
2442 -- Post'Class |
2443 -- Type_Invariant'Class |
2444 -- Invariant'Class
2446 -- We allow this special usage in all Ada modes, but it would be a
2447 -- pain to allow these aspects to pervade the pragma syntax, and the
2448 -- representation of pragma nodes internally. So what we do is to
2449 -- replace these ASPECT_MARK forms with identifiers whose name is one
2450 -- of the special internal names _Pre, _Post or _Type_Invariant.
2452 -- We do a similar replacement of these Aspect_Mark forms in the
2453 -- Expression of a pragma argument association for the cases of
2454 -- the first arguments of any Check pragmas and Check_Policy pragmas
2456 -- N_Pragma_Argument_Association
2457 -- Sloc points to first token in association
2458 -- Chars (Name1) (set to No_Name if no pragma argument identifier)
2459 -- Expression (Node3)
2461 ------------------------
2462 -- 2.9 Reserved Word --
2463 ------------------------
2465 -- Reserved words are parsed by the scanner, and returned as the
2466 -- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
2468 ----------------------------
2469 -- 3.1 Basic Declaration --
2470 ----------------------------
2472 -- BASIC_DECLARATION ::=
2473 -- TYPE_DECLARATION | SUBTYPE_DECLARATION
2474 -- | OBJECT_DECLARATION | NUMBER_DECLARATION
2475 -- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
2476 -- | PACKAGE_DECLARATION | RENAMING_DECLARATION
2477 -- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
2478 -- | GENERIC_INSTANTIATION
2480 -- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
2481 -- see further description in section on semantic nodes.
2483 -- Also, in the tree that is constructed, a pragma may appear
2484 -- anywhere that a declaration may appear.
2486 ------------------------------
2487 -- 3.1 Defining Identifier --
2488 ------------------------------
2490 -- DEFINING_IDENTIFIER ::= IDENTIFIER
2492 -- A defining identifier is an entity, which has additional fields
2493 -- depending on the setting of the Ekind field. These additional
2494 -- fields are defined (and access subprograms declared) in package
2495 -- Einfo.
2497 -- Note: N_Defining_Identifier is an extended node whose fields are
2498 -- deliberate layed out to match the layout of fields in an ordinary
2499 -- N_Identifier node allowing for easy alteration of an identifier
2500 -- node into a defining identifier node. For details, see procedure
2501 -- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
2503 -- N_Defining_Identifier
2504 -- Sloc points to identifier
2505 -- Chars (Name1) contains the Name_Id for the identifier
2506 -- Next_Entity (Node2-Sem)
2507 -- Scope (Node3-Sem)
2508 -- Etype (Node5-Sem)
2510 -----------------------------
2511 -- 3.2.1 Type Declaration --
2512 -----------------------------
2514 -- TYPE_DECLARATION ::=
2515 -- FULL_TYPE_DECLARATION
2516 -- | INCOMPLETE_TYPE_DECLARATION
2517 -- | PRIVATE_TYPE_DECLARATION
2518 -- | PRIVATE_EXTENSION_DECLARATION
2520 ----------------------------------
2521 -- 3.2.1 Full Type Declaration --
2522 ----------------------------------
2524 -- FULL_TYPE_DECLARATION ::=
2525 -- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
2526 -- is TYPE_DEFINITION
2527 -- [ASPECT_SPECIFICATIONS];
2528 -- | TASK_TYPE_DECLARATION
2529 -- | PROTECTED_TYPE_DECLARATION
2531 -- The full type declaration node is used only for the first case. The
2532 -- second case (concurrent type declaration), is represented directly
2533 -- by a task type declaration or a protected type declaration.
2535 -- N_Full_Type_Declaration
2536 -- Sloc points to TYPE
2537 -- Defining_Identifier (Node1)
2538 -- Incomplete_View (Node2-Sem)
2539 -- Discriminant_Specifications (List4) (set to No_List if none)
2540 -- Type_Definition (Node3)
2541 -- Discr_Check_Funcs_Built (Flag11-Sem)
2543 ----------------------------
2544 -- 3.2.1 Type Definition --
2545 ----------------------------
2547 -- TYPE_DEFINITION ::=
2548 -- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
2549 -- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
2550 -- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
2551 -- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
2553 --------------------------------
2554 -- 3.2.2 Subtype Declaration --
2555 --------------------------------
2557 -- SUBTYPE_DECLARATION ::=
2558 -- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
2559 -- [ASPECT_SPECIFICATIONS];
2561 -- The subtype indication field is set to Empty for subtypes
2562 -- declared in package Standard (Positive, Natural).
2564 -- N_Subtype_Declaration
2565 -- Sloc points to SUBTYPE
2566 -- Defining_Identifier (Node1)
2567 -- Null_Exclusion_Present (Flag11)
2568 -- Subtype_Indication (Node5)
2569 -- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
2570 -- Exception_Junk (Flag8-Sem)
2571 -- Has_Dynamic_Range_Check (Flag12-Sem)
2573 -------------------------------
2574 -- 3.2.2 Subtype Indication --
2575 -------------------------------
2577 -- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
2579 -- Note: if no constraint is present, the subtype indication appears
2580 -- directly in the tree as a subtype mark. The N_Subtype_Indication
2581 -- node is used only if a constraint is present.
2583 -- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
2584 -- with the null-exclusion part (see AI-231), we had to introduce a new
2585 -- attribute in all the parents of subtype_indication nodes to indicate
2586 -- if the null-exclusion is present.
2588 -- Note: the reason that this node has expression fields is that a
2589 -- subtype indication can appear as an operand of a membership test.
2591 -- N_Subtype_Indication
2592 -- Sloc points to first token of subtype mark
2593 -- Subtype_Mark (Node4)
2594 -- Constraint (Node3)
2595 -- Etype (Node5-Sem)
2596 -- Must_Not_Freeze (Flag8-Sem)
2598 -- Note: Depending on context, the Etype is either the entity of the
2599 -- Subtype_Mark field, or it is an itype constructed to reify the
2600 -- subtype indication. In particular, such itypes are created for a
2601 -- subtype indication that appears in an array type declaration. This
2602 -- simplifies constraint checking in indexed components.
2604 -- For subtype indications that appear in scalar type and subtype
2605 -- declarations, the Etype is the entity of the subtype mark.
2607 -------------------------
2608 -- 3.2.2 Subtype Mark --
2609 -------------------------
2611 -- SUBTYPE_MARK ::= subtype_NAME
2613 -----------------------
2614 -- 3.2.2 Constraint --
2615 -----------------------
2617 -- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
2619 ------------------------------
2620 -- 3.2.2 Scalar Constraint --
2621 ------------------------------
2623 -- SCALAR_CONSTRAINT ::=
2624 -- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
2626 ---------------------------------
2627 -- 3.2.2 Composite Constraint --
2628 ---------------------------------
2630 -- COMPOSITE_CONSTRAINT ::=
2631 -- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
2633 -------------------------------
2634 -- 3.3.1 Object Declaration --
2635 -------------------------------
2637 -- OBJECT_DECLARATION ::=
2638 -- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2639 -- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
2640 -- [ASPECT_SPECIFICATIONS];
2641 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2642 -- ACCESS_DEFINITION [:= EXPRESSION]
2643 -- [ASPECT_SPECIFICATIONS];
2644 -- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
2645 -- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
2646 -- [ASPECT_SPECIFICATIONS];
2647 -- | SINGLE_TASK_DECLARATION
2648 -- | SINGLE_PROTECTED_DECLARATION
2650 -- Note: aliased is not permitted in Ada 83 mode
2652 -- The N_Object_Declaration node is only for the first two cases.
2653 -- Single task declaration is handled by P_Task (9.1)
2654 -- Single protected declaration is handled by P_protected (9.5)
2656 -- Although the syntax allows multiple identifiers in the list, the
2657 -- semantics is as though successive declarations were given with
2658 -- identical type definition and expression components. To simplify
2659 -- semantic processing, the parser represents a multiple declaration
2660 -- case as a sequence of single declarations, using the More_Ids and
2661 -- Prev_Ids flags to preserve the original source form as described
2662 -- in the section on "Handling of Defining Identifier Lists".
2664 -- The flag Has_Init_Expression is set if an initializing expression
2665 -- is present. Normally it is set if and only if Expression contains
2666 -- a non-empty value, but there is an exception to this. When the
2667 -- initializing expression is an aggregate which requires explicit
2668 -- assignments, the Expression field gets set to Empty, but this flag
2669 -- is still set, so we don't forget we had an initializing expression.
2671 -- Note: if a range check is required for the initialization
2672 -- expression then the Do_Range_Check flag is set in the Expression,
2673 -- with the check being done against the type given by the object
2674 -- definition, which is also the Etype of the defining identifier.
2676 -- Note: the contents of the Expression field must be ignored (i.e.
2677 -- treated as though it were Empty) if No_Initialization is set True.
2679 -- Note: the back end places some restrictions on the form of the
2680 -- Expression field. If the object being declared is Atomic, then
2681 -- the Expression may not have the form of an aggregate (since this
2682 -- might cause the back end to generate separate assignments). In this
2683 -- case the front end must generate an extra temporary and initialize
2684 -- this temporary as required (the temporary itself is not atomic).
2686 -- Note: there is not node kind for object definition. Instead, the
2687 -- corresponding field holds a subtype indication, an array type
2688 -- definition, or (Ada 2005, AI-406) an access definition.
2690 -- N_Object_Declaration
2691 -- Sloc points to first identifier
2692 -- Defining_Identifier (Node1)
2693 -- Aliased_Present (Flag4)
2694 -- Constant_Present (Flag17) set if CONSTANT appears
2695 -- Null_Exclusion_Present (Flag11)
2696 -- Object_Definition (Node4) subtype indic./array type def./access def.
2697 -- Expression (Node3) (set to Empty if not present)
2698 -- Handler_List_Entry (Node2-Sem)
2699 -- Corresponding_Generic_Association (Node5-Sem)
2700 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2701 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2702 -- No_Initialization (Flag13-Sem)
2703 -- Assignment_OK (Flag15-Sem)
2704 -- Exception_Junk (Flag8-Sem)
2705 -- Is_Subprogram_Descriptor (Flag16-Sem)
2706 -- Has_Init_Expression (Flag14)
2707 -- Suppress_Assignment_Checks (Flag18-Sem)
2709 -------------------------------------
2710 -- 3.3.1 Defining Identifier List --
2711 -------------------------------------
2713 -- DEFINING_IDENTIFIER_LIST ::=
2714 -- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
2716 -------------------------------
2717 -- 3.3.2 Number Declaration --
2718 -------------------------------
2720 -- NUMBER_DECLARATION ::=
2721 -- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
2723 -- Although the syntax allows multiple identifiers in the list, the
2724 -- semantics is as though successive declarations were given with
2725 -- identical expressions. To simplify semantic processing, the parser
2726 -- represents a multiple declaration case as a sequence of single
2727 -- declarations, using the More_Ids and Prev_Ids flags to preserve
2728 -- the original source form as described in the section on "Handling
2729 -- of Defining Identifier Lists".
2731 -- N_Number_Declaration
2732 -- Sloc points to first identifier
2733 -- Defining_Identifier (Node1)
2734 -- Expression (Node3)
2735 -- More_Ids (Flag5) (set to False if no more identifiers in list)
2736 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
2738 ----------------------------------
2739 -- 3.4 Derived Type Definition --
2740 ----------------------------------
2742 -- DERIVED_TYPE_DEFINITION ::=
2743 -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
2744 -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
2746 -- Note: ABSTRACT, LIMITED and record extension part are not permitted
2747 -- in Ada 83 mode
2749 -- Note: a record extension part is required if ABSTRACT is present
2751 -- N_Derived_Type_Definition
2752 -- Sloc points to NEW
2753 -- Abstract_Present (Flag4)
2754 -- Null_Exclusion_Present (Flag11) (set to False if not present)
2755 -- Subtype_Indication (Node5)
2756 -- Record_Extension_Part (Node3) (set to Empty if not present)
2757 -- Limited_Present (Flag17)
2758 -- Task_Present (Flag5) set in task interfaces
2759 -- Protected_Present (Flag6) set in protected interfaces
2760 -- Synchronized_Present (Flag7) set in interfaces
2761 -- Interface_List (List2) (set to No_List if none)
2762 -- Interface_Present (Flag16) set in abstract interfaces
2764 -- Note: Task_Present, Protected_Present, Synchronized_Present,
2765 -- Interface_List, and Interface_Present are used for abstract
2766 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
2768 ---------------------------
2769 -- 3.5 Range Constraint --
2770 ---------------------------
2772 -- RANGE_CONSTRAINT ::= range RANGE
2774 -- N_Range_Constraint
2775 -- Sloc points to RANGE
2776 -- Range_Expression (Node4)
2778 ----------------
2779 -- 3.5 Range --
2780 ----------------
2782 -- RANGE ::=
2783 -- RANGE_ATTRIBUTE_REFERENCE
2784 -- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
2786 -- Note: the case of a range given as a range attribute reference
2787 -- appears directly in the tree as an attribute reference.
2789 -- Note: the field name for a reference to a range is Range_Expression
2790 -- rather than Range, because range is a reserved keyword in Ada.
2792 -- Note: the reason that this node has expression fields is that a
2793 -- range can appear as an operand of a membership test. The Etype
2794 -- field is the type of the range (we do NOT construct an implicit
2795 -- subtype to represent the range exactly).
2797 -- N_Range
2798 -- Sloc points to ..
2799 -- Low_Bound (Node1)
2800 -- High_Bound (Node2)
2801 -- Includes_Infinities (Flag11)
2802 -- plus fields for expression
2804 -- Note: if the range appears in a context, such as a subtype
2805 -- declaration, where range checks are required on one or both of
2806 -- the expression fields, then type conversion nodes are inserted
2807 -- to represent the required checks.
2809 ----------------------------------------
2810 -- 3.5.1 Enumeration Type Definition --
2811 ----------------------------------------
2813 -- ENUMERATION_TYPE_DEFINITION ::=
2814 -- (ENUMERATION_LITERAL_SPECIFICATION
2815 -- {, ENUMERATION_LITERAL_SPECIFICATION})
2817 -- Note: the Literals field in the node described below is null for
2818 -- the case of the standard types CHARACTER and WIDE_CHARACTER, for
2819 -- which special processing handles these types as special cases.
2821 -- N_Enumeration_Type_Definition
2822 -- Sloc points to left parenthesis
2823 -- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
2824 -- End_Label (Node4) (set to Empty if internally generated record)
2826 ----------------------------------------------
2827 -- 3.5.1 Enumeration Literal Specification --
2828 ----------------------------------------------
2830 -- ENUMERATION_LITERAL_SPECIFICATION ::=
2831 -- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
2833 ---------------------------------------
2834 -- 3.5.1 Defining Character Literal --
2835 ---------------------------------------
2837 -- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
2839 -- A defining character literal is an entity, which has additional
2840 -- fields depending on the setting of the Ekind field. These
2841 -- additional fields are defined (and access subprograms declared)
2842 -- in package Einfo.
2844 -- Note: N_Defining_Character_Literal is an extended node whose fields
2845 -- are deliberate layed out to match the layout of fields in an ordinary
2846 -- N_Character_Literal node allowing for easy alteration of a character
2847 -- literal node into a defining character literal node. For details, see
2848 -- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
2850 -- N_Defining_Character_Literal
2851 -- Sloc points to literal
2852 -- Chars (Name1) contains the Name_Id for the identifier
2853 -- Next_Entity (Node2-Sem)
2854 -- Scope (Node3-Sem)
2855 -- Etype (Node5-Sem)
2857 ------------------------------------
2858 -- 3.5.4 Integer Type Definition --
2859 ------------------------------------
2861 -- Note: there is an error in this rule in the latest version of the
2862 -- grammar, so we have retained the old rule pending clarification.
2864 -- INTEGER_TYPE_DEFINITION ::=
2865 -- SIGNED_INTEGER_TYPE_DEFINITION
2866 -- | MODULAR_TYPE_DEFINITION
2868 -------------------------------------------
2869 -- 3.5.4 Signed Integer Type Definition --
2870 -------------------------------------------
2872 -- SIGNED_INTEGER_TYPE_DEFINITION ::=
2873 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2875 -- Note: the Low_Bound and High_Bound fields are set to Empty
2876 -- for integer types defined in package Standard.
2878 -- N_Signed_Integer_Type_Definition
2879 -- Sloc points to RANGE
2880 -- Low_Bound (Node1)
2881 -- High_Bound (Node2)
2883 ------------------------------------
2884 -- 3.5.4 Modular Type Definition --
2885 ------------------------------------
2887 -- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
2889 -- N_Modular_Type_Definition
2890 -- Sloc points to MOD
2891 -- Expression (Node3)
2893 ---------------------------------
2894 -- 3.5.6 Real Type Definition --
2895 ---------------------------------
2897 -- REAL_TYPE_DEFINITION ::=
2898 -- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
2900 --------------------------------------
2901 -- 3.5.7 Floating Point Definition --
2902 --------------------------------------
2904 -- FLOATING_POINT_DEFINITION ::=
2905 -- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
2907 -- Note: The Digits_Expression and Real_Range_Specifications fields
2908 -- are set to Empty for floating-point types declared in Standard.
2910 -- N_Floating_Point_Definition
2911 -- Sloc points to DIGITS
2912 -- Digits_Expression (Node2)
2913 -- Real_Range_Specification (Node4) (set to Empty if not present)
2915 -------------------------------------
2916 -- 3.5.7 Real Range Specification --
2917 -------------------------------------
2919 -- REAL_RANGE_SPECIFICATION ::=
2920 -- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
2922 -- N_Real_Range_Specification
2923 -- Sloc points to RANGE
2924 -- Low_Bound (Node1)
2925 -- High_Bound (Node2)
2927 -----------------------------------
2928 -- 3.5.9 Fixed Point Definition --
2929 -----------------------------------
2931 -- FIXED_POINT_DEFINITION ::=
2932 -- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
2934 --------------------------------------------
2935 -- 3.5.9 Ordinary Fixed Point Definition --
2936 --------------------------------------------
2938 -- ORDINARY_FIXED_POINT_DEFINITION ::=
2939 -- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
2941 -- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2943 -- N_Ordinary_Fixed_Point_Definition
2944 -- Sloc points to DELTA
2945 -- Delta_Expression (Node3)
2946 -- Real_Range_Specification (Node4)
2948 -------------------------------------------
2949 -- 3.5.9 Decimal Fixed Point Definition --
2950 -------------------------------------------
2952 -- DECIMAL_FIXED_POINT_DEFINITION ::=
2953 -- delta static_EXPRESSION
2954 -- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
2956 -- Note: decimal types are not permitted in Ada 83 mode
2958 -- N_Decimal_Fixed_Point_Definition
2959 -- Sloc points to DELTA
2960 -- Delta_Expression (Node3)
2961 -- Digits_Expression (Node2)
2962 -- Real_Range_Specification (Node4) (set to Empty if not present)
2964 ------------------------------
2965 -- 3.5.9 Digits Constraint --
2966 ------------------------------
2968 -- DIGITS_CONSTRAINT ::=
2969 -- digits static_EXPRESSION [RANGE_CONSTRAINT]
2971 -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
2972 -- Note: in Ada 95, reduced accuracy subtypes are obsolescent
2974 -- N_Digits_Constraint
2975 -- Sloc points to DIGITS
2976 -- Digits_Expression (Node2)
2977 -- Range_Constraint (Node4) (set to Empty if not present)
2979 --------------------------------
2980 -- 3.6 Array Type Definition --
2981 --------------------------------
2983 -- ARRAY_TYPE_DEFINITION ::=
2984 -- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
2986 -----------------------------------------
2987 -- 3.6 Unconstrained Array Definition --
2988 -----------------------------------------
2990 -- UNCONSTRAINED_ARRAY_DEFINITION ::=
2991 -- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
2992 -- COMPONENT_DEFINITION
2994 -- Note: dimensionality of array is indicated by number of entries in
2995 -- the Subtype_Marks list, which has one entry for each dimension.
2997 -- N_Unconstrained_Array_Definition
2998 -- Sloc points to ARRAY
2999 -- Subtype_Marks (List2)
3000 -- Component_Definition (Node4)
3002 -----------------------------------
3003 -- 3.6 Index Subtype Definition --
3004 -----------------------------------
3006 -- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
3008 -- There is no explicit node in the tree for an index subtype
3009 -- definition since the N_Unconstrained_Array_Definition node
3010 -- incorporates the type marks which appear in this context.
3012 ---------------------------------------
3013 -- 3.6 Constrained Array Definition --
3014 ---------------------------------------
3016 -- CONSTRAINED_ARRAY_DEFINITION ::=
3017 -- array (DISCRETE_SUBTYPE_DEFINITION
3018 -- {, DISCRETE_SUBTYPE_DEFINITION})
3019 -- of COMPONENT_DEFINITION
3021 -- Note: dimensionality of array is indicated by number of entries
3022 -- in the Discrete_Subtype_Definitions list, which has one entry
3023 -- for each dimension.
3025 -- N_Constrained_Array_Definition
3026 -- Sloc points to ARRAY
3027 -- Discrete_Subtype_Definitions (List2)
3028 -- Component_Definition (Node4)
3030 -- Note: although the language allows the full syntax for discrete
3031 -- subtype definitions (i.e. a discrete subtype indication or a range),
3032 -- in the generated tree, we always rewrite these as N_Range nodes.
3034 --------------------------------------
3035 -- 3.6 Discrete Subtype Definition --
3036 --------------------------------------
3038 -- DISCRETE_SUBTYPE_DEFINITION ::=
3039 -- discrete_SUBTYPE_INDICATION | RANGE
3041 -------------------------------
3042 -- 3.6 Component Definition --
3043 -------------------------------
3045 -- COMPONENT_DEFINITION ::=
3046 -- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
3048 -- Note: although the syntax does not permit a component definition to
3049 -- be an anonymous array (and the parser will diagnose such an attempt
3050 -- with an appropriate message), it is possible for anonymous arrays
3051 -- to appear as component definitions. The semantics and back end handle
3052 -- this case properly, and the expander in fact generates such cases.
3053 -- Access_Definition is an optional field that gives support to
3054 -- Ada 2005 (AI-230). The parser generates nodes that have either the
3055 -- Subtype_Indication field or else the Access_Definition field.
3057 -- N_Component_Definition
3058 -- Sloc points to ALIASED, ACCESS or to first token of subtype mark
3059 -- Aliased_Present (Flag4)
3060 -- Null_Exclusion_Present (Flag11)
3061 -- Subtype_Indication (Node5) (set to Empty if not present)
3062 -- Access_Definition (Node3) (set to Empty if not present)
3064 -----------------------------
3065 -- 3.6.1 Index Constraint --
3066 -----------------------------
3068 -- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
3070 -- It is not in general possible to distinguish between discriminant
3071 -- constraints and index constraints at parse time, since a simple
3072 -- name could be either the subtype mark of a discrete range, or an
3073 -- expression in a discriminant association with no name. Either
3074 -- entry appears simply as the name, and the semantic parse must
3075 -- distinguish between the two cases. Thus we use a common tree
3076 -- node format for both of these constraint types.
3078 -- See Discriminant_Constraint for format of node
3080 ---------------------------
3081 -- 3.6.1 Discrete Range --
3082 ---------------------------
3084 -- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
3086 ----------------------------
3087 -- 3.7 Discriminant Part --
3088 ----------------------------
3090 -- DISCRIMINANT_PART ::=
3091 -- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
3093 ------------------------------------
3094 -- 3.7 Unknown Discriminant Part --
3095 ------------------------------------
3097 -- UNKNOWN_DISCRIMINANT_PART ::= (<>)
3099 -- Note: unknown discriminant parts are not permitted in Ada 83 mode
3101 -- There is no explicit node in the tree for an unknown discriminant
3102 -- part. Instead the Unknown_Discriminants_Present flag is set in the
3103 -- parent node.
3105 ----------------------------------
3106 -- 3.7 Known Discriminant Part --
3107 ----------------------------------
3109 -- KNOWN_DISCRIMINANT_PART ::=
3110 -- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
3112 -------------------------------------
3113 -- 3.7 Discriminant Specification --
3114 -------------------------------------
3116 -- DISCRIMINANT_SPECIFICATION ::=
3117 -- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
3118 -- [:= DEFAULT_EXPRESSION]
3119 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
3120 -- [:= DEFAULT_EXPRESSION]
3122 -- Although the syntax allows multiple identifiers in the list, the
3123 -- semantics is as though successive specifications were given with
3124 -- identical type definition and expression components. To simplify
3125 -- semantic processing, the parser represents a multiple declaration
3126 -- case as a sequence of single specifications, using the More_Ids and
3127 -- Prev_Ids flags to preserve the original source form as described
3128 -- in the section on "Handling of Defining Identifier Lists".
3130 -- N_Discriminant_Specification
3131 -- Sloc points to first identifier
3132 -- Defining_Identifier (Node1)
3133 -- Null_Exclusion_Present (Flag11)
3134 -- Discriminant_Type (Node5) subtype mark or access parameter definition
3135 -- Expression (Node3) (set to Empty if no default expression)
3136 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3137 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3139 -----------------------------
3140 -- 3.7 Default Expression --
3141 -----------------------------
3143 -- DEFAULT_EXPRESSION ::= EXPRESSION
3145 ------------------------------------
3146 -- 3.7.1 Discriminant Constraint --
3147 ------------------------------------
3149 -- DISCRIMINANT_CONSTRAINT ::=
3150 -- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
3152 -- It is not in general possible to distinguish between discriminant
3153 -- constraints and index constraints at parse time, since a simple
3154 -- name could be either the subtype mark of a discrete range, or an
3155 -- expression in a discriminant association with no name. Either
3156 -- entry appears simply as the name, and the semantic parse must
3157 -- distinguish between the two cases. Thus we use a common tree
3158 -- node format for both of these constraint types.
3160 -- N_Index_Or_Discriminant_Constraint
3161 -- Sloc points to left paren
3162 -- Constraints (List1) points to list of discrete ranges or
3163 -- discriminant associations
3165 -------------------------------------
3166 -- 3.7.1 Discriminant Association --
3167 -------------------------------------
3169 -- DISCRIMINANT_ASSOCIATION ::=
3170 -- [discriminant_SELECTOR_NAME
3171 -- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
3173 -- Note: a discriminant association that has no selector name list
3174 -- appears directly as an expression in the tree.
3176 -- N_Discriminant_Association
3177 -- Sloc points to first token of discriminant association
3178 -- Selector_Names (List1) (always non-empty, since if no selector
3179 -- names are present, this node is not used, see comment above)
3180 -- Expression (Node3)
3182 ---------------------------------
3183 -- 3.8 Record Type Definition --
3184 ---------------------------------
3186 -- RECORD_TYPE_DEFINITION ::=
3187 -- [[abstract] tagged] [limited] RECORD_DEFINITION
3189 -- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
3191 -- There is no explicit node in the tree for a record type definition.
3192 -- Instead the flags for Tagged_Present and Limited_Present appear in
3193 -- the N_Record_Definition node for a record definition appearing in
3194 -- the context of a record type definition.
3196 ----------------------------
3197 -- 3.8 Record Definition --
3198 ----------------------------
3200 -- RECORD_DEFINITION ::=
3201 -- record
3202 -- COMPONENT_LIST
3203 -- end record
3204 -- | null record
3206 -- Note: the Abstract_Present, Tagged_Present and Limited_Present
3207 -- flags appear only for a record definition appearing in a record
3208 -- type definition.
3210 -- Note: the NULL RECORD case is not permitted in Ada 83
3212 -- N_Record_Definition
3213 -- Sloc points to RECORD or NULL
3214 -- End_Label (Node4) (set to Empty if internally generated record)
3215 -- Abstract_Present (Flag4)
3216 -- Tagged_Present (Flag15)
3217 -- Limited_Present (Flag17)
3218 -- Component_List (Node1) empty in null record case
3219 -- Null_Present (Flag13) set in null record case
3220 -- Task_Present (Flag5) set in task interfaces
3221 -- Protected_Present (Flag6) set in protected interfaces
3222 -- Synchronized_Present (Flag7) set in interfaces
3223 -- Interface_Present (Flag16) set in abstract interfaces
3224 -- Interface_List (List2) (set to No_List if none)
3226 -- Note: Task_Present, Protected_Present, Synchronized _Present,
3227 -- Interface_List and Interface_Present are used for abstract
3228 -- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
3230 -------------------------
3231 -- 3.8 Component List --
3232 -------------------------
3234 -- COMPONENT_LIST ::=
3235 -- COMPONENT_ITEM {COMPONENT_ITEM}
3236 -- | {COMPONENT_ITEM} VARIANT_PART
3237 -- | null;
3239 -- N_Component_List
3240 -- Sloc points to first token of component list
3241 -- Component_Items (List3)
3242 -- Variant_Part (Node4) (set to Empty if no variant part)
3243 -- Null_Present (Flag13)
3245 -------------------------
3246 -- 3.8 Component Item --
3247 -------------------------
3249 -- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
3251 -- Note: A component item can also be a pragma, and in the tree
3252 -- that is obtained after semantic processing, a component item
3253 -- can be an N_Null node resulting from a non-recognized pragma.
3255 --------------------------------
3256 -- 3.8 Component Declaration --
3257 --------------------------------
3259 -- COMPONENT_DECLARATION ::=
3260 -- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
3261 -- [:= DEFAULT_EXPRESSION]
3262 -- [ASPECT_SPECIFICATIONS];
3264 -- Note: although the syntax does not permit a component definition to
3265 -- be an anonymous array (and the parser will diagnose such an attempt
3266 -- with an appropriate message), it is possible for anonymous arrays
3267 -- to appear as component definitions. The semantics and back end handle
3268 -- this case properly, and the expander in fact generates such cases.
3270 -- Although the syntax allows multiple identifiers in the list, the
3271 -- semantics is as though successive declarations were given with the
3272 -- same component definition and expression components. To simplify
3273 -- semantic processing, the parser represents a multiple declaration
3274 -- case as a sequence of single declarations, using the More_Ids and
3275 -- Prev_Ids flags to preserve the original source form as described
3276 -- in the section on "Handling of Defining Identifier Lists".
3278 -- N_Component_Declaration
3279 -- Sloc points to first identifier
3280 -- Defining_Identifier (Node1)
3281 -- Component_Definition (Node4)
3282 -- Expression (Node3) (set to Empty if no default expression)
3283 -- More_Ids (Flag5) (set to False if no more identifiers in list)
3284 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
3286 -------------------------
3287 -- 3.8.1 Variant Part --
3288 -------------------------
3290 -- VARIANT_PART ::=
3291 -- case discriminant_DIRECT_NAME is
3292 -- VARIANT {VARIANT}
3293 -- end case;
3295 -- Note: the variants list can contain pragmas as well as variants.
3296 -- In a properly formed program there is at least one variant.
3298 -- N_Variant_Part
3299 -- Sloc points to CASE
3300 -- Name (Node2)
3301 -- Variants (List1)
3303 --------------------
3304 -- 3.8.1 Variant --
3305 --------------------
3307 -- VARIANT ::=
3308 -- when DISCRETE_CHOICE_LIST =>
3309 -- COMPONENT_LIST
3311 -- N_Variant
3312 -- Sloc points to WHEN
3313 -- Discrete_Choices (List4)
3314 -- Component_List (Node1)
3315 -- Enclosing_Variant (Node2-Sem)
3316 -- Present_Expr (Uint3-Sem)
3317 -- Dcheck_Function (Node5-Sem)
3318 -- Has_SP_Choice (Flag15-Sem)
3320 -- Note: in the list of Discrete_Choices, the tree passed to the back
3321 -- end does not have choice entries corresponding to names of statically
3322 -- predicated subtypes. Such entries are always expanded out to the list
3323 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
3324 -- mode also has this expansion, but done with a proper Rewrite call on
3325 -- the N_Variant node so that ASIS can properly retrieve the original.
3327 ---------------------------------
3328 -- 3.8.1 Discrete Choice List --
3329 ---------------------------------
3331 -- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
3333 ----------------------------
3334 -- 3.8.1 Discrete Choice --
3335 ----------------------------
3337 -- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
3339 -- Note: in Ada 83 mode, the expression must be a simple expression
3341 -- The only choice that appears explicitly is the OTHERS choice, as
3342 -- defined here. Other cases of discrete choice (expression and
3343 -- discrete range) appear directly. This production is also used
3344 -- for the OTHERS possibility of an exception choice.
3346 -- Note: in accordance with the syntax, the parser does not check that
3347 -- OTHERS appears at the end on its own in a choice list context. This
3348 -- is a semantic check.
3350 -- N_Others_Choice
3351 -- Sloc points to OTHERS
3352 -- Others_Discrete_Choices (List1-Sem)
3353 -- All_Others (Flag11-Sem)
3355 ----------------------------------
3356 -- 3.9.1 Record Extension Part --
3357 ----------------------------------
3359 -- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
3361 -- Note: record extension parts are not permitted in Ada 83 mode
3363 --------------------------------------
3364 -- 3.9.4 Interface Type Definition --
3365 --------------------------------------
3367 -- INTERFACE_TYPE_DEFINITION ::=
3368 -- [limited | task | protected | synchronized]
3369 -- interface [interface_list]
3371 -- Note: Interfaces are implemented with N_Record_Definition and
3372 -- N_Derived_Type_Definition nodes because most of the support
3373 -- for the analysis of abstract types has been reused to
3374 -- analyze abstract interfaces.
3376 ----------------------------------
3377 -- 3.10 Access Type Definition --
3378 ----------------------------------
3380 -- ACCESS_TYPE_DEFINITION ::=
3381 -- ACCESS_TO_OBJECT_DEFINITION
3382 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3384 --------------------------
3385 -- 3.10 Null Exclusion --
3386 --------------------------
3388 -- NULL_EXCLUSION ::= not null
3390 ---------------------------------------
3391 -- 3.10 Access To Object Definition --
3392 ---------------------------------------
3394 -- ACCESS_TO_OBJECT_DEFINITION ::=
3395 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
3396 -- SUBTYPE_INDICATION
3398 -- N_Access_To_Object_Definition
3399 -- Sloc points to ACCESS
3400 -- All_Present (Flag15)
3401 -- Null_Exclusion_Present (Flag11)
3402 -- Null_Excluding_Subtype (Flag16)
3403 -- Subtype_Indication (Node5)
3404 -- Constant_Present (Flag17)
3406 -----------------------------------
3407 -- 3.10 General Access Modifier --
3408 -----------------------------------
3410 -- GENERAL_ACCESS_MODIFIER ::= all | constant
3412 -- Note: general access modifiers are not permitted in Ada 83 mode
3414 -- There is no explicit node in the tree for general access modifier.
3415 -- Instead the All_Present or Constant_Present flags are set in the
3416 -- parent node.
3418 -------------------------------------------
3419 -- 3.10 Access To Subprogram Definition --
3420 -------------------------------------------
3422 -- ACCESS_TO_SUBPROGRAM_DEFINITION
3423 -- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
3424 -- | [NULL_EXCLUSION] access [protected] function
3425 -- PARAMETER_AND_RESULT_PROFILE
3427 -- Note: access to subprograms are not permitted in Ada 83 mode
3429 -- N_Access_Function_Definition
3430 -- Sloc points to ACCESS
3431 -- Null_Exclusion_Present (Flag11)
3432 -- Null_Exclusion_In_Return_Present (Flag14)
3433 -- Protected_Present (Flag6)
3434 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3435 -- Result_Definition (Node4) result subtype (subtype mark or access def)
3437 -- N_Access_Procedure_Definition
3438 -- Sloc points to ACCESS
3439 -- Null_Exclusion_Present (Flag11)
3440 -- Protected_Present (Flag6)
3441 -- Parameter_Specifications (List3) (set to No_List if no formal part)
3443 -----------------------------
3444 -- 3.10 Access Definition --
3445 -----------------------------
3447 -- ACCESS_DEFINITION ::=
3448 -- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
3449 -- | ACCESS_TO_SUBPROGRAM_DEFINITION
3451 -- Note: access to subprograms are an Ada 2005 (AI-254) extension
3453 -- N_Access_Definition
3454 -- Sloc points to ACCESS
3455 -- Null_Exclusion_Present (Flag11)
3456 -- All_Present (Flag15)
3457 -- Constant_Present (Flag17)
3458 -- Subtype_Mark (Node4)
3459 -- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
3461 -----------------------------------------
3462 -- 3.10.1 Incomplete Type Declaration --
3463 -----------------------------------------
3465 -- INCOMPLETE_TYPE_DECLARATION ::=
3466 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
3468 -- N_Incomplete_Type_Declaration
3469 -- Sloc points to TYPE
3470 -- Defining_Identifier (Node1)
3471 -- Discriminant_Specifications (List4) (set to No_List if no
3472 -- discriminant part, or if the discriminant part is an
3473 -- unknown discriminant part)
3474 -- Premature_Use (Node5-Sem) used for improved diagnostics.
3475 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
3476 -- Tagged_Present (Flag15)
3478 ----------------------------
3479 -- 3.11 Declarative Part --
3480 ----------------------------
3482 -- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
3484 -- Note: although the parser enforces the syntactic requirement that
3485 -- a declarative part can contain only declarations, the semantic
3486 -- processing may add statements to the list of actions in a
3487 -- declarative part, so the code generator should be prepared
3488 -- to accept a statement in this position.
3490 ----------------------------
3491 -- 3.11 Declarative Item --
3492 ----------------------------
3494 -- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
3496 ----------------------------------
3497 -- 3.11 Basic Declarative Item --
3498 ----------------------------------
3500 -- BASIC_DECLARATIVE_ITEM ::=
3501 -- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
3503 ----------------
3504 -- 3.11 Body --
3505 ----------------
3507 -- BODY ::= PROPER_BODY | BODY_STUB
3509 -----------------------
3510 -- 3.11 Proper Body --
3511 -----------------------
3513 -- PROPER_BODY ::=
3514 -- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
3516 ---------------
3517 -- 4.1 Name --
3518 ---------------
3520 -- NAME ::=
3521 -- DIRECT_NAME | EXPLICIT_DEREFERENCE
3522 -- | INDEXED_COMPONENT | SLICE
3523 -- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
3524 -- | TYPE_CONVERSION | FUNCTION_CALL
3525 -- | CHARACTER_LITERAL
3527 ----------------------
3528 -- 4.1 Direct Name --
3529 ----------------------
3531 -- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
3533 -----------------
3534 -- 4.1 Prefix --
3535 -----------------
3537 -- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
3539 -------------------------------
3540 -- 4.1 Explicit Dereference --
3541 -------------------------------
3543 -- EXPLICIT_DEREFERENCE ::= NAME . all
3545 -- N_Explicit_Dereference
3546 -- Sloc points to ALL
3547 -- Prefix (Node3)
3548 -- Actual_Designated_Subtype (Node4-Sem)
3549 -- Atomic_Sync_Required (Flag14-Sem)
3550 -- Has_Dereference_Action (Flag13-Sem)
3551 -- plus fields for expression
3553 -------------------------------
3554 -- 4.1 Implicit Dereference --
3555 -------------------------------
3557 -- IMPLICIT_DEREFERENCE ::= NAME
3559 ------------------------------
3560 -- 4.1.1 Indexed Component --
3561 ------------------------------
3563 -- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
3565 -- Note: the parser may generate this node in some situations where it
3566 -- should be a function call. The semantic pass must correct this
3567 -- misidentification (which is inevitable at the parser level).
3569 -- N_Indexed_Component
3570 -- Sloc contains a copy of the Sloc value of the Prefix
3571 -- Prefix (Node3)
3572 -- Expressions (List1)
3573 -- Generalized_Indexing (Node4-Sem)
3574 -- Atomic_Sync_Required (Flag14-Sem)
3575 -- plus fields for expression
3577 -- Note: if any of the subscripts requires a range check, then the
3578 -- Do_Range_Check flag is set on the corresponding expression, with
3579 -- the index type being determined from the type of the Prefix, which
3580 -- references the array being indexed.
3582 -- Note: in a fully analyzed and expanded indexed component node, and
3583 -- hence in any such node that gigi sees, if the prefix is an access
3584 -- type, then an explicit dereference operation has been inserted.
3586 ------------------
3587 -- 4.1.2 Slice --
3588 ------------------
3590 -- SLICE ::= PREFIX (DISCRETE_RANGE)
3592 -- Note: an implicit subtype is created to describe the resulting
3593 -- type, so that the bounds of this type are the bounds of the slice.
3595 -- N_Slice
3596 -- Sloc points to first token of prefix
3597 -- Prefix (Node3)
3598 -- Discrete_Range (Node4)
3599 -- plus fields for expression
3601 -------------------------------
3602 -- 4.1.3 Selected Component --
3603 -------------------------------
3605 -- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
3607 -- Note: selected components that are semantically expanded names get
3608 -- changed during semantic processing into the separate N_Expanded_Name
3609 -- node. See description of this node in the section on semantic nodes.
3611 -- N_Selected_Component
3612 -- Sloc points to period
3613 -- Prefix (Node3)
3614 -- Selector_Name (Node2)
3615 -- Associated_Node (Node4-Sem)
3616 -- Do_Discriminant_Check (Flag1-Sem)
3617 -- Is_In_Discriminant_Check (Flag11-Sem)
3618 -- Is_Prefixed_Call (Flag17-Sem)
3619 -- Atomic_Sync_Required (Flag14-Sem)
3620 -- plus fields for expression
3622 --------------------------
3623 -- 4.1.3 Selector Name --
3624 --------------------------
3626 -- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
3628 --------------------------------
3629 -- 4.1.4 Attribute Reference --
3630 --------------------------------
3632 -- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
3634 -- Note: the syntax is quite ambiguous at this point. Consider:
3636 -- A'Length (X) X is part of the attribute designator
3637 -- A'Pos (X) X is an explicit actual parameter of function A'Pos
3638 -- A'Class (X) X is the expression of a type conversion
3640 -- It would be possible for the parser to distinguish these cases
3641 -- by looking at the attribute identifier. However, that would mean
3642 -- more work in introducing new implementation defined attributes,
3643 -- and also it would mean that special processing for attributes
3644 -- would be scattered around, instead of being centralized in the
3645 -- semantic routine that handles an N_Attribute_Reference node.
3646 -- Consequently, the parser in all the above cases stores the
3647 -- expression (X in these examples) as a single element list in
3648 -- in the Expressions field of the N_Attribute_Reference node.
3650 -- Similarly, for attributes like Max which take two arguments,
3651 -- we store the two arguments as a two element list in the
3652 -- Expressions field. Of course it is clear at parse time that
3653 -- this case is really a function call with an attribute as the
3654 -- prefix, but it turns out to be convenient to handle the two
3655 -- argument case in a similar manner to the one argument case,
3656 -- and indeed in general the parser will accept any number of
3657 -- expressions in this position and store them as a list in the
3658 -- attribute reference node. This allows for future addition of
3659 -- attributes that take more than two arguments.
3661 -- Note: named associates are not permitted in function calls where
3662 -- the function is an attribute (see RM 6.4(3)) so it is legitimate
3663 -- to skip the normal subprogram argument processing.
3665 -- Note: for the attributes whose designators are technically keywords,
3666 -- i.e. digits, access, delta, range, the Attribute_Name field contains
3667 -- the corresponding name, even though no identifier is involved.
3669 -- Note: the generated code may contain stream attributes applied to
3670 -- limited types for which no stream routines exist officially. In such
3671 -- case, the result is to use the stream attribute for the underlying
3672 -- full type, or in the case of a protected type, the components
3673 -- (including any discriminants) are merely streamed in order.
3675 -- See Exp_Attr for a complete description of which attributes are
3676 -- passed onto Gigi, and which are handled entirely by the front end.
3678 -- Gigi restriction: For the Pos attribute, the prefix cannot be
3679 -- a non-standard enumeration type or a nonzero/zero semantics
3680 -- boolean type, so the value is simply the stored representation.
3682 -- Gigi requirement: For the Mechanism_Code attribute, if the prefix
3683 -- references a subprogram that is a renaming, then the front end must
3684 -- rewrite the attribute to refer directly to the renamed entity.
3686 -- Note: syntactically the prefix of an attribute reference must be a
3687 -- name, and this (somewhat artificial) requirement is enforced by the
3688 -- parser. However, for many attributes, such as 'Valid, it is quite
3689 -- reasonable to apply the attribute to any value, and hence to any
3690 -- expression. Internally in the tree, the prefix is an expression which
3691 -- does not have to be a name, and this is handled fine by the semantic
3692 -- analysis and expansion, and back ends. This arises for the case of
3693 -- attribute references built by the expander (e.g. 'Valid for the case
3694 -- of an implicit validity check).
3696 -- Note: In generated code, the Address and Unrestricted_Access
3697 -- attributes can be applied to any expression, and the meaning is
3698 -- to create an object containing the value (the object is in the
3699 -- current stack frame), and pass the address of this value. If the
3700 -- Must_Be_Byte_Aligned flag is set, then the object whose address
3701 -- is taken must be on a byte (storage unit) boundary, and if it is
3702 -- not (or may not be), then the generated code must create a copy
3703 -- that is byte aligned, and pass the address of this copy.
3705 -- N_Attribute_Reference
3706 -- Sloc points to apostrophe
3707 -- Prefix (Node3) (general expression, see note above)
3708 -- Attribute_Name (Name2) identifier name from attribute designator
3709 -- Expressions (List1) (set to No_List if no associated expressions)
3710 -- Entity (Node4-Sem) used if the attribute yields a type
3711 -- Associated_Node (Node4-Sem)
3712 -- Do_Overflow_Check (Flag17-Sem)
3713 -- Header_Size_Added (Flag11-Sem)
3714 -- Must_Be_Byte_Aligned (Flag14-Sem)
3715 -- Non_Aliased_Prefix (Flag18-Sem)
3716 -- Redundant_Use (Flag13-Sem)
3718 -- plus fields for expression
3720 -- Note: in Modify_Tree_For_C mode, Max and Min attributes are expanded
3721 -- into equivalent if expressions, properly taking care of side effects.
3723 ---------------------------------
3724 -- 4.1.4 Attribute Designator --
3725 ---------------------------------
3727 -- ATTRIBUTE_DESIGNATOR ::=
3728 -- IDENTIFIER [(static_EXPRESSION)]
3729 -- | access | delta | digits
3731 -- There is no explicit node in the tree for an attribute designator.
3732 -- Instead the Attribute_Name and Expressions fields of the parent
3733 -- node (N_Attribute_Reference node) hold the information.
3735 -- Note: if ACCESS, DELTA or DIGITS appears in an attribute
3736 -- designator, then they are treated as identifiers internally
3737 -- rather than the keywords of the same name.
3739 --------------------------------------
3740 -- 4.1.4 Range Attribute Reference --
3741 --------------------------------------
3743 -- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
3745 -- A range attribute reference is represented in the tree using the
3746 -- normal N_Attribute_Reference node.
3748 ---------------------------------------
3749 -- 4.1.4 Range Attribute Designator --
3750 ---------------------------------------
3752 -- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
3754 -- A range attribute designator is represented in the tree using the
3755 -- normal N_Attribute_Reference node.
3757 --------------------
3758 -- 4.3 Aggregate --
3759 --------------------
3761 -- AGGREGATE ::=
3762 -- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
3764 -----------------------------
3765 -- 4.3.1 Record Aggregate --
3766 -----------------------------
3768 -- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
3770 -- N_Aggregate
3771 -- Sloc points to left parenthesis
3772 -- Expressions (List1) (set to No_List if none or null record case)
3773 -- Component_Associations (List2) (set to No_List if none)
3774 -- Null_Record_Present (Flag17)
3775 -- Aggregate_Bounds (Node3-Sem)
3776 -- Associated_Node (Node4-Sem)
3777 -- Compile_Time_Known_Aggregate (Flag18-Sem)
3778 -- Expansion_Delayed (Flag11-Sem)
3779 -- Has_Self_Reference (Flag13-Sem)
3780 -- plus fields for expression
3782 -- Note: this structure is used for both record and array aggregates
3783 -- since the two cases are not separable by the parser. The parser
3784 -- makes no attempt to enforce consistency here, so it is up to the
3785 -- semantic phase to make sure that the aggregate is consistent (i.e.
3786 -- that it is not a "half-and-half" case that mixes record and array
3787 -- syntax. In particular, for a record aggregate, the expressions
3788 -- field will be set if there are positional associations.
3790 -- Note: N_Aggregate is not used for all aggregates; in particular,
3791 -- there is a separate node kind for extension aggregates.
3793 -- Note: gigi/gcc can handle array aggregates correctly providing that
3794 -- they are entirely positional, and the array subtype involved has a
3795 -- known at compile time length and is not bit packed, or a convention
3796 -- Fortran array with more than one dimension. If these conditions
3797 -- are not met, then the front end must translate the aggregate into
3798 -- an appropriate set of assignments into a temporary.
3800 -- Note: for the record aggregate case, gigi/gcc can handle most cases
3801 -- of record aggregates, including those for packed, and rep-claused
3802 -- records, and also variant records, providing that there are no
3803 -- variable length fields whose size is not known at compile time,
3804 -- and providing that the aggregate is presented in fully named form.
3806 -- The other situation in which array aggregates and record aggregates
3807 -- cannot be passed to the back end is if assignment to one or more
3808 -- components itself needs expansion, e.g. in the case of an assignment
3809 -- of an object of a controlled type. In such cases, the front end
3810 -- must expand the aggregate to a series of assignments, and apply
3811 -- the required expansion to the individual assignment statements.
3813 ----------------------------------------------
3814 -- 4.3.1 Record Component Association List --
3815 ----------------------------------------------
3817 -- RECORD_COMPONENT_ASSOCIATION_LIST ::=
3818 -- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
3819 -- | null record
3821 -- There is no explicit node in the tree for a record component
3822 -- association list. Instead the Null_Record_Present flag is set in
3823 -- the parent node for the NULL RECORD case.
3825 ------------------------------------------------------
3826 -- 4.3.1 Record Component Association (also 4.3.3) --
3827 ------------------------------------------------------
3829 -- RECORD_COMPONENT_ASSOCIATION ::=
3830 -- [COMPONENT_CHOICE_LIST =>] EXPRESSION
3832 -- N_Component_Association
3833 -- Sloc points to first selector name
3834 -- Choices (List1)
3835 -- Loop_Actions (List2-Sem)
3836 -- Expression (Node3) (empty if Box_Present)
3837 -- Box_Present (Flag15)
3838 -- Inherited_Discriminant (Flag13)
3840 -- Note: this structure is used for both record component associations
3841 -- and array component associations, since the two cases aren't always
3842 -- separable by the parser. The choices list may represent either a
3843 -- list of selector names in the record aggregate case, or a list of
3844 -- discrete choices in the array aggregate case or an N_Others_Choice
3845 -- node (which appears as a singleton list). Box_Present gives support
3846 -- to Ada 2005 (AI-287).
3848 ----------------------------------
3849 -- 4.3.1 Component Choice List --
3850 ----------------------------------
3852 -- COMPONENT_CHOICE_LIST ::=
3853 -- component_SELECTOR_NAME {| component_SELECTOR_NAME}
3854 -- | others
3856 -- The entries of a component choice list appear in the Choices list of
3857 -- the associated N_Component_Association, as either selector names, or
3858 -- as an N_Others_Choice node.
3860 --------------------------------
3861 -- 4.3.2 Extension Aggregate --
3862 --------------------------------
3864 -- EXTENSION_AGGREGATE ::=
3865 -- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
3867 -- Note: extension aggregates are not permitted in Ada 83 mode
3869 -- N_Extension_Aggregate
3870 -- Sloc points to left parenthesis
3871 -- Ancestor_Part (Node3)
3872 -- Associated_Node (Node4-Sem)
3873 -- Expressions (List1) (set to No_List if none or null record case)
3874 -- Component_Associations (List2) (set to No_List if none)
3875 -- Null_Record_Present (Flag17)
3876 -- Expansion_Delayed (Flag11-Sem)
3877 -- Has_Self_Reference (Flag13-Sem)
3878 -- plus fields for expression
3880 --------------------------
3881 -- 4.3.2 Ancestor Part --
3882 --------------------------
3884 -- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
3886 ----------------------------
3887 -- 4.3.3 Array Aggregate --
3888 ----------------------------
3890 -- ARRAY_AGGREGATE ::=
3891 -- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
3893 ---------------------------------------
3894 -- 4.3.3 Positional Array Aggregate --
3895 ---------------------------------------
3897 -- POSITIONAL_ARRAY_AGGREGATE ::=
3898 -- (EXPRESSION, EXPRESSION {, EXPRESSION})
3899 -- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
3901 -- See Record_Aggregate (4.3.1) for node structure
3903 ----------------------------------
3904 -- 4.3.3 Named Array Aggregate --
3905 ----------------------------------
3907 -- NAMED_ARRAY_AGGREGATE ::=
3908 -- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
3910 -- See Record_Aggregate (4.3.1) for node structure
3912 ----------------------------------------
3913 -- 4.3.3 Array Component Association --
3914 ----------------------------------------
3916 -- ARRAY_COMPONENT_ASSOCIATION ::=
3917 -- DISCRETE_CHOICE_LIST => EXPRESSION
3919 -- See Record_Component_Association (4.3.1) for node structure
3921 --------------------------------------------------
3922 -- 4.4 Expression/Relation/Term/Factor/Primary --
3923 --------------------------------------------------
3925 -- EXPRESSION ::=
3926 -- RELATION {LOGICAL_OPERATOR RELATION}
3928 -- CHOICE_EXPRESSION ::=
3929 -- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
3931 -- CHOICE_RELATION ::=
3932 -- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
3934 -- RELATION ::=
3935 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
3936 -- | RAISE_EXPRESSION
3938 -- MEMBERSHIP_CHOICE_LIST ::=
3939 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
3941 -- MEMBERSHIP_CHOICE ::=
3942 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
3944 -- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
3946 -- SIMPLE_EXPRESSION ::=
3947 -- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
3949 -- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
3951 -- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
3953 -- No nodes are generated for any of these constructs. Instead, the
3954 -- node for the operator appears directly. When we refer to an
3955 -- expression in this description, we mean any of the possible
3956 -- constituent components of an expression (e.g. identifier is
3957 -- an example of an expression).
3959 -- Note: the above syntax is that Ada 2012 syntax which restricts
3960 -- choice relations to simple expressions to avoid ambiguities in
3961 -- some contexts with set membership notation. It has been decided
3962 -- that in retrospect, the Ada 95 change allowing general expressions
3963 -- in this context was a mistake, so we have reverted to the above
3964 -- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
3965 -- expressions was there in Ada 83 from the start).
3967 ------------------
3968 -- 4.4 Primary --
3969 ------------------
3971 -- PRIMARY ::=
3972 -- NUMERIC_LITERAL | null
3973 -- | STRING_LITERAL | AGGREGATE
3974 -- | NAME | QUALIFIED_EXPRESSION
3975 -- | ALLOCATOR | (EXPRESSION)
3977 -- Usually there is no explicit node in the tree for primary. Instead
3978 -- the constituent (e.g. AGGREGATE) appears directly. There are two
3979 -- exceptions. First, there is an explicit node for a null primary.
3981 -- N_Null
3982 -- Sloc points to NULL
3983 -- plus fields for expression
3985 -- Second, the case of (EXPRESSION) is handled specially. Ada requires
3986 -- that the parser keep track of which subexpressions are enclosed
3987 -- in parentheses, and how many levels of parentheses are used. This
3988 -- information is required for optimization purposes, and also for
3989 -- some semantic checks (e.g. (((1))) in a procedure spec does not
3990 -- conform with ((((1)))) in the body).
3992 -- The parentheses are recorded by keeping a Paren_Count field in every
3993 -- subexpression node (it is actually present in all nodes, but only
3994 -- used in subexpression nodes). This count records the number of
3995 -- levels of parentheses. If the number of levels in the source exceeds
3996 -- the maximum accommodated by this count, then the count is simply left
3997 -- at the maximum value. This means that there are some pathological
3998 -- cases of failure to detect conformance failures (e.g. an expression
3999 -- with 500 levels of parens will conform with one with 501 levels),
4000 -- but we do not need to lose sleep over this.
4002 -- Historical note: in versions of GNAT prior to 1.75, there was a node
4003 -- type N_Parenthesized_Expression used to accurately record unlimited
4004 -- numbers of levels of parentheses. However, it turned out to be a
4005 -- real nuisance to have to take into account the possible presence of
4006 -- this node during semantic analysis, since basically parentheses have
4007 -- zero relevance to semantic analysis.
4009 -- Note: the level of parentheses always present in things like
4010 -- aggregates does not count, only the parentheses in the primary
4011 -- (EXPRESSION) affect the setting of the Paren_Count field.
4013 -- 2nd Note: the contents of the Expression field must be ignored (i.e.
4014 -- treated as though it were Empty) if No_Initialization is set True.
4016 --------------------------------------
4017 -- 4.5 Short Circuit Control Forms --
4018 --------------------------------------
4020 -- EXPRESSION ::=
4021 -- RELATION {and then RELATION} | RELATION {or else RELATION}
4023 -- Gigi restriction: For both these control forms, the operand and
4024 -- result types are always Standard.Boolean. The expander inserts the
4025 -- required conversion operations where needed to ensure this is the
4026 -- case.
4028 -- N_And_Then
4029 -- Sloc points to AND of AND THEN
4030 -- Left_Opnd (Node2)
4031 -- Right_Opnd (Node3)
4032 -- Actions (List1-Sem)
4033 -- plus fields for expression
4035 -- N_Or_Else
4036 -- Sloc points to OR of OR ELSE
4037 -- Left_Opnd (Node2)
4038 -- Right_Opnd (Node3)
4039 -- Actions (List1-Sem)
4040 -- plus fields for expression
4042 -- Note: The Actions field is used to hold actions associated with
4043 -- the right hand operand. These have to be treated specially since
4044 -- they are not unconditionally executed. See Insert_Actions for a
4045 -- more detailed description of how these actions are handled.
4047 ---------------------------
4048 -- 4.5 Membership Tests --
4049 ---------------------------
4051 -- RELATION ::=
4052 -- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
4054 -- MEMBERSHIP_CHOICE_LIST ::=
4055 -- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
4057 -- MEMBERSHIP_CHOICE ::=
4058 -- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
4060 -- Note: although the grammar above allows only a range or a subtype
4061 -- mark, the parser in fact will accept any simple expression in place
4062 -- of a subtype mark. This means that the semantic analyzer must be able
4063 -- to deal with, and diagnose a simple expression other than a name for
4064 -- the right operand. This simplifies error recovery in the parser.
4066 -- The Alternatives field below is present only if there is more than
4067 -- one Membership_Choice present (which is legitimate only in Ada 2012
4068 -- mode) in which case Right_Opnd is Empty, and Alternatives contains
4069 -- the list of choices. In the tree passed to the back end, Alternatives
4070 -- is always No_List, and Right_Opnd is set (i.e. the expansion circuit
4071 -- expands out the complex set membership case using simple membership
4072 -- and equality operations).
4074 -- Should we rename Alternatives here to Membership_Choices ???
4076 -- N_In
4077 -- Sloc points to IN
4078 -- Left_Opnd (Node2)
4079 -- Right_Opnd (Node3)
4080 -- Alternatives (List4) (set to No_List if only one set alternative)
4081 -- No_Minimize_Eliminate (Flag17)
4082 -- plus fields for expression
4084 -- N_Not_In
4085 -- Sloc points to NOT of NOT IN
4086 -- Left_Opnd (Node2)
4087 -- Right_Opnd (Node3)
4088 -- Alternatives (List4) (set to No_List if only one set alternative)
4089 -- No_Minimize_Eliminate (Flag17)
4090 -- plus fields for expression
4092 --------------------
4093 -- 4.5 Operators --
4094 --------------------
4096 -- LOGICAL_OPERATOR ::= and | or | xor
4098 -- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
4100 -- BINARY_ADDING_OPERATOR ::= + | - | &
4102 -- UNARY_ADDING_OPERATOR ::= + | -
4104 -- MULTIPLYING_OPERATOR ::= * | / | mod | rem
4106 -- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
4108 -- Sprint syntax if Treat_Fixed_As_Integer is set:
4110 -- x #* y
4111 -- x #/ y
4112 -- x #mod y
4113 -- x #rem y
4115 -- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
4116 -- will only be given nodes with the Treat_Fixed_As_Integer flag set.
4117 -- All handling of smalls for multiplication and division is handled
4118 -- by the front end (mod and rem result only from expansion). Gigi
4119 -- thus never needs to worry about small values (for other operators
4120 -- operating on fixed-point, e.g. addition, the small value does not
4121 -- have any semantic effect anyway, these are always integer operations.
4123 -- Gigi restriction: For all operators taking Boolean operands, the
4124 -- type is always Standard.Boolean. The expander inserts the required
4125 -- conversion operations where needed to ensure this is the case.
4127 -- N_Op_And
4128 -- Sloc points to AND
4129 -- Do_Length_Check (Flag4-Sem)
4130 -- plus fields for binary operator
4131 -- plus fields for expression
4133 -- N_Op_Or
4134 -- Sloc points to OR
4135 -- Do_Length_Check (Flag4-Sem)
4136 -- plus fields for binary operator
4137 -- plus fields for expression
4139 -- N_Op_Xor
4140 -- Sloc points to XOR
4141 -- Do_Length_Check (Flag4-Sem)
4142 -- plus fields for binary operator
4143 -- plus fields for expression
4145 -- N_Op_Eq
4146 -- Sloc points to =
4147 -- plus fields for binary operator
4148 -- plus fields for expression
4150 -- N_Op_Ne
4151 -- Sloc points to /=
4152 -- plus fields for binary operator
4153 -- plus fields for expression
4155 -- N_Op_Lt
4156 -- Sloc points to <
4157 -- plus fields for binary operator
4158 -- plus fields for expression
4160 -- N_Op_Le
4161 -- Sloc points to <=
4162 -- plus fields for binary operator
4163 -- plus fields for expression
4165 -- N_Op_Gt
4166 -- Sloc points to >
4167 -- plus fields for binary operator
4168 -- plus fields for expression
4170 -- N_Op_Ge
4171 -- Sloc points to >=
4172 -- plus fields for binary operator
4173 -- plus fields for expression
4175 -- N_Op_Add
4176 -- Sloc points to + (binary)
4177 -- plus fields for binary operator
4178 -- plus fields for expression
4180 -- N_Op_Subtract
4181 -- Sloc points to - (binary)
4182 -- plus fields for binary operator
4183 -- plus fields for expression
4185 -- N_Op_Concat
4186 -- Sloc points to &
4187 -- Is_Component_Left_Opnd (Flag13-Sem)
4188 -- Is_Component_Right_Opnd (Flag14-Sem)
4189 -- plus fields for binary operator
4190 -- plus fields for expression
4192 -- N_Op_Multiply
4193 -- Sloc points to *
4194 -- Treat_Fixed_As_Integer (Flag14-Sem)
4195 -- Rounded_Result (Flag18-Sem)
4196 -- plus fields for binary operator
4197 -- plus fields for expression
4199 -- N_Op_Divide
4200 -- Sloc points to /
4201 -- Treat_Fixed_As_Integer (Flag14-Sem)
4202 -- Do_Division_Check (Flag13-Sem)
4203 -- Rounded_Result (Flag18-Sem)
4204 -- plus fields for binary operator
4205 -- plus fields for expression
4207 -- N_Op_Mod
4208 -- Sloc points to MOD
4209 -- Treat_Fixed_As_Integer (Flag14-Sem)
4210 -- Do_Division_Check (Flag13-Sem)
4211 -- plus fields for binary operator
4212 -- plus fields for expression
4214 -- N_Op_Rem
4215 -- Sloc points to REM
4216 -- Treat_Fixed_As_Integer (Flag14-Sem)
4217 -- Do_Division_Check (Flag13-Sem)
4218 -- plus fields for binary operator
4219 -- plus fields for expression
4221 -- N_Op_Expon
4222 -- Is_Power_Of_2_For_Shift (Flag13-Sem)
4223 -- Sloc points to **
4224 -- plus fields for binary operator
4225 -- plus fields for expression
4227 -- N_Op_Plus
4228 -- Sloc points to + (unary)
4229 -- plus fields for unary operator
4230 -- plus fields for expression
4232 -- N_Op_Minus
4233 -- Sloc points to - (unary)
4234 -- plus fields for unary operator
4235 -- plus fields for expression
4237 -- N_Op_Abs
4238 -- Sloc points to ABS
4239 -- plus fields for unary operator
4240 -- plus fields for expression
4242 -- N_Op_Not
4243 -- Sloc points to NOT
4244 -- plus fields for unary operator
4245 -- plus fields for expression
4247 -- See also shift operators in section B.2
4249 -- Note on fixed-point operations passed to Gigi: For adding operators,
4250 -- the semantics is to treat these simply as integer operations, with
4251 -- the small values being ignored (the bounds are already stored in
4252 -- units of small, so that constraint checking works as usual). For the
4253 -- case of multiply/divide/rem/mod operations, Gigi will only see fixed
4254 -- point operands if the Treat_Fixed_As_Integer flag is set and will
4255 -- thus treat these nodes in identical manner, ignoring small values.
4257 -- Note on equality/inequality tests for records. In the expanded tree,
4258 -- record comparisons are always expanded to be a series of component
4259 -- comparisons, so the back end will never see an equality or inequality
4260 -- operation with operands of a record type.
4262 -- Note on overflow handling: When the overflow checking mode is set to
4263 -- MINIMIZED or ELIMINATED, nodes for signed arithmetic operations may
4264 -- be modified to use a larger type for the operands and result. In
4265 -- the case where the computed range exceeds that of Long_Long_Integer,
4266 -- and we are running in ELIMINATED mode, the operator node will be
4267 -- changed to be a call to the appropriate routine in System.Bignums.
4269 -- Note: In Modify_Tree_For_C mode, we do not generate an N_Op_Mod node
4270 -- for signed integer types (since there is no equivalent operator in
4271 -- C). Instead we rewrite such an operation in terms of REM (which is
4272 -- % in C) and other C-available operators.
4274 ------------------------------------
4275 -- 4.5.7 Conditional Expressions --
4276 ------------------------------------
4278 -- CONDITIONAL_EXPRESSION ::= IF_EXPRESSION | CASE_EXPRESSION
4280 --------------------------
4281 -- 4.5.7 If Expression --
4282 ----------------------------
4284 -- IF_EXPRESSION ::=
4285 -- if CONDITION then DEPENDENT_EXPRESSION
4286 -- {elsif CONDITION then DEPENDENT_EXPRESSION}
4287 -- [else DEPENDENT_EXPRESSION]
4289 -- DEPENDENT_EXPRESSION ::= EXPRESSION
4291 -- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
4292 -- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
4293 -- the Is_Elsif flag is set on the inner if expression.
4295 -- N_If_Expression
4296 -- Sloc points to IF or ELSIF keyword
4297 -- Expressions (List1)
4298 -- Then_Actions (List2-Sem)
4299 -- Else_Actions (List3-Sem)
4300 -- Is_Elsif (Flag13) (set if comes from ELSIF)
4301 -- Do_Overflow_Check (Flag17-Sem)
4302 -- plus fields for expression
4304 -- Expressions here is a three-element list, whose first element is the
4305 -- condition, the second element is the dependent expression after THEN
4306 -- and the third element is the dependent expression after the ELSE
4307 -- (explicitly set to True if missing).
4309 -- Note: the Then_Actions and Else_Actions fields are always set to
4310 -- No_List in the tree passed to the back end. These are used only
4311 -- for temporary processing purposes in the expander. Even though they
4312 -- are semantic fields, their parent pointers are set because analysis
4313 -- of actions nodes in those lists may generate additional actions that
4314 -- need to know their insertion point (for example for the creation of
4315 -- transient scopes).
4317 -- Note: in the tree passed to the back end, if the result type is
4318 -- an unconstrained array, the if expression can only appears in the
4319 -- initializing expression of an object declaration (this avoids the
4320 -- back end having to create a variable length temporary on the fly).
4322 ----------------------------
4323 -- 4.5.7 Case Expression --
4324 ----------------------------
4326 -- CASE_EXPRESSION ::=
4327 -- case SELECTING_EXPRESSION is
4328 -- CASE_EXPRESSION_ALTERNATIVE
4329 -- {,CASE_EXPRESSION_ALTERNATIVE}
4331 -- Note that the Alternatives cannot include pragmas (this contrasts
4332 -- with the situation of case statements where pragmas are allowed).
4334 -- N_Case_Expression
4335 -- Sloc points to CASE
4336 -- Expression (Node3) (the selecting expression)
4337 -- Alternatives (List4) (the case expression alternatives)
4338 -- Do_Overflow_Check (Flag17-Sem)
4340 ----------------------------------------
4341 -- 4.5.7 Case Expression Alternative --
4342 ----------------------------------------
4344 -- CASE_EXPRESSION_ALTERNATIVE ::=
4345 -- when DISCRETE_CHOICE_LIST =>
4346 -- DEPENDENT_EXPRESSION
4348 -- N_Case_Expression_Alternative
4349 -- Sloc points to WHEN
4350 -- Actions (List1)
4351 -- Discrete_Choices (List4)
4352 -- Expression (Node3)
4353 -- Has_SP_Choice (Flag15-Sem)
4355 -- Note: The Actions field temporarily holds any actions associated with
4356 -- evaluation of the Expression. During expansion of the case expression
4357 -- these actions are wrapped into an N_Expressions_With_Actions node
4358 -- replacing the original expression.
4360 -- Note: this node never appears in the tree passed to the back end,
4361 -- since the expander converts case expressions into case statements.
4363 ---------------------------------
4364 -- 4.5.9 Quantified Expression --
4365 ---------------------------------
4367 -- QUANTIFIED_EXPRESSION ::=
4368 -- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
4369 -- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
4371 -- QUANTIFIER ::= all | some
4373 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4374 -- is present at a time, in which case the other one is empty.
4376 -- N_Quantified_Expression
4377 -- Sloc points to FOR
4378 -- Iterator_Specification (Node2)
4379 -- Loop_Parameter_Specification (Node4)
4380 -- Condition (Node1)
4381 -- All_Present (Flag15)
4383 --------------------------
4384 -- 4.6 Type Conversion --
4385 --------------------------
4387 -- TYPE_CONVERSION ::=
4388 -- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
4390 -- In the (NAME) case, the name is stored as the expression
4392 -- Note: the parser never generates a type conversion node, since it
4393 -- looks like an indexed component which is generated by preference.
4394 -- The semantic pass must correct this misidentification.
4396 -- Gigi handles conversions that involve no change in the root type,
4397 -- and also all conversions from integer to floating-point types.
4398 -- Conversions from floating-point to integer are only handled in
4399 -- the case where Float_Truncate flag set. Other conversions from
4400 -- floating-point to integer (involving rounding) and all conversions
4401 -- involving fixed-point types are handled by the expander.
4403 -- Sprint syntax if Float_Truncate set: X^(Y)
4404 -- Sprint syntax if Conversion_OK set X?(Y)
4405 -- Sprint syntax if both flags set X?^(Y)
4407 -- Note: If either the operand or result type is fixed-point, Gigi will
4408 -- only see a type conversion node with Conversion_OK set. The front end
4409 -- takes care of all handling of small's for fixed-point conversions.
4411 -- N_Type_Conversion
4412 -- Sloc points to first token of subtype mark
4413 -- Subtype_Mark (Node4)
4414 -- Expression (Node3)
4415 -- Do_Discriminant_Check (Flag1-Sem)
4416 -- Do_Length_Check (Flag4-Sem)
4417 -- Float_Truncate (Flag11-Sem)
4418 -- Do_Tag_Check (Flag13-Sem)
4419 -- Conversion_OK (Flag14-Sem)
4420 -- Do_Overflow_Check (Flag17-Sem)
4421 -- Rounded_Result (Flag18-Sem)
4422 -- plus fields for expression
4424 -- Note: if a range check is required, then the Do_Range_Check flag
4425 -- is set in the Expression with the check being done against the
4426 -- target type range (after the base type conversion, if any).
4428 -------------------------------
4429 -- 4.7 Qualified Expression --
4430 -------------------------------
4432 -- QUALIFIED_EXPRESSION ::=
4433 -- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
4435 -- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
4436 -- the expression, so the Expression field of this node always points
4437 -- to a parenthesized expression in this case (i.e. Paren_Count will
4438 -- always be non-zero for the referenced expression if it is not an
4439 -- aggregate).
4441 -- N_Qualified_Expression
4442 -- Sloc points to apostrophe
4443 -- Subtype_Mark (Node4)
4444 -- Expression (Node3) expression or aggregate
4445 -- plus fields for expression
4447 --------------------
4448 -- 4.8 Allocator --
4449 --------------------
4451 -- ALLOCATOR ::=
4452 -- new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
4453 -- | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
4455 -- SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
4457 -- Sprint syntax (when storage pool present)
4458 -- new xxx (storage_pool = pool)
4459 -- or
4460 -- new (subpool) xxx (storage_pool = pool)
4462 -- N_Allocator
4463 -- Sloc points to NEW
4464 -- Expression (Node3) subtype indication or qualified expression
4465 -- Subpool_Handle_Name (Node4) (set to Empty if not present)
4466 -- Storage_Pool (Node1-Sem)
4467 -- Procedure_To_Call (Node2-Sem)
4468 -- Null_Exclusion_Present (Flag11)
4469 -- No_Initialization (Flag13-Sem)
4470 -- Is_Static_Coextension (Flag14-Sem)
4471 -- Do_Storage_Check (Flag17-Sem)
4472 -- Is_Dynamic_Coextension (Flag18-Sem)
4473 -- plus fields for expression
4475 -- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
4476 -- This flag has a special function in conjunction with the restriction
4477 -- No_Implicit_Heap_Allocations, which will be triggered if this flag
4478 -- is not set. This means that if a source allocator is replaced with
4479 -- a constructed allocator, the Comes_From_Source flag should be copied
4480 -- to the newly created allocator.
4482 ---------------------------------
4483 -- 5.1 Sequence Of Statements --
4484 ---------------------------------
4486 -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
4488 -- Note: Although the parser will not accept a declaration as a
4489 -- statement, the semantic analyzer may insert declarations (e.g.
4490 -- declarations of implicit types needed for execution of other
4491 -- statements) into a sequence of statements, so the code generator
4492 -- should be prepared to accept a declaration where a statement is
4493 -- expected. Note also that pragmas can appear as statements.
4495 --------------------
4496 -- 5.1 Statement --
4497 --------------------
4499 -- STATEMENT ::=
4500 -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
4502 -- There is no explicit node in the tree for a statement. Instead, the
4503 -- individual statement appears directly. Labels are treated as a
4504 -- kind of statement, i.e. they are linked into a statement list at
4505 -- the point they appear, so the labeled statement appears following
4506 -- the label or labels in the statement list.
4508 ---------------------------
4509 -- 5.1 Simple Statement --
4510 ---------------------------
4512 -- SIMPLE_STATEMENT ::= NULL_STATEMENT
4513 -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
4514 -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
4515 -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
4516 -- | REQUEUE_STATEMENT | DELAY_STATEMENT
4517 -- | ABORT_STATEMENT | RAISE_STATEMENT
4518 -- | CODE_STATEMENT
4520 -----------------------------
4521 -- 5.1 Compound Statement --
4522 -----------------------------
4524 -- COMPOUND_STATEMENT ::=
4525 -- IF_STATEMENT | CASE_STATEMENT
4526 -- | LOOP_STATEMENT | BLOCK_STATEMENT
4527 -- | EXTENDED_RETURN_STATEMENT
4528 -- | ACCEPT_STATEMENT | SELECT_STATEMENT
4530 -------------------------
4531 -- 5.1 Null Statement --
4532 -------------------------
4534 -- NULL_STATEMENT ::= null;
4536 -- N_Null_Statement
4537 -- Sloc points to NULL
4539 ----------------
4540 -- 5.1 Label --
4541 ----------------
4543 -- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
4545 -- Note that the occurrence of a label is not a defining identifier,
4546 -- but rather a referencing occurrence. The defining occurrence is
4547 -- in the implicit label declaration which occurs in the innermost
4548 -- enclosing block.
4550 -- N_Label
4551 -- Sloc points to <<
4552 -- Identifier (Node1) direct name of statement identifier
4553 -- Exception_Junk (Flag8-Sem)
4555 -- Note: Before Ada 2012, a label is always followed by a statement,
4556 -- and this is true in the tree even in Ada 2012 mode (the parser
4557 -- inserts a null statement marked with Comes_From_Source False).
4559 -------------------------------
4560 -- 5.1 Statement Identifier --
4561 -------------------------------
4563 -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
4565 -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
4566 -- (not an OPERATOR_SYMBOL)
4568 -------------------------------
4569 -- 5.2 Assignment Statement --
4570 -------------------------------
4572 -- ASSIGNMENT_STATEMENT ::=
4573 -- variable_NAME := EXPRESSION;
4575 -- N_Assignment_Statement
4576 -- Sloc points to :=
4577 -- Name (Node2)
4578 -- Expression (Node3)
4579 -- Do_Discriminant_Check (Flag1-Sem)
4580 -- Do_Tag_Check (Flag13-Sem)
4581 -- Do_Length_Check (Flag4-Sem)
4582 -- Forwards_OK (Flag5-Sem)
4583 -- Backwards_OK (Flag6-Sem)
4584 -- No_Ctrl_Actions (Flag7-Sem)
4585 -- Componentwise_Assignment (Flag14-Sem)
4586 -- Suppress_Assignment_Checks (Flag18-Sem)
4588 -- Note: if a range check is required, then the Do_Range_Check flag
4589 -- is set in the Expression (right hand side), with the check being
4590 -- done against the type of the Name (left hand side).
4592 -- Note: the back end places some restrictions on the form of the
4593 -- Expression field. If the object being assigned to is Atomic, then
4594 -- the Expression may not have the form of an aggregate (since this
4595 -- might cause the back end to generate separate assignments). In this
4596 -- case the front end must generate an extra temporary and initialize
4597 -- this temporary as required (the temporary itself is not atomic).
4599 -----------------------
4600 -- 5.3 If Statement --
4601 -----------------------
4603 -- IF_STATEMENT ::=
4604 -- if CONDITION then
4605 -- SEQUENCE_OF_STATEMENTS
4606 -- {elsif CONDITION then
4607 -- SEQUENCE_OF_STATEMENTS}
4608 -- [else
4609 -- SEQUENCE_OF_STATEMENTS]
4610 -- end if;
4612 -- Gigi restriction: This expander ensures that the type of the
4613 -- Condition fields is always Standard.Boolean, even if the type
4614 -- in the source is some non-standard boolean type.
4616 -- N_If_Statement
4617 -- Sloc points to IF
4618 -- Condition (Node1)
4619 -- Then_Statements (List2)
4620 -- Elsif_Parts (List3) (set to No_List if none present)
4621 -- Else_Statements (List4) (set to No_List if no else part present)
4622 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4623 -- From_Conditional_Expression (Flag1-Sem)
4625 -- N_Elsif_Part
4626 -- Sloc points to ELSIF
4627 -- Condition (Node1)
4628 -- Then_Statements (List2)
4629 -- Condition_Actions (List3-Sem)
4631 --------------------
4632 -- 5.3 Condition --
4633 --------------------
4635 -- CONDITION ::= boolean_EXPRESSION
4637 -------------------------
4638 -- 5.4 Case Statement --
4639 -------------------------
4641 -- CASE_STATEMENT ::=
4642 -- case EXPRESSION is
4643 -- CASE_STATEMENT_ALTERNATIVE
4644 -- {CASE_STATEMENT_ALTERNATIVE}
4645 -- end case;
4647 -- Note: the Alternatives can contain pragmas. These only occur at
4648 -- the start of the list, since any pragmas occurring after the first
4649 -- alternative are absorbed into the corresponding statement sequence.
4651 -- N_Case_Statement
4652 -- Sloc points to CASE
4653 -- Expression (Node3)
4654 -- Alternatives (List4)
4655 -- End_Span (Uint5) (set to Uint_0 if expander generated)
4656 -- From_Conditional_Expression (Flag1-Sem)
4658 -- Note: Before Ada 2012, a pragma in a statement sequence is always
4659 -- followed by a statement, and this is true in the tree even in Ada
4660 -- 2012 mode (the parser inserts a null statement marked with the flag
4661 -- Comes_From_Source False).
4663 -------------------------------------
4664 -- 5.4 Case Statement Alternative --
4665 -------------------------------------
4667 -- CASE_STATEMENT_ALTERNATIVE ::=
4668 -- when DISCRETE_CHOICE_LIST =>
4669 -- SEQUENCE_OF_STATEMENTS
4671 -- N_Case_Statement_Alternative
4672 -- Sloc points to WHEN
4673 -- Discrete_Choices (List4)
4674 -- Statements (List3)
4675 -- Has_SP_Choice (Flag15-Sem)
4677 -- Note: in the list of Discrete_Choices, the tree passed to the back
4678 -- end does not have choice entries corresponding to names of statically
4679 -- predicated subtypes. Such entries are always expanded out to the list
4680 -- of equivalent values or ranges. The ASIS tree generated in -gnatct
4681 -- mode does not have this expansion, and has the original choices.
4683 -------------------------
4684 -- 5.5 Loop Statement --
4685 -------------------------
4687 -- LOOP_STATEMENT ::=
4688 -- [loop_STATEMENT_IDENTIFIER :]
4689 -- [ITERATION_SCHEME] loop
4690 -- SEQUENCE_OF_STATEMENTS
4691 -- end loop [loop_IDENTIFIER];
4693 -- Note: The occurrence of a loop label is not a defining identifier
4694 -- but rather a referencing occurrence. The defining occurrence is in
4695 -- the implicit label declaration which occurs in the innermost
4696 -- enclosing block.
4698 -- Note: there is always a loop statement identifier present in the
4699 -- tree, even if none was given in the source. In the case where no loop
4700 -- identifier is given in the source, the parser creates a name of the
4701 -- form _Loop_n, where n is a decimal integer (the two underlines ensure
4702 -- that the loop names created in this manner do not conflict with any
4703 -- user defined identifiers), and the flag Has_Created_Identifier is set
4704 -- to True. The only exception to the rule that all loop statement nodes
4705 -- have identifiers occurs for loops constructed by the expander, and
4706 -- the semantic analyzer will create and supply dummy loop identifiers
4707 -- in these cases.
4709 -- N_Loop_Statement
4710 -- Sloc points to LOOP
4711 -- Identifier (Node1) loop identifier (set to Empty if no identifier)
4712 -- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
4713 -- Statements (List3)
4714 -- End_Label (Node4)
4715 -- Has_Created_Identifier (Flag15)
4716 -- Is_Null_Loop (Flag16)
4717 -- Suppress_Loop_Warnings (Flag17)
4719 -- Note: the parser fills in the Identifier field if there is an
4720 -- explicit loop identifier. Otherwise the parser leaves this field
4721 -- set to Empty, and then the semantic processing for a loop statement
4722 -- creates an identifier, setting the Has_Created_Identifier flag to
4723 -- True. So after semantic analysis, the Identifier is always set,
4724 -- referencing an identifier whose entity has an Ekind of E_Loop.
4726 ---------------------------
4727 -- 5.5 Iteration Scheme --
4728 ---------------------------
4730 -- ITERATION_SCHEME ::=
4731 -- while CONDITION
4732 -- | for LOOP_PARAMETER_SPECIFICATION
4733 -- | for ITERATOR_SPECIFICATION
4735 -- At most one of (Iterator_Specification, Loop_Parameter_Specification)
4736 -- is present at a time, in which case the other one is empty. Both are
4737 -- empty in the case of a WHILE loop.
4739 -- Gigi restriction: The expander ensures that the type of the Condition
4740 -- field is always Standard.Boolean, even if the type in the source is
4741 -- some non-standard boolean type.
4743 -- N_Iteration_Scheme
4744 -- Sloc points to WHILE or FOR
4745 -- Condition (Node1) (set to Empty if FOR case)
4746 -- Condition_Actions (List3-Sem)
4747 -- Iterator_Specification (Node2) (set to Empty if WHILE case)
4748 -- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
4750 ---------------------------------------
4751 -- 5.5 Loop Parameter Specification --
4752 ---------------------------------------
4754 -- LOOP_PARAMETER_SPECIFICATION ::=
4755 -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
4757 -- N_Loop_Parameter_Specification
4758 -- Sloc points to first identifier
4759 -- Defining_Identifier (Node1)
4760 -- Reverse_Present (Flag15)
4761 -- Discrete_Subtype_Definition (Node4)
4763 -----------------------------------
4764 -- 5.5.1 Iterator Specification --
4765 -----------------------------------
4767 -- ITERATOR_SPECIFICATION ::=
4768 -- DEFINING_IDENTIFIER in [reverse] NAME
4769 -- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
4771 -- N_Iterator_Specification
4772 -- Sloc points to defining identifier
4773 -- Defining_Identifier (Node1)
4774 -- Name (Node2)
4775 -- Reverse_Present (Flag15)
4776 -- Of_Present (Flag16)
4777 -- Subtype_Indication (Node5)
4779 -- Note: The Of_Present flag distinguishes the two forms
4781 --------------------------
4782 -- 5.6 Block Statement --
4783 --------------------------
4785 -- BLOCK_STATEMENT ::=
4786 -- [block_STATEMENT_IDENTIFIER:]
4787 -- [declare
4788 -- DECLARATIVE_PART]
4789 -- begin
4790 -- HANDLED_SEQUENCE_OF_STATEMENTS
4791 -- end [block_IDENTIFIER];
4793 -- Note that the occurrence of a block identifier is not a defining
4794 -- identifier, but rather a referencing occurrence. The defining
4795 -- occurrence is an E_Block entity declared by the implicit label
4796 -- declaration which occurs in the innermost enclosing block statement
4797 -- or body; the block identifier denotes that E_Block.
4799 -- For block statements that come from source code, there is always a
4800 -- block statement identifier present in the tree, denoting an E_Block.
4801 -- In the case where no block identifier is given in the source,
4802 -- the parser creates a name of the form B_n, where n is a decimal
4803 -- integer, and the flag Has_Created_Identifier is set to True. Blocks
4804 -- constructed by the expander usually have no identifier, and no
4805 -- corresponding entity.
4807 -- Note: the block statement created for an extended return statement
4808 -- has an entity, and this entity is an E_Return_Statement, rather than
4809 -- the usual E_Block.
4811 -- Note: Exception_Junk is set for the wrapping blocks created during
4812 -- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
4814 -- Note: from a control flow viewpoint, a block statement defines an
4815 -- extended basic block, i.e. the entry of the block dominates every
4816 -- statement in the sequence. When generating new statements with
4817 -- exception handlers in the expander at the end of a sequence that
4818 -- comes from source code, it can be necessary to wrap them all in a
4819 -- block statement in order to expose the implicit control flow to
4820 -- gigi and thus prevent it from issuing bogus control flow warnings.
4822 -- N_Block_Statement
4823 -- Sloc points to DECLARE or BEGIN
4824 -- Identifier (Node1) block direct name (set to Empty if not present)
4825 -- Declarations (List2) (set to No_List if no DECLARE part)
4826 -- Handled_Statement_Sequence (Node4)
4827 -- Cleanup_Actions (List5-Sem)
4828 -- Is_Task_Master (Flag5-Sem)
4829 -- Activation_Chain_Entity (Node3-Sem)
4830 -- Has_Created_Identifier (Flag15)
4831 -- Is_Task_Allocation_Block (Flag6)
4832 -- Is_Asynchronous_Call_Block (Flag7)
4833 -- Exception_Junk (Flag8-Sem)
4834 -- Is_Finalization_Wrapper (Flag9-Sem)
4836 -------------------------
4837 -- 5.7 Exit Statement --
4838 -------------------------
4840 -- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
4842 -- Gigi restriction: The expander ensures that the type of the Condition
4843 -- field is always Standard.Boolean, even if the type in the source is
4844 -- some non-standard boolean type.
4846 -- N_Exit_Statement
4847 -- Sloc points to EXIT
4848 -- Name (Node2) (set to Empty if no loop name present)
4849 -- Condition (Node1) (set to Empty if no WHEN part present)
4850 -- Next_Exit_Statement (Node3-Sem): Next exit on chain
4852 -------------------------
4853 -- 5.9 Goto Statement --
4854 -------------------------
4856 -- GOTO_STATEMENT ::= goto label_NAME;
4858 -- N_Goto_Statement
4859 -- Sloc points to GOTO
4860 -- Name (Node2)
4861 -- Exception_Junk (Flag8-Sem)
4863 ---------------------------------
4864 -- 6.1 Subprogram Declaration --
4865 ---------------------------------
4867 -- SUBPROGRAM_DECLARATION ::=
4868 -- SUBPROGRAM_SPECIFICATION
4869 -- [ASPECT_SPECIFICATIONS];
4871 -- N_Subprogram_Declaration
4872 -- Sloc points to FUNCTION or PROCEDURE
4873 -- Specification (Node1)
4874 -- Body_To_Inline (Node3-Sem)
4875 -- Corresponding_Body (Node5-Sem)
4876 -- Parent_Spec (Node4-Sem)
4878 ------------------------------------------
4879 -- 6.1 Abstract Subprogram Declaration --
4880 ------------------------------------------
4882 -- ABSTRACT_SUBPROGRAM_DECLARATION ::=
4883 -- SUBPROGRAM_SPECIFICATION is abstract
4884 -- [ASPECT_SPECIFICATIONS];
4886 -- N_Abstract_Subprogram_Declaration
4887 -- Sloc points to ABSTRACT
4888 -- Specification (Node1)
4890 -----------------------------------
4891 -- 6.1 Subprogram Specification --
4892 -----------------------------------
4894 -- SUBPROGRAM_SPECIFICATION ::=
4895 -- [[not] overriding]
4896 -- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
4897 -- | [[not] overriding]
4898 -- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
4900 -- Note: there are no separate nodes for the profiles, instead the
4901 -- information appears directly in the following nodes.
4903 -- N_Function_Specification
4904 -- Sloc points to FUNCTION
4905 -- Defining_Unit_Name (Node1) (the designator)
4906 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4907 -- Null_Exclusion_Present (Flag11)
4908 -- Result_Definition (Node4) for result subtype
4909 -- Generic_Parent (Node5-Sem)
4910 -- Must_Override (Flag14) set if overriding indicator present
4911 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4913 -- N_Procedure_Specification
4914 -- Sloc points to PROCEDURE
4915 -- Defining_Unit_Name (Node1)
4916 -- Parameter_Specifications (List3) (set to No_List if no formal part)
4917 -- Generic_Parent (Node5-Sem)
4918 -- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
4919 -- Must_Override (Flag14) set if overriding indicator present
4920 -- Must_Not_Override (Flag15) set if not_overriding indicator present
4922 -- Note: overriding indicator is an Ada 2005 feature
4924 ---------------------
4925 -- 6.1 Designator --
4926 ---------------------
4928 -- DESIGNATOR ::=
4929 -- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
4931 -- Designators that are simply identifiers or operator symbols appear
4932 -- directly in the tree in this form. The following node is used only
4933 -- in the case where the designator has a parent unit name component.
4935 -- N_Designator
4936 -- Sloc points to period
4937 -- Name (Node2) holds the parent unit name
4938 -- Identifier (Node1)
4940 -- Note: Name is always non-Empty, since this node is only used for the
4941 -- case where a parent library unit package name is present.
4943 -- Note that the identifier can also be an operator symbol here
4945 ------------------------------
4946 -- 6.1 Defining Designator --
4947 ------------------------------
4949 -- DEFINING_DESIGNATOR ::=
4950 -- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
4952 -------------------------------------
4953 -- 6.1 Defining Program Unit Name --
4954 -------------------------------------
4956 -- DEFINING_PROGRAM_UNIT_NAME ::=
4957 -- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
4959 -- The parent unit name is present only in the case of a child unit name
4960 -- (permissible only for Ada 95 for a library level unit, i.e. a unit
4961 -- at scope level one). If no such name is present, the defining program
4962 -- unit name is represented simply as the defining identifier. In the
4963 -- child unit case, the following node is used to represent the child
4964 -- unit name.
4966 -- N_Defining_Program_Unit_Name
4967 -- Sloc points to period
4968 -- Name (Node2) holds the parent unit name
4969 -- Defining_Identifier (Node1)
4971 -- Note: Name is always non-Empty, since this node is only used for the
4972 -- case where a parent unit name is present.
4974 --------------------------
4975 -- 6.1 Operator Symbol --
4976 --------------------------
4978 -- OPERATOR_SYMBOL ::= STRING_LITERAL
4980 -- Note: the fields of the N_Operator_Symbol node are laid out to match
4981 -- the corresponding fields of an N_Character_Literal node. This allows
4982 -- easy conversion of the operator symbol node into a character literal
4983 -- node in the case where a string constant of the form of an operator
4984 -- symbol is scanned out as such, but turns out semantically to be a
4985 -- string literal that is not an operator. For details see Sinfo.CN.
4986 -- Change_Operator_Symbol_To_String_Literal.
4988 -- N_Operator_Symbol
4989 -- Sloc points to literal
4990 -- Chars (Name1) contains the Name_Id for the operator symbol
4991 -- Strval (Str3) Id of string value. This is used if the operator
4992 -- symbol turns out to be a normal string after all.
4993 -- Entity (Node4-Sem)
4994 -- Associated_Node (Node4-Sem)
4995 -- Has_Private_View (Flag11-Sem) set in generic units.
4996 -- Etype (Node5-Sem)
4998 -- Note: the Strval field may be set to No_String for generated
4999 -- operator symbols that are known not to be string literals
5000 -- semantically.
5002 -----------------------------------
5003 -- 6.1 Defining Operator Symbol --
5004 -----------------------------------
5006 -- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
5008 -- A defining operator symbol is an entity, which has additional
5009 -- fields depending on the setting of the Ekind field. These
5010 -- additional fields are defined (and access subprograms declared)
5011 -- in package Einfo.
5013 -- Note: N_Defining_Operator_Symbol is an extended node whose fields
5014 -- are deliberately layed out to match the layout of fields in an
5015 -- ordinary N_Operator_Symbol node allowing for easy alteration of
5016 -- an operator symbol node into a defining operator symbol node.
5017 -- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
5018 -- for further details.
5020 -- N_Defining_Operator_Symbol
5021 -- Sloc points to literal
5022 -- Chars (Name1) contains the Name_Id for the operator symbol
5023 -- Next_Entity (Node2-Sem)
5024 -- Scope (Node3-Sem)
5025 -- Etype (Node5-Sem)
5027 ----------------------------
5028 -- 6.1 Parameter Profile --
5029 ----------------------------
5031 -- PARAMETER_PROFILE ::= [FORMAL_PART]
5033 ---------------------------------------
5034 -- 6.1 Parameter and Result Profile --
5035 ---------------------------------------
5037 -- PARAMETER_AND_RESULT_PROFILE ::=
5038 -- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
5039 -- | [FORMAL_PART] return ACCESS_DEFINITION
5041 -- There is no explicit node in the tree for a parameter and result
5042 -- profile. Instead the information appears directly in the parent.
5044 ----------------------
5045 -- 6.1 Formal Part --
5046 ----------------------
5048 -- FORMAL_PART ::=
5049 -- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
5051 ----------------------------------
5052 -- 6.1 Parameter Specification --
5053 ----------------------------------
5055 -- PARAMETER_SPECIFICATION ::=
5056 -- DEFINING_IDENTIFIER_LIST : [ALIASED] MODE [NULL_EXCLUSION]
5057 -- SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
5058 -- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
5059 -- [:= DEFAULT_EXPRESSION]
5061 -- Although the syntax allows multiple identifiers in the list, the
5062 -- semantics is as though successive specifications were given with
5063 -- identical type definition and expression components. To simplify
5064 -- semantic processing, the parser represents a multiple declaration
5065 -- case as a sequence of single Specifications, using the More_Ids and
5066 -- Prev_Ids flags to preserve the original source form as described
5067 -- in the section on "Handling of Defining Identifier Lists".
5069 -- ALIASED can only be present in Ada 2012 mode
5071 -- N_Parameter_Specification
5072 -- Sloc points to first identifier
5073 -- Defining_Identifier (Node1)
5074 -- Aliased_Present (Flag4)
5075 -- In_Present (Flag15)
5076 -- Out_Present (Flag17)
5077 -- Null_Exclusion_Present (Flag11)
5078 -- Parameter_Type (Node2) subtype mark or access definition
5079 -- Expression (Node3) (set to Empty if no default expression present)
5080 -- Do_Accessibility_Check (Flag13-Sem)
5081 -- More_Ids (Flag5) (set to False if no more identifiers in list)
5082 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
5083 -- Default_Expression (Node5-Sem)
5085 ---------------
5086 -- 6.1 Mode --
5087 ---------------
5089 -- MODE ::= [in] | in out | out
5091 -- There is no explicit node in the tree for the Mode. Instead the
5092 -- In_Present and Out_Present flags are set in the parent node to
5093 -- record the presence of keywords specifying the mode.
5095 --------------------------
5096 -- 6.3 Subprogram Body --
5097 --------------------------
5099 -- SUBPROGRAM_BODY ::=
5100 -- SUBPROGRAM_SPECIFICATION [ASPECT_SPECIFICATIONS] is
5101 -- DECLARATIVE_PART
5102 -- begin
5103 -- HANDLED_SEQUENCE_OF_STATEMENTS
5104 -- end [DESIGNATOR];
5106 -- N_Subprogram_Body
5107 -- Sloc points to FUNCTION or PROCEDURE
5108 -- Specification (Node1)
5109 -- Declarations (List2)
5110 -- Handled_Statement_Sequence (Node4)
5111 -- Activation_Chain_Entity (Node3-Sem)
5112 -- Corresponding_Spec (Node5-Sem)
5113 -- Acts_As_Spec (Flag4-Sem)
5114 -- Bad_Is_Detected (Flag15) used only by parser
5115 -- Do_Storage_Check (Flag17-Sem)
5116 -- Is_Protected_Subprogram_Body (Flag7-Sem)
5117 -- Is_Entry_Barrier_Function (Flag8-Sem)
5118 -- Is_Task_Master (Flag5-Sem)
5119 -- Was_Originally_Stub (Flag13-Sem)
5120 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5122 -------------------------
5123 -- Expression Function --
5124 -------------------------
5126 -- This is an Ada 2012 extension, we put it here for now, to be labeled
5127 -- and put in its proper section when we know exactly where that is.
5129 -- EXPRESSION_FUNCTION ::=
5130 -- FUNCTION SPECIFICATION IS (EXPRESSION)
5131 -- [ASPECT_SPECIFICATIONS];
5133 -- N_Expression_Function
5134 -- Sloc points to FUNCTION
5135 -- Specification (Node1)
5136 -- Expression (Node3)
5137 -- Corresponding_Spec (Node5-Sem)
5139 -----------------------------------
5140 -- 6.4 Procedure Call Statement --
5141 -----------------------------------
5143 -- PROCEDURE_CALL_STATEMENT ::=
5144 -- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
5146 -- Note: the reason that a procedure call has expression fields is that
5147 -- it semantically resembles an expression, e.g. overloading is allowed
5148 -- and a type is concocted for semantic processing purposes. Certain of
5149 -- these fields, such as Parens are not relevant, but it is easier to
5150 -- just supply all of them together.
5152 -- N_Procedure_Call_Statement
5153 -- Sloc points to first token of name or prefix
5154 -- Name (Node2) stores name or prefix
5155 -- Parameter_Associations (List3) (set to No_List if no
5156 -- actual parameter part)
5157 -- First_Named_Actual (Node4-Sem)
5158 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5159 -- Do_Tag_Check (Flag13-Sem)
5160 -- No_Elaboration_Check (Flag14-Sem)
5161 -- ABE_Is_Certain (Flag18-Sem)
5162 -- plus fields for expression
5164 -- If any IN parameter requires a range check, then the corresponding
5165 -- argument expression has the Do_Range_Check flag set, and the range
5166 -- check is done against the formal type. Note that this argument
5167 -- expression may appear directly in the Parameter_Associations list,
5168 -- or may be a descendent of an N_Parameter_Association node that
5169 -- appears in this list.
5171 ------------------------
5172 -- 6.4 Function Call --
5173 ------------------------
5175 -- FUNCTION_CALL ::=
5176 -- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
5178 -- Note: the parser may generate an indexed component node or simply
5179 -- a name node instead of a function call node. The semantic pass must
5180 -- correct this misidentification.
5182 -- N_Function_Call
5183 -- Sloc points to first token of name or prefix
5184 -- Name (Node2) stores name or prefix
5185 -- Parameter_Associations (List3) (set to No_List if no
5186 -- actual parameter part)
5187 -- First_Named_Actual (Node4-Sem)
5188 -- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
5189 -- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
5190 -- Do_Tag_Check (Flag13-Sem)
5191 -- No_Elaboration_Check (Flag14-Sem)
5192 -- ABE_Is_Certain (Flag18-Sem)
5193 -- plus fields for expression
5195 --------------------------------
5196 -- 6.4 Actual Parameter Part --
5197 --------------------------------
5199 -- ACTUAL_PARAMETER_PART ::=
5200 -- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
5202 --------------------------------
5203 -- 6.4 Parameter Association --
5204 --------------------------------
5206 -- PARAMETER_ASSOCIATION ::=
5207 -- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
5209 -- Note: the N_Parameter_Association node is built only if a formal
5210 -- parameter selector name is present, otherwise the parameter
5211 -- association appears in the tree simply as the node for the
5212 -- explicit actual parameter.
5214 -- N_Parameter_Association
5215 -- Sloc points to formal parameter
5216 -- Selector_Name (Node2) (always non-Empty)
5217 -- Explicit_Actual_Parameter (Node3)
5218 -- Next_Named_Actual (Node4-Sem)
5219 -- Is_Accessibility_Actual (Flag13-Sem)
5221 ---------------------------
5222 -- 6.4 Actual Parameter --
5223 ---------------------------
5225 -- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
5227 ---------------------------
5228 -- 6.5 Return Statement --
5229 ---------------------------
5231 -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
5233 -- EXTENDED_RETURN_STATEMENT ::=
5234 -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5235 -- [:= EXPRESSION] [do
5236 -- HANDLED_SEQUENCE_OF_STATEMENTS
5237 -- end return];
5239 -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
5241 -- The term "return statement" is defined in 6.5 to mean either a
5242 -- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT. We avoid
5243 -- the use of this term, since it used to mean someting else in earlier
5244 -- versions of Ada.
5246 -- N_Simple_Return_Statement
5247 -- Sloc points to RETURN
5248 -- Return_Statement_Entity (Node5-Sem)
5249 -- Expression (Node3) (set to Empty if no expression present)
5250 -- Storage_Pool (Node1-Sem)
5251 -- Procedure_To_Call (Node2-Sem)
5252 -- Do_Tag_Check (Flag13-Sem)
5253 -- By_Ref (Flag5-Sem)
5254 -- Comes_From_Extended_Return_Statement (Flag18-Sem)
5256 -- Note: Return_Statement_Entity points to an E_Return_Statement
5258 -- If a range check is required, then Do_Range_Check is set on the
5259 -- Expression. The check is against the return subtype of the function.
5261 -- N_Extended_Return_Statement
5262 -- Sloc points to RETURN
5263 -- Return_Statement_Entity (Node5-Sem)
5264 -- Return_Object_Declarations (List3)
5265 -- Handled_Statement_Sequence (Node4) (set to Empty if not present)
5266 -- Storage_Pool (Node1-Sem)
5267 -- Procedure_To_Call (Node2-Sem)
5268 -- Do_Tag_Check (Flag13-Sem)
5269 -- By_Ref (Flag5-Sem)
5271 -- Note: Return_Statement_Entity points to an E_Return_Statement.
5273 -- Note that Return_Object_Declarations is a list containing the
5274 -- N_Object_Declaration -- see comment on this field above.
5276 -- The declared object will have Is_Return_Object = True.
5278 -- There is no such syntactic category as return_object_declaration
5279 -- in the RM. Return_Object_Declarations represents this portion of
5280 -- the syntax for EXTENDED_RETURN_STATEMENT:
5281 -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
5282 -- [:= EXPRESSION]
5284 -- There are two entities associated with an extended_return_statement:
5285 -- the Return_Statement_Entity represents the statement itself,
5286 -- and the Defining_Identifier of the Object_Declaration in
5287 -- Return_Object_Declarations represents the object being
5288 -- returned. N_Simple_Return_Statement has only the former.
5290 ------------------------------
5291 -- 7.1 Package Declaration --
5292 ------------------------------
5294 -- PACKAGE_DECLARATION ::=
5295 -- PACKAGE_SPECIFICATION;
5297 -- Note: the activation chain entity for a package spec is used for
5298 -- all tasks declared in the package spec, or in the package body.
5300 -- N_Package_Declaration
5301 -- Sloc points to PACKAGE
5302 -- Specification (Node1)
5303 -- Corresponding_Body (Node5-Sem)
5304 -- Parent_Spec (Node4-Sem)
5305 -- Activation_Chain_Entity (Node3-Sem)
5307 --------------------------------
5308 -- 7.1 Package Specification --
5309 --------------------------------
5311 -- PACKAGE_SPECIFICATION ::=
5312 -- package DEFINING_PROGRAM_UNIT_NAME
5313 -- [ASPECT_SPECIFICATIONS]
5314 -- is
5315 -- {BASIC_DECLARATIVE_ITEM}
5316 -- [private
5317 -- {BASIC_DECLARATIVE_ITEM}]
5318 -- end [[PARENT_UNIT_NAME .] IDENTIFIER]
5320 -- N_Package_Specification
5321 -- Sloc points to PACKAGE
5322 -- Defining_Unit_Name (Node1)
5323 -- Visible_Declarations (List2)
5324 -- Private_Declarations (List3) (set to No_List if no private
5325 -- part present)
5326 -- End_Label (Node4)
5327 -- Generic_Parent (Node5-Sem)
5328 -- Limited_View_Installed (Flag18-Sem)
5330 -----------------------
5331 -- 7.1 Package Body --
5332 -----------------------
5334 -- PACKAGE_BODY ::=
5335 -- package body DEFINING_PROGRAM_UNIT_NAME
5336 -- [ASPECT_SPECIFICATIONS]
5337 -- is
5338 -- DECLARATIVE_PART
5339 -- [begin
5340 -- HANDLED_SEQUENCE_OF_STATEMENTS]
5341 -- end [[PARENT_UNIT_NAME .] IDENTIFIER];
5343 -- N_Package_Body
5344 -- Sloc points to PACKAGE
5345 -- Defining_Unit_Name (Node1)
5346 -- Declarations (List2)
5347 -- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
5348 -- Corresponding_Spec (Node5-Sem)
5349 -- Was_Originally_Stub (Flag13-Sem)
5351 -- Note: if a source level package does not contain a handled sequence
5352 -- of statements, then the parser supplies a dummy one with a null
5353 -- sequence of statements. Comes_From_Source will be False in this
5354 -- constructed sequence. The reason we need this is for the End_Label
5355 -- field in the HSS.
5357 -----------------------------------
5358 -- 7.4 Private Type Declaration --
5359 -----------------------------------
5361 -- PRIVATE_TYPE_DECLARATION ::=
5362 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
5363 -- is [[abstract] tagged] [limited] private
5364 -- [ASPECT_SPECIFICATIONS];
5366 -- Note: TAGGED is not permitted in Ada 83 mode
5368 -- N_Private_Type_Declaration
5369 -- Sloc points to TYPE
5370 -- Defining_Identifier (Node1)
5371 -- Discriminant_Specifications (List4) (set to No_List if no
5372 -- discriminant part)
5373 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5374 -- Abstract_Present (Flag4)
5375 -- Tagged_Present (Flag15)
5376 -- Limited_Present (Flag17)
5378 ----------------------------------------
5379 -- 7.4 Private Extension Declaration --
5380 ----------------------------------------
5382 -- PRIVATE_EXTENSION_DECLARATION ::=
5383 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
5384 -- [abstract] [limited | synchronized]
5385 -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
5386 -- with private [ASPECT_SPECIFICATIONS];
5388 -- Note: LIMITED, and private extension declarations are not allowed
5389 -- in Ada 83 mode.
5391 -- N_Private_Extension_Declaration
5392 -- Sloc points to TYPE
5393 -- Defining_Identifier (Node1)
5394 -- Uninitialized_Variable (Node3-Sem)
5395 -- Discriminant_Specifications (List4) (set to No_List if no
5396 -- discriminant part)
5397 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
5398 -- Abstract_Present (Flag4)
5399 -- Limited_Present (Flag17)
5400 -- Synchronized_Present (Flag7)
5401 -- Subtype_Indication (Node5)
5402 -- Interface_List (List2) (set to No_List if none)
5404 ---------------------
5405 -- 8.4 Use Clause --
5406 ---------------------
5408 -- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
5410 -----------------------------
5411 -- 8.4 Use Package Clause --
5412 -----------------------------
5414 -- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
5416 -- N_Use_Package_Clause
5417 -- Sloc points to USE
5418 -- Names (List2)
5419 -- Next_Use_Clause (Node3-Sem)
5420 -- Hidden_By_Use_Clause (Elist4-Sem)
5422 --------------------------
5423 -- 8.4 Use Type Clause --
5424 --------------------------
5426 -- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
5428 -- Note: use type clause is not permitted in Ada 83 mode
5430 -- Note: the ALL keyword can appear only in Ada 2012 mode
5432 -- N_Use_Type_Clause
5433 -- Sloc points to USE
5434 -- Subtype_Marks (List2)
5435 -- Next_Use_Clause (Node3-Sem)
5436 -- Hidden_By_Use_Clause (Elist4-Sem)
5437 -- Used_Operations (Elist5-Sem)
5438 -- All_Present (Flag15)
5440 -------------------------------
5441 -- 8.5 Renaming Declaration --
5442 -------------------------------
5444 -- RENAMING_DECLARATION ::=
5445 -- OBJECT_RENAMING_DECLARATION
5446 -- | EXCEPTION_RENAMING_DECLARATION
5447 -- | PACKAGE_RENAMING_DECLARATION
5448 -- | SUBPROGRAM_RENAMING_DECLARATION
5449 -- | GENERIC_RENAMING_DECLARATION
5451 --------------------------------------
5452 -- 8.5 Object Renaming Declaration --
5453 --------------------------------------
5455 -- OBJECT_RENAMING_DECLARATION ::=
5456 -- DEFINING_IDENTIFIER :
5457 -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME
5458 -- [ASPECT_SPECIFICATIONS];
5459 -- | DEFINING_IDENTIFIER :
5460 -- ACCESS_DEFINITION renames object_NAME
5461 -- [ASPECT_SPECIFICATIONS];
5463 -- Note: Access_Definition is an optional field that gives support to
5464 -- Ada 2005 (AI-230). The parser generates nodes that have either the
5465 -- Subtype_Indication field or else the Access_Definition field.
5467 -- N_Object_Renaming_Declaration
5468 -- Sloc points to first identifier
5469 -- Defining_Identifier (Node1)
5470 -- Null_Exclusion_Present (Flag11) (set to False if not present)
5471 -- Subtype_Mark (Node4) (set to Empty if not present)
5472 -- Access_Definition (Node3) (set to Empty if not present)
5473 -- Name (Node2)
5474 -- Corresponding_Generic_Association (Node5-Sem)
5476 -----------------------------------------
5477 -- 8.5 Exception Renaming Declaration --
5478 -----------------------------------------
5480 -- EXCEPTION_RENAMING_DECLARATION ::=
5481 -- DEFINING_IDENTIFIER : exception renames exception_NAME
5482 -- [ASPECT_SPECIFICATIONS];
5484 -- N_Exception_Renaming_Declaration
5485 -- Sloc points to first identifier
5486 -- Defining_Identifier (Node1)
5487 -- Name (Node2)
5489 ---------------------------------------
5490 -- 8.5 Package Renaming Declaration --
5491 ---------------------------------------
5493 -- PACKAGE_RENAMING_DECLARATION ::=
5494 -- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME
5495 -- [ASPECT_SPECIFICATIONS];
5497 -- N_Package_Renaming_Declaration
5498 -- Sloc points to PACKAGE
5499 -- Defining_Unit_Name (Node1)
5500 -- Name (Node2)
5501 -- Parent_Spec (Node4-Sem)
5503 ------------------------------------------
5504 -- 8.5 Subprogram Renaming Declaration --
5505 ------------------------------------------
5507 -- SUBPROGRAM_RENAMING_DECLARATION ::=
5508 -- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME
5509 -- [ASPECT_SPECIFICATIONS];
5511 -- N_Subprogram_Renaming_Declaration
5512 -- Sloc points to RENAMES
5513 -- Specification (Node1)
5514 -- Name (Node2)
5515 -- Parent_Spec (Node4-Sem)
5516 -- Corresponding_Spec (Node5-Sem)
5517 -- Corresponding_Formal_Spec (Node3-Sem)
5518 -- From_Default (Flag6-Sem)
5520 -----------------------------------------
5521 -- 8.5.5 Generic Renaming Declaration --
5522 -----------------------------------------
5524 -- GENERIC_RENAMING_DECLARATION ::=
5525 -- generic package DEFINING_PROGRAM_UNIT_NAME
5526 -- renames generic_package_NAME
5527 -- [ASPECT_SPECIFICATIONS];
5528 -- | generic procedure DEFINING_PROGRAM_UNIT_NAME
5529 -- renames generic_procedure_NAME
5530 -- [ASPECT_SPECIFICATIONS];
5531 -- | generic function DEFINING_PROGRAM_UNIT_NAME
5532 -- renames generic_function_NAME
5533 -- [ASPECT_SPECIFICATIONS];
5535 -- N_Generic_Package_Renaming_Declaration
5536 -- Sloc points to GENERIC
5537 -- Defining_Unit_Name (Node1)
5538 -- Name (Node2)
5539 -- Parent_Spec (Node4-Sem)
5541 -- N_Generic_Procedure_Renaming_Declaration
5542 -- Sloc points to GENERIC
5543 -- Defining_Unit_Name (Node1)
5544 -- Name (Node2)
5545 -- Parent_Spec (Node4-Sem)
5547 -- N_Generic_Function_Renaming_Declaration
5548 -- Sloc points to GENERIC
5549 -- Defining_Unit_Name (Node1)
5550 -- Name (Node2)
5551 -- Parent_Spec (Node4-Sem)
5553 --------------------------------
5554 -- 9.1 Task Type Declaration --
5555 --------------------------------
5557 -- TASK_TYPE_DECLARATION ::=
5558 -- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5559 -- [ASPECT_SPECIFICATIONS]
5560 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5562 -- N_Task_Type_Declaration
5563 -- Sloc points to TASK
5564 -- Defining_Identifier (Node1)
5565 -- Discriminant_Specifications (List4) (set to No_List if no
5566 -- discriminant part)
5567 -- Interface_List (List2) (set to No_List if none)
5568 -- Task_Definition (Node3) (set to Empty if not present)
5569 -- Corresponding_Body (Node5-Sem)
5571 ----------------------------------
5572 -- 9.1 Single Task Declaration --
5573 ----------------------------------
5575 -- SINGLE_TASK_DECLARATION ::=
5576 -- task DEFINING_IDENTIFIER
5577 -- [ASPECT_SPECIFICATIONS]
5578 -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
5580 -- N_Single_Task_Declaration
5581 -- Sloc points to TASK
5582 -- Defining_Identifier (Node1)
5583 -- Interface_List (List2) (set to No_List if none)
5584 -- Task_Definition (Node3) (set to Empty if not present)
5586 --------------------------
5587 -- 9.1 Task Definition --
5588 --------------------------
5590 -- TASK_DEFINITION ::=
5591 -- {TASK_ITEM}
5592 -- [private
5593 -- {TASK_ITEM}]
5594 -- end [task_IDENTIFIER]
5596 -- Note: as a result of semantic analysis, the list of task items can
5597 -- include implicit type declarations resulting from entry families.
5599 -- N_Task_Definition
5600 -- Sloc points to first token of task definition
5601 -- Visible_Declarations (List2)
5602 -- Private_Declarations (List3) (set to No_List if no private part)
5603 -- End_Label (Node4)
5604 -- Has_Storage_Size_Pragma (Flag5-Sem)
5605 -- Has_Relative_Deadline_Pragma (Flag9-Sem)
5607 --------------------
5608 -- 9.1 Task Item --
5609 --------------------
5611 -- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
5613 --------------------
5614 -- 9.1 Task Body --
5615 --------------------
5617 -- TASK_BODY ::=
5618 -- task body task_DEFINING_IDENTIFIER
5619 -- [ASPECT_SPECIFICATIONS]
5620 -- is
5621 -- DECLARATIVE_PART
5622 -- begin
5623 -- HANDLED_SEQUENCE_OF_STATEMENTS
5624 -- end [task_IDENTIFIER];
5626 -- Gigi restriction: This node never appears
5628 -- N_Task_Body
5629 -- Sloc points to TASK
5630 -- Defining_Identifier (Node1)
5631 -- Declarations (List2)
5632 -- Handled_Statement_Sequence (Node4)
5633 -- Is_Task_Master (Flag5-Sem)
5634 -- Activation_Chain_Entity (Node3-Sem)
5635 -- Corresponding_Spec (Node5-Sem)
5636 -- Was_Originally_Stub (Flag13-Sem)
5638 -------------------------------------
5639 -- 9.4 Protected Type Declaration --
5640 -------------------------------------
5642 -- PROTECTED_TYPE_DECLARATION ::=
5643 -- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
5644 -- [ASPECT_SPECIFICATIONS]
5645 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5647 -- Note: protected type declarations are not permitted in Ada 83 mode
5649 -- N_Protected_Type_Declaration
5650 -- Sloc points to PROTECTED
5651 -- Defining_Identifier (Node1)
5652 -- Discriminant_Specifications (List4) (set to No_List if no
5653 -- discriminant part)
5654 -- Interface_List (List2) (set to No_List if none)
5655 -- Protected_Definition (Node3)
5656 -- Corresponding_Body (Node5-Sem)
5658 ---------------------------------------
5659 -- 9.4 Single Protected Declaration --
5660 ---------------------------------------
5662 -- SINGLE_PROTECTED_DECLARATION ::=
5663 -- protected DEFINING_IDENTIFIER
5664 -- [ASPECT_SPECIFICATIONS]
5665 -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
5667 -- Note: single protected declarations are not allowed in Ada 83 mode
5669 -- N_Single_Protected_Declaration
5670 -- Sloc points to PROTECTED
5671 -- Defining_Identifier (Node1)
5672 -- Interface_List (List2) (set to No_List if none)
5673 -- Protected_Definition (Node3)
5675 -------------------------------
5676 -- 9.4 Protected Definition --
5677 -------------------------------
5679 -- PROTECTED_DEFINITION ::=
5680 -- {PROTECTED_OPERATION_DECLARATION}
5681 -- [private
5682 -- {PROTECTED_ELEMENT_DECLARATION}]
5683 -- end [protected_IDENTIFIER]
5685 -- N_Protected_Definition
5686 -- Sloc points to first token of protected definition
5687 -- Visible_Declarations (List2)
5688 -- Private_Declarations (List3) (set to No_List if no private part)
5689 -- End_Label (Node4)
5691 ------------------------------------------
5692 -- 9.4 Protected Operation Declaration --
5693 ------------------------------------------
5695 -- PROTECTED_OPERATION_DECLARATION ::=
5696 -- SUBPROGRAM_DECLARATION
5697 -- | ENTRY_DECLARATION
5698 -- | REPRESENTATION_CLAUSE
5700 ----------------------------------------
5701 -- 9.4 Protected Element Declaration --
5702 ----------------------------------------
5704 -- PROTECTED_ELEMENT_DECLARATION ::=
5705 -- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
5707 -------------------------
5708 -- 9.4 Protected Body --
5709 -------------------------
5711 -- PROTECTED_BODY ::=
5712 -- protected body DEFINING_IDENTIFIER
5713 -- [ASPECT_SPECIFICATIONS];
5714 -- is
5715 -- {PROTECTED_OPERATION_ITEM}
5716 -- end [protected_IDENTIFIER];
5718 -- Note: protected bodies are not allowed in Ada 83 mode
5720 -- Gigi restriction: This node never appears
5722 -- N_Protected_Body
5723 -- Sloc points to PROTECTED
5724 -- Defining_Identifier (Node1)
5725 -- Declarations (List2) protected operation items (and pragmas)
5726 -- End_Label (Node4)
5727 -- Corresponding_Spec (Node5-Sem)
5728 -- Was_Originally_Stub (Flag13-Sem)
5730 -----------------------------------
5731 -- 9.4 Protected Operation Item --
5732 -----------------------------------
5734 -- PROTECTED_OPERATION_ITEM ::=
5735 -- SUBPROGRAM_DECLARATION
5736 -- | SUBPROGRAM_BODY
5737 -- | ENTRY_BODY
5738 -- | REPRESENTATION_CLAUSE
5740 ------------------------------
5741 -- 9.5.2 Entry Declaration --
5742 ------------------------------
5744 -- ENTRY_DECLARATION ::=
5745 -- [[not] overriding]
5746 -- entry DEFINING_IDENTIFIER
5747 -- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE
5748 -- [ASPECT_SPECIFICATIONS];
5750 -- N_Entry_Declaration
5751 -- Sloc points to ENTRY
5752 -- Defining_Identifier (Node1)
5753 -- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
5754 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5755 -- Corresponding_Body (Node5-Sem)
5756 -- Must_Override (Flag14) set if overriding indicator present
5757 -- Must_Not_Override (Flag15) set if not_overriding indicator present
5759 -- Note: overriding indicator is an Ada 2005 feature
5761 -----------------------------
5762 -- 9.5.2 Accept statement --
5763 -----------------------------
5765 -- ACCEPT_STATEMENT ::=
5766 -- accept entry_DIRECT_NAME
5767 -- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
5768 -- HANDLED_SEQUENCE_OF_STATEMENTS
5769 -- end [entry_IDENTIFIER]];
5771 -- Gigi restriction: This node never appears
5773 -- Note: there are no explicit declarations allowed in an accept
5774 -- statement. However, the implicit declarations for any statement
5775 -- identifiers (labels and block/loop identifiers) are declarations
5776 -- that belong logically to the accept statement, and that is why
5777 -- there is a Declarations field in this node.
5779 -- N_Accept_Statement
5780 -- Sloc points to ACCEPT
5781 -- Entry_Direct_Name (Node1)
5782 -- Entry_Index (Node5) (set to Empty if not present)
5783 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5784 -- Handled_Statement_Sequence (Node4)
5785 -- Declarations (List2) (set to No_List if no declarations)
5787 ------------------------
5788 -- 9.5.2 Entry Index --
5789 ------------------------
5791 -- ENTRY_INDEX ::= EXPRESSION
5793 -----------------------
5794 -- 9.5.2 Entry Body --
5795 -----------------------
5797 -- ENTRY_BODY ::=
5798 -- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
5799 -- DECLARATIVE_PART
5800 -- begin
5801 -- HANDLED_SEQUENCE_OF_STATEMENTS
5802 -- end [entry_IDENTIFIER];
5804 -- ENTRY_BARRIER ::= when CONDITION
5806 -- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
5807 -- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
5808 -- too full (it would otherwise have too many fields)
5810 -- Gigi restriction: This node never appears
5812 -- N_Entry_Body
5813 -- Sloc points to ENTRY
5814 -- Defining_Identifier (Node1)
5815 -- Entry_Body_Formal_Part (Node5)
5816 -- Declarations (List2)
5817 -- Handled_Statement_Sequence (Node4)
5818 -- Activation_Chain_Entity (Node3-Sem)
5820 -----------------------------------
5821 -- 9.5.2 Entry Body Formal Part --
5822 -----------------------------------
5824 -- ENTRY_BODY_FORMAL_PART ::=
5825 -- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
5827 -- Note that an entry body formal part node is present even if it is
5828 -- empty. This reflects the grammar, in which it is the components of
5829 -- the entry body formal part that are optional, not the entry body
5830 -- formal part itself. Also this means that the barrier condition
5831 -- always has somewhere to be stored.
5833 -- Gigi restriction: This node never appears
5835 -- N_Entry_Body_Formal_Part
5836 -- Sloc points to first token
5837 -- Entry_Index_Specification (Node4) (set to Empty if not present)
5838 -- Parameter_Specifications (List3) (set to No_List if no formal part)
5839 -- Condition (Node1) from entry barrier of entry body
5841 --------------------------
5842 -- 9.5.2 Entry Barrier --
5843 --------------------------
5845 -- ENTRY_BARRIER ::= when CONDITION
5847 --------------------------------------
5848 -- 9.5.2 Entry Index Specification --
5849 --------------------------------------
5851 -- ENTRY_INDEX_SPECIFICATION ::=
5852 -- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
5854 -- Gigi restriction: This node never appears
5856 -- N_Entry_Index_Specification
5857 -- Sloc points to FOR
5858 -- Defining_Identifier (Node1)
5859 -- Discrete_Subtype_Definition (Node4)
5861 ---------------------------------
5862 -- 9.5.3 Entry Call Statement --
5863 ---------------------------------
5865 -- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
5867 -- The parser may generate a procedure call for this construct. The
5868 -- semantic pass must correct this misidentification where needed.
5870 -- Gigi restriction: This node never appears
5872 -- N_Entry_Call_Statement
5873 -- Sloc points to first token of name
5874 -- Name (Node2)
5875 -- Parameter_Associations (List3) (set to No_List if no
5876 -- actual parameter part)
5877 -- First_Named_Actual (Node4-Sem)
5879 ------------------------------
5880 -- 9.5.4 Requeue Statement --
5881 ------------------------------
5883 -- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
5885 -- Note: requeue statements are not permitted in Ada 83 mode
5887 -- Gigi restriction: This node never appears
5889 -- N_Requeue_Statement
5890 -- Sloc points to REQUEUE
5891 -- Name (Node2)
5892 -- Abort_Present (Flag15)
5894 --------------------------
5895 -- 9.6 Delay Statement --
5896 --------------------------
5898 -- DELAY_STATEMENT ::=
5899 -- DELAY_UNTIL_STATEMENT
5900 -- | DELAY_RELATIVE_STATEMENT
5902 --------------------------------
5903 -- 9.6 Delay Until Statement --
5904 --------------------------------
5906 -- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
5908 -- Note: delay until statements are not permitted in Ada 83 mode
5910 -- Gigi restriction: This node never appears
5912 -- N_Delay_Until_Statement
5913 -- Sloc points to DELAY
5914 -- Expression (Node3)
5916 -----------------------------------
5917 -- 9.6 Delay Relative Statement --
5918 -----------------------------------
5920 -- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
5922 -- Gigi restriction: This node never appears
5924 -- N_Delay_Relative_Statement
5925 -- Sloc points to DELAY
5926 -- Expression (Node3)
5928 ---------------------------
5929 -- 9.7 Select Statement --
5930 ---------------------------
5932 -- SELECT_STATEMENT ::=
5933 -- SELECTIVE_ACCEPT
5934 -- | TIMED_ENTRY_CALL
5935 -- | CONDITIONAL_ENTRY_CALL
5936 -- | ASYNCHRONOUS_SELECT
5938 -----------------------------
5939 -- 9.7.1 Selective Accept --
5940 -----------------------------
5942 -- SELECTIVE_ACCEPT ::=
5943 -- select
5944 -- [GUARD]
5945 -- SELECT_ALTERNATIVE
5946 -- {or
5947 -- [GUARD]
5948 -- SELECT_ALTERNATIVE}
5949 -- [else
5950 -- SEQUENCE_OF_STATEMENTS]
5951 -- end select;
5953 -- Gigi restriction: This node never appears
5955 -- Note: the guard expression, if present, appears in the node for
5956 -- the select alternative.
5958 -- N_Selective_Accept
5959 -- Sloc points to SELECT
5960 -- Select_Alternatives (List1)
5961 -- Else_Statements (List4) (set to No_List if no else part)
5963 ------------------
5964 -- 9.7.1 Guard --
5965 ------------------
5967 -- GUARD ::= when CONDITION =>
5969 -- As noted above, the CONDITION that is part of a GUARD is included
5970 -- in the node for the select alternative for convenience.
5972 -------------------------------
5973 -- 9.7.1 Select Alternative --
5974 -------------------------------
5976 -- SELECT_ALTERNATIVE ::=
5977 -- ACCEPT_ALTERNATIVE
5978 -- | DELAY_ALTERNATIVE
5979 -- | TERMINATE_ALTERNATIVE
5981 -------------------------------
5982 -- 9.7.1 Accept Alternative --
5983 -------------------------------
5985 -- ACCEPT_ALTERNATIVE ::=
5986 -- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
5988 -- Gigi restriction: This node never appears
5990 -- N_Accept_Alternative
5991 -- Sloc points to ACCEPT
5992 -- Accept_Statement (Node2)
5993 -- Condition (Node1) from the guard (set to Empty if no guard present)
5994 -- Statements (List3) (set to Empty_List if no statements)
5995 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
5996 -- Accept_Handler_Records (List5-Sem)
5998 ------------------------------
5999 -- 9.7.1 Delay Alternative --
6000 ------------------------------
6002 -- DELAY_ALTERNATIVE ::=
6003 -- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
6005 -- Gigi restriction: This node never appears
6007 -- N_Delay_Alternative
6008 -- Sloc points to DELAY
6009 -- Delay_Statement (Node2)
6010 -- Condition (Node1) from the guard (set to Empty if no guard present)
6011 -- Statements (List3) (set to Empty_List if no statements)
6012 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6014 ----------------------------------
6015 -- 9.7.1 Terminate Alternative --
6016 ----------------------------------
6018 -- TERMINATE_ALTERNATIVE ::= terminate;
6020 -- Gigi restriction: This node never appears
6022 -- N_Terminate_Alternative
6023 -- Sloc points to TERMINATE
6024 -- Condition (Node1) from the guard (set to Empty if no guard present)
6025 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6026 -- Pragmas_After (List5) pragmas after alt (set to No_List if none)
6028 -----------------------------
6029 -- 9.7.2 Timed Entry Call --
6030 -----------------------------
6032 -- TIMED_ENTRY_CALL ::=
6033 -- select
6034 -- ENTRY_CALL_ALTERNATIVE
6035 -- or
6036 -- DELAY_ALTERNATIVE
6037 -- end select;
6039 -- Gigi restriction: This node never appears
6041 -- N_Timed_Entry_Call
6042 -- Sloc points to SELECT
6043 -- Entry_Call_Alternative (Node1)
6044 -- Delay_Alternative (Node4)
6046 -----------------------------------
6047 -- 9.7.2 Entry Call Alternative --
6048 -----------------------------------
6050 -- ENTRY_CALL_ALTERNATIVE ::=
6051 -- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
6053 -- PROCEDURE_OR_ENTRY_CALL ::=
6054 -- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
6056 -- Gigi restriction: This node never appears
6058 -- N_Entry_Call_Alternative
6059 -- Sloc points to first token of entry call statement
6060 -- Entry_Call_Statement (Node1)
6061 -- Statements (List3) (set to Empty_List if no statements)
6062 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6064 -----------------------------------
6065 -- 9.7.3 Conditional Entry Call --
6066 -----------------------------------
6068 -- CONDITIONAL_ENTRY_CALL ::=
6069 -- select
6070 -- ENTRY_CALL_ALTERNATIVE
6071 -- else
6072 -- SEQUENCE_OF_STATEMENTS
6073 -- end select;
6075 -- Gigi restriction: This node never appears
6077 -- N_Conditional_Entry_Call
6078 -- Sloc points to SELECT
6079 -- Entry_Call_Alternative (Node1)
6080 -- Else_Statements (List4)
6082 --------------------------------
6083 -- 9.7.4 Asynchronous Select --
6084 --------------------------------
6086 -- ASYNCHRONOUS_SELECT ::=
6087 -- select
6088 -- TRIGGERING_ALTERNATIVE
6089 -- then abort
6090 -- ABORTABLE_PART
6091 -- end select;
6093 -- Note: asynchronous select is not permitted in Ada 83 mode
6095 -- Gigi restriction: This node never appears
6097 -- N_Asynchronous_Select
6098 -- Sloc points to SELECT
6099 -- Triggering_Alternative (Node1)
6100 -- Abortable_Part (Node2)
6102 -----------------------------------
6103 -- 9.7.4 Triggering Alternative --
6104 -----------------------------------
6106 -- TRIGGERING_ALTERNATIVE ::=
6107 -- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
6109 -- Gigi restriction: This node never appears
6111 -- N_Triggering_Alternative
6112 -- Sloc points to first token of triggering statement
6113 -- Triggering_Statement (Node1)
6114 -- Statements (List3) (set to Empty_List if no statements)
6115 -- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
6117 ---------------------------------
6118 -- 9.7.4 Triggering Statement --
6119 ---------------------------------
6121 -- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
6123 ---------------------------
6124 -- 9.7.4 Abortable Part --
6125 ---------------------------
6127 -- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
6129 -- Gigi restriction: This node never appears
6131 -- N_Abortable_Part
6132 -- Sloc points to ABORT
6133 -- Statements (List3)
6135 --------------------------
6136 -- 9.8 Abort Statement --
6137 --------------------------
6139 -- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
6141 -- Gigi restriction: This node never appears
6143 -- N_Abort_Statement
6144 -- Sloc points to ABORT
6145 -- Names (List2)
6147 -------------------------
6148 -- 10.1.1 Compilation --
6149 -------------------------
6151 -- COMPILATION ::= {COMPILATION_UNIT}
6153 -- There is no explicit node in the tree for a compilation, since in
6154 -- general the compiler is processing only a single compilation unit
6155 -- at a time. It is possible to parse multiple units in syntax check
6156 -- only mode, but the trees are discarded in that case.
6158 ------------------------------
6159 -- 10.1.1 Compilation Unit --
6160 ------------------------------
6162 -- COMPILATION_UNIT ::=
6163 -- CONTEXT_CLAUSE LIBRARY_ITEM
6164 -- | CONTEXT_CLAUSE SUBUNIT
6166 -- The N_Compilation_Unit node itself represents the above syntax.
6167 -- However, there are two additional items not reflected in the above
6168 -- syntax. First we have the global declarations that are added by the
6169 -- code generator. These are outer level declarations (so they cannot
6170 -- be represented as being inside the units). An example is the wrapper
6171 -- subprograms that are created to do ABE checking. As always a list of
6172 -- declarations can contain actions as well (i.e. statements), and such
6173 -- statements are executed as part of the elaboration of the unit. Note
6174 -- that all such declarations are elaborated before the library unit.
6176 -- Similarly, certain actions need to be elaborated at the completion
6177 -- of elaboration of the library unit (notably the statement that sets
6178 -- the Boolean flag indicating that elaboration is complete).
6180 -- The third item not reflected in the syntax is pragmas that appear
6181 -- after the compilation unit. As always pragmas are a problem since
6182 -- they are not part of the formal syntax, but can be stuck into the
6183 -- source following a set of ad hoc rules, and we have to find an ad
6184 -- hoc way of sticking them into the tree. For pragmas that appear
6185 -- before the library unit, we just consider them to be part of the
6186 -- context clause, and pragmas can appear in the Context_Items list
6187 -- of the compilation unit. However, pragmas can also appear after
6188 -- the library item.
6190 -- To deal with all these problems, we create an auxiliary node for
6191 -- a compilation unit, referenced from the N_Compilation_Unit node,
6192 -- that contains these items.
6194 -- N_Compilation_Unit
6195 -- Sloc points to first token of defining unit name
6196 -- Library_Unit (Node4-Sem) corresponding/parent spec/body
6197 -- Context_Items (List1) context items and pragmas preceding unit
6198 -- Private_Present (Flag15) set if library unit has private keyword
6199 -- Unit (Node2) library item or subunit
6200 -- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
6201 -- Has_No_Elaboration_Code (Flag17-Sem)
6202 -- Body_Required (Flag13-Sem) set for spec if body is required
6203 -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
6204 -- Context_Pending (Flag16-Sem)
6205 -- First_Inlined_Subprogram (Node3-Sem)
6206 -- Has_Pragma_Suppress_All (Flag14-Sem)
6208 -- N_Compilation_Unit_Aux
6209 -- Sloc is a copy of the Sloc from the N_Compilation_Unit node
6210 -- Declarations (List2) (set to No_List if no global declarations)
6211 -- Actions (List1) (set to No_List if no actions)
6212 -- Pragmas_After (List5) pragmas after unit (set to No_List if none)
6213 -- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
6214 -- Default_Storage_Pool (Node3-Sem)
6216 --------------------------
6217 -- 10.1.1 Library Item --
6218 --------------------------
6220 -- LIBRARY_ITEM ::=
6221 -- [private] LIBRARY_UNIT_DECLARATION
6222 -- | LIBRARY_UNIT_BODY
6223 -- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
6225 -- Note: PRIVATE is not allowed in Ada 83 mode
6227 -- There is no explicit node in the tree for library item, instead
6228 -- the declaration or body, and the flag for private if present,
6229 -- appear in the N_Compilation_Unit node.
6231 --------------------------------------
6232 -- 10.1.1 Library Unit Declaration --
6233 --------------------------------------
6235 -- LIBRARY_UNIT_DECLARATION ::=
6236 -- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
6237 -- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
6239 -----------------------------------------------
6240 -- 10.1.1 Library Unit Renaming Declaration --
6241 -----------------------------------------------
6243 -- LIBRARY_UNIT_RENAMING_DECLARATION ::=
6244 -- PACKAGE_RENAMING_DECLARATION
6245 -- | GENERIC_RENAMING_DECLARATION
6246 -- | SUBPROGRAM_RENAMING_DECLARATION
6248 -------------------------------
6249 -- 10.1.1 Library unit body --
6250 -------------------------------
6252 -- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
6254 ------------------------------
6255 -- 10.1.1 Parent Unit Name --
6256 ------------------------------
6258 -- PARENT_UNIT_NAME ::= NAME
6260 ----------------------------
6261 -- 10.1.2 Context clause --
6262 ----------------------------
6264 -- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
6266 -- The context clause can include pragmas, and any pragmas that appear
6267 -- before the context clause proper (i.e. all configuration pragmas,
6268 -- also appear at the front of this list).
6270 --------------------------
6271 -- 10.1.2 Context_Item --
6272 --------------------------
6274 -- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
6276 -------------------------
6277 -- 10.1.2 With clause --
6278 -------------------------
6280 -- WITH_CLAUSE ::=
6281 -- with library_unit_NAME {,library_unit_NAME};
6283 -- A separate With clause is built for each name, so that we have
6284 -- a Corresponding_Spec field for each with'ed spec. The flags
6285 -- First_Name and Last_Name are used to reconstruct the exact
6286 -- source form. When a list of names appears in one with clause,
6287 -- the first name in the list has First_Name set, and the last
6288 -- has Last_Name set. If the with clause has only one name, then
6289 -- both of the flags First_Name and Last_Name are set in this name.
6291 -- Note: in the case of implicit with's that are installed by the
6292 -- Rtsfind routine, Implicit_With is set, and the Sloc is typically
6293 -- set to Standard_Location, but it is incorrect to test the Sloc
6294 -- to find out if a with clause is implicit, test the flag instead.
6296 -- N_With_Clause
6297 -- Sloc points to first token of library unit name
6298 -- Withed_Body (Node1-Sem)
6299 -- Name (Node2)
6300 -- Next_Implicit_With (Node3-Sem)
6301 -- Library_Unit (Node4-Sem)
6302 -- Corresponding_Spec (Node5-Sem)
6303 -- First_Name (Flag5) (set to True if first name or only one name)
6304 -- Last_Name (Flag6) (set to True if last name or only one name)
6305 -- Context_Installed (Flag13-Sem)
6306 -- Elaborate_Present (Flag4-Sem)
6307 -- Elaborate_All_Present (Flag14-Sem)
6308 -- Elaborate_All_Desirable (Flag9-Sem)
6309 -- Elaborate_Desirable (Flag11-Sem)
6310 -- Private_Present (Flag15) set if with_clause has private keyword
6311 -- Implicit_With (Flag16-Sem)
6312 -- Implicit_With_From_Instantiation (Flag12-Sem)
6313 -- Limited_Present (Flag17) set if LIMITED is present
6314 -- Limited_View_Installed (Flag18-Sem)
6315 -- Unreferenced_In_Spec (Flag7-Sem)
6316 -- No_Entities_Ref_In_Spec (Flag8-Sem)
6318 -- Note: Limited_Present and Limited_View_Installed are used to support
6319 -- the implementation of Ada 2005 (AI-50217).
6321 -- Similarly, Private_Present is used to support the implementation of
6322 -- Ada 2005 (AI-50262).
6324 ----------------------
6325 -- With_Type clause --
6326 ----------------------
6328 -- This is a GNAT extension, used to implement mutually recursive
6329 -- types declared in different packages.
6331 -- Note: this is now obsolete. The functionality of this construct
6332 -- is now implemented by the Ada 2005 limited_with_clause.
6334 ---------------------
6335 -- 10.2 Body stub --
6336 ---------------------
6338 -- BODY_STUB ::=
6339 -- SUBPROGRAM_BODY_STUB
6340 -- | PACKAGE_BODY_STUB
6341 -- | TASK_BODY_STUB
6342 -- | PROTECTED_BODY_STUB
6344 ----------------------------------
6345 -- 10.1.3 Subprogram Body Stub --
6346 ----------------------------------
6348 -- SUBPROGRAM_BODY_STUB ::=
6349 -- SUBPROGRAM_SPECIFICATION is separate
6350 -- [ASPECT_SPECIFICATION];
6352 -- N_Subprogram_Body_Stub
6353 -- Sloc points to FUNCTION or PROCEDURE
6354 -- Specification (Node1)
6355 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6356 -- Library_Unit (Node4-Sem) points to the subunit
6357 -- Corresponding_Body (Node5-Sem)
6359 -------------------------------
6360 -- 10.1.3 Package Body Stub --
6361 -------------------------------
6363 -- PACKAGE_BODY_STUB ::=
6364 -- package body DEFINING_IDENTIFIER is separate
6365 -- [ASPECT_SPECIFICATION];
6367 -- N_Package_Body_Stub
6368 -- Sloc points to PACKAGE
6369 -- Defining_Identifier (Node1)
6370 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6371 -- Library_Unit (Node4-Sem) points to the subunit
6372 -- Corresponding_Body (Node5-Sem)
6374 ----------------------------
6375 -- 10.1.3 Task Body Stub --
6376 ----------------------------
6378 -- TASK_BODY_STUB ::=
6379 -- task body DEFINING_IDENTIFIER is separate
6380 -- [ASPECT_SPECIFICATION];
6382 -- N_Task_Body_Stub
6383 -- Sloc points to TASK
6384 -- Defining_Identifier (Node1)
6385 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6386 -- Library_Unit (Node4-Sem) points to the subunit
6387 -- Corresponding_Body (Node5-Sem)
6389 ---------------------------------
6390 -- 10.1.3 Protected Body Stub --
6391 ---------------------------------
6393 -- PROTECTED_BODY_STUB ::=
6394 -- protected body DEFINING_IDENTIFIER is separate
6395 -- [ASPECT_SPECIFICATION];
6397 -- Note: protected body stubs are not allowed in Ada 83 mode
6399 -- N_Protected_Body_Stub
6400 -- Sloc points to PROTECTED
6401 -- Defining_Identifier (Node1)
6402 -- Corresponding_Spec_Of_Stub (Node2-Sem)
6403 -- Library_Unit (Node4-Sem) points to the subunit
6404 -- Corresponding_Body (Node5-Sem)
6406 ---------------------
6407 -- 10.1.3 Subunit --
6408 ---------------------
6410 -- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
6412 -- N_Subunit
6413 -- Sloc points to SEPARATE
6414 -- Name (Node2) is the name of the parent unit
6415 -- Proper_Body (Node1) is the subunit body
6416 -- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
6418 ---------------------------------
6419 -- 11.1 Exception Declaration --
6420 ---------------------------------
6422 -- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
6423 -- [ASPECT_SPECIFICATIONS];
6425 -- For consistency with object declarations etc., the parser converts
6426 -- the case of multiple identifiers being declared to a series of
6427 -- declarations in which the expression is copied, using the More_Ids
6428 -- and Prev_Ids flags to remember the source form as described in the
6429 -- section on "Handling of Defining Identifier Lists".
6431 -- N_Exception_Declaration
6432 -- Sloc points to EXCEPTION
6433 -- Defining_Identifier (Node1)
6434 -- Expression (Node3-Sem)
6435 -- Renaming_Exception (Node2-Sem)
6436 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6437 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6439 ------------------------------------------
6440 -- 11.2 Handled Sequence Of Statements --
6441 ------------------------------------------
6443 -- HANDLED_SEQUENCE_OF_STATEMENTS ::=
6444 -- SEQUENCE_OF_STATEMENTS
6445 -- [exception
6446 -- EXCEPTION_HANDLER
6447 -- {EXCEPTION_HANDLER}]
6448 -- [at end
6449 -- cleanup_procedure_call (param, param, param, ...);]
6451 -- The AT END phrase is a GNAT extension to provide for cleanups. It is
6452 -- used only internally currently, but is considered to be syntactic.
6453 -- At the moment, the only cleanup action allowed is a single call to
6454 -- a parameterless procedure, and the Identifier field of the node is
6455 -- the procedure to be called. The cleanup action occurs whenever the
6456 -- sequence of statements is left for any reason. The possible reasons
6457 -- are:
6458 -- 1. reaching the end of the sequence
6459 -- 2. exit, return, or goto
6460 -- 3. exception or abort
6461 -- For some back ends, such as gcc with ZCX, "at end" is implemented
6462 -- entirely in the back end. In this case, a handled sequence of
6463 -- statements with an "at end" cannot also have exception handlers.
6464 -- For other back ends, such as gcc with SJLJ and .NET, the
6465 -- implementation is split between the front end and back end; the front
6466 -- end implements 3, and the back end implements 1 and 2. In this case,
6467 -- if there is an "at end", the front end inserts the appropriate
6468 -- exception handler, and this handler takes precedence over "at end"
6469 -- in case of exception.
6471 -- The inserted exception handler is of the form:
6473 -- when all others =>
6474 -- cleanup;
6475 -- raise;
6477 -- where cleanup is the procedure to be called. The reason we do this is
6478 -- so that the front end can handle the necessary entries in the
6479 -- exception tables, and other exception handler actions required as
6480 -- part of the normal handling for exception handlers.
6482 -- The AT END cleanup handler protects only the sequence of statements
6483 -- (not the associated declarations of the parent), just like exception
6484 -- handlers. The big difference is that the cleanup procedure is called
6485 -- on either a normal or an abnormal exit from the statement sequence.
6487 -- Note: the list of Exception_Handlers can contain pragmas as well
6488 -- as actual handlers. In practice these pragmas can only occur at
6489 -- the start of the list, since any pragmas occurring later on will
6490 -- be included in the statement list of the corresponding handler.
6492 -- Note: although in the Ada syntax, the sequence of statements in
6493 -- a handled sequence of statements can only contain statements, we
6494 -- allow free mixing of declarations and statements in the resulting
6495 -- expanded tree. This is for example used to deal with the case of
6496 -- a cleanup procedure that must handle declarations as well as the
6497 -- statements of a block.
6499 -- N_Handled_Sequence_Of_Statements
6500 -- Sloc points to first token of first statement
6501 -- Statements (List3)
6502 -- End_Label (Node4) (set to Empty if expander generated)
6503 -- Exception_Handlers (List5) (set to No_List if none present)
6504 -- At_End_Proc (Node1) (set to Empty if no clean up procedure)
6505 -- First_Real_Statement (Node2-Sem)
6507 -- Note: the parent always contains a Declarations field which contains
6508 -- declarations associated with the handled sequence of statements. This
6509 -- is true even in the case of an accept statement (see description of
6510 -- the N_Accept_Statement node).
6512 -- End_Label refers to the containing construct
6514 -----------------------------
6515 -- 11.2 Exception Handler --
6516 -----------------------------
6518 -- EXCEPTION_HANDLER ::=
6519 -- when [CHOICE_PARAMETER_SPECIFICATION :]
6520 -- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
6521 -- SEQUENCE_OF_STATEMENTS
6523 -- Note: choice parameter specification is not allowed in Ada 83 mode
6525 -- N_Exception_Handler
6526 -- Sloc points to WHEN
6527 -- Choice_Parameter (Node2) (set to Empty if not present)
6528 -- Exception_Choices (List4)
6529 -- Statements (List3)
6530 -- Exception_Label (Node5-Sem) (set to Empty of not present)
6531 -- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
6532 -- Local_Raise_Not_OK (Flag7-Sem)
6533 -- Has_Local_Raise (Flag8-Sem)
6535 ------------------------------------------
6536 -- 11.2 Choice parameter specification --
6537 ------------------------------------------
6539 -- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
6541 ----------------------------
6542 -- 11.2 Exception Choice --
6543 ----------------------------
6545 -- EXCEPTION_CHOICE ::= exception_NAME | others
6547 -- Except in the case of OTHERS, no explicit node appears in the tree
6548 -- for exception choice. Instead the exception name appears directly.
6549 -- An OTHERS choice is represented by a N_Others_Choice node (see
6550 -- section 3.8.1.
6552 -- Note: for the exception choice created for an at end handler, the
6553 -- exception choice is an N_Others_Choice node with All_Others set.
6555 ---------------------------
6556 -- 11.3 Raise Statement --
6557 ---------------------------
6559 -- RAISE_STATEMENT ::= raise [exception_NAME];
6561 -- In Ada 2005, we have
6563 -- RAISE_STATEMENT ::=
6564 -- raise; | raise exception_NAME [with string_EXPRESSION];
6566 -- N_Raise_Statement
6567 -- Sloc points to RAISE
6568 -- Name (Node2) (set to Empty if no exception name present)
6569 -- Expression (Node3) (set to Empty if no expression present)
6570 -- From_At_End (Flag4-Sem)
6572 ----------------------------
6573 -- 11.3 Raise Expression --
6574 ----------------------------
6576 -- RAISE_EXPRESSION ::= raise exception_NAME [with string_EXPRESSION]
6578 -- N_Raise_Expression
6579 -- Sloc points to RAISE
6580 -- Name (Node2) (always present)
6581 -- Expression (Node3) (set to Empty if no expression present)
6582 -- Convert_To_Return_False (Flag13-Sem)
6583 -- plus fields for expression
6585 -------------------------------
6586 -- 12.1 Generic Declaration --
6587 -------------------------------
6589 -- GENERIC_DECLARATION ::=
6590 -- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
6592 ------------------------------------------
6593 -- 12.1 Generic Subprogram Declaration --
6594 ------------------------------------------
6596 -- GENERIC_SUBPROGRAM_DECLARATION ::=
6597 -- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION
6598 -- [ASPECT_SPECIFICATIONS];
6600 -- Note: Generic_Formal_Declarations can include pragmas
6602 -- N_Generic_Subprogram_Declaration
6603 -- Sloc points to GENERIC
6604 -- Specification (Node1) subprogram specification
6605 -- Corresponding_Body (Node5-Sem)
6606 -- Generic_Formal_Declarations (List2) from generic formal part
6607 -- Parent_Spec (Node4-Sem)
6609 ---------------------------------------
6610 -- 12.1 Generic Package Declaration --
6611 ---------------------------------------
6613 -- GENERIC_PACKAGE_DECLARATION ::=
6614 -- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
6615 -- [ASPECT_SPECIFICATIONS];
6617 -- Note: when we do generics right, the Activation_Chain_Entity entry
6618 -- for this node can be removed (since the expander won't see generic
6619 -- units any more)???.
6621 -- Note: Generic_Formal_Declarations can include pragmas
6623 -- N_Generic_Package_Declaration
6624 -- Sloc points to GENERIC
6625 -- Specification (Node1) package specification
6626 -- Corresponding_Body (Node5-Sem)
6627 -- Generic_Formal_Declarations (List2) from generic formal part
6628 -- Parent_Spec (Node4-Sem)
6629 -- Activation_Chain_Entity (Node3-Sem)
6631 -------------------------------
6632 -- 12.1 Generic Formal Part --
6633 -------------------------------
6635 -- GENERIC_FORMAL_PART ::=
6636 -- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
6638 ------------------------------------------------
6639 -- 12.1 Generic Formal Parameter Declaration --
6640 ------------------------------------------------
6642 -- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
6643 -- FORMAL_OBJECT_DECLARATION
6644 -- | FORMAL_TYPE_DECLARATION
6645 -- | FORMAL_SUBPROGRAM_DECLARATION
6646 -- | FORMAL_PACKAGE_DECLARATION
6648 ---------------------------------
6649 -- 12.3 Generic Instantiation --
6650 ---------------------------------
6652 -- GENERIC_INSTANTIATION ::=
6653 -- package DEFINING_PROGRAM_UNIT_NAME is
6654 -- new generic_package_NAME [GENERIC_ACTUAL_PART]
6655 -- [ASPECT_SPECIFICATIONS];
6656 -- | [[not] overriding]
6657 -- procedure DEFINING_PROGRAM_UNIT_NAME is
6658 -- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
6659 -- [ASPECT_SPECIFICATIONS];
6660 -- | [[not] overriding]
6661 -- function DEFINING_DESIGNATOR is
6662 -- new generic_function_NAME [GENERIC_ACTUAL_PART]
6663 -- [ASPECT_SPECIFICATIONS];
6665 -- N_Package_Instantiation
6666 -- Sloc points to PACKAGE
6667 -- Defining_Unit_Name (Node1)
6668 -- Name (Node2)
6669 -- Generic_Associations (List3) (set to No_List if no
6670 -- generic actual part)
6671 -- Parent_Spec (Node4-Sem)
6672 -- Instance_Spec (Node5-Sem)
6673 -- ABE_Is_Certain (Flag18-Sem)
6675 -- N_Procedure_Instantiation
6676 -- Sloc points to PROCEDURE
6677 -- Defining_Unit_Name (Node1)
6678 -- Name (Node2)
6679 -- Parent_Spec (Node4-Sem)
6680 -- Generic_Associations (List3) (set to No_List if no
6681 -- generic actual part)
6682 -- Instance_Spec (Node5-Sem)
6683 -- Must_Override (Flag14) set if overriding indicator present
6684 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6685 -- ABE_Is_Certain (Flag18-Sem)
6687 -- N_Function_Instantiation
6688 -- Sloc points to FUNCTION
6689 -- Defining_Unit_Name (Node1)
6690 -- Name (Node2)
6691 -- Generic_Associations (List3) (set to No_List if no
6692 -- generic actual part)
6693 -- Parent_Spec (Node4-Sem)
6694 -- Instance_Spec (Node5-Sem)
6695 -- Must_Override (Flag14) set if overriding indicator present
6696 -- Must_Not_Override (Flag15) set if not_overriding indicator present
6697 -- ABE_Is_Certain (Flag18-Sem)
6699 -- Note: overriding indicator is an Ada 2005 feature
6701 -------------------------------
6702 -- 12.3 Generic Actual Part --
6703 -------------------------------
6705 -- GENERIC_ACTUAL_PART ::=
6706 -- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
6708 -------------------------------
6709 -- 12.3 Generic Association --
6710 -------------------------------
6712 -- GENERIC_ASSOCIATION ::=
6713 -- [generic_formal_parameter_SELECTOR_NAME =>]
6715 -- Note: unlike the procedure call case, a generic association node
6716 -- is generated for every association, even if no formal parameter
6717 -- selector name is present. In this case the parser will leave the
6718 -- Selector_Name field set to Empty, to be filled in later by the
6719 -- semantic pass.
6721 -- In Ada 2005, a formal may be associated with a box, if the
6722 -- association is part of the list of actuals for a formal package.
6723 -- If the association is given by OTHERS => <>, the association is
6724 -- an N_Others_Choice.
6726 -- N_Generic_Association
6727 -- Sloc points to first token of generic association
6728 -- Selector_Name (Node2) (set to Empty if no formal
6729 -- parameter selector name)
6730 -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
6731 -- Box_Present (Flag15) (for formal_package associations with a box)
6733 ---------------------------------------------
6734 -- 12.3 Explicit Generic Actual Parameter --
6735 ---------------------------------------------
6737 -- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
6738 -- EXPRESSION | variable_NAME | subprogram_NAME
6739 -- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
6741 -------------------------------------
6742 -- 12.4 Formal Object Declaration --
6743 -------------------------------------
6745 -- FORMAL_OBJECT_DECLARATION ::=
6746 -- DEFINING_IDENTIFIER_LIST :
6747 -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
6748 -- [ASPECT_SPECIFICATIONS];
6749 -- | DEFINING_IDENTIFIER_LIST :
6750 -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
6751 -- [ASPECT_SPECIFICATIONS];
6753 -- Although the syntax allows multiple identifiers in the list, the
6754 -- semantics is as though successive declarations were given with
6755 -- identical type definition and expression components. To simplify
6756 -- semantic processing, the parser represents a multiple declaration
6757 -- case as a sequence of single declarations, using the More_Ids and
6758 -- Prev_Ids flags to preserve the original source form as described
6759 -- in the section on "Handling of Defining Identifier Lists".
6761 -- N_Formal_Object_Declaration
6762 -- Sloc points to first identifier
6763 -- Defining_Identifier (Node1)
6764 -- In_Present (Flag15)
6765 -- Out_Present (Flag17)
6766 -- Null_Exclusion_Present (Flag11) (set to False if not present)
6767 -- Subtype_Mark (Node4) (set to Empty if not present)
6768 -- Access_Definition (Node3) (set to Empty if not present)
6769 -- Default_Expression (Node5) (set to Empty if no default expression)
6770 -- More_Ids (Flag5) (set to False if no more identifiers in list)
6771 -- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
6773 -----------------------------------
6774 -- 12.5 Formal Type Declaration --
6775 -----------------------------------
6777 -- FORMAL_TYPE_DECLARATION ::=
6778 -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
6779 -- is FORMAL_TYPE_DEFINITION
6780 -- [ASPECT_SPECIFICATIONS];
6781 -- | type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [is tagged]
6783 -- N_Formal_Type_Declaration
6784 -- Sloc points to TYPE
6785 -- Defining_Identifier (Node1)
6786 -- Formal_Type_Definition (Node3)
6787 -- Discriminant_Specifications (List4) (set to No_List if no
6788 -- discriminant part)
6789 -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
6791 ----------------------------------
6792 -- 12.5 Formal type definition --
6793 ----------------------------------
6795 -- FORMAL_TYPE_DEFINITION ::=
6796 -- FORMAL_PRIVATE_TYPE_DEFINITION
6797 -- | FORMAL_DERIVED_TYPE_DEFINITION
6798 -- | FORMAL_DISCRETE_TYPE_DEFINITION
6799 -- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
6800 -- | FORMAL_MODULAR_TYPE_DEFINITION
6801 -- | FORMAL_FLOATING_POINT_DEFINITION
6802 -- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
6803 -- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
6804 -- | FORMAL_ARRAY_TYPE_DEFINITION
6805 -- | FORMAL_ACCESS_TYPE_DEFINITION
6806 -- | FORMAL_INTERFACE_TYPE_DEFINITION
6807 -- | FORMAL_INCOMPLETE_TYPE_DEFINITION
6809 -- The Ada 2012 syntax introduces two new non-terminals:
6810 -- Formal_{Complete,Incomplete}_Type_Declaration just to introduce
6811 -- the latter category. Here we introduce an incomplete type definition
6812 -- in order to preserve as much as possible the existing structure.
6814 ---------------------------------------------
6815 -- 12.5.1 Formal Private Type Definition --
6816 ---------------------------------------------
6818 -- FORMAL_PRIVATE_TYPE_DEFINITION ::=
6819 -- [[abstract] tagged] [limited] private
6821 -- Note: TAGGED is not allowed in Ada 83 mode
6823 -- N_Formal_Private_Type_Definition
6824 -- Sloc points to PRIVATE
6825 -- Uninitialized_Variable (Node3-Sem)
6826 -- Abstract_Present (Flag4)
6827 -- Tagged_Present (Flag15)
6828 -- Limited_Present (Flag17)
6830 --------------------------------------------
6831 -- 12.5.1 Formal Derived Type Definition --
6832 --------------------------------------------
6834 -- FORMAL_DERIVED_TYPE_DEFINITION ::=
6835 -- [abstract] [limited | synchronized]
6836 -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
6837 -- Note: this construct is not allowed in Ada 83 mode
6839 -- N_Formal_Derived_Type_Definition
6840 -- Sloc points to NEW
6841 -- Subtype_Mark (Node4)
6842 -- Private_Present (Flag15)
6843 -- Abstract_Present (Flag4)
6844 -- Limited_Present (Flag17)
6845 -- Synchronized_Present (Flag7)
6846 -- Interface_List (List2) (set to No_List if none)
6848 -----------------------------------------------
6849 -- 12.5.1 Formal Incomplete Type Definition --
6850 -----------------------------------------------
6852 -- FORMAL_INCOMPLETE_TYPE_DEFINITION ::= [tagged]
6854 -- N_Formal_Incomplete_Type_Definition
6855 -- Sloc points to identifier of parent
6856 -- Tagged_Present (Flag15)
6858 ---------------------------------------------
6859 -- 12.5.2 Formal Discrete Type Definition --
6860 ---------------------------------------------
6862 -- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
6864 -- N_Formal_Discrete_Type_Definition
6865 -- Sloc points to (
6867 ---------------------------------------------------
6868 -- 12.5.2 Formal Signed Integer Type Definition --
6869 ---------------------------------------------------
6871 -- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
6873 -- N_Formal_Signed_Integer_Type_Definition
6874 -- Sloc points to RANGE
6876 --------------------------------------------
6877 -- 12.5.2 Formal Modular Type Definition --
6878 --------------------------------------------
6880 -- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
6882 -- N_Formal_Modular_Type_Definition
6883 -- Sloc points to MOD
6885 ----------------------------------------------
6886 -- 12.5.2 Formal Floating Point Definition --
6887 ----------------------------------------------
6889 -- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
6891 -- N_Formal_Floating_Point_Definition
6892 -- Sloc points to DIGITS
6894 ----------------------------------------------------
6895 -- 12.5.2 Formal Ordinary Fixed Point Definition --
6896 ----------------------------------------------------
6898 -- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
6900 -- N_Formal_Ordinary_Fixed_Point_Definition
6901 -- Sloc points to DELTA
6903 ---------------------------------------------------
6904 -- 12.5.2 Formal Decimal Fixed Point Definition --
6905 ---------------------------------------------------
6907 -- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
6909 -- Note: formal decimal fixed point definition not allowed in Ada 83
6911 -- N_Formal_Decimal_Fixed_Point_Definition
6912 -- Sloc points to DELTA
6914 ------------------------------------------
6915 -- 12.5.3 Formal Array Type Definition --
6916 ------------------------------------------
6918 -- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
6920 -------------------------------------------
6921 -- 12.5.4 Formal Access Type Definition --
6922 -------------------------------------------
6924 -- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
6926 ----------------------------------------------
6927 -- 12.5.5 Formal Interface Type Definition --
6928 ----------------------------------------------
6930 -- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
6932 -----------------------------------------
6933 -- 12.6 Formal Subprogram Declaration --
6934 -----------------------------------------
6936 -- FORMAL_SUBPROGRAM_DECLARATION ::=
6937 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
6938 -- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
6940 --------------------------------------------------
6941 -- 12.6 Formal Concrete Subprogram Declaration --
6942 --------------------------------------------------
6944 -- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
6945 -- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
6946 -- [ASPECT_SPECIFICATIONS];
6948 -- N_Formal_Concrete_Subprogram_Declaration
6949 -- Sloc points to WITH
6950 -- Specification (Node1)
6951 -- Default_Name (Node2) (set to Empty if no subprogram default)
6952 -- Box_Present (Flag15)
6954 -- Note: if no subprogram default is present, then Name is set
6955 -- to Empty, and Box_Present is False.
6957 --------------------------------------------------
6958 -- 12.6 Formal Abstract Subprogram Declaration --
6959 --------------------------------------------------
6961 -- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
6962 -- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
6963 -- [ASPECT_SPECIFICATIONS];
6965 -- N_Formal_Abstract_Subprogram_Declaration
6966 -- Sloc points to WITH
6967 -- Specification (Node1)
6968 -- Default_Name (Node2) (set to Empty if no subprogram default)
6969 -- Box_Present (Flag15)
6971 -- Note: if no subprogram default is present, then Name is set
6972 -- to Empty, and Box_Present is False.
6974 ------------------------------
6975 -- 12.6 Subprogram Default --
6976 ------------------------------
6978 -- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
6980 -- There is no separate node in the tree for a subprogram default.
6981 -- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
6982 -- or N_Formal_Abstract_Subprogram_Declaration) node contains the
6983 -- default name or box indication, as needed.
6985 ------------------------
6986 -- 12.6 Default Name --
6987 ------------------------
6989 -- DEFAULT_NAME ::= NAME
6991 --------------------------------------
6992 -- 12.7 Formal Package Declaration --
6993 --------------------------------------
6995 -- FORMAL_PACKAGE_DECLARATION ::=
6996 -- with package DEFINING_IDENTIFIER
6997 -- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
6998 -- [ASPECT_SPECIFICATIONS];
7000 -- Note: formal package declarations not allowed in Ada 83 mode
7002 -- N_Formal_Package_Declaration
7003 -- Sloc points to WITH
7004 -- Defining_Identifier (Node1)
7005 -- Name (Node2)
7006 -- Generic_Associations (List3) (set to No_List if (<>) case or
7007 -- empty generic actual part)
7008 -- Box_Present (Flag15)
7009 -- Instance_Spec (Node5-Sem)
7010 -- ABE_Is_Certain (Flag18-Sem)
7012 --------------------------------------
7013 -- 12.7 Formal Package Actual Part --
7014 --------------------------------------
7016 -- FORMAL_PACKAGE_ACTUAL_PART ::=
7017 -- ([OTHERS] => <>)
7018 -- | [GENERIC_ACTUAL_PART]
7019 -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
7021 -- FORMAL_PACKAGE_ASSOCIATION ::=
7022 -- GENERIC_ASSOCIATION
7023 -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
7025 -- There is no explicit node in the tree for a formal package actual
7026 -- part. Instead the information appears in the parent node (i.e. the
7027 -- formal package declaration node itself).
7029 -- There is no explicit node for a formal package association. All of
7030 -- them are represented either by a generic association, possibly with
7031 -- Box_Present, or by an N_Others_Choice.
7033 ---------------------------------
7034 -- 13.1 Representation clause --
7035 ---------------------------------
7037 -- REPRESENTATION_CLAUSE ::=
7038 -- ATTRIBUTE_DEFINITION_CLAUSE
7039 -- | ENUMERATION_REPRESENTATION_CLAUSE
7040 -- | RECORD_REPRESENTATION_CLAUSE
7041 -- | AT_CLAUSE
7043 ----------------------
7044 -- 13.1 Local Name --
7045 ----------------------
7047 -- LOCAL_NAME :=
7048 -- DIRECT_NAME
7049 -- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
7050 -- | library_unit_NAME
7052 -- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
7053 -- as an attribute reference, which has essentially the same form.
7055 ---------------------------------------
7056 -- 13.3 Attribute definition clause --
7057 ---------------------------------------
7059 -- ATTRIBUTE_DEFINITION_CLAUSE ::=
7060 -- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
7061 -- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
7063 -- In Ada 83, the expression must be a simple expression and the
7064 -- local name must be a direct name.
7066 -- Note: the only attribute definition clause that is processed by
7067 -- gigi is an address clause. For all other cases, the information
7068 -- is extracted by the front end and either results in setting entity
7069 -- information, e.g. Esize for the Size clause, or in appropriate
7070 -- expansion actions (e.g. in the case of Storage_Size).
7072 -- For an address clause, Gigi constructs the appropriate addressing
7073 -- code. It also ensures that no aliasing optimizations are made
7074 -- for the object for which the address clause appears.
7076 -- Note: for an address clause used to achieve an overlay:
7078 -- A : Integer;
7079 -- B : Integer;
7080 -- for B'Address use A'Address;
7082 -- the above rule means that Gigi will ensure that no optimizations
7083 -- will be made for B that would violate the implementation advice
7084 -- of RM 13.3(19). However, this advice applies only to B and not
7085 -- to A, which seems unfortunate. The GNAT front end will mark the
7086 -- object A as volatile to also prevent unwanted optimization
7087 -- assumptions based on no aliasing being made for B.
7089 -- N_Attribute_Definition_Clause
7090 -- Sloc points to FOR
7091 -- Name (Node2) the local name
7092 -- Chars (Name1) the identifier name from the attribute designator
7093 -- Expression (Node3) the expression or name
7094 -- Entity (Node4-Sem)
7095 -- Next_Rep_Item (Node5-Sem)
7096 -- From_At_Mod (Flag4-Sem)
7097 -- Check_Address_Alignment (Flag11-Sem)
7098 -- From_Aspect_Specification (Flag13-Sem)
7099 -- Is_Delayed_Aspect (Flag14-Sem)
7100 -- Address_Warning_Posted (Flag18-Sem)
7102 -- Note: if From_Aspect_Specification is set, then Sloc points to the
7103 -- aspect name, and Entity is resolved already to reference the entity
7104 -- to which the aspect applies.
7106 -----------------------------------
7107 -- 13.3.1 Aspect Specifications --
7108 -----------------------------------
7110 -- We modify the RM grammar here, the RM grammar is:
7112 -- ASPECT_SPECIFICATION ::=
7113 -- with ASPECT_MARK [=> ASPECT_DEFINITION] {,
7114 -- ASPECT_MARK [=> ASPECT_DEFINITION] }
7116 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7118 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7120 -- That's inconvenient, since there is no non-terminal name for a single
7121 -- entry in the list of aspects. So we use this grammar instead:
7123 -- ASPECT_SPECIFICATIONS ::=
7124 -- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
7126 -- ASPECT_SPECIFICATION =>
7127 -- ASPECT_MARK [=> ASPECT_DEFINITION]
7129 -- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
7131 -- ASPECT_DEFINITION ::= NAME | EXPRESSION
7133 -- Note that for Annotate, the ASPECT_DEFINITION is a pure positional
7134 -- aggregate with the elements of the aggregate corresponding to the
7135 -- successive arguments of the corresponding pragma.
7137 -- See separate package Aspects for details on the incorporation of
7138 -- these nodes into the tree, and how aspect specifications for a given
7139 -- declaration node are associated with that node.
7141 -- N_Aspect_Specification
7142 -- Sloc points to aspect identifier
7143 -- Identifier (Node1) aspect identifier
7144 -- Aspect_Rep_Item (Node2-Sem)
7145 -- Expression (Node3) Aspect_Definition (set to Empty if none)
7146 -- Entity (Node4-Sem) entity to which the aspect applies
7147 -- Next_Rep_Item (Node5-Sem)
7148 -- Class_Present (Flag6) Set if 'Class present
7149 -- Is_Ignored (Flag9-Sem)
7150 -- Is_Checked (Flag11-Sem)
7151 -- Is_Delayed_Aspect (Flag14-Sem)
7152 -- Is_Disabled (Flag15-Sem)
7153 -- Is_Boolean_Aspect (Flag16-Sem)
7154 -- Split_PPC (Flag17) Set if split pre/post attribute
7156 -- Note: Aspect_Specification is an Ada 2012 feature
7158 -- Note: The Identifier serves to identify the aspect involved (it
7159 -- is the aspect whose name corresponds to the Chars field). This
7160 -- means that the other fields of this identifier are unused, and
7161 -- in particular we use the Entity field of this identifier to save
7162 -- a copy of the expression for visibility analysis, see spec of
7163 -- Sem_Ch13 for full details of this usage.
7165 -- In the case of aspects of the form xxx'Class, the aspect identifier
7166 -- is for xxx, and Class_Present is set to True.
7168 -- Note: When a Pre or Post aspect specification is processed, it is
7169 -- broken into AND THEN sections. The left most section has Split_PPC
7170 -- set to False, indicating that it is the original specification (e.g.
7171 -- for posting errors). For the other sections, Split_PPC is set True.
7173 ---------------------------------------------
7174 -- 13.4 Enumeration representation clause --
7175 ---------------------------------------------
7177 -- ENUMERATION_REPRESENTATION_CLAUSE ::=
7178 -- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
7180 -- In Ada 83, the name must be a direct name
7182 -- N_Enumeration_Representation_Clause
7183 -- Sloc points to FOR
7184 -- Identifier (Node1) direct name
7185 -- Array_Aggregate (Node3)
7186 -- Next_Rep_Item (Node5-Sem)
7188 ---------------------------------
7189 -- 13.4 Enumeration aggregate --
7190 ---------------------------------
7192 -- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
7194 ------------------------------------------
7195 -- 13.5.1 Record representation clause --
7196 ------------------------------------------
7198 -- RECORD_REPRESENTATION_CLAUSE ::=
7199 -- for first_subtype_LOCAL_NAME use
7200 -- record [MOD_CLAUSE]
7201 -- {COMPONENT_CLAUSE}
7202 -- end record;
7204 -- Gigi restriction: Mod_Clause is always Empty (if present it is
7205 -- replaced by a corresponding Alignment attribute definition clause).
7207 -- Note: Component_Clauses can include pragmas
7209 -- N_Record_Representation_Clause
7210 -- Sloc points to FOR
7211 -- Identifier (Node1) direct name
7212 -- Mod_Clause (Node2) (set to Empty if no mod clause present)
7213 -- Component_Clauses (List3)
7214 -- Next_Rep_Item (Node5-Sem)
7216 ------------------------------
7217 -- 13.5.1 Component clause --
7218 ------------------------------
7220 -- COMPONENT_CLAUSE ::=
7221 -- component_LOCAL_NAME at POSITION
7222 -- range FIRST_BIT .. LAST_BIT;
7224 -- N_Component_Clause
7225 -- Sloc points to AT
7226 -- Component_Name (Node1) points to Name or Attribute_Reference
7227 -- Position (Node2)
7228 -- First_Bit (Node3)
7229 -- Last_Bit (Node4)
7231 ----------------------
7232 -- 13.5.1 Position --
7233 ----------------------
7235 -- POSITION ::= static_EXPRESSION
7237 -----------------------
7238 -- 13.5.1 First_Bit --
7239 -----------------------
7241 -- FIRST_BIT ::= static_SIMPLE_EXPRESSION
7243 ----------------------
7244 -- 13.5.1 Last_Bit --
7245 ----------------------
7247 -- LAST_BIT ::= static_SIMPLE_EXPRESSION
7249 --------------------------
7250 -- 13.8 Code statement --
7251 --------------------------
7253 -- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
7255 -- Note: in GNAT, the qualified expression has the form
7257 -- Asm_Insn'(Asm (...));
7259 -- See package System.Machine_Code in file s-maccod.ads for details on
7260 -- the allowed parameters to Asm. There are two ways this node can
7261 -- arise, as a code statement, in which case the expression is the
7262 -- qualified expression, or as a result of the expansion of an intrinsic
7263 -- call to the Asm or Asm_Input procedure.
7265 -- N_Code_Statement
7266 -- Sloc points to first token of the expression
7267 -- Expression (Node3)
7269 -- Note: package Exp_Code contains an abstract functional interface
7270 -- for use by Gigi in accessing the data from N_Code_Statement nodes.
7272 ------------------------
7273 -- 13.12 Restriction --
7274 ------------------------
7276 -- RESTRICTION ::=
7277 -- restriction_IDENTIFIER
7278 -- | restriction_parameter_IDENTIFIER => EXPRESSION
7280 -- There is no explicit node for restrictions. Instead the restriction
7281 -- appears in normal pragma syntax as a pragma argument association,
7282 -- which has the same syntactic form.
7284 --------------------------
7285 -- B.2 Shift Operators --
7286 --------------------------
7288 -- Calls to the intrinsic shift functions are converted to one of
7289 -- the following shift nodes, which have the form of normal binary
7290 -- operator names. Note that for a given shift operation, one node
7291 -- covers all possible types, as for normal operators.
7293 -- Note: it is perfectly permissible for the expander to generate
7294 -- shift operation nodes directly, in which case they will be analyzed
7295 -- and parsed in the usual manner.
7297 -- Sprint syntax: shift-function-name!(expr, count)
7299 -- Note: the Left_Opnd field holds the first argument (the value to
7300 -- be shifted). The Right_Opnd field holds the second argument (the
7301 -- shift count). The Chars field is the name of the intrinsic function.
7303 -- N_Op_Rotate_Left
7304 -- Sloc points to the function name
7305 -- plus fields for binary operator
7306 -- plus fields for expression
7307 -- Shift_Count_OK (Flag4-Sem)
7309 -- N_Op_Rotate_Right
7310 -- Sloc points to the function name
7311 -- plus fields for binary operator
7312 -- plus fields for expression
7313 -- Shift_Count_OK (Flag4-Sem)
7315 -- N_Op_Shift_Left
7316 -- Sloc points to the function name
7317 -- plus fields for binary operator
7318 -- plus fields for expression
7319 -- Shift_Count_OK (Flag4-Sem)
7321 -- N_Op_Shift_Right_Arithmetic
7322 -- Sloc points to the function name
7323 -- plus fields for binary operator
7324 -- plus fields for expression
7325 -- Shift_Count_OK (Flag4-Sem)
7327 -- N_Op_Shift_Right
7328 -- Sloc points to the function name
7329 -- plus fields for binary operator
7330 -- plus fields for expression
7331 -- Shift_Count_OK (Flag4-Sem)
7333 -- Note: N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic
7334 -- never appear in the expanded tree if Modify_Tree_For_C mode is set.
7336 -- Note: For N_Op_Shift_Left and N_Op_Shift_Right, the right operand is
7337 -- always less than the word size if Modify_Tree_For_C mode is set.
7339 --------------------------
7340 -- Obsolescent Features --
7341 --------------------------
7343 -- The syntax descriptions and tree nodes for obsolescent features are
7344 -- grouped together, corresponding to their location in appendix I in
7345 -- the RM. However, parsing and semantic analysis for these constructs
7346 -- is located in an appropriate chapter (see individual notes).
7348 ---------------------------
7349 -- J.3 Delta Constraint --
7350 ---------------------------
7352 -- Note: the parse routine for this construct is located in section
7353 -- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
7354 -- where delta constraint logically belongs.
7356 -- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
7358 -- N_Delta_Constraint
7359 -- Sloc points to DELTA
7360 -- Delta_Expression (Node3)
7361 -- Range_Constraint (Node4) (set to Empty if not present)
7363 --------------------
7364 -- J.7 At Clause --
7365 --------------------
7367 -- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
7369 -- Note: the parse routine for this construct is located in Par-Ch13,
7370 -- and the semantic analysis is in Sem_Ch13, where at clause logically
7371 -- belongs if it were not obsolescent.
7373 -- Note: in Ada 83 the expression must be a simple expression
7375 -- Gigi restriction: This node never appears, it is rewritten as an
7376 -- address attribute definition clause.
7378 -- N_At_Clause
7379 -- Sloc points to FOR
7380 -- Identifier (Node1)
7381 -- Expression (Node3)
7383 ---------------------
7384 -- J.8 Mod clause --
7385 ---------------------
7387 -- MOD_CLAUSE ::= at mod static_EXPRESSION;
7389 -- Note: the parse routine for this construct is located in Par-Ch13,
7390 -- and the semantic analysis is in Sem_Ch13, where mod clause logically
7391 -- belongs if it were not obsolescent.
7393 -- Note: in Ada 83, the expression must be a simple expression
7395 -- Gigi restriction: this node never appears. It is replaced
7396 -- by a corresponding Alignment attribute definition clause.
7398 -- Note: pragmas can appear before and after the MOD_CLAUSE since
7399 -- its name has "clause" in it. This is rather strange, but is quite
7400 -- definitely specified. The pragmas before are collected in the
7401 -- Pragmas_Before field of the mod clause node itself, and pragmas
7402 -- after are simply swallowed up in the list of component clauses.
7404 -- N_Mod_Clause
7405 -- Sloc points to AT
7406 -- Expression (Node3)
7407 -- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
7409 --------------------
7410 -- Semantic Nodes --
7411 --------------------
7413 -- These semantic nodes are used to hold additional semantic information.
7414 -- They are inserted into the tree as a result of semantic processing.
7415 -- Although there are no legitimate source syntax constructions that
7416 -- correspond directly to these nodes, we need a source syntax for the
7417 -- reconstructed tree printed by Sprint, and the node descriptions here
7418 -- show this syntax.
7420 ------------------------
7421 -- Compound Statement --
7422 ------------------------
7424 -- This node is created by the analyzer/expander to handle some
7425 -- expansion cases where a sequence of actions needs to be captured
7426 -- within a single node (which acts as a container and allows the
7427 -- entire list of actions to be moved around as a whole) appearing
7428 -- in a sequence of statements.
7430 -- This is the statement counterpart to the expression node
7431 -- N_Expression_With_Actions.
7433 -- The required semantics is that the set of actions is executed in
7434 -- the order in which it appears, as though they appeared by themselves
7435 -- in the enclosing list of declarations of statements. Unlike what
7436 -- happens when using an N_Block_Statement, no new scope is introduced.
7438 -- Note: for the time being, this is used only as a transient
7439 -- representation during expansion, and all compound statement nodes
7440 -- must be exploded back to their constituent statements before handing
7441 -- the tree to the back end.
7443 -- Sprint syntax: do
7444 -- action;
7445 -- action;
7446 -- ...
7447 -- action;
7448 -- end;
7450 -- N_Compound_Statement
7451 -- Actions (List1)
7453 --------------
7454 -- Contract --
7455 --------------
7457 -- This node is used to hold the various parts of an entry, subprogram
7458 -- [body] or package [body] contract, in particular:
7459 -- Abstract states declared by a package declaration
7460 -- Contract cases that apply to a subprogram
7461 -- Dependency relations of inputs and output of a subprogram
7462 -- Global annotations classifying data as input or output
7463 -- Initialization sequences for a package declaration
7464 -- Pre- and postconditions that apply to a subprogram
7466 -- The node appears in an entry and [generic] subprogram [body] entity.
7468 -- Sprint syntax: <none> as the node should not appear in the tree, but
7469 -- only attached to an entry or [generic] subprogram
7470 -- entity.
7472 -- N_Contract
7473 -- Sloc points to the subprogram's name
7474 -- Pre_Post_Conditions (Node1) (set to Empty if none)
7475 -- Contract_Test_Cases (Node2) (set to Empty if none)
7476 -- Classifications (Node3) (set to Empty if none)
7478 -- Pre_Post_Conditions contains a collection of pragmas that correspond
7479 -- to pre- and postconditions associated with an entry or a subprogram
7480 -- [body or stub]. The pragmas can either come from source or be the
7481 -- byproduct of aspect expansion. Currently the following pragmas appear
7482 -- in this list:
7483 -- Post
7484 -- Postcondition
7485 -- Pre
7486 -- Precondition
7487 -- Refined_Post
7488 -- The ordering in the list is in LIFO fashion.
7490 -- Note that there might be multiple preconditions or postconditions
7491 -- in this list, either because they come from separate pragmas in the
7492 -- source, or because a Pre (resp. Post) aspect specification has been
7493 -- broken into AND THEN sections. See Split_PPC for details.
7495 -- Contract_Test_Cases contains a collection of pragmas that correspond
7496 -- to aspects/pragmas Contract_Cases and Test_Case. The ordering in the
7497 -- list is in LIFO fashion.
7499 -- Classifications contains pragmas that either declare, categorize or
7500 -- establish dependencies between subprogram or package inputs and
7501 -- outputs. Currently the following pragmas appear in this list:
7502 -- Abstract_States
7503 -- Async_Readers
7504 -- Async_Writers
7505 -- Depends
7506 -- Effective_Reads
7507 -- Effective_Writes
7508 -- Global
7509 -- Initial_Condition
7510 -- Initializes
7511 -- Part_Of
7512 -- Refined_Depends
7513 -- Refined_Global
7514 -- Refined_States
7515 -- The ordering is in LIFO fashion.
7517 -------------------
7518 -- Expanded Name --
7519 -------------------
7521 -- The N_Expanded_Name node is used to represent a selected component
7522 -- name that has been resolved to an expanded name. The semantic phase
7523 -- replaces N_Selected_Component nodes that represent names by the use
7524 -- of this node, leaving the N_Selected_Component node used only when
7525 -- the prefix is a record or protected type.
7527 -- The fields of the N_Expanded_Name node are layed out identically
7528 -- to those of the N_Selected_Component node, allowing conversion of
7529 -- an expanded name node to a selected component node to be done
7530 -- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
7532 -- There is no special sprint syntax for an expanded name
7534 -- N_Expanded_Name
7535 -- Sloc points to the period
7536 -- Chars (Name1) copy of Chars field of selector name
7537 -- Prefix (Node3)
7538 -- Selector_Name (Node2)
7539 -- Entity (Node4-Sem)
7540 -- Associated_Node (Node4-Sem)
7541 -- Has_Private_View (Flag11-Sem) set in generic units.
7542 -- Redundant_Use (Flag13-Sem)
7543 -- Atomic_Sync_Required (Flag14-Sem)
7544 -- plus fields for expression
7546 -----------------------------
7547 -- Expression With Actions --
7548 -----------------------------
7550 -- This node is created by the analyzer/expander to handle some
7551 -- expansion cases, notably short circuit forms where there are
7552 -- actions associated with the right-hand side operand.
7554 -- The N_Expression_With_Actions node represents an expression with
7555 -- an associated set of actions (which are executable statements and
7556 -- declarations, as might occur in a handled statement sequence).
7558 -- The required semantics is that the set of actions is executed in
7559 -- the order in which it appears just before the expression is
7560 -- evaluated (and these actions must only be executed if the value
7561 -- of the expression is evaluated). The node is considered to be
7562 -- a subexpression, whose value is the value of the Expression after
7563 -- executing all the actions.
7565 -- If the actions contain declarations, then these declarations may
7566 -- be referenced within the expression. However note that there is
7567 -- no proper scope associated with the expression-with-action, so the
7568 -- back-end will elaborate them in the context of the enclosing scope.
7570 -- Sprint syntax: do
7571 -- action;
7572 -- action;
7573 -- ...
7574 -- action;
7575 -- in expression end
7577 -- N_Expression_With_Actions
7578 -- Actions (List1)
7579 -- Expression (Node3)
7580 -- plus fields for expression
7582 -- Note: In the final generated tree presented to the code generator,
7583 -- the actions list is always non-null, since there is no point in this
7584 -- node if the actions are Empty. During semantic analysis there are
7585 -- cases where it is convenient to temporarily generate an empty actions
7586 -- list. This arises in cases where we create such an empty actions
7587 -- list, and it may or may not end up being a place where additional
7588 -- actions are inserted. The expander removes such empty cases after
7589 -- the expression of the node is fully analyzed and expanded, at which
7590 -- point it is safe to remove it, since no more actions can be inserted.
7592 -- Note: In Modify_Tree_For_C, we never generate any declarations in
7593 -- the action list, which can contain only non-declarative statements.
7595 --------------------
7596 -- Free Statement --
7597 --------------------
7599 -- The N_Free_Statement node is generated as a result of a call to an
7600 -- instantiation of Unchecked_Deallocation. The instantiation of this
7601 -- generic is handled specially and generates this node directly.
7603 -- Sprint syntax: free expression
7605 -- N_Free_Statement
7606 -- Sloc is copied from the unchecked deallocation call
7607 -- Expression (Node3) argument to unchecked deallocation call
7608 -- Storage_Pool (Node1-Sem)
7609 -- Procedure_To_Call (Node2-Sem)
7610 -- Actual_Designated_Subtype (Node4-Sem)
7612 -- Note: in the case where a debug source file is generated, the Sloc
7613 -- for this node points to the FREE keyword in the Sprint file output.
7615 -------------------
7616 -- Freeze Entity --
7617 -------------------
7619 -- This node marks the point in a declarative part at which an entity
7620 -- declared therein becomes frozen. The expander places initialization
7621 -- procedures for types at those points. Gigi uses the freezing point
7622 -- to elaborate entities that may depend on previous private types.
7624 -- See the section in Einfo "Delayed Freezing and Elaboration" for
7625 -- a full description of the use of this node.
7627 -- The Entity field points back to the entity for the type (whose
7628 -- Freeze_Node field points back to this freeze node).
7630 -- The Actions field contains a list of declarations and statements
7631 -- generated by the expander which are associated with the freeze
7632 -- node, and are elaborated as though the freeze node were replaced
7633 -- by this sequence of actions.
7635 -- Note: the Sloc field in the freeze node references a construct
7636 -- associated with the freezing point. This is used for posting
7637 -- messages in some error/warning situations, e.g. the case where
7638 -- a primitive operation of a tagged type is declared too late.
7640 -- Sprint syntax: freeze entity-name [
7641 -- freeze actions
7642 -- ]
7644 -- N_Freeze_Entity
7645 -- Sloc points near freeze point (see above special note)
7646 -- Entity (Node4-Sem)
7647 -- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
7648 -- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
7649 -- Actions (List1) (set to No_List if no freeze actions)
7650 -- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
7652 -- The Actions field holds actions associated with the freeze. These
7653 -- actions are elaborated at the point where the type is frozen.
7655 -- Note: in the case where a debug source file is generated, the Sloc
7656 -- for this node points to the FREEZE keyword in the Sprint file output.
7658 ---------------------------
7659 -- Freeze Generic Entity --
7660 ---------------------------
7662 -- The freeze point of an entity indicates the point at which the
7663 -- information needed to generate code for the entity is complete.
7664 -- The freeze node for an entity triggers expander activities, such as
7665 -- build initialization procedures, and backend activities, such as
7666 -- completing the elaboration of packages.
7668 -- For entities declared within a generic unit, for which no code is
7669 -- generated, the freeze point is not equally meaningful. However, in
7670 -- Ada 2012 several semantic checks on declarations must be delayed to
7671 -- the freeze point, and we need to include such a mark in the tree to
7672 -- trigger these checks. The Freeze_Generic_Entity node plays no other
7673 -- role, and is ignored by the expander and the back-end.
7675 -- Sprint syntax: freeze_generic entity-name
7677 -- N_Freeze_Generic_Entity
7678 -- Sloc points near freeze point
7679 -- Entity (Node4-Sem)
7681 --------------------------------
7682 -- Implicit Label Declaration --
7683 --------------------------------
7685 -- An implicit label declaration is created for every occurrence of a
7686 -- label on a statement or a label on a block or loop. It is chained
7687 -- in the declarations of the innermost enclosing block as specified
7688 -- in RM section 5.1 (3).
7690 -- The Defining_Identifier is the actual identifier for the statement
7691 -- identifier. Note that the occurrence of the label is a reference, NOT
7692 -- the defining occurrence. The defining occurrence occurs at the head
7693 -- of the innermost enclosing block, and is represented by this node.
7695 -- Note: from the grammar, this might better be called an implicit
7696 -- statement identifier declaration, but the term we choose seems
7697 -- friendlier, since at least informally statement identifiers are
7698 -- called labels in both cases (i.e. when used in labels, and when
7699 -- used as the identifiers of blocks and loops).
7701 -- Note: although this is logically a semantic node, since it does not
7702 -- correspond directly to a source syntax construction, these nodes are
7703 -- actually created by the parser in a post pass done just after parsing
7704 -- is complete, before semantic analysis is started (see Par.Labl).
7706 -- Sprint syntax: labelname : label;
7708 -- N_Implicit_Label_Declaration
7709 -- Sloc points to the << token for a statement identifier, or to the
7710 -- LOOP, DECLARE, or BEGIN token for a loop or block identifier
7711 -- Defining_Identifier (Node1)
7712 -- Label_Construct (Node2-Sem)
7714 -- Note: in the case where a debug source file is generated, the Sloc
7715 -- for this node points to the label name in the generated declaration.
7717 ---------------------
7718 -- Itype Reference --
7719 ---------------------
7721 -- This node is used to create a reference to an Itype. The only purpose
7722 -- is to make sure the Itype is defined if this is the first reference.
7724 -- A typical use of this node is when an Itype is to be referenced in
7725 -- two branches of an IF statement. In this case it is important that
7726 -- the first use of the Itype not be inside the conditional, since then
7727 -- it might not be defined if the other branch of the IF is taken, in
7728 -- the case where the definition generates elaboration code.
7730 -- The Itype field points to the referenced Itype
7732 -- Sprint syntax: reference itype-name
7734 -- N_Itype_Reference
7735 -- Sloc points to the node generating the reference
7736 -- Itype (Node1-Sem)
7738 -- Note: in the case where a debug source file is generated, the Sloc
7739 -- for this node points to the REFERENCE keyword in the file output.
7741 ---------------------
7742 -- Raise xxx Error --
7743 ---------------------
7745 -- One of these nodes is created during semantic analysis to replace
7746 -- a node for an expression that is determined to definitely raise
7747 -- the corresponding exception.
7749 -- The N_Raise_xxx_Error node may also stand alone in place
7750 -- of a declaration or statement, in which case it simply causes
7751 -- the exception to be raised (i.e. it is equivalent to a raise
7752 -- statement that raises the corresponding exception). This use
7753 -- is distinguished by the fact that the Etype in this case is
7754 -- Standard_Void_Type; in the subexpression case, the Etype is the
7755 -- same as the type of the subexpression which it replaces.
7757 -- If Condition is empty, then the raise is unconditional. If the
7758 -- Condition field is non-empty, it is a boolean expression which
7759 -- is first evaluated, and the exception is raised only if the
7760 -- value of the expression is True. In the unconditional case, the
7761 -- creation of this node is usually accompanied by a warning message
7762 -- error. The creation of this node will usually be accompanied by a
7763 -- message (unless it appears within the right operand of a short
7764 -- circuit form whose left argument is static and decisively
7765 -- eliminates elaboration of the raise operation. The condition field
7766 -- can ONLY be present when the node is used as a statement form, it
7767 -- may NOT be present in the case where the node appears within an
7768 -- expression.
7770 -- The exception is generated with a message that contains the
7771 -- file name and line number, and then appended text. The Reason
7772 -- code shows the text to be added. The Reason code is an element
7773 -- of the type Types.RT_Exception_Code, and indicates both the
7774 -- message to be added, and the exception to be raised (which must
7775 -- match the node type). The value is stored by storing a Uint which
7776 -- is the Pos value of the enumeration element in this type.
7778 -- Gigi restriction: This expander ensures that the type of the
7779 -- Condition field is always Standard.Boolean, even if the type
7780 -- in the source is some non-standard boolean type.
7782 -- Sprint syntax: [xxx_error "msg"]
7783 -- or: [xxx_error when condition "msg"]
7785 -- N_Raise_Constraint_Error
7786 -- Sloc references related construct
7787 -- Condition (Node1) (set to Empty if no condition)
7788 -- Reason (Uint3)
7789 -- plus fields for expression
7791 -- N_Raise_Program_Error
7792 -- Sloc references related construct
7793 -- Condition (Node1) (set to Empty if no condition)
7794 -- Reason (Uint3)
7795 -- plus fields for expression
7797 -- N_Raise_Storage_Error
7798 -- Sloc references related construct
7799 -- Condition (Node1) (set to Empty if no condition)
7800 -- Reason (Uint3)
7801 -- plus fields for expression
7803 -- Note: Sloc is copied from the expression generating the exception.
7804 -- In the case where a debug source file is generated, the Sloc for
7805 -- this node points to the left bracket in the Sprint file output.
7807 -- Note: the back end may be required to translate these nodes into
7808 -- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
7810 ---------------------------------------------
7811 -- Optimization of Exception Raise to Goto --
7812 ---------------------------------------------
7814 -- In some cases, the front end will determine that any exception raised
7815 -- by the back end for a certain exception should be transformed into a
7816 -- goto statement.
7818 -- There are three kinds of exceptions raised by the back end (note that
7819 -- for this purpose we consider gigi to be part of the back end in the
7820 -- gcc case):
7822 -- 1. Exceptions resulting from N_Raise_xxx_Error nodes
7823 -- 2. Exceptions from checks triggered by Do_xxx_Check flags
7824 -- 3. Other cases not specifically marked by the front end
7826 -- Normally all such exceptions are translated into calls to the proper
7827 -- Rcheck_xx procedure, where xx encodes both the exception to be raised
7828 -- and the exception message.
7830 -- The front end may determine that for a particular sequence of code,
7831 -- exceptions in any of these three categories for a particular builtin
7832 -- exception should result in a goto, rather than a call to Rcheck_xx.
7833 -- The exact sequence to be generated is:
7835 -- Local_Raise (exception'Identity);
7836 -- goto Label
7838 -- The front end marks such a sequence of code by bracketing it with
7839 -- push and pop nodes:
7841 -- N_Push_xxx_Label (referencing the label)
7842 -- ...
7843 -- (code where transformation is expected for exception xxx)
7844 -- ...
7845 -- N_Pop_xxx_Label
7847 -- The use of push/pop reflects the fact that such regions can properly
7848 -- nest, and one special case is a subregion in which no transformation
7849 -- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
7850 -- Exception_Label field is Empty.
7852 -- N_Push_Constraint_Error_Label
7853 -- Sloc references first statement in region covered
7854 -- Exception_Label (Node5-Sem)
7856 -- N_Push_Program_Error_Label
7857 -- Sloc references first statement in region covered
7858 -- Exception_Label (Node5-Sem)
7860 -- N_Push_Storage_Error_Label
7861 -- Sloc references first statement in region covered
7862 -- Exception_Label (Node5-Sem)
7864 -- N_Pop_Constraint_Error_Label
7865 -- Sloc references last statement in region covered
7867 -- N_Pop_Program_Error_Label
7868 -- Sloc references last statement in region covered
7870 -- N_Pop_Storage_Error_Label
7871 -- Sloc references last statement in region covered
7873 ---------------
7874 -- Reference --
7875 ---------------
7877 -- For a number of purposes, we need to construct references to objects.
7878 -- These references are subsequently treated as normal access values.
7879 -- An example is the construction of the parameter block passed to a
7880 -- task entry. The N_Reference node is provided for this purpose. It is
7881 -- similar in effect to the use of the Unrestricted_Access attribute,
7882 -- and like Unrestricted_Access can be applied to objects which would
7883 -- not be valid prefixes for the Unchecked_Access attribute (e.g.
7884 -- objects which are not aliased, and slices). In addition it can be
7885 -- applied to composite type values as well as objects, including string
7886 -- values and aggregates.
7888 -- Note: we use the Prefix field for this expression so that the
7889 -- resulting node can be treated using common code with the attribute
7890 -- nodes for the 'Access and related attributes. Logically it would make
7891 -- more sense to call it an Expression field, but then we would have to
7892 -- special case the treatment of the N_Reference node.
7894 -- Note: evaluating a N_Reference node is guaranteed to yield a non-null
7895 -- value at run time. Therefore, it is valid to set Is_Known_Non_Null on
7896 -- a temporary initialized to a N_Reference node in order to eliminate
7897 -- superfluous access checks.
7899 -- Sprint syntax: prefix'reference
7901 -- N_Reference
7902 -- Sloc is copied from the expression
7903 -- Prefix (Node3)
7904 -- plus fields for expression
7906 -- Note: in the case where a debug source file is generated, the Sloc
7907 -- for this node points to the quote in the Sprint file output.
7909 ----------------
7910 -- SCIL Nodes --
7911 ----------------
7913 -- SCIL nodes are special nodes added to the tree when the CodePeer mode
7914 -- is active. They are only generated if SCIL generation is enabled.
7915 -- A standard tree-walk will not encounter these nodes even if they
7916 -- are present; these nodes are only accessible via the function
7917 -- SCIL_LL.Get_SCIL_Node. These nodes have no associated dynamic
7918 -- semantics.
7920 -- Sprint syntax: [ <node kind> ]
7921 -- No semantic field values are displayed.
7923 -- N_SCIL_Dispatch_Table_Tag_Init
7924 -- Sloc references a node for a tag initialization
7925 -- SCIL_Entity (Node4-Sem)
7927 -- An N_SCIL_Dispatch_Table_Tag_Init node may be associated (via
7928 -- Get_SCIL_Node) with the N_Object_Declaration node corresponding to
7929 -- the declaration of the dispatch table for a tagged type.
7931 -- N_SCIL_Dispatching_Call
7932 -- Sloc references the node of a dispatching call
7933 -- SCIL_Target_Prim (Node2-Sem)
7934 -- SCIL_Entity (Node4-Sem)
7935 -- SCIL_Controlling_Tag (Node5-Sem)
7937 -- An N_Scil_Dispatching call node may be associated (via Get_SCIL_Node)
7938 -- with the N_Procedure_Call or N_Function_Call node (or a rewriting
7939 -- thereof) corresponding to a dispatching call.
7941 -- N_SCIL_Membership_Test
7942 -- Sloc references the node of a membership test
7943 -- SCIL_Tag_Value (Node5-Sem)
7944 -- SCIL_Entity (Node4-Sem)
7946 -- An N_Scil_Membership_Test node may be associated (via Get_SCIL_Node)
7947 -- with the N_In node (or a rewriting thereof) corresponding to a
7948 -- classwide membership test.
7950 --------------------------
7951 -- Unchecked Expression --
7952 --------------------------
7954 -- An unchecked expression is one that must be analyzed and resolved
7955 -- with all checks off, regardless of the current setting of scope
7956 -- suppress flags.
7958 -- Sprint syntax: `(expression)
7960 -- Note: this node is always removed from the tree (and replaced by
7961 -- its constituent expression) on completion of analysis, so it only
7962 -- appears in intermediate trees, and will never be seen by Gigi.
7964 -- N_Unchecked_Expression
7965 -- Sloc is a copy of the Sloc of the expression
7966 -- Expression (Node3)
7967 -- plus fields for expression
7969 -- Note: in the case where a debug source file is generated, the Sloc
7970 -- for this node points to the back quote in the Sprint file output.
7972 -------------------------------
7973 -- Unchecked Type Conversion --
7974 -------------------------------
7976 -- An unchecked type conversion node represents the semantic action
7977 -- corresponding to a call to an instantiation of Unchecked_Conversion.
7978 -- It is generated as a result of actual use of Unchecked_Conversion
7979 -- and also the expander generates unchecked type conversion nodes
7980 -- directly for expansion of complex semantic actions.
7982 -- Note: an unchecked type conversion is a variable as far as the
7983 -- semantics are concerned, which is convenient for the expander.
7984 -- This does not change what Ada source programs are legal, since
7985 -- clearly a function call to an instantiation of Unchecked_Conversion
7986 -- is not a variable in any case.
7988 -- Sprint syntax: subtype-mark!(expression)
7990 -- N_Unchecked_Type_Conversion
7991 -- Sloc points to related node in source
7992 -- Subtype_Mark (Node4)
7993 -- Expression (Node3)
7994 -- Kill_Range_Check (Flag11-Sem)
7995 -- No_Truncation (Flag17-Sem)
7996 -- plus fields for expression
7998 -- Note: in the case where a debug source file is generated, the Sloc
7999 -- for this node points to the exclamation in the Sprint file output.
8001 -----------------------------------
8002 -- Validate_Unchecked_Conversion --
8003 -----------------------------------
8005 -- The front end does most of the validation of unchecked conversion,
8006 -- including checking sizes (this is done after the back end is called
8007 -- to take advantage of back-annotation of calculated sizes).
8009 -- The front end also deals with specific cases that are not allowed
8010 -- e.g. involving unconstrained array types.
8012 -- For the case of the standard gigi backend, this means that all
8013 -- checks are done in the front end.
8015 -- However, in the case of specialized back-ends, notably the JVM
8016 -- backend for JGNAT, additional requirements and restrictions apply
8017 -- to unchecked conversion, and these are most conveniently performed
8018 -- in the specialized back-end.
8020 -- To accommodate this requirement, for such back ends, the following
8021 -- special node is generated recording an unchecked conversion that
8022 -- needs to be validated. The back end should post an appropriate
8023 -- error message if the unchecked conversion is invalid or warrants
8024 -- a special warning message.
8026 -- Source_Type and Target_Type point to the entities for the two
8027 -- types involved in the unchecked conversion instantiation that
8028 -- is to be validated.
8030 -- Sprint syntax: validate Unchecked_Conversion (source, target);
8032 -- N_Validate_Unchecked_Conversion
8033 -- Sloc points to instantiation (location for warning message)
8034 -- Source_Type (Node1-Sem)
8035 -- Target_Type (Node2-Sem)
8037 -- Note: in the case where a debug source file is generated, the Sloc
8038 -- for this node points to the VALIDATE keyword in the file output.
8040 -----------
8041 -- Empty --
8042 -----------
8044 -- Used as the contents of the Nkind field of the dummy Empty node
8045 -- and in some other situations to indicate an uninitialized value.
8047 -- N_Empty
8048 -- Chars (Name1) is set to No_Name
8050 -----------
8051 -- Error --
8052 -----------
8054 -- Used as the contents of the Nkind field of the dummy Error node.
8055 -- Has an Etype field, which gets set to Any_Type later on, to help
8056 -- error recovery (Error_Posted is also set in the Error node).
8058 -- N_Error
8059 -- Chars (Name1) is set to Error_Name
8060 -- Etype (Node5-Sem)
8062 --------------------------
8063 -- Node Type Definition --
8064 --------------------------
8066 -- The following is the definition of the Node_Kind type. As previously
8067 -- discussed, this is separated off to allow rearrangement of the order to
8068 -- facilitate definition of subtype ranges. The comments show the subtype
8069 -- classes which apply to each set of node kinds. The first entry in the
8070 -- comment characterizes the following list of nodes.
8072 type Node_Kind is (
8073 N_Unused_At_Start,
8075 -- N_Representation_Clause
8077 N_At_Clause,
8078 N_Component_Clause,
8079 N_Enumeration_Representation_Clause,
8080 N_Mod_Clause,
8081 N_Record_Representation_Clause,
8083 -- N_Representation_Clause, N_Has_Chars
8085 N_Attribute_Definition_Clause,
8087 -- N_Has_Chars
8089 N_Empty,
8090 N_Pragma_Argument_Association,
8092 -- N_Has_Etype, N_Has_Chars
8094 -- Note: of course N_Error does not really have Etype or Chars fields,
8095 -- and any attempt to access these fields in N_Error will cause an
8096 -- error, but historically this always has been positioned so that an
8097 -- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
8098 -- Most likely this makes coding easier somewhere but still seems
8099 -- undesirable. To be investigated some time ???
8101 N_Error,
8103 -- N_Entity, N_Has_Etype, N_Has_Chars
8105 N_Defining_Character_Literal,
8106 N_Defining_Identifier,
8107 N_Defining_Operator_Symbol,
8109 -- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
8111 N_Expanded_Name,
8113 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8114 -- N_Has_Chars, N_Has_Entity
8116 N_Identifier,
8117 N_Operator_Symbol,
8119 -- N_Direct_Name, N_Subexpr, N_Has_Etype,
8120 -- N_Has_Chars, N_Has_Entity
8122 N_Character_Literal,
8124 -- N_Binary_Op, N_Op, N_Subexpr,
8125 -- N_Has_Etype, N_Has_Chars, N_Has_Entity
8127 N_Op_Add,
8128 N_Op_Concat,
8129 N_Op_Expon,
8130 N_Op_Subtract,
8132 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
8133 -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
8135 N_Op_Divide,
8136 N_Op_Mod,
8137 N_Op_Multiply,
8138 N_Op_Rem,
8140 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8141 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8143 N_Op_And,
8145 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8146 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
8148 N_Op_Eq,
8149 N_Op_Ge,
8150 N_Op_Gt,
8151 N_Op_Le,
8152 N_Op_Lt,
8153 N_Op_Ne,
8155 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
8156 -- N_Has_Entity, N_Has_Chars, N_Op_Boolean
8158 N_Op_Or,
8159 N_Op_Xor,
8161 -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
8162 -- N_Op_Shift, N_Has_Chars, N_Has_Entity
8164 N_Op_Rotate_Left,
8165 N_Op_Rotate_Right,
8166 N_Op_Shift_Left,
8167 N_Op_Shift_Right,
8168 N_Op_Shift_Right_Arithmetic,
8170 -- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
8171 -- N_Has_Chars, N_Has_Entity
8173 N_Op_Abs,
8174 N_Op_Minus,
8175 N_Op_Not,
8176 N_Op_Plus,
8178 -- N_Subexpr, N_Has_Etype, N_Has_Entity
8180 N_Attribute_Reference,
8182 -- N_Subexpr, N_Has_Etype, N_Membership_Test
8184 N_In,
8185 N_Not_In,
8187 -- N_Subexpr, N_Has_Etype, N_Short_Circuit
8189 N_And_Then,
8190 N_Or_Else,
8192 -- N_Subexpr, N_Has_Etype, N_Subprogram_Call
8194 N_Function_Call,
8195 N_Procedure_Call_Statement,
8197 -- N_Subexpr, N_Has_Etype, N_Raise_xxx_Error
8199 N_Raise_Constraint_Error,
8200 N_Raise_Program_Error,
8201 N_Raise_Storage_Error,
8203 -- N_Subexpr, N_Has_Etype, N_Numeric_Or_String_Literal
8205 N_Integer_Literal,
8206 N_Real_Literal,
8207 N_String_Literal,
8209 -- N_Subexpr, N_Has_Etype
8211 N_Explicit_Dereference,
8212 N_Expression_With_Actions,
8213 N_If_Expression,
8214 N_Indexed_Component,
8215 N_Null,
8216 N_Qualified_Expression,
8217 N_Quantified_Expression,
8218 N_Aggregate,
8219 N_Allocator,
8220 N_Case_Expression,
8221 N_Extension_Aggregate,
8222 N_Raise_Expression,
8223 N_Range,
8224 N_Reference,
8225 N_Selected_Component,
8226 N_Slice,
8227 N_Type_Conversion,
8228 N_Unchecked_Expression,
8229 N_Unchecked_Type_Conversion,
8231 -- N_Has_Etype
8233 N_Subtype_Indication,
8235 -- N_Declaration
8237 N_Component_Declaration,
8238 N_Entry_Declaration,
8239 N_Expression_Function,
8240 N_Formal_Object_Declaration,
8241 N_Formal_Type_Declaration,
8242 N_Full_Type_Declaration,
8243 N_Incomplete_Type_Declaration,
8244 N_Iterator_Specification,
8245 N_Loop_Parameter_Specification,
8246 N_Object_Declaration,
8247 N_Protected_Type_Declaration,
8248 N_Private_Extension_Declaration,
8249 N_Private_Type_Declaration,
8250 N_Subtype_Declaration,
8252 -- N_Subprogram_Specification, N_Declaration
8254 N_Function_Specification,
8255 N_Procedure_Specification,
8257 -- N_Access_To_Subprogram_Definition
8259 N_Access_Function_Definition,
8260 N_Access_Procedure_Definition,
8262 -- N_Later_Decl_Item
8264 N_Task_Type_Declaration,
8266 -- N_Body_Stub, N_Later_Decl_Item
8268 N_Package_Body_Stub,
8269 N_Protected_Body_Stub,
8270 N_Subprogram_Body_Stub,
8271 N_Task_Body_Stub,
8273 -- N_Generic_Instantiation, N_Later_Decl_Item
8274 -- N_Subprogram_Instantiation
8276 N_Function_Instantiation,
8277 N_Procedure_Instantiation,
8279 -- N_Generic_Instantiation, N_Later_Decl_Item
8281 N_Package_Instantiation,
8283 -- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
8285 N_Package_Body,
8286 N_Subprogram_Body,
8288 -- N_Later_Decl_Item, N_Proper_Body
8290 N_Protected_Body,
8291 N_Task_Body,
8293 -- N_Later_Decl_Item
8295 N_Implicit_Label_Declaration,
8296 N_Package_Declaration,
8297 N_Single_Task_Declaration,
8298 N_Subprogram_Declaration,
8299 N_Use_Package_Clause,
8301 -- N_Generic_Declaration, N_Later_Decl_Item
8303 N_Generic_Package_Declaration,
8304 N_Generic_Subprogram_Declaration,
8306 -- N_Array_Type_Definition
8308 N_Constrained_Array_Definition,
8309 N_Unconstrained_Array_Definition,
8311 -- N_Renaming_Declaration
8313 N_Exception_Renaming_Declaration,
8314 N_Object_Renaming_Declaration,
8315 N_Package_Renaming_Declaration,
8316 N_Subprogram_Renaming_Declaration,
8318 -- N_Generic_Renaming_Declaration, N_Renaming_Declaration
8320 N_Generic_Function_Renaming_Declaration,
8321 N_Generic_Package_Renaming_Declaration,
8322 N_Generic_Procedure_Renaming_Declaration,
8324 -- N_Statement_Other_Than_Procedure_Call
8326 N_Abort_Statement,
8327 N_Accept_Statement,
8328 N_Assignment_Statement,
8329 N_Asynchronous_Select,
8330 N_Block_Statement,
8331 N_Case_Statement,
8332 N_Code_Statement,
8333 N_Compound_Statement,
8334 N_Conditional_Entry_Call,
8336 -- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
8338 N_Delay_Relative_Statement,
8339 N_Delay_Until_Statement,
8341 -- N_Statement_Other_Than_Procedure_Call
8343 N_Entry_Call_Statement,
8344 N_Free_Statement,
8345 N_Goto_Statement,
8346 N_Loop_Statement,
8347 N_Null_Statement,
8348 N_Raise_Statement,
8349 N_Requeue_Statement,
8350 N_Simple_Return_Statement,
8351 N_Extended_Return_Statement,
8352 N_Selective_Accept,
8353 N_Timed_Entry_Call,
8355 -- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
8357 N_Exit_Statement,
8358 N_If_Statement,
8360 -- N_Has_Condition
8362 N_Accept_Alternative,
8363 N_Delay_Alternative,
8364 N_Elsif_Part,
8365 N_Entry_Body_Formal_Part,
8366 N_Iteration_Scheme,
8367 N_Terminate_Alternative,
8369 -- N_Formal_Subprogram_Declaration
8371 N_Formal_Abstract_Subprogram_Declaration,
8372 N_Formal_Concrete_Subprogram_Declaration,
8374 -- N_Push_xxx_Label, N_Push_Pop_xxx_Label
8376 N_Push_Constraint_Error_Label,
8377 N_Push_Program_Error_Label,
8378 N_Push_Storage_Error_Label,
8380 -- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
8382 N_Pop_Constraint_Error_Label,
8383 N_Pop_Program_Error_Label,
8384 N_Pop_Storage_Error_Label,
8386 -- SCIL nodes
8388 N_SCIL_Dispatch_Table_Tag_Init,
8389 N_SCIL_Dispatching_Call,
8390 N_SCIL_Membership_Test,
8392 -- Other nodes (not part of any subtype class)
8394 N_Abortable_Part,
8395 N_Abstract_Subprogram_Declaration,
8396 N_Access_Definition,
8397 N_Access_To_Object_Definition,
8398 N_Aspect_Specification,
8399 N_Case_Expression_Alternative,
8400 N_Case_Statement_Alternative,
8401 N_Compilation_Unit,
8402 N_Compilation_Unit_Aux,
8403 N_Component_Association,
8404 N_Component_Definition,
8405 N_Component_List,
8406 N_Contract,
8407 N_Derived_Type_Definition,
8408 N_Decimal_Fixed_Point_Definition,
8409 N_Defining_Program_Unit_Name,
8410 N_Delta_Constraint,
8411 N_Designator,
8412 N_Digits_Constraint,
8413 N_Discriminant_Association,
8414 N_Discriminant_Specification,
8415 N_Enumeration_Type_Definition,
8416 N_Entry_Body,
8417 N_Entry_Call_Alternative,
8418 N_Entry_Index_Specification,
8419 N_Exception_Declaration,
8420 N_Exception_Handler,
8421 N_Floating_Point_Definition,
8422 N_Formal_Decimal_Fixed_Point_Definition,
8423 N_Formal_Derived_Type_Definition,
8424 N_Formal_Discrete_Type_Definition,
8425 N_Formal_Floating_Point_Definition,
8426 N_Formal_Modular_Type_Definition,
8427 N_Formal_Ordinary_Fixed_Point_Definition,
8428 N_Formal_Package_Declaration,
8429 N_Formal_Private_Type_Definition,
8430 N_Formal_Incomplete_Type_Definition,
8431 N_Formal_Signed_Integer_Type_Definition,
8432 N_Freeze_Entity,
8433 N_Freeze_Generic_Entity,
8434 N_Generic_Association,
8435 N_Handled_Sequence_Of_Statements,
8436 N_Index_Or_Discriminant_Constraint,
8437 N_Itype_Reference,
8438 N_Label,
8439 N_Modular_Type_Definition,
8440 N_Number_Declaration,
8441 N_Ordinary_Fixed_Point_Definition,
8442 N_Others_Choice,
8443 N_Package_Specification,
8444 N_Parameter_Association,
8445 N_Parameter_Specification,
8446 N_Pragma,
8447 N_Protected_Definition,
8448 N_Range_Constraint,
8449 N_Real_Range_Specification,
8450 N_Record_Definition,
8451 N_Signed_Integer_Type_Definition,
8452 N_Single_Protected_Declaration,
8453 N_Subunit,
8454 N_Task_Definition,
8455 N_Triggering_Alternative,
8456 N_Use_Type_Clause,
8457 N_Validate_Unchecked_Conversion,
8458 N_Variant,
8459 N_Variant_Part,
8460 N_With_Clause,
8461 N_Unused_At_End);
8463 for Node_Kind'Size use 8;
8464 -- The data structures in Atree assume this
8466 ----------------------------
8467 -- Node Class Definitions --
8468 ----------------------------
8470 subtype N_Access_To_Subprogram_Definition is Node_Kind range
8471 N_Access_Function_Definition ..
8472 N_Access_Procedure_Definition;
8474 subtype N_Array_Type_Definition is Node_Kind range
8475 N_Constrained_Array_Definition ..
8476 N_Unconstrained_Array_Definition;
8478 subtype N_Binary_Op is Node_Kind range
8479 N_Op_Add ..
8480 N_Op_Shift_Right_Arithmetic;
8482 subtype N_Body_Stub is Node_Kind range
8483 N_Package_Body_Stub ..
8484 N_Task_Body_Stub;
8486 subtype N_Declaration is Node_Kind range
8487 N_Component_Declaration ..
8488 N_Procedure_Specification;
8489 -- Note: this includes all constructs normally thought of as declarations
8490 -- except those which are separately grouped as later declarations.
8492 subtype N_Delay_Statement is Node_Kind range
8493 N_Delay_Relative_Statement ..
8494 N_Delay_Until_Statement;
8496 subtype N_Direct_Name is Node_Kind range
8497 N_Identifier ..
8498 N_Character_Literal;
8500 subtype N_Entity is Node_Kind range
8501 N_Defining_Character_Literal ..
8502 N_Defining_Operator_Symbol;
8504 subtype N_Formal_Subprogram_Declaration is Node_Kind range
8505 N_Formal_Abstract_Subprogram_Declaration ..
8506 N_Formal_Concrete_Subprogram_Declaration;
8508 subtype N_Generic_Declaration is Node_Kind range
8509 N_Generic_Package_Declaration ..
8510 N_Generic_Subprogram_Declaration;
8512 subtype N_Generic_Instantiation is Node_Kind range
8513 N_Function_Instantiation ..
8514 N_Package_Instantiation;
8516 subtype N_Generic_Renaming_Declaration is Node_Kind range
8517 N_Generic_Function_Renaming_Declaration ..
8518 N_Generic_Procedure_Renaming_Declaration;
8520 subtype N_Has_Chars is Node_Kind range
8521 N_Attribute_Definition_Clause ..
8522 N_Op_Plus;
8524 subtype N_Has_Entity is Node_Kind range
8525 N_Expanded_Name ..
8526 N_Attribute_Reference;
8527 -- Nodes that have Entity fields
8528 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
8529 -- N_Aspect_Specification, or N_Attribute_Definition_Clause.
8531 subtype N_Has_Etype is Node_Kind range
8532 N_Error ..
8533 N_Subtype_Indication;
8535 subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
8536 N_Op_Divide ..
8537 N_Op_Rem;
8539 subtype N_Multiplying_Operator is Node_Kind range
8540 N_Op_Divide ..
8541 N_Op_Rem;
8543 subtype N_Later_Decl_Item is Node_Kind range
8544 N_Task_Type_Declaration ..
8545 N_Generic_Subprogram_Declaration;
8546 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
8547 -- only those items which can appear as later declarative items. This also
8548 -- includes N_Implicit_Label_Declaration which is not specifically in the
8549 -- grammar but may appear as a valid later declarative items. It does NOT
8550 -- include N_Pragma which can also appear among later declarative items.
8551 -- It does however include N_Protected_Body, which is a bit peculiar, but
8552 -- harmless since this cannot appear in Ada 83 mode anyway.
8554 subtype N_Membership_Test is Node_Kind range
8555 N_In ..
8556 N_Not_In;
8558 subtype N_Numeric_Or_String_Literal is Node_Kind range
8559 N_Integer_Literal ..
8560 N_String_Literal;
8562 subtype N_Op is Node_Kind range
8563 N_Op_Add ..
8564 N_Op_Plus;
8566 subtype N_Op_Boolean is Node_Kind range
8567 N_Op_And ..
8568 N_Op_Xor;
8569 -- Binary operators which take operands of a boolean type, and yield
8570 -- a result of a boolean type.
8572 subtype N_Op_Compare is Node_Kind range
8573 N_Op_Eq ..
8574 N_Op_Ne;
8576 subtype N_Op_Shift is Node_Kind range
8577 N_Op_Rotate_Left ..
8578 N_Op_Shift_Right_Arithmetic;
8580 subtype N_Proper_Body is Node_Kind range
8581 N_Package_Body ..
8582 N_Task_Body;
8584 subtype N_Push_xxx_Label is Node_Kind range
8585 N_Push_Constraint_Error_Label ..
8586 N_Push_Storage_Error_Label;
8588 subtype N_Pop_xxx_Label is Node_Kind range
8589 N_Pop_Constraint_Error_Label ..
8590 N_Pop_Storage_Error_Label;
8592 subtype N_Push_Pop_xxx_Label is Node_Kind range
8593 N_Push_Constraint_Error_Label ..
8594 N_Pop_Storage_Error_Label;
8596 subtype N_Raise_xxx_Error is Node_Kind range
8597 N_Raise_Constraint_Error ..
8598 N_Raise_Storage_Error;
8600 subtype N_Renaming_Declaration is Node_Kind range
8601 N_Exception_Renaming_Declaration ..
8602 N_Generic_Procedure_Renaming_Declaration;
8604 subtype N_Representation_Clause is Node_Kind range
8605 N_At_Clause ..
8606 N_Attribute_Definition_Clause;
8608 subtype N_Short_Circuit is Node_Kind range
8609 N_And_Then ..
8610 N_Or_Else;
8612 subtype N_SCIL_Node is Node_Kind range
8613 N_SCIL_Dispatch_Table_Tag_Init ..
8614 N_SCIL_Membership_Test;
8616 subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
8617 N_Abort_Statement ..
8618 N_If_Statement;
8619 -- Note that this includes all statement types except for the cases of the
8620 -- N_Procedure_Call_Statement which is considered to be a subexpression
8621 -- (since overloading is possible, so it needs to go through the normal
8622 -- overloading resolution for expressions).
8624 subtype N_Subprogram_Call is Node_Kind range
8625 N_Function_Call ..
8626 N_Procedure_Call_Statement;
8628 subtype N_Subprogram_Instantiation is Node_Kind range
8629 N_Function_Instantiation ..
8630 N_Procedure_Instantiation;
8632 subtype N_Has_Condition is Node_Kind range
8633 N_Exit_Statement ..
8634 N_Terminate_Alternative;
8635 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
8637 subtype N_Subexpr is Node_Kind range
8638 N_Expanded_Name ..
8639 N_Unchecked_Type_Conversion;
8640 -- Nodes with expression fields
8642 subtype N_Subprogram_Specification is Node_Kind range
8643 N_Function_Specification ..
8644 N_Procedure_Specification;
8646 subtype N_Unary_Op is Node_Kind range
8647 N_Op_Abs ..
8648 N_Op_Plus;
8650 subtype N_Unit_Body is Node_Kind range
8651 N_Package_Body ..
8652 N_Subprogram_Body;
8654 ---------------------------
8655 -- Node Access Functions --
8656 ---------------------------
8658 -- The following functions return the contents of the indicated field of
8659 -- the node referenced by the argument, which is a Node_Id. They provide
8660 -- logical access to fields in the node which could be accessed using the
8661 -- Atree.Unchecked_Access package, but the idea is always to use these
8662 -- higher level routines which preserve strong typing. In debug mode,
8663 -- these routines check that they are being applied to an appropriate
8664 -- node, as well as checking that the node is in range.
8666 function ABE_Is_Certain
8667 (N : Node_Id) return Boolean; -- Flag18
8669 function Abort_Present
8670 (N : Node_Id) return Boolean; -- Flag15
8672 function Abortable_Part
8673 (N : Node_Id) return Node_Id; -- Node2
8675 function Abstract_Present
8676 (N : Node_Id) return Boolean; -- Flag4
8678 function Accept_Handler_Records
8679 (N : Node_Id) return List_Id; -- List5
8681 function Accept_Statement
8682 (N : Node_Id) return Node_Id; -- Node2
8684 function Access_Definition
8685 (N : Node_Id) return Node_Id; -- Node3
8687 function Access_To_Subprogram_Definition
8688 (N : Node_Id) return Node_Id; -- Node3
8690 function Access_Types_To_Process
8691 (N : Node_Id) return Elist_Id; -- Elist2
8693 function Actions
8694 (N : Node_Id) return List_Id; -- List1
8696 function Activation_Chain_Entity
8697 (N : Node_Id) return Node_Id; -- Node3
8699 function Acts_As_Spec
8700 (N : Node_Id) return Boolean; -- Flag4
8702 function Actual_Designated_Subtype
8703 (N : Node_Id) return Node_Id; -- Node4
8705 function Address_Warning_Posted
8706 (N : Node_Id) return Boolean; -- Flag18
8708 function Aggregate_Bounds
8709 (N : Node_Id) return Node_Id; -- Node3
8711 function Aliased_Present
8712 (N : Node_Id) return Boolean; -- Flag4
8714 function All_Others
8715 (N : Node_Id) return Boolean; -- Flag11
8717 function All_Present
8718 (N : Node_Id) return Boolean; -- Flag15
8720 function Alternatives
8721 (N : Node_Id) return List_Id; -- List4
8723 function Ancestor_Part
8724 (N : Node_Id) return Node_Id; -- Node3
8726 function Atomic_Sync_Required
8727 (N : Node_Id) return Boolean; -- Flag14
8729 function Array_Aggregate
8730 (N : Node_Id) return Node_Id; -- Node3
8732 function Aspect_Rep_Item
8733 (N : Node_Id) return Node_Id; -- Node2
8735 function Assignment_OK
8736 (N : Node_Id) return Boolean; -- Flag15
8738 function Associated_Node
8739 (N : Node_Id) return Node_Id; -- Node4
8741 function At_End_Proc
8742 (N : Node_Id) return Node_Id; -- Node1
8744 function Attribute_Name
8745 (N : Node_Id) return Name_Id; -- Name2
8747 function Aux_Decls_Node
8748 (N : Node_Id) return Node_Id; -- Node5
8750 function Backwards_OK
8751 (N : Node_Id) return Boolean; -- Flag6
8753 function Bad_Is_Detected
8754 (N : Node_Id) return Boolean; -- Flag15
8756 function By_Ref
8757 (N : Node_Id) return Boolean; -- Flag5
8759 function Body_Required
8760 (N : Node_Id) return Boolean; -- Flag13
8762 function Body_To_Inline
8763 (N : Node_Id) return Node_Id; -- Node3
8765 function Box_Present
8766 (N : Node_Id) return Boolean; -- Flag15
8768 function Char_Literal_Value
8769 (N : Node_Id) return Uint; -- Uint2
8771 function Chars
8772 (N : Node_Id) return Name_Id; -- Name1
8774 function Check_Address_Alignment
8775 (N : Node_Id) return Boolean; -- Flag11
8777 function Choice_Parameter
8778 (N : Node_Id) return Node_Id; -- Node2
8780 function Choices
8781 (N : Node_Id) return List_Id; -- List1
8783 function Class_Present
8784 (N : Node_Id) return Boolean; -- Flag6
8786 function Classifications
8787 (N : Node_Id) return Node_Id; -- Node3
8789 function Cleanup_Actions
8790 (N : Node_Id) return List_Id; -- List5
8792 function Comes_From_Extended_Return_Statement
8793 (N : Node_Id) return Boolean; -- Flag18
8795 function Compile_Time_Known_Aggregate
8796 (N : Node_Id) return Boolean; -- Flag18
8798 function Component_Associations
8799 (N : Node_Id) return List_Id; -- List2
8801 function Component_Clauses
8802 (N : Node_Id) return List_Id; -- List3
8804 function Component_Definition
8805 (N : Node_Id) return Node_Id; -- Node4
8807 function Component_Items
8808 (N : Node_Id) return List_Id; -- List3
8810 function Component_List
8811 (N : Node_Id) return Node_Id; -- Node1
8813 function Component_Name
8814 (N : Node_Id) return Node_Id; -- Node1
8816 function Componentwise_Assignment
8817 (N : Node_Id) return Boolean; -- Flag14
8819 function Condition
8820 (N : Node_Id) return Node_Id; -- Node1
8822 function Condition_Actions
8823 (N : Node_Id) return List_Id; -- List3
8825 function Config_Pragmas
8826 (N : Node_Id) return List_Id; -- List4
8828 function Constant_Present
8829 (N : Node_Id) return Boolean; -- Flag17
8831 function Constraint
8832 (N : Node_Id) return Node_Id; -- Node3
8834 function Constraints
8835 (N : Node_Id) return List_Id; -- List1
8837 function Context_Installed
8838 (N : Node_Id) return Boolean; -- Flag13
8840 function Context_Pending
8841 (N : Node_Id) return Boolean; -- Flag16
8843 function Context_Items
8844 (N : Node_Id) return List_Id; -- List1
8846 function Contract_Test_Cases
8847 (N : Node_Id) return Node_Id; -- Node2
8849 function Controlling_Argument
8850 (N : Node_Id) return Node_Id; -- Node1
8852 function Conversion_OK
8853 (N : Node_Id) return Boolean; -- Flag14
8855 function Convert_To_Return_False
8856 (N : Node_Id) return Boolean; -- Flag13
8858 function Corresponding_Aspect
8859 (N : Node_Id) return Node_Id; -- Node3
8861 function Corresponding_Body
8862 (N : Node_Id) return Node_Id; -- Node5
8864 function Corresponding_Formal_Spec
8865 (N : Node_Id) return Node_Id; -- Node3
8867 function Corresponding_Generic_Association
8868 (N : Node_Id) return Node_Id; -- Node5
8870 function Corresponding_Integer_Value
8871 (N : Node_Id) return Uint; -- Uint4
8873 function Corresponding_Spec
8874 (N : Node_Id) return Node_Id; -- Node5
8876 function Corresponding_Spec_Of_Stub
8877 (N : Node_Id) return Node_Id; -- Node2
8879 function Corresponding_Stub
8880 (N : Node_Id) return Node_Id; -- Node3
8882 function Dcheck_Function
8883 (N : Node_Id) return Entity_Id; -- Node5
8885 function Declarations
8886 (N : Node_Id) return List_Id; -- List2
8888 function Default_Expression
8889 (N : Node_Id) return Node_Id; -- Node5
8891 function Default_Storage_Pool
8892 (N : Node_Id) return Node_Id; -- Node3
8894 function Default_Name
8895 (N : Node_Id) return Node_Id; -- Node2
8897 function Defining_Identifier
8898 (N : Node_Id) return Entity_Id; -- Node1
8900 function Defining_Unit_Name
8901 (N : Node_Id) return Node_Id; -- Node1
8903 function Delay_Alternative
8904 (N : Node_Id) return Node_Id; -- Node4
8906 function Delay_Statement
8907 (N : Node_Id) return Node_Id; -- Node2
8909 function Delta_Expression
8910 (N : Node_Id) return Node_Id; -- Node3
8912 function Digits_Expression
8913 (N : Node_Id) return Node_Id; -- Node2
8915 function Discr_Check_Funcs_Built
8916 (N : Node_Id) return Boolean; -- Flag11
8918 function Discrete_Choices
8919 (N : Node_Id) return List_Id; -- List4
8921 function Discrete_Range
8922 (N : Node_Id) return Node_Id; -- Node4
8924 function Discrete_Subtype_Definition
8925 (N : Node_Id) return Node_Id; -- Node4
8927 function Discrete_Subtype_Definitions
8928 (N : Node_Id) return List_Id; -- List2
8930 function Discriminant_Specifications
8931 (N : Node_Id) return List_Id; -- List4
8933 function Discriminant_Type
8934 (N : Node_Id) return Node_Id; -- Node5
8936 function Do_Accessibility_Check
8937 (N : Node_Id) return Boolean; -- Flag13
8939 function Do_Discriminant_Check
8940 (N : Node_Id) return Boolean; -- Flag1
8942 function Do_Division_Check
8943 (N : Node_Id) return Boolean; -- Flag13
8945 function Do_Length_Check
8946 (N : Node_Id) return Boolean; -- Flag4
8948 function Do_Overflow_Check
8949 (N : Node_Id) return Boolean; -- Flag17
8951 function Do_Range_Check
8952 (N : Node_Id) return Boolean; -- Flag9
8954 function Do_Storage_Check
8955 (N : Node_Id) return Boolean; -- Flag17
8957 function Do_Tag_Check
8958 (N : Node_Id) return Boolean; -- Flag13
8960 function Elaborate_All_Desirable
8961 (N : Node_Id) return Boolean; -- Flag9
8963 function Elaborate_All_Present
8964 (N : Node_Id) return Boolean; -- Flag14
8966 function Elaborate_Desirable
8967 (N : Node_Id) return Boolean; -- Flag11
8969 function Elaborate_Present
8970 (N : Node_Id) return Boolean; -- Flag4
8972 function Else_Actions
8973 (N : Node_Id) return List_Id; -- List3
8975 function Else_Statements
8976 (N : Node_Id) return List_Id; -- List4
8978 function Elsif_Parts
8979 (N : Node_Id) return List_Id; -- List3
8981 function Enclosing_Variant
8982 (N : Node_Id) return Node_Id; -- Node2
8984 function End_Label
8985 (N : Node_Id) return Node_Id; -- Node4
8987 function End_Span
8988 (N : Node_Id) return Uint; -- Uint5
8990 function Entity
8991 (N : Node_Id) return Node_Id; -- Node4
8993 function Entity_Or_Associated_Node
8994 (N : Node_Id) return Node_Id; -- Node4
8996 function Entry_Body_Formal_Part
8997 (N : Node_Id) return Node_Id; -- Node5
8999 function Entry_Call_Alternative
9000 (N : Node_Id) return Node_Id; -- Node1
9002 function Entry_Call_Statement
9003 (N : Node_Id) return Node_Id; -- Node1
9005 function Entry_Direct_Name
9006 (N : Node_Id) return Node_Id; -- Node1
9008 function Entry_Index
9009 (N : Node_Id) return Node_Id; -- Node5
9011 function Entry_Index_Specification
9012 (N : Node_Id) return Node_Id; -- Node4
9014 function Etype
9015 (N : Node_Id) return Node_Id; -- Node5
9017 function Exception_Choices
9018 (N : Node_Id) return List_Id; -- List4
9020 function Exception_Handlers
9021 (N : Node_Id) return List_Id; -- List5
9023 function Exception_Junk
9024 (N : Node_Id) return Boolean; -- Flag8
9026 function Exception_Label
9027 (N : Node_Id) return Node_Id; -- Node5
9029 function Explicit_Actual_Parameter
9030 (N : Node_Id) return Node_Id; -- Node3
9032 function Expansion_Delayed
9033 (N : Node_Id) return Boolean; -- Flag11
9035 function Explicit_Generic_Actual_Parameter
9036 (N : Node_Id) return Node_Id; -- Node1
9038 function Expression
9039 (N : Node_Id) return Node_Id; -- Node3
9041 function Expressions
9042 (N : Node_Id) return List_Id; -- List1
9044 function First_Bit
9045 (N : Node_Id) return Node_Id; -- Node3
9047 function First_Inlined_Subprogram
9048 (N : Node_Id) return Entity_Id; -- Node3
9050 function First_Name
9051 (N : Node_Id) return Boolean; -- Flag5
9053 function First_Named_Actual
9054 (N : Node_Id) return Node_Id; -- Node4
9056 function First_Real_Statement
9057 (N : Node_Id) return Node_Id; -- Node2
9059 function First_Subtype_Link
9060 (N : Node_Id) return Entity_Id; -- Node5
9062 function Float_Truncate
9063 (N : Node_Id) return Boolean; -- Flag11
9065 function Formal_Type_Definition
9066 (N : Node_Id) return Node_Id; -- Node3
9068 function Forwards_OK
9069 (N : Node_Id) return Boolean; -- Flag5
9071 function From_Aspect_Specification
9072 (N : Node_Id) return Boolean; -- Flag13
9074 function From_At_End
9075 (N : Node_Id) return Boolean; -- Flag4
9077 function From_At_Mod
9078 (N : Node_Id) return Boolean; -- Flag4
9080 function From_Conditional_Expression
9081 (N : Node_Id) return Boolean; -- Flag1
9083 function From_Default
9084 (N : Node_Id) return Boolean; -- Flag6
9086 function Generalized_Indexing
9087 (N : Node_Id) return Node_Id; -- Node4
9088 function Generic_Associations
9089 (N : Node_Id) return List_Id; -- List3
9091 function Generic_Formal_Declarations
9092 (N : Node_Id) return List_Id; -- List2
9094 function Generic_Parent
9095 (N : Node_Id) return Node_Id; -- Node5
9097 function Generic_Parent_Type
9098 (N : Node_Id) return Node_Id; -- Node4
9100 function Handled_Statement_Sequence
9101 (N : Node_Id) return Node_Id; -- Node4
9103 function Handler_List_Entry
9104 (N : Node_Id) return Node_Id; -- Node2
9106 function Has_Created_Identifier
9107 (N : Node_Id) return Boolean; -- Flag15
9109 function Has_Dereference_Action
9110 (N : Node_Id) return Boolean; -- Flag13
9112 function Has_Dynamic_Length_Check
9113 (N : Node_Id) return Boolean; -- Flag10
9115 function Has_Dynamic_Range_Check
9116 (N : Node_Id) return Boolean; -- Flag12
9118 function Has_Init_Expression
9119 (N : Node_Id) return Boolean; -- Flag14
9121 function Has_Local_Raise
9122 (N : Node_Id) return Boolean; -- Flag8
9124 function Has_No_Elaboration_Code
9125 (N : Node_Id) return Boolean; -- Flag17
9127 function Has_Pragma_Suppress_All
9128 (N : Node_Id) return Boolean; -- Flag14
9130 function Has_Private_View
9131 (N : Node_Id) return Boolean; -- Flag11
9133 function Has_Relative_Deadline_Pragma
9134 (N : Node_Id) return Boolean; -- Flag9
9136 function Has_Self_Reference
9137 (N : Node_Id) return Boolean; -- Flag13
9139 function Has_SP_Choice
9140 (N : Node_Id) return Boolean; -- Flag15
9142 function Has_Storage_Size_Pragma
9143 (N : Node_Id) return Boolean; -- Flag5
9145 function Has_Wide_Character
9146 (N : Node_Id) return Boolean; -- Flag11
9148 function Has_Wide_Wide_Character
9149 (N : Node_Id) return Boolean; -- Flag13
9151 function Header_Size_Added
9152 (N : Node_Id) return Boolean; -- Flag11
9154 function Hidden_By_Use_Clause
9155 (N : Node_Id) return Elist_Id; -- Elist4
9157 function High_Bound
9158 (N : Node_Id) return Node_Id; -- Node2
9160 function Identifier
9161 (N : Node_Id) return Node_Id; -- Node1
9163 function Interface_List
9164 (N : Node_Id) return List_Id; -- List2
9166 function Interface_Present
9167 (N : Node_Id) return Boolean; -- Flag16
9169 function Implicit_With
9170 (N : Node_Id) return Boolean; -- Flag16
9172 function Implicit_With_From_Instantiation
9173 (N : Node_Id) return Boolean; -- Flag12
9175 function Import_Interface_Present
9176 (N : Node_Id) return Boolean; -- Flag16
9178 function In_Present
9179 (N : Node_Id) return Boolean; -- Flag15
9181 function Includes_Infinities
9182 (N : Node_Id) return Boolean; -- Flag11
9184 function Incomplete_View
9185 (N : Node_Id) return Node_Id; -- Node2
9187 function Inherited_Discriminant
9188 (N : Node_Id) return Boolean; -- Flag13
9190 function Instance_Spec
9191 (N : Node_Id) return Node_Id; -- Node5
9193 function Intval
9194 (N : Node_Id) return Uint; -- Uint3
9196 function Is_Accessibility_Actual
9197 (N : Node_Id) return Boolean; -- Flag13
9199 function Is_Asynchronous_Call_Block
9200 (N : Node_Id) return Boolean; -- Flag7
9202 function Is_Boolean_Aspect
9203 (N : Node_Id) return Boolean; -- Flag16
9205 function Is_Checked
9206 (N : Node_Id) return Boolean; -- Flag11
9208 function Is_Component_Left_Opnd
9209 (N : Node_Id) return Boolean; -- Flag13
9211 function Is_Component_Right_Opnd
9212 (N : Node_Id) return Boolean; -- Flag14
9214 function Is_Controlling_Actual
9215 (N : Node_Id) return Boolean; -- Flag16
9217 function Is_Delayed_Aspect
9218 (N : Node_Id) return Boolean; -- Flag14
9220 function Is_Disabled
9221 (N : Node_Id) return Boolean; -- Flag15
9223 function Is_Dynamic_Coextension
9224 (N : Node_Id) return Boolean; -- Flag18
9226 function Is_Elsif
9227 (N : Node_Id) return Boolean; -- Flag13
9229 function Is_Entry_Barrier_Function
9230 (N : Node_Id) return Boolean; -- Flag8
9232 function Is_Expanded_Build_In_Place_Call
9233 (N : Node_Id) return Boolean; -- Flag11
9235 function Is_Finalization_Wrapper
9236 (N : Node_Id) return Boolean; -- Flag9
9238 function Is_Folded_In_Parser
9239 (N : Node_Id) return Boolean; -- Flag4
9241 function Is_Ignored
9242 (N : Node_Id) return Boolean; -- Flag9
9244 function Is_In_Discriminant_Check
9245 (N : Node_Id) return Boolean; -- Flag11
9247 function Is_Inherited
9248 (N : Node_Id) return Boolean; -- Flag4
9250 function Is_Machine_Number
9251 (N : Node_Id) return Boolean; -- Flag11
9253 function Is_Null_Loop
9254 (N : Node_Id) return Boolean; -- Flag16
9256 function Is_Overloaded
9257 (N : Node_Id) return Boolean; -- Flag5
9259 function Is_Power_Of_2_For_Shift
9260 (N : Node_Id) return Boolean; -- Flag13
9262 function Is_Prefixed_Call
9263 (N : Node_Id) return Boolean; -- Flag17
9265 function Is_Protected_Subprogram_Body
9266 (N : Node_Id) return Boolean; -- Flag7
9268 function Is_Static_Coextension
9269 (N : Node_Id) return Boolean; -- Flag14
9271 function Is_Static_Expression
9272 (N : Node_Id) return Boolean; -- Flag6
9274 function Is_Subprogram_Descriptor
9275 (N : Node_Id) return Boolean; -- Flag16
9277 function Is_Task_Allocation_Block
9278 (N : Node_Id) return Boolean; -- Flag6
9280 function Is_Task_Master
9281 (N : Node_Id) return Boolean; -- Flag5
9283 function Iteration_Scheme
9284 (N : Node_Id) return Node_Id; -- Node2
9286 function Iterator_Specification
9287 (N : Node_Id) return Node_Id; -- Node2
9289 function Itype
9290 (N : Node_Id) return Entity_Id; -- Node1
9292 function Kill_Range_Check
9293 (N : Node_Id) return Boolean; -- Flag11
9295 function Label_Construct
9296 (N : Node_Id) return Node_Id; -- Node2
9298 function Left_Opnd
9299 (N : Node_Id) return Node_Id; -- Node2
9301 function Last_Bit
9302 (N : Node_Id) return Node_Id; -- Node4
9304 function Last_Name
9305 (N : Node_Id) return Boolean; -- Flag6
9307 function Library_Unit
9308 (N : Node_Id) return Node_Id; -- Node4
9310 function Limited_View_Installed
9311 (N : Node_Id) return Boolean; -- Flag18
9313 function Limited_Present
9314 (N : Node_Id) return Boolean; -- Flag17
9316 function Literals
9317 (N : Node_Id) return List_Id; -- List1
9319 function Local_Raise_Not_OK
9320 (N : Node_Id) return Boolean; -- Flag7
9322 function Local_Raise_Statements
9323 (N : Node_Id) return Elist_Id; -- Elist1
9325 function Loop_Actions
9326 (N : Node_Id) return List_Id; -- List2
9328 function Loop_Parameter_Specification
9329 (N : Node_Id) return Node_Id; -- Node4
9331 function Low_Bound
9332 (N : Node_Id) return Node_Id; -- Node1
9334 function Mod_Clause
9335 (N : Node_Id) return Node_Id; -- Node2
9337 function More_Ids
9338 (N : Node_Id) return Boolean; -- Flag5
9340 function Must_Be_Byte_Aligned
9341 (N : Node_Id) return Boolean; -- Flag14
9343 function Must_Not_Freeze
9344 (N : Node_Id) return Boolean; -- Flag8
9346 function Must_Not_Override
9347 (N : Node_Id) return Boolean; -- Flag15
9349 function Must_Override
9350 (N : Node_Id) return Boolean; -- Flag14
9352 function Name
9353 (N : Node_Id) return Node_Id; -- Node2
9355 function Names
9356 (N : Node_Id) return List_Id; -- List2
9358 function Next_Entity
9359 (N : Node_Id) return Node_Id; -- Node2
9361 function Next_Exit_Statement
9362 (N : Node_Id) return Node_Id; -- Node3
9364 function Next_Implicit_With
9365 (N : Node_Id) return Node_Id; -- Node3
9367 function Next_Named_Actual
9368 (N : Node_Id) return Node_Id; -- Node4
9370 function Next_Pragma
9371 (N : Node_Id) return Node_Id; -- Node1
9373 function Next_Rep_Item
9374 (N : Node_Id) return Node_Id; -- Node5
9376 function Next_Use_Clause
9377 (N : Node_Id) return Node_Id; -- Node3
9379 function No_Ctrl_Actions
9380 (N : Node_Id) return Boolean; -- Flag7
9382 function No_Elaboration_Check
9383 (N : Node_Id) return Boolean; -- Flag14
9385 function No_Entities_Ref_In_Spec
9386 (N : Node_Id) return Boolean; -- Flag8
9388 function No_Initialization
9389 (N : Node_Id) return Boolean; -- Flag13
9391 function No_Minimize_Eliminate
9392 (N : Node_Id) return Boolean; -- Flag17
9394 function No_Truncation
9395 (N : Node_Id) return Boolean; -- Flag17
9397 function Non_Aliased_Prefix
9398 (N : Node_Id) return Boolean; -- Flag18
9400 function Null_Present
9401 (N : Node_Id) return Boolean; -- Flag13
9403 function Null_Excluding_Subtype
9404 (N : Node_Id) return Boolean; -- Flag16
9406 function Null_Exclusion_Present
9407 (N : Node_Id) return Boolean; -- Flag11
9409 function Null_Exclusion_In_Return_Present
9410 (N : Node_Id) return Boolean; -- Flag14
9412 function Null_Record_Present
9413 (N : Node_Id) return Boolean; -- Flag17
9415 function Object_Definition
9416 (N : Node_Id) return Node_Id; -- Node4
9418 function Of_Present
9419 (N : Node_Id) return Boolean; -- Flag16
9421 function Original_Discriminant
9422 (N : Node_Id) return Node_Id; -- Node2
9424 function Original_Entity
9425 (N : Node_Id) return Entity_Id; -- Node2
9427 function Others_Discrete_Choices
9428 (N : Node_Id) return List_Id; -- List1
9430 function Out_Present
9431 (N : Node_Id) return Boolean; -- Flag17
9433 function Parameter_Associations
9434 (N : Node_Id) return List_Id; -- List3
9436 function Parameter_Specifications
9437 (N : Node_Id) return List_Id; -- List3
9439 function Parameter_Type
9440 (N : Node_Id) return Node_Id; -- Node2
9442 function Parent_Spec
9443 (N : Node_Id) return Node_Id; -- Node4
9445 function Position
9446 (N : Node_Id) return Node_Id; -- Node2
9448 function Pragma_Argument_Associations
9449 (N : Node_Id) return List_Id; -- List2
9451 function Pragma_Identifier
9452 (N : Node_Id) return Node_Id; -- Node4
9454 function Pragmas_After
9455 (N : Node_Id) return List_Id; -- List5
9457 function Pragmas_Before
9458 (N : Node_Id) return List_Id; -- List4
9460 function Pre_Post_Conditions
9461 (N : Node_Id) return Node_Id; -- Node1
9463 function Prefix
9464 (N : Node_Id) return Node_Id; -- Node3
9466 function Premature_Use
9467 (N : Node_Id) return Node_Id; -- Node5
9469 function Present_Expr
9470 (N : Node_Id) return Uint; -- Uint3
9472 function Prev_Ids
9473 (N : Node_Id) return Boolean; -- Flag6
9475 function Print_In_Hex
9476 (N : Node_Id) return Boolean; -- Flag13
9478 function Private_Declarations
9479 (N : Node_Id) return List_Id; -- List3
9481 function Private_Present
9482 (N : Node_Id) return Boolean; -- Flag15
9484 function Procedure_To_Call
9485 (N : Node_Id) return Node_Id; -- Node2
9487 function Proper_Body
9488 (N : Node_Id) return Node_Id; -- Node1
9490 function Protected_Definition
9491 (N : Node_Id) return Node_Id; -- Node3
9493 function Protected_Present
9494 (N : Node_Id) return Boolean; -- Flag6
9496 function Raises_Constraint_Error
9497 (N : Node_Id) return Boolean; -- Flag7
9499 function Range_Constraint
9500 (N : Node_Id) return Node_Id; -- Node4
9502 function Range_Expression
9503 (N : Node_Id) return Node_Id; -- Node4
9505 function Real_Range_Specification
9506 (N : Node_Id) return Node_Id; -- Node4
9508 function Realval
9509 (N : Node_Id) return Ureal; -- Ureal3
9511 function Reason
9512 (N : Node_Id) return Uint; -- Uint3
9514 function Record_Extension_Part
9515 (N : Node_Id) return Node_Id; -- Node3
9517 function Redundant_Use
9518 (N : Node_Id) return Boolean; -- Flag13
9520 function Renaming_Exception
9521 (N : Node_Id) return Node_Id; -- Node2
9523 function Result_Definition
9524 (N : Node_Id) return Node_Id; -- Node4
9526 function Return_Object_Declarations
9527 (N : Node_Id) return List_Id; -- List3
9529 function Return_Statement_Entity
9530 (N : Node_Id) return Node_Id; -- Node5
9532 function Reverse_Present
9533 (N : Node_Id) return Boolean; -- Flag15
9535 function Right_Opnd
9536 (N : Node_Id) return Node_Id; -- Node3
9538 function Rounded_Result
9539 (N : Node_Id) return Boolean; -- Flag18
9541 function SCIL_Controlling_Tag
9542 (N : Node_Id) return Node_Id; -- Node5
9544 function SCIL_Entity
9545 (N : Node_Id) return Node_Id; -- Node4
9547 function SCIL_Tag_Value
9548 (N : Node_Id) return Node_Id; -- Node5
9550 function SCIL_Target_Prim
9551 (N : Node_Id) return Node_Id; -- Node2
9553 function Scope
9554 (N : Node_Id) return Node_Id; -- Node3
9556 function Select_Alternatives
9557 (N : Node_Id) return List_Id; -- List1
9559 function Selector_Name
9560 (N : Node_Id) return Node_Id; -- Node2
9562 function Selector_Names
9563 (N : Node_Id) return List_Id; -- List1
9565 function Shift_Count_OK
9566 (N : Node_Id) return Boolean; -- Flag4
9568 function Source_Type
9569 (N : Node_Id) return Entity_Id; -- Node1
9571 function Specification
9572 (N : Node_Id) return Node_Id; -- Node1
9574 function Split_PPC
9575 (N : Node_Id) return Boolean; -- Flag17
9577 function Statements
9578 (N : Node_Id) return List_Id; -- List3
9580 function Storage_Pool
9581 (N : Node_Id) return Node_Id; -- Node1
9583 function Subpool_Handle_Name
9584 (N : Node_Id) return Node_Id; -- Node4
9586 function Strval
9587 (N : Node_Id) return String_Id; -- Str3
9589 function Subtype_Indication
9590 (N : Node_Id) return Node_Id; -- Node5
9592 function Subtype_Mark
9593 (N : Node_Id) return Node_Id; -- Node4
9595 function Subtype_Marks
9596 (N : Node_Id) return List_Id; -- List2
9598 function Suppress_Assignment_Checks
9599 (N : Node_Id) return Boolean; -- Flag18
9601 function Suppress_Loop_Warnings
9602 (N : Node_Id) return Boolean; -- Flag17
9604 function Synchronized_Present
9605 (N : Node_Id) return Boolean; -- Flag7
9607 function Tagged_Present
9608 (N : Node_Id) return Boolean; -- Flag15
9610 function Target_Type
9611 (N : Node_Id) return Entity_Id; -- Node2
9613 function Task_Definition
9614 (N : Node_Id) return Node_Id; -- Node3
9616 function Task_Present
9617 (N : Node_Id) return Boolean; -- Flag5
9619 function Then_Actions
9620 (N : Node_Id) return List_Id; -- List2
9622 function Then_Statements
9623 (N : Node_Id) return List_Id; -- List2
9625 function Treat_Fixed_As_Integer
9626 (N : Node_Id) return Boolean; -- Flag14
9628 function Triggering_Alternative
9629 (N : Node_Id) return Node_Id; -- Node1
9631 function Triggering_Statement
9632 (N : Node_Id) return Node_Id; -- Node1
9634 function TSS_Elist
9635 (N : Node_Id) return Elist_Id; -- Elist3
9637 function Type_Definition
9638 (N : Node_Id) return Node_Id; -- Node3
9640 function Uneval_Old_Accept
9641 (N : Node_Id) return Boolean; -- Flag7
9643 function Uneval_Old_Warn
9644 (N : Node_Id) return Boolean; -- Flag18
9646 function Unit
9647 (N : Node_Id) return Node_Id; -- Node2
9649 function Unknown_Discriminants_Present
9650 (N : Node_Id) return Boolean; -- Flag13
9652 function Unreferenced_In_Spec
9653 (N : Node_Id) return Boolean; -- Flag7
9655 function Variant_Part
9656 (N : Node_Id) return Node_Id; -- Node4
9658 function Variants
9659 (N : Node_Id) return List_Id; -- List1
9661 function Visible_Declarations
9662 (N : Node_Id) return List_Id; -- List2
9664 function Uninitialized_Variable
9665 (N : Node_Id) return Node_Id; -- Node3
9667 function Used_Operations
9668 (N : Node_Id) return Elist_Id; -- Elist5
9670 function Was_Originally_Stub
9671 (N : Node_Id) return Boolean; -- Flag13
9673 function Withed_Body
9674 (N : Node_Id) return Node_Id; -- Node1
9676 -- End functions (note used by xsinfo utility program to end processing)
9678 ----------------------------
9679 -- Node Update Procedures --
9680 ----------------------------
9682 -- These are the corresponding node update routines, which again provide
9683 -- a high level logical access with type checking. In addition to setting
9684 -- the indicated field of the node N to the given Val, in the case of
9685 -- tree pointers (List1-4), the parent pointer of the Val node is set to
9686 -- point back to node N. This automates the setting of the parent pointer.
9688 procedure Set_ABE_Is_Certain
9689 (N : Node_Id; Val : Boolean := True); -- Flag18
9691 procedure Set_Abort_Present
9692 (N : Node_Id; Val : Boolean := True); -- Flag15
9694 procedure Set_Abortable_Part
9695 (N : Node_Id; Val : Node_Id); -- Node2
9697 procedure Set_Abstract_Present
9698 (N : Node_Id; Val : Boolean := True); -- Flag4
9700 procedure Set_Accept_Handler_Records
9701 (N : Node_Id; Val : List_Id); -- List5
9703 procedure Set_Accept_Statement
9704 (N : Node_Id; Val : Node_Id); -- Node2
9706 procedure Set_Access_Definition
9707 (N : Node_Id; Val : Node_Id); -- Node3
9709 procedure Set_Access_To_Subprogram_Definition
9710 (N : Node_Id; Val : Node_Id); -- Node3
9712 procedure Set_Access_Types_To_Process
9713 (N : Node_Id; Val : Elist_Id); -- Elist2
9715 procedure Set_Actions
9716 (N : Node_Id; Val : List_Id); -- List1
9718 procedure Set_Activation_Chain_Entity
9719 (N : Node_Id; Val : Node_Id); -- Node3
9721 procedure Set_Acts_As_Spec
9722 (N : Node_Id; Val : Boolean := True); -- Flag4
9724 procedure Set_Actual_Designated_Subtype
9725 (N : Node_Id; Val : Node_Id); -- Node4
9727 procedure Set_Address_Warning_Posted
9728 (N : Node_Id; Val : Boolean := True); -- Flag18
9730 procedure Set_Aggregate_Bounds
9731 (N : Node_Id; Val : Node_Id); -- Node3
9733 procedure Set_Aliased_Present
9734 (N : Node_Id; Val : Boolean := True); -- Flag4
9736 procedure Set_All_Others
9737 (N : Node_Id; Val : Boolean := True); -- Flag11
9739 procedure Set_All_Present
9740 (N : Node_Id; Val : Boolean := True); -- Flag15
9742 procedure Set_Alternatives
9743 (N : Node_Id; Val : List_Id); -- List4
9745 procedure Set_Ancestor_Part
9746 (N : Node_Id; Val : Node_Id); -- Node3
9748 procedure Set_Atomic_Sync_Required
9749 (N : Node_Id; Val : Boolean := True); -- Flag14
9751 procedure Set_Array_Aggregate
9752 (N : Node_Id; Val : Node_Id); -- Node3
9754 procedure Set_Aspect_Rep_Item
9755 (N : Node_Id; Val : Node_Id); -- Node2
9757 procedure Set_Assignment_OK
9758 (N : Node_Id; Val : Boolean := True); -- Flag15
9760 procedure Set_Associated_Node
9761 (N : Node_Id; Val : Node_Id); -- Node4
9763 procedure Set_Attribute_Name
9764 (N : Node_Id; Val : Name_Id); -- Name2
9766 procedure Set_At_End_Proc
9767 (N : Node_Id; Val : Node_Id); -- Node1
9769 procedure Set_Aux_Decls_Node
9770 (N : Node_Id; Val : Node_Id); -- Node5
9772 procedure Set_Backwards_OK
9773 (N : Node_Id; Val : Boolean := True); -- Flag6
9775 procedure Set_Bad_Is_Detected
9776 (N : Node_Id; Val : Boolean := True); -- Flag15
9778 procedure Set_Body_Required
9779 (N : Node_Id; Val : Boolean := True); -- Flag13
9781 procedure Set_Body_To_Inline
9782 (N : Node_Id; Val : Node_Id); -- Node3
9784 procedure Set_Box_Present
9785 (N : Node_Id; Val : Boolean := True); -- Flag15
9787 procedure Set_By_Ref
9788 (N : Node_Id; Val : Boolean := True); -- Flag5
9790 procedure Set_Char_Literal_Value
9791 (N : Node_Id; Val : Uint); -- Uint2
9793 procedure Set_Chars
9794 (N : Node_Id; Val : Name_Id); -- Name1
9796 procedure Set_Check_Address_Alignment
9797 (N : Node_Id; Val : Boolean := True); -- Flag11
9799 procedure Set_Choice_Parameter
9800 (N : Node_Id; Val : Node_Id); -- Node2
9802 procedure Set_Choices
9803 (N : Node_Id; Val : List_Id); -- List1
9805 procedure Set_Class_Present
9806 (N : Node_Id; Val : Boolean := True); -- Flag6
9808 procedure Set_Classifications
9809 (N : Node_Id; Val : Node_Id); -- Node3
9811 procedure Set_Cleanup_Actions
9812 (N : Node_Id; Val : List_Id); -- List5
9814 procedure Set_Comes_From_Extended_Return_Statement
9815 (N : Node_Id; Val : Boolean := True); -- Flag18
9817 procedure Set_Compile_Time_Known_Aggregate
9818 (N : Node_Id; Val : Boolean := True); -- Flag18
9820 procedure Set_Component_Associations
9821 (N : Node_Id; Val : List_Id); -- List2
9823 procedure Set_Component_Clauses
9824 (N : Node_Id; Val : List_Id); -- List3
9826 procedure Set_Component_Definition
9827 (N : Node_Id; Val : Node_Id); -- Node4
9829 procedure Set_Component_Items
9830 (N : Node_Id; Val : List_Id); -- List3
9832 procedure Set_Component_List
9833 (N : Node_Id; Val : Node_Id); -- Node1
9835 procedure Set_Component_Name
9836 (N : Node_Id; Val : Node_Id); -- Node1
9838 procedure Set_Componentwise_Assignment
9839 (N : Node_Id; Val : Boolean := True); -- Flag14
9841 procedure Set_Condition
9842 (N : Node_Id; Val : Node_Id); -- Node1
9844 procedure Set_Condition_Actions
9845 (N : Node_Id; Val : List_Id); -- List3
9847 procedure Set_Config_Pragmas
9848 (N : Node_Id; Val : List_Id); -- List4
9850 procedure Set_Constant_Present
9851 (N : Node_Id; Val : Boolean := True); -- Flag17
9853 procedure Set_Constraint
9854 (N : Node_Id; Val : Node_Id); -- Node3
9856 procedure Set_Constraints
9857 (N : Node_Id; Val : List_Id); -- List1
9859 procedure Set_Context_Installed
9860 (N : Node_Id; Val : Boolean := True); -- Flag13
9862 procedure Set_Context_Items
9863 (N : Node_Id; Val : List_Id); -- List1
9865 procedure Set_Context_Pending
9866 (N : Node_Id; Val : Boolean := True); -- Flag16
9868 procedure Set_Contract_Test_Cases
9869 (N : Node_Id; Val : Node_Id); -- Node2
9871 procedure Set_Controlling_Argument
9872 (N : Node_Id; Val : Node_Id); -- Node1
9874 procedure Set_Conversion_OK
9875 (N : Node_Id; Val : Boolean := True); -- Flag14
9877 procedure Set_Convert_To_Return_False
9878 (N : Node_Id; Val : Boolean := True); -- Flag13
9880 procedure Set_Corresponding_Aspect
9881 (N : Node_Id; Val : Node_Id); -- Node3
9883 procedure Set_Corresponding_Body
9884 (N : Node_Id; Val : Node_Id); -- Node5
9886 procedure Set_Corresponding_Formal_Spec
9887 (N : Node_Id; Val : Node_Id); -- Node3
9889 procedure Set_Corresponding_Generic_Association
9890 (N : Node_Id; Val : Node_Id); -- Node5
9892 procedure Set_Corresponding_Integer_Value
9893 (N : Node_Id; Val : Uint); -- Uint4
9895 procedure Set_Corresponding_Spec
9896 (N : Node_Id; Val : Node_Id); -- Node5
9898 procedure Set_Corresponding_Spec_Of_Stub
9899 (N : Node_Id; Val : Node_Id); -- Node2
9901 procedure Set_Corresponding_Stub
9902 (N : Node_Id; Val : Node_Id); -- Node3
9904 procedure Set_Dcheck_Function
9905 (N : Node_Id; Val : Entity_Id); -- Node5
9907 procedure Set_Declarations
9908 (N : Node_Id; Val : List_Id); -- List2
9910 procedure Set_Default_Expression
9911 (N : Node_Id; Val : Node_Id); -- Node5
9913 procedure Set_Default_Storage_Pool
9914 (N : Node_Id; Val : Node_Id); -- Node3
9916 procedure Set_Default_Name
9917 (N : Node_Id; Val : Node_Id); -- Node2
9919 procedure Set_Defining_Identifier
9920 (N : Node_Id; Val : Entity_Id); -- Node1
9922 procedure Set_Defining_Unit_Name
9923 (N : Node_Id; Val : Node_Id); -- Node1
9925 procedure Set_Delay_Alternative
9926 (N : Node_Id; Val : Node_Id); -- Node4
9928 procedure Set_Delay_Statement
9929 (N : Node_Id; Val : Node_Id); -- Node2
9931 procedure Set_Delta_Expression
9932 (N : Node_Id; Val : Node_Id); -- Node3
9934 procedure Set_Digits_Expression
9935 (N : Node_Id; Val : Node_Id); -- Node2
9937 procedure Set_Discr_Check_Funcs_Built
9938 (N : Node_Id; Val : Boolean := True); -- Flag11
9940 procedure Set_Discrete_Choices
9941 (N : Node_Id; Val : List_Id); -- List4
9943 procedure Set_Discrete_Range
9944 (N : Node_Id; Val : Node_Id); -- Node4
9946 procedure Set_Discrete_Subtype_Definition
9947 (N : Node_Id; Val : Node_Id); -- Node4
9949 procedure Set_Discrete_Subtype_Definitions
9950 (N : Node_Id; Val : List_Id); -- List2
9952 procedure Set_Discriminant_Specifications
9953 (N : Node_Id; Val : List_Id); -- List4
9955 procedure Set_Discriminant_Type
9956 (N : Node_Id; Val : Node_Id); -- Node5
9958 procedure Set_Do_Accessibility_Check
9959 (N : Node_Id; Val : Boolean := True); -- Flag13
9961 procedure Set_Do_Discriminant_Check
9962 (N : Node_Id; Val : Boolean := True); -- Flag1
9964 procedure Set_Do_Division_Check
9965 (N : Node_Id; Val : Boolean := True); -- Flag13
9967 procedure Set_Do_Length_Check
9968 (N : Node_Id; Val : Boolean := True); -- Flag4
9970 procedure Set_Do_Overflow_Check
9971 (N : Node_Id; Val : Boolean := True); -- Flag17
9973 procedure Set_Do_Range_Check
9974 (N : Node_Id; Val : Boolean := True); -- Flag9
9976 procedure Set_Do_Storage_Check
9977 (N : Node_Id; Val : Boolean := True); -- Flag17
9979 procedure Set_Do_Tag_Check
9980 (N : Node_Id; Val : Boolean := True); -- Flag13
9982 procedure Set_Elaborate_All_Desirable
9983 (N : Node_Id; Val : Boolean := True); -- Flag9
9985 procedure Set_Elaborate_All_Present
9986 (N : Node_Id; Val : Boolean := True); -- Flag14
9988 procedure Set_Elaborate_Desirable
9989 (N : Node_Id; Val : Boolean := True); -- Flag11
9991 procedure Set_Elaborate_Present
9992 (N : Node_Id; Val : Boolean := True); -- Flag4
9994 procedure Set_Else_Actions
9995 (N : Node_Id; Val : List_Id); -- List3
9997 procedure Set_Else_Statements
9998 (N : Node_Id; Val : List_Id); -- List4
10000 procedure Set_Elsif_Parts
10001 (N : Node_Id; Val : List_Id); -- List3
10003 procedure Set_Enclosing_Variant
10004 (N : Node_Id; Val : Node_Id); -- Node2
10006 procedure Set_End_Label
10007 (N : Node_Id; Val : Node_Id); -- Node4
10009 procedure Set_End_Span
10010 (N : Node_Id; Val : Uint); -- Uint5
10012 procedure Set_Entity
10013 (N : Node_Id; Val : Node_Id); -- Node4
10015 procedure Set_Entry_Body_Formal_Part
10016 (N : Node_Id; Val : Node_Id); -- Node5
10018 procedure Set_Entry_Call_Alternative
10019 (N : Node_Id; Val : Node_Id); -- Node1
10021 procedure Set_Entry_Call_Statement
10022 (N : Node_Id; Val : Node_Id); -- Node1
10024 procedure Set_Entry_Direct_Name
10025 (N : Node_Id; Val : Node_Id); -- Node1
10027 procedure Set_Entry_Index
10028 (N : Node_Id; Val : Node_Id); -- Node5
10030 procedure Set_Entry_Index_Specification
10031 (N : Node_Id; Val : Node_Id); -- Node4
10033 procedure Set_Etype
10034 (N : Node_Id; Val : Node_Id); -- Node5
10036 procedure Set_Exception_Choices
10037 (N : Node_Id; Val : List_Id); -- List4
10039 procedure Set_Exception_Handlers
10040 (N : Node_Id; Val : List_Id); -- List5
10042 procedure Set_Exception_Junk
10043 (N : Node_Id; Val : Boolean := True); -- Flag8
10045 procedure Set_Exception_Label
10046 (N : Node_Id; Val : Node_Id); -- Node5
10048 procedure Set_Expansion_Delayed
10049 (N : Node_Id; Val : Boolean := True); -- Flag11
10051 procedure Set_Explicit_Actual_Parameter
10052 (N : Node_Id; Val : Node_Id); -- Node3
10054 procedure Set_Explicit_Generic_Actual_Parameter
10055 (N : Node_Id; Val : Node_Id); -- Node1
10057 procedure Set_Expression
10058 (N : Node_Id; Val : Node_Id); -- Node3
10060 procedure Set_Expressions
10061 (N : Node_Id; Val : List_Id); -- List1
10063 procedure Set_First_Bit
10064 (N : Node_Id; Val : Node_Id); -- Node3
10066 procedure Set_First_Inlined_Subprogram
10067 (N : Node_Id; Val : Entity_Id); -- Node3
10069 procedure Set_First_Name
10070 (N : Node_Id; Val : Boolean := True); -- Flag5
10072 procedure Set_First_Named_Actual
10073 (N : Node_Id; Val : Node_Id); -- Node4
10075 procedure Set_First_Real_Statement
10076 (N : Node_Id; Val : Node_Id); -- Node2
10078 procedure Set_First_Subtype_Link
10079 (N : Node_Id; Val : Entity_Id); -- Node5
10081 procedure Set_Float_Truncate
10082 (N : Node_Id; Val : Boolean := True); -- Flag11
10084 procedure Set_Formal_Type_Definition
10085 (N : Node_Id; Val : Node_Id); -- Node3
10087 procedure Set_Forwards_OK
10088 (N : Node_Id; Val : Boolean := True); -- Flag5
10090 procedure Set_From_Aspect_Specification
10091 (N : Node_Id; Val : Boolean := True); -- Flag13
10093 procedure Set_From_At_End
10094 (N : Node_Id; Val : Boolean := True); -- Flag4
10096 procedure Set_From_At_Mod
10097 (N : Node_Id; Val : Boolean := True); -- Flag4
10099 procedure Set_From_Conditional_Expression
10100 (N : Node_Id; Val : Boolean := True); -- Flag1
10102 procedure Set_From_Default
10103 (N : Node_Id; Val : Boolean := True); -- Flag6
10105 procedure Set_Generalized_Indexing
10106 (N : Node_Id; Val : Node_Id); -- Node4
10108 procedure Set_Generic_Associations
10109 (N : Node_Id; Val : List_Id); -- List3
10111 procedure Set_Generic_Formal_Declarations
10112 (N : Node_Id; Val : List_Id); -- List2
10114 procedure Set_Generic_Parent
10115 (N : Node_Id; Val : Node_Id); -- Node5
10117 procedure Set_Generic_Parent_Type
10118 (N : Node_Id; Val : Node_Id); -- Node4
10120 procedure Set_Handled_Statement_Sequence
10121 (N : Node_Id; Val : Node_Id); -- Node4
10123 procedure Set_Handler_List_Entry
10124 (N : Node_Id; Val : Node_Id); -- Node2
10126 procedure Set_Has_Created_Identifier
10127 (N : Node_Id; Val : Boolean := True); -- Flag15
10129 procedure Set_Has_Dereference_Action
10130 (N : Node_Id; Val : Boolean := True); -- Flag13
10132 procedure Set_Has_Dynamic_Length_Check
10133 (N : Node_Id; Val : Boolean := True); -- Flag10
10135 procedure Set_Has_Dynamic_Range_Check
10136 (N : Node_Id; Val : Boolean := True); -- Flag12
10138 procedure Set_Has_Init_Expression
10139 (N : Node_Id; Val : Boolean := True); -- Flag14
10141 procedure Set_Has_Local_Raise
10142 (N : Node_Id; Val : Boolean := True); -- Flag8
10144 procedure Set_Has_No_Elaboration_Code
10145 (N : Node_Id; Val : Boolean := True); -- Flag17
10147 procedure Set_Has_Pragma_Suppress_All
10148 (N : Node_Id; Val : Boolean := True); -- Flag14
10150 procedure Set_Has_Private_View
10151 (N : Node_Id; Val : Boolean := True); -- Flag11
10153 procedure Set_Has_Relative_Deadline_Pragma
10154 (N : Node_Id; Val : Boolean := True); -- Flag9
10156 procedure Set_Has_Self_Reference
10157 (N : Node_Id; Val : Boolean := True); -- Flag13
10159 procedure Set_Has_SP_Choice
10160 (N : Node_Id; Val : Boolean := True); -- Flag15
10162 procedure Set_Has_Storage_Size_Pragma
10163 (N : Node_Id; Val : Boolean := True); -- Flag5
10165 procedure Set_Has_Wide_Character
10166 (N : Node_Id; Val : Boolean := True); -- Flag11
10168 procedure Set_Has_Wide_Wide_Character
10169 (N : Node_Id; Val : Boolean := True); -- Flag13
10171 procedure Set_Header_Size_Added
10172 (N : Node_Id; Val : Boolean := True); -- Flag11
10174 procedure Set_Hidden_By_Use_Clause
10175 (N : Node_Id; Val : Elist_Id); -- Elist4
10177 procedure Set_High_Bound
10178 (N : Node_Id; Val : Node_Id); -- Node2
10180 procedure Set_Identifier
10181 (N : Node_Id; Val : Node_Id); -- Node1
10183 procedure Set_Interface_List
10184 (N : Node_Id; Val : List_Id); -- List2
10186 procedure Set_Interface_Present
10187 (N : Node_Id; Val : Boolean := True); -- Flag16
10189 procedure Set_Implicit_With
10190 (N : Node_Id; Val : Boolean := True); -- Flag16
10192 procedure Set_Implicit_With_From_Instantiation
10193 (N : Node_Id; Val : Boolean := True); -- Flag12
10195 procedure Set_Import_Interface_Present
10196 (N : Node_Id; Val : Boolean := True); -- Flag16
10198 procedure Set_In_Present
10199 (N : Node_Id; Val : Boolean := True); -- Flag15
10201 procedure Set_Includes_Infinities
10202 (N : Node_Id; Val : Boolean := True); -- Flag11
10204 procedure Set_Incomplete_View
10205 (N : Node_Id; Val : Node_Id); -- Node2
10207 procedure Set_Inherited_Discriminant
10208 (N : Node_Id; Val : Boolean := True); -- Flag13
10210 procedure Set_Instance_Spec
10211 (N : Node_Id; Val : Node_Id); -- Node5
10213 procedure Set_Intval
10214 (N : Node_Id; Val : Uint); -- Uint3
10216 procedure Set_Is_Accessibility_Actual
10217 (N : Node_Id; Val : Boolean := True); -- Flag13
10219 procedure Set_Is_Asynchronous_Call_Block
10220 (N : Node_Id; Val : Boolean := True); -- Flag7
10222 procedure Set_Is_Boolean_Aspect
10223 (N : Node_Id; Val : Boolean := True); -- Flag16
10225 procedure Set_Is_Checked
10226 (N : Node_Id; Val : Boolean := True); -- Flag11
10228 procedure Set_Is_Component_Left_Opnd
10229 (N : Node_Id; Val : Boolean := True); -- Flag13
10231 procedure Set_Is_Component_Right_Opnd
10232 (N : Node_Id; Val : Boolean := True); -- Flag14
10234 procedure Set_Is_Controlling_Actual
10235 (N : Node_Id; Val : Boolean := True); -- Flag16
10237 procedure Set_Is_Delayed_Aspect
10238 (N : Node_Id; Val : Boolean := True); -- Flag14
10240 procedure Set_Is_Disabled
10241 (N : Node_Id; Val : Boolean := True); -- Flag15
10243 procedure Set_Is_Ignored
10244 (N : Node_Id; Val : Boolean := True); -- Flag9
10246 procedure Set_Is_Dynamic_Coextension
10247 (N : Node_Id; Val : Boolean := True); -- Flag18
10249 procedure Set_Is_Elsif
10250 (N : Node_Id; Val : Boolean := True); -- Flag13
10252 procedure Set_Is_Entry_Barrier_Function
10253 (N : Node_Id; Val : Boolean := True); -- Flag8
10255 procedure Set_Is_Expanded_Build_In_Place_Call
10256 (N : Node_Id; Val : Boolean := True); -- Flag11
10258 procedure Set_Is_Finalization_Wrapper
10259 (N : Node_Id; Val : Boolean := True); -- Flag9
10261 procedure Set_Is_Folded_In_Parser
10262 (N : Node_Id; Val : Boolean := True); -- Flag4
10264 procedure Set_Is_In_Discriminant_Check
10265 (N : Node_Id; Val : Boolean := True); -- Flag11
10267 procedure Set_Is_Inherited
10268 (N : Node_Id; Val : Boolean := True); -- Flag4
10270 procedure Set_Is_Machine_Number
10271 (N : Node_Id; Val : Boolean := True); -- Flag11
10273 procedure Set_Is_Null_Loop
10274 (N : Node_Id; Val : Boolean := True); -- Flag16
10276 procedure Set_Is_Overloaded
10277 (N : Node_Id; Val : Boolean := True); -- Flag5
10279 procedure Set_Is_Power_Of_2_For_Shift
10280 (N : Node_Id; Val : Boolean := True); -- Flag13
10282 procedure Set_Is_Prefixed_Call
10283 (N : Node_Id; Val : Boolean := True); -- Flag17
10285 procedure Set_Is_Protected_Subprogram_Body
10286 (N : Node_Id; Val : Boolean := True); -- Flag7
10288 procedure Set_Is_Static_Coextension
10289 (N : Node_Id; Val : Boolean := True); -- Flag14
10291 procedure Set_Is_Static_Expression
10292 (N : Node_Id; Val : Boolean := True); -- Flag6
10294 procedure Set_Is_Subprogram_Descriptor
10295 (N : Node_Id; Val : Boolean := True); -- Flag16
10297 procedure Set_Is_Task_Allocation_Block
10298 (N : Node_Id; Val : Boolean := True); -- Flag6
10300 procedure Set_Is_Task_Master
10301 (N : Node_Id; Val : Boolean := True); -- Flag5
10303 procedure Set_Iteration_Scheme
10304 (N : Node_Id; Val : Node_Id); -- Node2
10306 procedure Set_Iterator_Specification
10307 (N : Node_Id; Val : Node_Id); -- Node2
10309 procedure Set_Itype
10310 (N : Node_Id; Val : Entity_Id); -- Node1
10312 procedure Set_Kill_Range_Check
10313 (N : Node_Id; Val : Boolean := True); -- Flag11
10315 procedure Set_Last_Bit
10316 (N : Node_Id; Val : Node_Id); -- Node4
10318 procedure Set_Last_Name
10319 (N : Node_Id; Val : Boolean := True); -- Flag6
10321 procedure Set_Library_Unit
10322 (N : Node_Id; Val : Node_Id); -- Node4
10324 procedure Set_Label_Construct
10325 (N : Node_Id; Val : Node_Id); -- Node2
10327 procedure Set_Left_Opnd
10328 (N : Node_Id; Val : Node_Id); -- Node2
10330 procedure Set_Limited_View_Installed
10331 (N : Node_Id; Val : Boolean := True); -- Flag18
10333 procedure Set_Limited_Present
10334 (N : Node_Id; Val : Boolean := True); -- Flag17
10336 procedure Set_Literals
10337 (N : Node_Id; Val : List_Id); -- List1
10339 procedure Set_Local_Raise_Not_OK
10340 (N : Node_Id; Val : Boolean := True); -- Flag7
10342 procedure Set_Local_Raise_Statements
10343 (N : Node_Id; Val : Elist_Id); -- Elist1
10345 procedure Set_Loop_Actions
10346 (N : Node_Id; Val : List_Id); -- List2
10348 procedure Set_Loop_Parameter_Specification
10349 (N : Node_Id; Val : Node_Id); -- Node4
10351 procedure Set_Low_Bound
10352 (N : Node_Id; Val : Node_Id); -- Node1
10354 procedure Set_Mod_Clause
10355 (N : Node_Id; Val : Node_Id); -- Node2
10357 procedure Set_More_Ids
10358 (N : Node_Id; Val : Boolean := True); -- Flag5
10360 procedure Set_Must_Be_Byte_Aligned
10361 (N : Node_Id; Val : Boolean := True); -- Flag14
10363 procedure Set_Must_Not_Freeze
10364 (N : Node_Id; Val : Boolean := True); -- Flag8
10366 procedure Set_Must_Not_Override
10367 (N : Node_Id; Val : Boolean := True); -- Flag15
10369 procedure Set_Must_Override
10370 (N : Node_Id; Val : Boolean := True); -- Flag14
10372 procedure Set_Name
10373 (N : Node_Id; Val : Node_Id); -- Node2
10375 procedure Set_Names
10376 (N : Node_Id; Val : List_Id); -- List2
10378 procedure Set_Next_Entity
10379 (N : Node_Id; Val : Node_Id); -- Node2
10381 procedure Set_Next_Exit_Statement
10382 (N : Node_Id; Val : Node_Id); -- Node3
10384 procedure Set_Next_Implicit_With
10385 (N : Node_Id; Val : Node_Id); -- Node3
10387 procedure Set_Next_Named_Actual
10388 (N : Node_Id; Val : Node_Id); -- Node4
10390 procedure Set_Next_Pragma
10391 (N : Node_Id; Val : Node_Id); -- Node1
10393 procedure Set_Next_Rep_Item
10394 (N : Node_Id; Val : Node_Id); -- Node5
10396 procedure Set_Next_Use_Clause
10397 (N : Node_Id; Val : Node_Id); -- Node3
10399 procedure Set_No_Ctrl_Actions
10400 (N : Node_Id; Val : Boolean := True); -- Flag7
10402 procedure Set_No_Elaboration_Check
10403 (N : Node_Id; Val : Boolean := True); -- Flag14
10405 procedure Set_No_Entities_Ref_In_Spec
10406 (N : Node_Id; Val : Boolean := True); -- Flag8
10408 procedure Set_No_Initialization
10409 (N : Node_Id; Val : Boolean := True); -- Flag13
10411 procedure Set_No_Minimize_Eliminate
10412 (N : Node_Id; Val : Boolean := True); -- Flag17
10414 procedure Set_No_Truncation
10415 (N : Node_Id; Val : Boolean := True); -- Flag17
10417 procedure Set_Non_Aliased_Prefix
10418 (N : Node_Id; Val : Boolean := True); -- Flag18
10420 procedure Set_Null_Present
10421 (N : Node_Id; Val : Boolean := True); -- Flag13
10423 procedure Set_Null_Excluding_Subtype
10424 (N : Node_Id; Val : Boolean := True); -- Flag16
10426 procedure Set_Null_Exclusion_Present
10427 (N : Node_Id; Val : Boolean := True); -- Flag11
10429 procedure Set_Null_Exclusion_In_Return_Present
10430 (N : Node_Id; Val : Boolean := True); -- Flag14
10432 procedure Set_Null_Record_Present
10433 (N : Node_Id; Val : Boolean := True); -- Flag17
10435 procedure Set_Object_Definition
10436 (N : Node_Id; Val : Node_Id); -- Node4
10438 procedure Set_Of_Present
10439 (N : Node_Id; Val : Boolean := True); -- Flag16
10441 procedure Set_Original_Discriminant
10442 (N : Node_Id; Val : Node_Id); -- Node2
10444 procedure Set_Original_Entity
10445 (N : Node_Id; Val : Entity_Id); -- Node2
10447 procedure Set_Others_Discrete_Choices
10448 (N : Node_Id; Val : List_Id); -- List1
10450 procedure Set_Out_Present
10451 (N : Node_Id; Val : Boolean := True); -- Flag17
10453 procedure Set_Parameter_Associations
10454 (N : Node_Id; Val : List_Id); -- List3
10456 procedure Set_Parameter_Specifications
10457 (N : Node_Id; Val : List_Id); -- List3
10459 procedure Set_Parameter_Type
10460 (N : Node_Id; Val : Node_Id); -- Node2
10462 procedure Set_Parent_Spec
10463 (N : Node_Id; Val : Node_Id); -- Node4
10465 procedure Set_Position
10466 (N : Node_Id; Val : Node_Id); -- Node2
10468 procedure Set_Pragma_Argument_Associations
10469 (N : Node_Id; Val : List_Id); -- List2
10471 procedure Set_Pragma_Identifier
10472 (N : Node_Id; Val : Node_Id); -- Node4
10474 procedure Set_Pragmas_After
10475 (N : Node_Id; Val : List_Id); -- List5
10477 procedure Set_Pragmas_Before
10478 (N : Node_Id; Val : List_Id); -- List4
10480 procedure Set_Pre_Post_Conditions
10481 (N : Node_Id; Val : Node_Id); -- Node1
10483 procedure Set_Prefix
10484 (N : Node_Id; Val : Node_Id); -- Node3
10486 procedure Set_Premature_Use
10487 (N : Node_Id; Val : Node_Id); -- Node5
10489 procedure Set_Present_Expr
10490 (N : Node_Id; Val : Uint); -- Uint3
10492 procedure Set_Prev_Ids
10493 (N : Node_Id; Val : Boolean := True); -- Flag6
10495 procedure Set_Print_In_Hex
10496 (N : Node_Id; Val : Boolean := True); -- Flag13
10498 procedure Set_Private_Declarations
10499 (N : Node_Id; Val : List_Id); -- List3
10501 procedure Set_Private_Present
10502 (N : Node_Id; Val : Boolean := True); -- Flag15
10504 procedure Set_Procedure_To_Call
10505 (N : Node_Id; Val : Node_Id); -- Node2
10507 procedure Set_Proper_Body
10508 (N : Node_Id; Val : Node_Id); -- Node1
10510 procedure Set_Protected_Definition
10511 (N : Node_Id; Val : Node_Id); -- Node3
10513 procedure Set_Protected_Present
10514 (N : Node_Id; Val : Boolean := True); -- Flag6
10516 procedure Set_Raises_Constraint_Error
10517 (N : Node_Id; Val : Boolean := True); -- Flag7
10519 procedure Set_Range_Constraint
10520 (N : Node_Id; Val : Node_Id); -- Node4
10522 procedure Set_Range_Expression
10523 (N : Node_Id; Val : Node_Id); -- Node4
10525 procedure Set_Real_Range_Specification
10526 (N : Node_Id; Val : Node_Id); -- Node4
10528 procedure Set_Realval
10529 (N : Node_Id; Val : Ureal); -- Ureal3
10531 procedure Set_Reason
10532 (N : Node_Id; Val : Uint); -- Uint3
10534 procedure Set_Record_Extension_Part
10535 (N : Node_Id; Val : Node_Id); -- Node3
10537 procedure Set_Redundant_Use
10538 (N : Node_Id; Val : Boolean := True); -- Flag13
10540 procedure Set_Renaming_Exception
10541 (N : Node_Id; Val : Node_Id); -- Node2
10543 procedure Set_Result_Definition
10544 (N : Node_Id; Val : Node_Id); -- Node4
10546 procedure Set_Return_Object_Declarations
10547 (N : Node_Id; Val : List_Id); -- List3
10549 procedure Set_Return_Statement_Entity
10550 (N : Node_Id; Val : Node_Id); -- Node5
10552 procedure Set_Reverse_Present
10553 (N : Node_Id; Val : Boolean := True); -- Flag15
10555 procedure Set_Right_Opnd
10556 (N : Node_Id; Val : Node_Id); -- Node3
10558 procedure Set_Rounded_Result
10559 (N : Node_Id; Val : Boolean := True); -- Flag18
10561 procedure Set_SCIL_Controlling_Tag
10562 (N : Node_Id; Val : Node_Id); -- Node5
10564 procedure Set_SCIL_Entity
10565 (N : Node_Id; Val : Node_Id); -- Node4
10567 procedure Set_SCIL_Tag_Value
10568 (N : Node_Id; Val : Node_Id); -- Node5
10570 procedure Set_SCIL_Target_Prim
10571 (N : Node_Id; Val : Node_Id); -- Node2
10573 procedure Set_Scope
10574 (N : Node_Id; Val : Node_Id); -- Node3
10576 procedure Set_Select_Alternatives
10577 (N : Node_Id; Val : List_Id); -- List1
10579 procedure Set_Selector_Name
10580 (N : Node_Id; Val : Node_Id); -- Node2
10582 procedure Set_Selector_Names
10583 (N : Node_Id; Val : List_Id); -- List1
10585 procedure Set_Shift_Count_OK
10586 (N : Node_Id; Val : Boolean := True); -- Flag4
10588 procedure Set_Source_Type
10589 (N : Node_Id; Val : Entity_Id); -- Node1
10591 procedure Set_Specification
10592 (N : Node_Id; Val : Node_Id); -- Node1
10594 procedure Set_Split_PPC
10595 (N : Node_Id; Val : Boolean); -- Flag17
10597 procedure Set_Statements
10598 (N : Node_Id; Val : List_Id); -- List3
10600 procedure Set_Storage_Pool
10601 (N : Node_Id; Val : Node_Id); -- Node1
10603 procedure Set_Subpool_Handle_Name
10604 (N : Node_Id; Val : Node_Id); -- Node4
10606 procedure Set_Strval
10607 (N : Node_Id; Val : String_Id); -- Str3
10609 procedure Set_Subtype_Indication
10610 (N : Node_Id; Val : Node_Id); -- Node5
10612 procedure Set_Subtype_Mark
10613 (N : Node_Id; Val : Node_Id); -- Node4
10615 procedure Set_Subtype_Marks
10616 (N : Node_Id; Val : List_Id); -- List2
10618 procedure Set_Suppress_Assignment_Checks
10619 (N : Node_Id; Val : Boolean := True); -- Flag18
10621 procedure Set_Suppress_Loop_Warnings
10622 (N : Node_Id; Val : Boolean := True); -- Flag17
10624 procedure Set_Synchronized_Present
10625 (N : Node_Id; Val : Boolean := True); -- Flag7
10627 procedure Set_Tagged_Present
10628 (N : Node_Id; Val : Boolean := True); -- Flag15
10630 procedure Set_Target_Type
10631 (N : Node_Id; Val : Entity_Id); -- Node2
10633 procedure Set_Task_Definition
10634 (N : Node_Id; Val : Node_Id); -- Node3
10636 procedure Set_Task_Present
10637 (N : Node_Id; Val : Boolean := True); -- Flag5
10639 procedure Set_Then_Actions
10640 (N : Node_Id; Val : List_Id); -- List2
10642 procedure Set_Then_Statements
10643 (N : Node_Id; Val : List_Id); -- List2
10645 procedure Set_Treat_Fixed_As_Integer
10646 (N : Node_Id; Val : Boolean := True); -- Flag14
10648 procedure Set_Triggering_Alternative
10649 (N : Node_Id; Val : Node_Id); -- Node1
10651 procedure Set_Triggering_Statement
10652 (N : Node_Id; Val : Node_Id); -- Node1
10654 procedure Set_TSS_Elist
10655 (N : Node_Id; Val : Elist_Id); -- Elist3
10657 procedure Set_Type_Definition
10658 (N : Node_Id; Val : Node_Id); -- Node3
10660 procedure Set_Uneval_Old_Accept
10661 (N : Node_Id; Val : Boolean := True); -- Flag7
10663 procedure Set_Uneval_Old_Warn
10664 (N : Node_Id; Val : Boolean := True); -- Flag18
10666 procedure Set_Unit
10667 (N : Node_Id; Val : Node_Id); -- Node2
10669 procedure Set_Unknown_Discriminants_Present
10670 (N : Node_Id; Val : Boolean := True); -- Flag13
10672 procedure Set_Unreferenced_In_Spec
10673 (N : Node_Id; Val : Boolean := True); -- Flag7
10675 procedure Set_Variant_Part
10676 (N : Node_Id; Val : Node_Id); -- Node4
10678 procedure Set_Variants
10679 (N : Node_Id; Val : List_Id); -- List1
10681 procedure Set_Visible_Declarations
10682 (N : Node_Id; Val : List_Id); -- List2
10684 procedure Set_Uninitialized_Variable
10685 (N : Node_Id; Val : Node_Id); -- Node3
10687 procedure Set_Used_Operations
10688 (N : Node_Id; Val : Elist_Id); -- Elist5
10690 procedure Set_Was_Originally_Stub
10691 (N : Node_Id; Val : Boolean := True); -- Flag13
10693 procedure Set_Withed_Body
10694 (N : Node_Id; Val : Node_Id); -- Node1
10696 -------------------------
10697 -- Iterator Procedures --
10698 -------------------------
10700 -- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
10702 procedure Next_Entity (N : in out Node_Id);
10703 procedure Next_Named_Actual (N : in out Node_Id);
10704 procedure Next_Rep_Item (N : in out Node_Id);
10705 procedure Next_Use_Clause (N : in out Node_Id);
10707 -------------------------------------------
10708 -- Miscellaneous Tree Access Subprograms --
10709 -------------------------------------------
10711 function End_Location (N : Node_Id) return Source_Ptr;
10712 -- N is an N_If_Statement or N_Case_Statement node, and this function
10713 -- returns the location of the IF token in the END IF sequence by
10714 -- translating the value of the End_Span field.
10716 procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
10717 -- N is an N_If_Statement or N_Case_Statement node. This procedure sets
10718 -- the End_Span field to correspond to the given value S. In other words,
10719 -- End_Span is set to the difference between S and Sloc (N), the starting
10720 -- location.
10722 function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
10723 -- Given an argument to a pragma Arg, this function returns the expression
10724 -- for the argument. This is Arg itself, or, in the case where Arg is a
10725 -- pragma argument association node, the expression from this node.
10727 --------------------------------
10728 -- Node_Kind Membership Tests --
10729 --------------------------------
10731 -- The following functions allow a convenient notation for testing whether
10732 -- a Node_Kind value matches any one of a list of possible values. In each
10733 -- case True is returned if the given T argument is equal to any of the V
10734 -- arguments. Note that there is a similar set of functions defined in
10735 -- Atree where the first argument is a Node_Id whose Nkind field is tested.
10737 function Nkind_In
10738 (T : Node_Kind;
10739 V1 : Node_Kind;
10740 V2 : Node_Kind) return Boolean;
10742 function Nkind_In
10743 (T : Node_Kind;
10744 V1 : Node_Kind;
10745 V2 : Node_Kind;
10746 V3 : Node_Kind) return Boolean;
10748 function Nkind_In
10749 (T : Node_Kind;
10750 V1 : Node_Kind;
10751 V2 : Node_Kind;
10752 V3 : Node_Kind;
10753 V4 : Node_Kind) return Boolean;
10755 function Nkind_In
10756 (T : Node_Kind;
10757 V1 : Node_Kind;
10758 V2 : Node_Kind;
10759 V3 : Node_Kind;
10760 V4 : Node_Kind;
10761 V5 : Node_Kind) return Boolean;
10763 function Nkind_In
10764 (T : Node_Kind;
10765 V1 : Node_Kind;
10766 V2 : Node_Kind;
10767 V3 : Node_Kind;
10768 V4 : Node_Kind;
10769 V5 : Node_Kind;
10770 V6 : Node_Kind) return Boolean;
10772 function Nkind_In
10773 (T : Node_Kind;
10774 V1 : Node_Kind;
10775 V2 : Node_Kind;
10776 V3 : Node_Kind;
10777 V4 : Node_Kind;
10778 V5 : Node_Kind;
10779 V6 : Node_Kind;
10780 V7 : Node_Kind) return Boolean;
10782 function Nkind_In
10783 (T : Node_Kind;
10784 V1 : Node_Kind;
10785 V2 : Node_Kind;
10786 V3 : Node_Kind;
10787 V4 : Node_Kind;
10788 V5 : Node_Kind;
10789 V6 : Node_Kind;
10790 V7 : Node_Kind;
10791 V8 : Node_Kind) return Boolean;
10793 function Nkind_In
10794 (T : Node_Kind;
10795 V1 : Node_Kind;
10796 V2 : Node_Kind;
10797 V3 : Node_Kind;
10798 V4 : Node_Kind;
10799 V5 : Node_Kind;
10800 V6 : Node_Kind;
10801 V7 : Node_Kind;
10802 V8 : Node_Kind;
10803 V9 : Node_Kind) return Boolean;
10805 pragma Inline (Nkind_In);
10806 -- Inline all above functions
10808 -----------------------
10809 -- Utility Functions --
10810 -----------------------
10812 function Pragma_Name (N : Node_Id) return Name_Id;
10813 pragma Inline (Pragma_Name);
10814 -- Convenient function to obtain Chars field of Pragma_Identifier
10816 -----------------------------
10817 -- Syntactic Parent Tables --
10818 -----------------------------
10820 -- These tables show for each node, and for each of the five fields,
10821 -- whether the corresponding field is syntactic (True) or semantic (False).
10822 -- Unused entries are also set to False.
10824 subtype Field_Num is Natural range 1 .. 5;
10826 Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
10828 -- Following entries can be built automatically from the sinfo sources
10829 -- using the makeisf utility (currently this program is in spitbol).
10831 N_Identifier =>
10832 (1 => True, -- Chars (Name1)
10833 2 => False, -- Original_Discriminant (Node2-Sem)
10834 3 => False, -- unused
10835 4 => False, -- Entity (Node4-Sem)
10836 5 => False), -- Etype (Node5-Sem)
10838 N_Integer_Literal =>
10839 (1 => False, -- unused
10840 2 => False, -- Original_Entity (Node2-Sem)
10841 3 => True, -- Intval (Uint3)
10842 4 => False, -- unused
10843 5 => False), -- Etype (Node5-Sem)
10845 N_Real_Literal =>
10846 (1 => False, -- unused
10847 2 => False, -- Original_Entity (Node2-Sem)
10848 3 => True, -- Realval (Ureal3)
10849 4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
10850 5 => False), -- Etype (Node5-Sem)
10852 N_Character_Literal =>
10853 (1 => True, -- Chars (Name1)
10854 2 => True, -- Char_Literal_Value (Uint2)
10855 3 => False, -- unused
10856 4 => False, -- Entity (Node4-Sem)
10857 5 => False), -- Etype (Node5-Sem)
10859 N_String_Literal =>
10860 (1 => False, -- unused
10861 2 => False, -- unused
10862 3 => True, -- Strval (Str3)
10863 4 => False, -- unused
10864 5 => False), -- Etype (Node5-Sem)
10866 N_Pragma =>
10867 (1 => False, -- Next_Pragma (Node1-Sem)
10868 2 => True, -- Pragma_Argument_Associations (List2)
10869 3 => False, -- unused
10870 4 => True, -- Pragma_Identifier (Node4)
10871 5 => False), -- Next_Rep_Item (Node5-Sem)
10873 N_Pragma_Argument_Association =>
10874 (1 => True, -- Chars (Name1)
10875 2 => False, -- unused
10876 3 => True, -- Expression (Node3)
10877 4 => False, -- unused
10878 5 => False), -- unused
10880 N_Defining_Identifier =>
10881 (1 => True, -- Chars (Name1)
10882 2 => False, -- Next_Entity (Node2-Sem)
10883 3 => False, -- Scope (Node3-Sem)
10884 4 => False, -- unused
10885 5 => False), -- Etype (Node5-Sem)
10887 N_Full_Type_Declaration =>
10888 (1 => True, -- Defining_Identifier (Node1)
10889 2 => False, -- Incomplete_View (Node2-Sem)
10890 3 => True, -- Type_Definition (Node3)
10891 4 => True, -- Discriminant_Specifications (List4)
10892 5 => False), -- unused
10894 N_Subtype_Declaration =>
10895 (1 => True, -- Defining_Identifier (Node1)
10896 2 => False, -- unused
10897 3 => False, -- unused
10898 4 => False, -- Generic_Parent_Type (Node4-Sem)
10899 5 => True), -- Subtype_Indication (Node5)
10901 N_Subtype_Indication =>
10902 (1 => False, -- unused
10903 2 => False, -- unused
10904 3 => True, -- Constraint (Node3)
10905 4 => True, -- Subtype_Mark (Node4)
10906 5 => False), -- Etype (Node5-Sem)
10908 N_Object_Declaration =>
10909 (1 => True, -- Defining_Identifier (Node1)
10910 2 => False, -- Handler_List_Entry (Node2-Sem)
10911 3 => True, -- Expression (Node3)
10912 4 => True, -- Object_Definition (Node4)
10913 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
10915 N_Number_Declaration =>
10916 (1 => True, -- Defining_Identifier (Node1)
10917 2 => False, -- unused
10918 3 => True, -- Expression (Node3)
10919 4 => False, -- unused
10920 5 => False), -- unused
10922 N_Derived_Type_Definition =>
10923 (1 => False, -- unused
10924 2 => True, -- Interface_List (List2)
10925 3 => True, -- Record_Extension_Part (Node3)
10926 4 => False, -- unused
10927 5 => True), -- Subtype_Indication (Node5)
10929 N_Range_Constraint =>
10930 (1 => False, -- unused
10931 2 => False, -- unused
10932 3 => False, -- unused
10933 4 => True, -- Range_Expression (Node4)
10934 5 => False), -- unused
10936 N_Range =>
10937 (1 => True, -- Low_Bound (Node1)
10938 2 => True, -- High_Bound (Node2)
10939 3 => False, -- unused
10940 4 => False, -- unused
10941 5 => False), -- Etype (Node5-Sem)
10943 N_Enumeration_Type_Definition =>
10944 (1 => True, -- Literals (List1)
10945 2 => False, -- unused
10946 3 => False, -- unused
10947 4 => True, -- End_Label (Node4)
10948 5 => False), -- unused
10950 N_Defining_Character_Literal =>
10951 (1 => True, -- Chars (Name1)
10952 2 => False, -- Next_Entity (Node2-Sem)
10953 3 => False, -- Scope (Node3-Sem)
10954 4 => False, -- unused
10955 5 => False), -- Etype (Node5-Sem)
10957 N_Signed_Integer_Type_Definition =>
10958 (1 => True, -- Low_Bound (Node1)
10959 2 => True, -- High_Bound (Node2)
10960 3 => False, -- unused
10961 4 => False, -- unused
10962 5 => False), -- unused
10964 N_Modular_Type_Definition =>
10965 (1 => False, -- unused
10966 2 => False, -- unused
10967 3 => True, -- Expression (Node3)
10968 4 => False, -- unused
10969 5 => False), -- unused
10971 N_Floating_Point_Definition =>
10972 (1 => False, -- unused
10973 2 => True, -- Digits_Expression (Node2)
10974 3 => False, -- unused
10975 4 => True, -- Real_Range_Specification (Node4)
10976 5 => False), -- unused
10978 N_Real_Range_Specification =>
10979 (1 => True, -- Low_Bound (Node1)
10980 2 => True, -- High_Bound (Node2)
10981 3 => False, -- unused
10982 4 => False, -- unused
10983 5 => False), -- unused
10985 N_Ordinary_Fixed_Point_Definition =>
10986 (1 => False, -- unused
10987 2 => False, -- unused
10988 3 => True, -- Delta_Expression (Node3)
10989 4 => True, -- Real_Range_Specification (Node4)
10990 5 => False), -- unused
10992 N_Decimal_Fixed_Point_Definition =>
10993 (1 => False, -- unused
10994 2 => True, -- Digits_Expression (Node2)
10995 3 => True, -- Delta_Expression (Node3)
10996 4 => True, -- Real_Range_Specification (Node4)
10997 5 => False), -- unused
10999 N_Digits_Constraint =>
11000 (1 => False, -- unused
11001 2 => True, -- Digits_Expression (Node2)
11002 3 => False, -- unused
11003 4 => True, -- Range_Constraint (Node4)
11004 5 => False), -- unused
11006 N_Unconstrained_Array_Definition =>
11007 (1 => False, -- unused
11008 2 => True, -- Subtype_Marks (List2)
11009 3 => False, -- unused
11010 4 => True, -- Component_Definition (Node4)
11011 5 => False), -- unused
11013 N_Constrained_Array_Definition =>
11014 (1 => False, -- unused
11015 2 => True, -- Discrete_Subtype_Definitions (List2)
11016 3 => False, -- unused
11017 4 => True, -- Component_Definition (Node4)
11018 5 => False), -- unused
11020 N_Component_Definition =>
11021 (1 => False, -- unused
11022 2 => False, -- unused
11023 3 => True, -- Access_Definition (Node3)
11024 4 => False, -- unused
11025 5 => True), -- Subtype_Indication (Node5)
11027 N_Discriminant_Specification =>
11028 (1 => True, -- Defining_Identifier (Node1)
11029 2 => False, -- unused
11030 3 => True, -- Expression (Node3)
11031 4 => False, -- unused
11032 5 => True), -- Discriminant_Type (Node5)
11034 N_Index_Or_Discriminant_Constraint =>
11035 (1 => True, -- Constraints (List1)
11036 2 => False, -- unused
11037 3 => False, -- unused
11038 4 => False, -- unused
11039 5 => False), -- unused
11041 N_Discriminant_Association =>
11042 (1 => True, -- Selector_Names (List1)
11043 2 => False, -- unused
11044 3 => True, -- Expression (Node3)
11045 4 => False, -- unused
11046 5 => False), -- unused
11048 N_Record_Definition =>
11049 (1 => True, -- Component_List (Node1)
11050 2 => True, -- Interface_List (List2)
11051 3 => False, -- unused
11052 4 => True, -- End_Label (Node4)
11053 5 => False), -- unused
11055 N_Component_List =>
11056 (1 => False, -- unused
11057 2 => False, -- unused
11058 3 => True, -- Component_Items (List3)
11059 4 => True, -- Variant_Part (Node4)
11060 5 => False), -- unused
11062 N_Component_Declaration =>
11063 (1 => True, -- Defining_Identifier (Node1)
11064 2 => False, -- unused
11065 3 => True, -- Expression (Node3)
11066 4 => True, -- Component_Definition (Node4)
11067 5 => False), -- unused
11069 N_Variant_Part =>
11070 (1 => True, -- Variants (List1)
11071 2 => True, -- Name (Node2)
11072 3 => False, -- unused
11073 4 => False, -- unused
11074 5 => False), -- unused
11076 N_Variant =>
11077 (1 => True, -- Component_List (Node1)
11078 2 => False, -- Enclosing_Variant (Node2-Sem)
11079 3 => False, -- Present_Expr (Uint3-Sem)
11080 4 => True, -- Discrete_Choices (List4)
11081 5 => False), -- Dcheck_Function (Node5-Sem)
11083 N_Others_Choice =>
11084 (1 => False, -- Others_Discrete_Choices (List1-Sem)
11085 2 => False, -- unused
11086 3 => False, -- unused
11087 4 => False, -- unused
11088 5 => False), -- unused
11090 N_Access_To_Object_Definition =>
11091 (1 => False, -- unused
11092 2 => False, -- unused
11093 3 => False, -- unused
11094 4 => False, -- unused
11095 5 => True), -- Subtype_Indication (Node5)
11097 N_Access_Function_Definition =>
11098 (1 => False, -- unused
11099 2 => False, -- unused
11100 3 => True, -- Parameter_Specifications (List3)
11101 4 => True, -- Result_Definition (Node4)
11102 5 => False), -- unused
11104 N_Access_Procedure_Definition =>
11105 (1 => False, -- unused
11106 2 => False, -- unused
11107 3 => True, -- Parameter_Specifications (List3)
11108 4 => False, -- unused
11109 5 => False), -- unused
11111 N_Access_Definition =>
11112 (1 => False, -- unused
11113 2 => False, -- unused
11114 3 => True, -- Access_To_Subprogram_Definition (Node3)
11115 4 => True, -- Subtype_Mark (Node4)
11116 5 => False), -- unused
11118 N_Incomplete_Type_Declaration =>
11119 (1 => True, -- Defining_Identifier (Node1)
11120 2 => False, -- unused
11121 3 => False, -- unused
11122 4 => True, -- Discriminant_Specifications (List4)
11123 5 => False), -- Premature_Use
11125 N_Explicit_Dereference =>
11126 (1 => False, -- unused
11127 2 => False, -- unused
11128 3 => True, -- Prefix (Node3)
11129 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
11130 5 => False), -- Etype (Node5-Sem)
11132 N_Indexed_Component =>
11133 (1 => True, -- Expressions (List1)
11134 2 => False, -- unused
11135 3 => True, -- Prefix (Node3)
11136 4 => False, -- Generalized_Indexing (Node4-Sem)
11137 5 => False), -- Etype (Node5-Sem)
11139 N_Slice =>
11140 (1 => False, -- unused
11141 2 => False, -- unused
11142 3 => True, -- Prefix (Node3)
11143 4 => True, -- Discrete_Range (Node4)
11144 5 => False), -- Etype (Node5-Sem)
11146 N_Selected_Component =>
11147 (1 => False, -- unused
11148 2 => True, -- Selector_Name (Node2)
11149 3 => True, -- Prefix (Node3)
11150 4 => False, -- unused
11151 5 => False), -- Etype (Node5-Sem)
11153 N_Attribute_Reference =>
11154 (1 => True, -- Expressions (List1)
11155 2 => True, -- Attribute_Name (Name2)
11156 3 => True, -- Prefix (Node3)
11157 4 => False, -- Entity (Node4-Sem)
11158 5 => False), -- Etype (Node5-Sem)
11160 N_Aggregate =>
11161 (1 => True, -- Expressions (List1)
11162 2 => True, -- Component_Associations (List2)
11163 3 => False, -- Aggregate_Bounds (Node3-Sem)
11164 4 => False, -- unused
11165 5 => False), -- Etype (Node5-Sem)
11167 N_Component_Association =>
11168 (1 => True, -- Choices (List1)
11169 2 => False, -- Loop_Actions (List2-Sem)
11170 3 => True, -- Expression (Node3)
11171 4 => False, -- unused
11172 5 => False), -- unused
11174 N_Extension_Aggregate =>
11175 (1 => True, -- Expressions (List1)
11176 2 => True, -- Component_Associations (List2)
11177 3 => True, -- Ancestor_Part (Node3)
11178 4 => False, -- unused
11179 5 => False), -- Etype (Node5-Sem)
11181 N_Null =>
11182 (1 => False, -- unused
11183 2 => False, -- unused
11184 3 => False, -- unused
11185 4 => False, -- unused
11186 5 => False), -- Etype (Node5-Sem)
11188 N_And_Then =>
11189 (1 => False, -- Actions (List1-Sem)
11190 2 => True, -- Left_Opnd (Node2)
11191 3 => True, -- Right_Opnd (Node3)
11192 4 => False, -- unused
11193 5 => False), -- Etype (Node5-Sem)
11195 N_Or_Else =>
11196 (1 => False, -- Actions (List1-Sem)
11197 2 => True, -- Left_Opnd (Node2)
11198 3 => True, -- Right_Opnd (Node3)
11199 4 => False, -- unused
11200 5 => False), -- Etype (Node5-Sem)
11202 N_In =>
11203 (1 => False, -- unused
11204 2 => True, -- Left_Opnd (Node2)
11205 3 => True, -- Right_Opnd (Node3)
11206 4 => True, -- Alternatives (List4)
11207 5 => False), -- Etype (Node5-Sem)
11209 N_Not_In =>
11210 (1 => False, -- unused
11211 2 => True, -- Left_Opnd (Node2)
11212 3 => True, -- Right_Opnd (Node3)
11213 4 => True, -- Alternatives (List4)
11214 5 => False), -- Etype (Node5-Sem)
11216 N_Op_And =>
11217 (1 => True, -- Chars (Name1)
11218 2 => True, -- Left_Opnd (Node2)
11219 3 => True, -- Right_Opnd (Node3)
11220 4 => False, -- Entity (Node4-Sem)
11221 5 => False), -- Etype (Node5-Sem)
11223 N_Op_Or =>
11224 (1 => True, -- Chars (Name1)
11225 2 => True, -- Left_Opnd (Node2)
11226 3 => True, -- Right_Opnd (Node3)
11227 4 => False, -- Entity (Node4-Sem)
11228 5 => False), -- Etype (Node5-Sem)
11230 N_Op_Xor =>
11231 (1 => True, -- Chars (Name1)
11232 2 => True, -- Left_Opnd (Node2)
11233 3 => True, -- Right_Opnd (Node3)
11234 4 => False, -- Entity (Node4-Sem)
11235 5 => False), -- Etype (Node5-Sem)
11237 N_Op_Eq =>
11238 (1 => True, -- Chars (Name1)
11239 2 => True, -- Left_Opnd (Node2)
11240 3 => True, -- Right_Opnd (Node3)
11241 4 => False, -- Entity (Node4-Sem)
11242 5 => False), -- Etype (Node5-Sem)
11244 N_Op_Ne =>
11245 (1 => True, -- Chars (Name1)
11246 2 => True, -- Left_Opnd (Node2)
11247 3 => True, -- Right_Opnd (Node3)
11248 4 => False, -- Entity (Node4-Sem)
11249 5 => False), -- Etype (Node5-Sem)
11251 N_Op_Lt =>
11252 (1 => True, -- Chars (Name1)
11253 2 => True, -- Left_Opnd (Node2)
11254 3 => True, -- Right_Opnd (Node3)
11255 4 => False, -- Entity (Node4-Sem)
11256 5 => False), -- Etype (Node5-Sem)
11258 N_Op_Le =>
11259 (1 => True, -- Chars (Name1)
11260 2 => True, -- Left_Opnd (Node2)
11261 3 => True, -- Right_Opnd (Node3)
11262 4 => False, -- Entity (Node4-Sem)
11263 5 => False), -- Etype (Node5-Sem)
11265 N_Op_Gt =>
11266 (1 => True, -- Chars (Name1)
11267 2 => True, -- Left_Opnd (Node2)
11268 3 => True, -- Right_Opnd (Node3)
11269 4 => False, -- Entity (Node4-Sem)
11270 5 => False), -- Etype (Node5-Sem)
11272 N_Op_Ge =>
11273 (1 => True, -- Chars (Name1)
11274 2 => True, -- Left_Opnd (Node2)
11275 3 => True, -- Right_Opnd (Node3)
11276 4 => False, -- Entity (Node4-Sem)
11277 5 => False), -- Etype (Node5-Sem)
11279 N_Op_Add =>
11280 (1 => True, -- Chars (Name1)
11281 2 => True, -- Left_Opnd (Node2)
11282 3 => True, -- Right_Opnd (Node3)
11283 4 => False, -- Entity (Node4-Sem)
11284 5 => False), -- Etype (Node5-Sem)
11286 N_Op_Subtract =>
11287 (1 => True, -- Chars (Name1)
11288 2 => True, -- Left_Opnd (Node2)
11289 3 => True, -- Right_Opnd (Node3)
11290 4 => False, -- Entity (Node4-Sem)
11291 5 => False), -- Etype (Node5-Sem)
11293 N_Op_Concat =>
11294 (1 => True, -- Chars (Name1)
11295 2 => True, -- Left_Opnd (Node2)
11296 3 => True, -- Right_Opnd (Node3)
11297 4 => False, -- Entity (Node4-Sem)
11298 5 => False), -- Etype (Node5-Sem)
11300 N_Op_Multiply =>
11301 (1 => True, -- Chars (Name1)
11302 2 => True, -- Left_Opnd (Node2)
11303 3 => True, -- Right_Opnd (Node3)
11304 4 => False, -- Entity (Node4-Sem)
11305 5 => False), -- Etype (Node5-Sem)
11307 N_Op_Divide =>
11308 (1 => True, -- Chars (Name1)
11309 2 => True, -- Left_Opnd (Node2)
11310 3 => True, -- Right_Opnd (Node3)
11311 4 => False, -- Entity (Node4-Sem)
11312 5 => False), -- Etype (Node5-Sem)
11314 N_Op_Mod =>
11315 (1 => True, -- Chars (Name1)
11316 2 => True, -- Left_Opnd (Node2)
11317 3 => True, -- Right_Opnd (Node3)
11318 4 => False, -- Entity (Node4-Sem)
11319 5 => False), -- Etype (Node5-Sem)
11321 N_Op_Rem =>
11322 (1 => True, -- Chars (Name1)
11323 2 => True, -- Left_Opnd (Node2)
11324 3 => True, -- Right_Opnd (Node3)
11325 4 => False, -- Entity (Node4-Sem)
11326 5 => False), -- Etype (Node5-Sem)
11328 N_Op_Expon =>
11329 (1 => True, -- Chars (Name1)
11330 2 => True, -- Left_Opnd (Node2)
11331 3 => True, -- Right_Opnd (Node3)
11332 4 => False, -- Entity (Node4-Sem)
11333 5 => False), -- Etype (Node5-Sem)
11335 N_Op_Plus =>
11336 (1 => True, -- Chars (Name1)
11337 2 => False, -- unused
11338 3 => True, -- Right_Opnd (Node3)
11339 4 => False, -- Entity (Node4-Sem)
11340 5 => False), -- Etype (Node5-Sem)
11342 N_Op_Minus =>
11343 (1 => True, -- Chars (Name1)
11344 2 => False, -- unused
11345 3 => True, -- Right_Opnd (Node3)
11346 4 => False, -- Entity (Node4-Sem)
11347 5 => False), -- Etype (Node5-Sem)
11349 N_Op_Abs =>
11350 (1 => True, -- Chars (Name1)
11351 2 => False, -- unused
11352 3 => True, -- Right_Opnd (Node3)
11353 4 => False, -- Entity (Node4-Sem)
11354 5 => False), -- Etype (Node5-Sem)
11356 N_Op_Not =>
11357 (1 => True, -- Chars (Name1)
11358 2 => False, -- unused
11359 3 => True, -- Right_Opnd (Node3)
11360 4 => False, -- Entity (Node4-Sem)
11361 5 => False), -- Etype (Node5-Sem)
11363 N_Type_Conversion =>
11364 (1 => False, -- unused
11365 2 => False, -- unused
11366 3 => True, -- Expression (Node3)
11367 4 => True, -- Subtype_Mark (Node4)
11368 5 => False), -- Etype (Node5-Sem)
11370 N_Qualified_Expression =>
11371 (1 => False, -- unused
11372 2 => False, -- unused
11373 3 => True, -- Expression (Node3)
11374 4 => True, -- Subtype_Mark (Node4)
11375 5 => False), -- Etype (Node5-Sem)
11377 N_Quantified_Expression =>
11378 (1 => True, -- Condition (Node1)
11379 2 => True, -- Iterator_Specification
11380 3 => False, -- unused
11381 4 => True, -- Loop_Parameter_Specification (Node4)
11382 5 => False), -- Etype (Node5-Sem)
11384 N_Allocator =>
11385 (1 => False, -- Storage_Pool (Node1-Sem)
11386 2 => False, -- Procedure_To_Call (Node2-Sem)
11387 3 => True, -- Expression (Node3)
11388 4 => True, -- Subpool_Handle_Name (Node4)
11389 5 => False), -- Etype (Node5-Sem)
11391 N_Null_Statement =>
11392 (1 => False, -- unused
11393 2 => False, -- unused
11394 3 => False, -- unused
11395 4 => False, -- unused
11396 5 => False), -- unused
11398 N_Label =>
11399 (1 => True, -- Identifier (Node1)
11400 2 => False, -- unused
11401 3 => False, -- unused
11402 4 => False, -- unused
11403 5 => False), -- unused
11405 N_Assignment_Statement =>
11406 (1 => False, -- unused
11407 2 => True, -- Name (Node2)
11408 3 => True, -- Expression (Node3)
11409 4 => False, -- unused
11410 5 => False), -- unused
11412 N_If_Statement =>
11413 (1 => True, -- Condition (Node1)
11414 2 => True, -- Then_Statements (List2)
11415 3 => True, -- Elsif_Parts (List3)
11416 4 => True, -- Else_Statements (List4)
11417 5 => True), -- End_Span (Uint5)
11419 N_Elsif_Part =>
11420 (1 => True, -- Condition (Node1)
11421 2 => True, -- Then_Statements (List2)
11422 3 => False, -- Condition_Actions (List3-Sem)
11423 4 => False, -- unused
11424 5 => False), -- unused
11426 N_Case_Expression =>
11427 (1 => False, -- unused
11428 2 => False, -- unused
11429 3 => True, -- Expression (Node3)
11430 4 => True, -- Alternatives (List4)
11431 5 => False), -- unused
11433 N_Case_Expression_Alternative =>
11434 (1 => False, -- Actions (List1-Sem)
11435 2 => False, -- unused
11436 3 => True, -- Statements (List3)
11437 4 => True, -- Expression (Node4)
11438 5 => False), -- unused
11440 N_Case_Statement =>
11441 (1 => False, -- unused
11442 2 => False, -- unused
11443 3 => True, -- Expression (Node3)
11444 4 => True, -- Alternatives (List4)
11445 5 => True), -- End_Span (Uint5)
11447 N_Case_Statement_Alternative =>
11448 (1 => False, -- unused
11449 2 => False, -- unused
11450 3 => True, -- Statements (List3)
11451 4 => True, -- Discrete_Choices (List4)
11452 5 => False), -- unused
11454 N_Loop_Statement =>
11455 (1 => True, -- Identifier (Node1)
11456 2 => True, -- Iteration_Scheme (Node2)
11457 3 => True, -- Statements (List3)
11458 4 => True, -- End_Label (Node4)
11459 5 => False), -- unused
11461 N_Iteration_Scheme =>
11462 (1 => True, -- Condition (Node1)
11463 2 => True, -- Iterator_Specification (Node2)
11464 3 => False, -- Condition_Actions (List3-Sem)
11465 4 => True, -- Loop_Parameter_Specification (Node4)
11466 5 => False), -- unused
11468 N_Loop_Parameter_Specification =>
11469 (1 => True, -- Defining_Identifier (Node1)
11470 2 => False, -- unused
11471 3 => False, -- unused
11472 4 => True, -- Discrete_Subtype_Definition (Node4)
11473 5 => False), -- unused
11475 N_Iterator_Specification =>
11476 (1 => True, -- Defining_Identifier (Node1)
11477 2 => True, -- Name (Node2)
11478 3 => False, -- Unused
11479 4 => False, -- Unused
11480 5 => True), -- Subtype_Indication (Node5)
11482 N_Block_Statement =>
11483 (1 => True, -- Identifier (Node1)
11484 2 => True, -- Declarations (List2)
11485 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11486 4 => True, -- Handled_Statement_Sequence (Node4)
11487 5 => False), -- unused
11489 N_Exit_Statement =>
11490 (1 => True, -- Condition (Node1)
11491 2 => True, -- Name (Node2)
11492 3 => False, -- unused
11493 4 => False, -- unused
11494 5 => False), -- unused
11496 N_Goto_Statement =>
11497 (1 => False, -- unused
11498 2 => True, -- Name (Node2)
11499 3 => False, -- unused
11500 4 => False, -- unused
11501 5 => False), -- unused
11503 N_Subprogram_Declaration =>
11504 (1 => True, -- Specification (Node1)
11505 2 => False, -- unused
11506 3 => False, -- Body_To_Inline (Node3-Sem)
11507 4 => False, -- Parent_Spec (Node4-Sem)
11508 5 => False), -- Corresponding_Body (Node5-Sem)
11510 N_Abstract_Subprogram_Declaration =>
11511 (1 => True, -- Specification (Node1)
11512 2 => False, -- unused
11513 3 => False, -- unused
11514 4 => False, -- unused
11515 5 => False), -- unused
11517 N_Function_Specification =>
11518 (1 => True, -- Defining_Unit_Name (Node1)
11519 2 => False, -- unused
11520 3 => True, -- Parameter_Specifications (List3)
11521 4 => True, -- Result_Definition (Node4)
11522 5 => False), -- Generic_Parent (Node5-Sem)
11524 N_Procedure_Specification =>
11525 (1 => True, -- Defining_Unit_Name (Node1)
11526 2 => False, -- unused
11527 3 => True, -- Parameter_Specifications (List3)
11528 4 => False, -- unused
11529 5 => False), -- Generic_Parent (Node5-Sem)
11531 N_Designator =>
11532 (1 => True, -- Identifier (Node1)
11533 2 => True, -- Name (Node2)
11534 3 => False, -- unused
11535 4 => False, -- unused
11536 5 => False), -- unused
11538 N_Defining_Program_Unit_Name =>
11539 (1 => True, -- Defining_Identifier (Node1)
11540 2 => True, -- Name (Node2)
11541 3 => False, -- unused
11542 4 => False, -- unused
11543 5 => False), -- unused
11545 N_Operator_Symbol =>
11546 (1 => True, -- Chars (Name1)
11547 2 => False, -- unused
11548 3 => True, -- Strval (Str3)
11549 4 => False, -- Entity (Node4-Sem)
11550 5 => False), -- Etype (Node5-Sem)
11552 N_Defining_Operator_Symbol =>
11553 (1 => True, -- Chars (Name1)
11554 2 => False, -- Next_Entity (Node2-Sem)
11555 3 => False, -- Scope (Node3-Sem)
11556 4 => False, -- unused
11557 5 => False), -- Etype (Node5-Sem)
11559 N_Parameter_Specification =>
11560 (1 => True, -- Defining_Identifier (Node1)
11561 2 => True, -- Parameter_Type (Node2)
11562 3 => True, -- Expression (Node3)
11563 4 => False, -- unused
11564 5 => False), -- Default_Expression (Node5-Sem)
11566 N_Subprogram_Body =>
11567 (1 => True, -- Specification (Node1)
11568 2 => True, -- Declarations (List2)
11569 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11570 4 => True, -- Handled_Statement_Sequence (Node4)
11571 5 => False), -- Corresponding_Spec (Node5-Sem)
11573 N_Expression_Function =>
11574 (1 => True, -- Specification (Node1)
11575 2 => False, -- unused
11576 3 => True, -- Expression (Node3)
11577 4 => False, -- unused
11578 5 => False), -- unused
11580 N_Procedure_Call_Statement =>
11581 (1 => False, -- Controlling_Argument (Node1-Sem)
11582 2 => True, -- Name (Node2)
11583 3 => True, -- Parameter_Associations (List3)
11584 4 => False, -- First_Named_Actual (Node4-Sem)
11585 5 => False), -- Etype (Node5-Sem)
11587 N_Function_Call =>
11588 (1 => False, -- Controlling_Argument (Node1-Sem)
11589 2 => True, -- Name (Node2)
11590 3 => True, -- Parameter_Associations (List3)
11591 4 => False, -- First_Named_Actual (Node4-Sem)
11592 5 => False), -- Etype (Node5-Sem)
11594 N_Parameter_Association =>
11595 (1 => False, -- unused
11596 2 => True, -- Selector_Name (Node2)
11597 3 => True, -- Explicit_Actual_Parameter (Node3)
11598 4 => False, -- Next_Named_Actual (Node4-Sem)
11599 5 => False), -- unused
11601 N_Simple_Return_Statement =>
11602 (1 => False, -- Storage_Pool (Node1-Sem)
11603 2 => False, -- Procedure_To_Call (Node2-Sem)
11604 3 => True, -- Expression (Node3)
11605 4 => False, -- unused
11606 5 => False), -- Return_Statement_Entity (Node5-Sem)
11608 N_Extended_Return_Statement =>
11609 (1 => False, -- Storage_Pool (Node1-Sem)
11610 2 => False, -- Procedure_To_Call (Node2-Sem)
11611 3 => True, -- Return_Object_Declarations (List3)
11612 4 => True, -- Handled_Statement_Sequence (Node4)
11613 5 => False), -- Return_Statement_Entity (Node5-Sem)
11615 N_Package_Declaration =>
11616 (1 => True, -- Specification (Node1)
11617 2 => False, -- unused
11618 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11619 4 => False, -- Parent_Spec (Node4-Sem)
11620 5 => False), -- Corresponding_Body (Node5-Sem)
11622 N_Package_Specification =>
11623 (1 => True, -- Defining_Unit_Name (Node1)
11624 2 => True, -- Visible_Declarations (List2)
11625 3 => True, -- Private_Declarations (List3)
11626 4 => True, -- End_Label (Node4)
11627 5 => False), -- Generic_Parent (Node5-Sem)
11629 N_Package_Body =>
11630 (1 => True, -- Defining_Unit_Name (Node1)
11631 2 => True, -- Declarations (List2)
11632 3 => False, -- unused
11633 4 => True, -- Handled_Statement_Sequence (Node4)
11634 5 => False), -- Corresponding_Spec (Node5-Sem)
11636 N_Private_Type_Declaration =>
11637 (1 => True, -- Defining_Identifier (Node1)
11638 2 => False, -- unused
11639 3 => False, -- unused
11640 4 => True, -- Discriminant_Specifications (List4)
11641 5 => False), -- unused
11643 N_Private_Extension_Declaration =>
11644 (1 => True, -- Defining_Identifier (Node1)
11645 2 => True, -- Interface_List (List2)
11646 3 => False, -- unused
11647 4 => True, -- Discriminant_Specifications (List4)
11648 5 => True), -- Subtype_Indication (Node5)
11650 N_Use_Package_Clause =>
11651 (1 => False, -- unused
11652 2 => True, -- Names (List2)
11653 3 => False, -- Next_Use_Clause (Node3-Sem)
11654 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
11655 5 => False), -- unused
11657 N_Use_Type_Clause =>
11658 (1 => False, -- unused
11659 2 => True, -- Subtype_Marks (List2)
11660 3 => False, -- Next_Use_Clause (Node3-Sem)
11661 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
11662 5 => False), -- unused
11664 N_Object_Renaming_Declaration =>
11665 (1 => True, -- Defining_Identifier (Node1)
11666 2 => True, -- Name (Node2)
11667 3 => True, -- Access_Definition (Node3)
11668 4 => True, -- Subtype_Mark (Node4)
11669 5 => False), -- Corresponding_Generic_Association (Node5-Sem)
11671 N_Exception_Renaming_Declaration =>
11672 (1 => True, -- Defining_Identifier (Node1)
11673 2 => True, -- Name (Node2)
11674 3 => False, -- unused
11675 4 => False, -- unused
11676 5 => False), -- unused
11678 N_Package_Renaming_Declaration =>
11679 (1 => True, -- Defining_Unit_Name (Node1)
11680 2 => True, -- Name (Node2)
11681 3 => False, -- unused
11682 4 => False, -- Parent_Spec (Node4-Sem)
11683 5 => False), -- unused
11685 N_Subprogram_Renaming_Declaration =>
11686 (1 => True, -- Specification (Node1)
11687 2 => True, -- Name (Node2)
11688 3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
11689 4 => False, -- Parent_Spec (Node4-Sem)
11690 5 => False), -- Corresponding_Spec (Node5-Sem)
11692 N_Generic_Package_Renaming_Declaration =>
11693 (1 => True, -- Defining_Unit_Name (Node1)
11694 2 => True, -- Name (Node2)
11695 3 => False, -- unused
11696 4 => False, -- Parent_Spec (Node4-Sem)
11697 5 => False), -- unused
11699 N_Generic_Procedure_Renaming_Declaration =>
11700 (1 => True, -- Defining_Unit_Name (Node1)
11701 2 => True, -- Name (Node2)
11702 3 => False, -- unused
11703 4 => False, -- Parent_Spec (Node4-Sem)
11704 5 => False), -- unused
11706 N_Generic_Function_Renaming_Declaration =>
11707 (1 => True, -- Defining_Unit_Name (Node1)
11708 2 => True, -- Name (Node2)
11709 3 => False, -- unused
11710 4 => False, -- Parent_Spec (Node4-Sem)
11711 5 => False), -- unused
11713 N_Task_Type_Declaration =>
11714 (1 => True, -- Defining_Identifier (Node1)
11715 2 => True, -- Interface_List (List2)
11716 3 => True, -- Task_Definition (Node3)
11717 4 => True, -- Discriminant_Specifications (List4)
11718 5 => False), -- Corresponding_Body (Node5-Sem)
11720 N_Single_Task_Declaration =>
11721 (1 => True, -- Defining_Identifier (Node1)
11722 2 => True, -- Interface_List (List2)
11723 3 => True, -- Task_Definition (Node3)
11724 4 => False, -- unused
11725 5 => False), -- unused
11727 N_Task_Definition =>
11728 (1 => False, -- unused
11729 2 => True, -- Visible_Declarations (List2)
11730 3 => True, -- Private_Declarations (List3)
11731 4 => True, -- End_Label (Node4)
11732 5 => False), -- unused
11734 N_Task_Body =>
11735 (1 => True, -- Defining_Identifier (Node1)
11736 2 => True, -- Declarations (List2)
11737 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11738 4 => True, -- Handled_Statement_Sequence (Node4)
11739 5 => False), -- Corresponding_Spec (Node5-Sem)
11741 N_Protected_Type_Declaration =>
11742 (1 => True, -- Defining_Identifier (Node1)
11743 2 => True, -- Interface_List (List2)
11744 3 => True, -- Protected_Definition (Node3)
11745 4 => True, -- Discriminant_Specifications (List4)
11746 5 => False), -- Corresponding_Body (Node5-Sem)
11748 N_Single_Protected_Declaration =>
11749 (1 => True, -- Defining_Identifier (Node1)
11750 2 => True, -- Interface_List (List2)
11751 3 => True, -- Protected_Definition (Node3)
11752 4 => False, -- unused
11753 5 => False), -- unused
11755 N_Protected_Definition =>
11756 (1 => False, -- unused
11757 2 => True, -- Visible_Declarations (List2)
11758 3 => True, -- Private_Declarations (List3)
11759 4 => True, -- End_Label (Node4)
11760 5 => False), -- unused
11762 N_Protected_Body =>
11763 (1 => True, -- Defining_Identifier (Node1)
11764 2 => True, -- Declarations (List2)
11765 3 => False, -- unused
11766 4 => True, -- End_Label (Node4)
11767 5 => False), -- Corresponding_Spec (Node5-Sem)
11769 N_Entry_Declaration =>
11770 (1 => True, -- Defining_Identifier (Node1)
11771 2 => False, -- unused
11772 3 => True, -- Parameter_Specifications (List3)
11773 4 => True, -- Discrete_Subtype_Definition (Node4)
11774 5 => False), -- Corresponding_Body (Node5-Sem)
11776 N_Accept_Statement =>
11777 (1 => True, -- Entry_Direct_Name (Node1)
11778 2 => True, -- Declarations (List2)
11779 3 => True, -- Parameter_Specifications (List3)
11780 4 => True, -- Handled_Statement_Sequence (Node4)
11781 5 => True), -- Entry_Index (Node5)
11783 N_Entry_Body =>
11784 (1 => True, -- Defining_Identifier (Node1)
11785 2 => True, -- Declarations (List2)
11786 3 => False, -- Activation_Chain_Entity (Node3-Sem)
11787 4 => True, -- Handled_Statement_Sequence (Node4)
11788 5 => True), -- Entry_Body_Formal_Part (Node5)
11790 N_Entry_Body_Formal_Part =>
11791 (1 => True, -- Condition (Node1)
11792 2 => False, -- unused
11793 3 => True, -- Parameter_Specifications (List3)
11794 4 => True, -- Entry_Index_Specification (Node4)
11795 5 => False), -- unused
11797 N_Entry_Index_Specification =>
11798 (1 => True, -- Defining_Identifier (Node1)
11799 2 => False, -- unused
11800 3 => False, -- unused
11801 4 => True, -- Discrete_Subtype_Definition (Node4)
11802 5 => False), -- unused
11804 N_Entry_Call_Statement =>
11805 (1 => False, -- unused
11806 2 => True, -- Name (Node2)
11807 3 => True, -- Parameter_Associations (List3)
11808 4 => False, -- First_Named_Actual (Node4-Sem)
11809 5 => False), -- unused
11811 N_Requeue_Statement =>
11812 (1 => False, -- unused
11813 2 => True, -- Name (Node2)
11814 3 => False, -- unused
11815 4 => False, -- unused
11816 5 => False), -- unused
11818 N_Delay_Until_Statement =>
11819 (1 => False, -- unused
11820 2 => False, -- unused
11821 3 => True, -- Expression (Node3)
11822 4 => False, -- unused
11823 5 => False), -- unused
11825 N_Delay_Relative_Statement =>
11826 (1 => False, -- unused
11827 2 => False, -- unused
11828 3 => True, -- Expression (Node3)
11829 4 => False, -- unused
11830 5 => False), -- unused
11832 N_Selective_Accept =>
11833 (1 => True, -- Select_Alternatives (List1)
11834 2 => False, -- unused
11835 3 => False, -- unused
11836 4 => True, -- Else_Statements (List4)
11837 5 => False), -- unused
11839 N_Accept_Alternative =>
11840 (1 => True, -- Condition (Node1)
11841 2 => True, -- Accept_Statement (Node2)
11842 3 => True, -- Statements (List3)
11843 4 => True, -- Pragmas_Before (List4)
11844 5 => False), -- Accept_Handler_Records (List5-Sem)
11846 N_Delay_Alternative =>
11847 (1 => True, -- Condition (Node1)
11848 2 => True, -- Delay_Statement (Node2)
11849 3 => True, -- Statements (List3)
11850 4 => True, -- Pragmas_Before (List4)
11851 5 => False), -- unused
11853 N_Terminate_Alternative =>
11854 (1 => True, -- Condition (Node1)
11855 2 => False, -- unused
11856 3 => False, -- unused
11857 4 => True, -- Pragmas_Before (List4)
11858 5 => True), -- Pragmas_After (List5)
11860 N_Timed_Entry_Call =>
11861 (1 => True, -- Entry_Call_Alternative (Node1)
11862 2 => False, -- unused
11863 3 => False, -- unused
11864 4 => True, -- Delay_Alternative (Node4)
11865 5 => False), -- unused
11867 N_Entry_Call_Alternative =>
11868 (1 => True, -- Entry_Call_Statement (Node1)
11869 2 => False, -- unused
11870 3 => True, -- Statements (List3)
11871 4 => True, -- Pragmas_Before (List4)
11872 5 => False), -- unused
11874 N_Conditional_Entry_Call =>
11875 (1 => True, -- Entry_Call_Alternative (Node1)
11876 2 => False, -- unused
11877 3 => False, -- unused
11878 4 => True, -- Else_Statements (List4)
11879 5 => False), -- unused
11881 N_Asynchronous_Select =>
11882 (1 => True, -- Triggering_Alternative (Node1)
11883 2 => True, -- Abortable_Part (Node2)
11884 3 => False, -- unused
11885 4 => False, -- unused
11886 5 => False), -- unused
11888 N_Triggering_Alternative =>
11889 (1 => True, -- Triggering_Statement (Node1)
11890 2 => False, -- unused
11891 3 => True, -- Statements (List3)
11892 4 => True, -- Pragmas_Before (List4)
11893 5 => False), -- unused
11895 N_Abortable_Part =>
11896 (1 => False, -- unused
11897 2 => False, -- unused
11898 3 => True, -- Statements (List3)
11899 4 => False, -- unused
11900 5 => False), -- unused
11902 N_Abort_Statement =>
11903 (1 => False, -- unused
11904 2 => True, -- Names (List2)
11905 3 => False, -- unused
11906 4 => False, -- unused
11907 5 => False), -- unused
11909 N_Compilation_Unit =>
11910 (1 => True, -- Context_Items (List1)
11911 2 => True, -- Unit (Node2)
11912 3 => False, -- First_Inlined_Subprogram (Node3-Sem)
11913 4 => False, -- Library_Unit (Node4-Sem)
11914 5 => True), -- Aux_Decls_Node (Node5)
11916 N_Compilation_Unit_Aux =>
11917 (1 => True, -- Actions (List1)
11918 2 => True, -- Declarations (List2)
11919 3 => False, -- Default_Storage_Pool (Node3)
11920 4 => True, -- Config_Pragmas (List4)
11921 5 => True), -- Pragmas_After (List5)
11923 N_With_Clause =>
11924 (1 => False, -- unused
11925 2 => True, -- Name (Node2)
11926 3 => False, -- unused
11927 4 => False, -- Library_Unit (Node4-Sem)
11928 5 => False), -- Corresponding_Spec (Node5-Sem)
11930 N_Subprogram_Body_Stub =>
11931 (1 => True, -- Specification (Node1)
11932 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11933 3 => False, -- unused
11934 4 => False, -- Library_Unit (Node4-Sem)
11935 5 => False), -- Corresponding_Body (Node5-Sem)
11937 N_Package_Body_Stub =>
11938 (1 => True, -- Defining_Identifier (Node1)
11939 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11940 3 => False, -- unused
11941 4 => False, -- Library_Unit (Node4-Sem)
11942 5 => False), -- Corresponding_Body (Node5-Sem)
11944 N_Task_Body_Stub =>
11945 (1 => True, -- Defining_Identifier (Node1)
11946 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11947 3 => False, -- unused
11948 4 => False, -- Library_Unit (Node4-Sem)
11949 5 => False), -- Corresponding_Body (Node5-Sem)
11951 N_Protected_Body_Stub =>
11952 (1 => True, -- Defining_Identifier (Node1)
11953 2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
11954 3 => False, -- unused
11955 4 => False, -- Library_Unit (Node4-Sem)
11956 5 => False), -- Corresponding_Body (Node5-Sem)
11958 N_Subunit =>
11959 (1 => True, -- Proper_Body (Node1)
11960 2 => True, -- Name (Node2)
11961 3 => False, -- Corresponding_Stub (Node3-Sem)
11962 4 => False, -- unused
11963 5 => False), -- unused
11965 N_Exception_Declaration =>
11966 (1 => True, -- Defining_Identifier (Node1)
11967 2 => False, -- unused
11968 3 => False, -- Expression (Node3-Sem)
11969 4 => False, -- unused
11970 5 => False), -- unused
11972 N_Handled_Sequence_Of_Statements =>
11973 (1 => True, -- At_End_Proc (Node1)
11974 2 => False, -- First_Real_Statement (Node2-Sem)
11975 3 => True, -- Statements (List3)
11976 4 => True, -- End_Label (Node4)
11977 5 => True), -- Exception_Handlers (List5)
11979 N_Exception_Handler =>
11980 (1 => False, -- Local_Raise_Statements (Elist1)
11981 2 => True, -- Choice_Parameter (Node2)
11982 3 => True, -- Statements (List3)
11983 4 => True, -- Exception_Choices (List4)
11984 5 => False), -- Exception_Label (Node5)
11986 N_Raise_Statement =>
11987 (1 => False, -- unused
11988 2 => True, -- Name (Node2)
11989 3 => True, -- Expression (Node3)
11990 4 => False, -- unused
11991 5 => False), -- unused
11993 N_Raise_Expression =>
11994 (1 => False, -- unused
11995 2 => True, -- Name (Node2)
11996 3 => True, -- Expression (Node3)
11997 4 => False, -- unused
11998 5 => False), -- Etype (Node5-Sem)
12000 N_Generic_Subprogram_Declaration =>
12001 (1 => True, -- Specification (Node1)
12002 2 => True, -- Generic_Formal_Declarations (List2)
12003 3 => False, -- unused
12004 4 => False, -- Parent_Spec (Node4-Sem)
12005 5 => False), -- Corresponding_Body (Node5-Sem)
12007 N_Generic_Package_Declaration =>
12008 (1 => True, -- Specification (Node1)
12009 2 => True, -- Generic_Formal_Declarations (List2)
12010 3 => False, -- Activation_Chain_Entity (Node3-Sem)
12011 4 => False, -- Parent_Spec (Node4-Sem)
12012 5 => False), -- Corresponding_Body (Node5-Sem)
12014 N_Package_Instantiation =>
12015 (1 => True, -- Defining_Unit_Name (Node1)
12016 2 => True, -- Name (Node2)
12017 3 => True, -- Generic_Associations (List3)
12018 4 => False, -- Parent_Spec (Node4-Sem)
12019 5 => False), -- Instance_Spec (Node5-Sem)
12021 N_Procedure_Instantiation =>
12022 (1 => True, -- Defining_Unit_Name (Node1)
12023 2 => True, -- Name (Node2)
12024 3 => True, -- Generic_Associations (List3)
12025 4 => False, -- Parent_Spec (Node4-Sem)
12026 5 => False), -- Instance_Spec (Node5-Sem)
12028 N_Function_Instantiation =>
12029 (1 => True, -- Defining_Unit_Name (Node1)
12030 2 => True, -- Name (Node2)
12031 3 => True, -- Generic_Associations (List3)
12032 4 => False, -- Parent_Spec (Node4-Sem)
12033 5 => False), -- Instance_Spec (Node5-Sem)
12035 N_Generic_Association =>
12036 (1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
12037 2 => True, -- Selector_Name (Node2)
12038 3 => False, -- unused
12039 4 => False, -- unused
12040 5 => False), -- unused
12042 N_Formal_Object_Declaration =>
12043 (1 => True, -- Defining_Identifier (Node1)
12044 2 => False, -- unused
12045 3 => True, -- Access_Definition (Node3)
12046 4 => True, -- Subtype_Mark (Node4)
12047 5 => True), -- Default_Expression (Node5)
12049 N_Formal_Type_Declaration =>
12050 (1 => True, -- Defining_Identifier (Node1)
12051 2 => False, -- unused
12052 3 => True, -- Formal_Type_Definition (Node3)
12053 4 => True, -- Discriminant_Specifications (List4)
12054 5 => False), -- unused
12056 N_Formal_Private_Type_Definition =>
12057 (1 => False, -- unused
12058 2 => False, -- unused
12059 3 => False, -- unused
12060 4 => False, -- unused
12061 5 => False), -- unused
12063 N_Formal_Incomplete_Type_Definition =>
12064 (1 => False, -- unused
12065 2 => False, -- unused
12066 3 => False, -- unused
12067 4 => False, -- unused
12068 5 => False), -- unused
12070 N_Formal_Derived_Type_Definition =>
12071 (1 => False, -- unused
12072 2 => True, -- Interface_List (List2)
12073 3 => False, -- unused
12074 4 => True, -- Subtype_Mark (Node4)
12075 5 => False), -- unused
12077 N_Formal_Discrete_Type_Definition =>
12078 (1 => False, -- unused
12079 2 => False, -- unused
12080 3 => False, -- unused
12081 4 => False, -- unused
12082 5 => False), -- unused
12084 N_Formal_Signed_Integer_Type_Definition =>
12085 (1 => False, -- unused
12086 2 => False, -- unused
12087 3 => False, -- unused
12088 4 => False, -- unused
12089 5 => False), -- unused
12091 N_Formal_Modular_Type_Definition =>
12092 (1 => False, -- unused
12093 2 => False, -- unused
12094 3 => False, -- unused
12095 4 => False, -- unused
12096 5 => False), -- unused
12098 N_Formal_Floating_Point_Definition =>
12099 (1 => False, -- unused
12100 2 => False, -- unused
12101 3 => False, -- unused
12102 4 => False, -- unused
12103 5 => False), -- unused
12105 N_Formal_Ordinary_Fixed_Point_Definition =>
12106 (1 => False, -- unused
12107 2 => False, -- unused
12108 3 => False, -- unused
12109 4 => False, -- unused
12110 5 => False), -- unused
12112 N_Formal_Decimal_Fixed_Point_Definition =>
12113 (1 => False, -- unused
12114 2 => False, -- unused
12115 3 => False, -- unused
12116 4 => False, -- unused
12117 5 => False), -- unused
12119 N_Formal_Concrete_Subprogram_Declaration =>
12120 (1 => True, -- Specification (Node1)
12121 2 => True, -- Default_Name (Node2)
12122 3 => False, -- unused
12123 4 => False, -- unused
12124 5 => False), -- unused
12126 N_Formal_Abstract_Subprogram_Declaration =>
12127 (1 => True, -- Specification (Node1)
12128 2 => True, -- Default_Name (Node2)
12129 3 => False, -- unused
12130 4 => False, -- unused
12131 5 => False), -- unused
12133 N_Formal_Package_Declaration =>
12134 (1 => True, -- Defining_Identifier (Node1)
12135 2 => True, -- Name (Node2)
12136 3 => True, -- Generic_Associations (List3)
12137 4 => False, -- unused
12138 5 => False), -- Instance_Spec (Node5-Sem)
12140 N_Attribute_Definition_Clause =>
12141 (1 => True, -- Chars (Name1)
12142 2 => True, -- Name (Node2)
12143 3 => True, -- Expression (Node3)
12144 4 => False, -- unused
12145 5 => False), -- Next_Rep_Item (Node5-Sem)
12147 N_Aspect_Specification =>
12148 (1 => True, -- Identifier (Node1)
12149 2 => False, -- Aspect_Rep_Item (Node2-Sem)
12150 3 => True, -- Expression (Node3)
12151 4 => False, -- Entity (Node4-Sem)
12152 5 => False), -- Next_Rep_Item (Node5-Sem)
12154 N_Enumeration_Representation_Clause =>
12155 (1 => True, -- Identifier (Node1)
12156 2 => False, -- unused
12157 3 => True, -- Array_Aggregate (Node3)
12158 4 => False, -- unused
12159 5 => False), -- Next_Rep_Item (Node5-Sem)
12161 N_Record_Representation_Clause =>
12162 (1 => True, -- Identifier (Node1)
12163 2 => True, -- Mod_Clause (Node2)
12164 3 => True, -- Component_Clauses (List3)
12165 4 => False, -- unused
12166 5 => False), -- Next_Rep_Item (Node5-Sem)
12168 N_Component_Clause =>
12169 (1 => True, -- Component_Name (Node1)
12170 2 => True, -- Position (Node2)
12171 3 => True, -- First_Bit (Node3)
12172 4 => True, -- Last_Bit (Node4)
12173 5 => False), -- unused
12175 N_Code_Statement =>
12176 (1 => False, -- unused
12177 2 => False, -- unused
12178 3 => True, -- Expression (Node3)
12179 4 => False, -- unused
12180 5 => False), -- unused
12182 N_Op_Rotate_Left =>
12183 (1 => True, -- Chars (Name1)
12184 2 => True, -- Left_Opnd (Node2)
12185 3 => True, -- Right_Opnd (Node3)
12186 4 => False, -- Entity (Node4-Sem)
12187 5 => False), -- Etype (Node5-Sem)
12189 N_Op_Rotate_Right =>
12190 (1 => True, -- Chars (Name1)
12191 2 => True, -- Left_Opnd (Node2)
12192 3 => True, -- Right_Opnd (Node3)
12193 4 => False, -- Entity (Node4-Sem)
12194 5 => False), -- Etype (Node5-Sem)
12196 N_Op_Shift_Left =>
12197 (1 => True, -- Chars (Name1)
12198 2 => True, -- Left_Opnd (Node2)
12199 3 => True, -- Right_Opnd (Node3)
12200 4 => False, -- Entity (Node4-Sem)
12201 5 => False), -- Etype (Node5-Sem)
12203 N_Op_Shift_Right_Arithmetic =>
12204 (1 => True, -- Chars (Name1)
12205 2 => True, -- Left_Opnd (Node2)
12206 3 => True, -- Right_Opnd (Node3)
12207 4 => False, -- Entity (Node4-Sem)
12208 5 => False), -- Etype (Node5-Sem)
12210 N_Op_Shift_Right =>
12211 (1 => True, -- Chars (Name1)
12212 2 => True, -- Left_Opnd (Node2)
12213 3 => True, -- Right_Opnd (Node3)
12214 4 => False, -- Entity (Node4-Sem)
12215 5 => False), -- Etype (Node5-Sem)
12217 N_Delta_Constraint =>
12218 (1 => False, -- unused
12219 2 => False, -- unused
12220 3 => True, -- Delta_Expression (Node3)
12221 4 => True, -- Range_Constraint (Node4)
12222 5 => False), -- unused
12224 N_At_Clause =>
12225 (1 => True, -- Identifier (Node1)
12226 2 => False, -- unused
12227 3 => True, -- Expression (Node3)
12228 4 => False, -- unused
12229 5 => False), -- unused
12231 N_Mod_Clause =>
12232 (1 => False, -- unused
12233 2 => False, -- unused
12234 3 => True, -- Expression (Node3)
12235 4 => True, -- Pragmas_Before (List4)
12236 5 => False), -- unused
12238 N_If_Expression =>
12239 (1 => True, -- Expressions (List1)
12240 2 => False, -- Then_Actions (List2-Sem)
12241 3 => False, -- Else_Actions (List3-Sem)
12242 4 => False, -- unused
12243 5 => False), -- Etype (Node5-Sem)
12245 N_Compound_Statement =>
12246 (1 => True, -- Actions (List1)
12247 2 => False, -- unused
12248 3 => False, -- unused
12249 4 => False, -- unused
12250 5 => False), -- unused
12252 N_Contract =>
12253 (1 => False, -- Pre_Post_Conditions (Node1)
12254 2 => False, -- Contract_Test_Cases (Node2)
12255 3 => False, -- Classifications (Node3)
12256 4 => False, -- unused
12257 5 => False), -- unused
12259 N_Expanded_Name =>
12260 (1 => True, -- Chars (Name1)
12261 2 => True, -- Selector_Name (Node2)
12262 3 => True, -- Prefix (Node3)
12263 4 => False, -- Entity (Node4-Sem)
12264 5 => False), -- Etype (Node5-Sem)
12266 N_Expression_With_Actions =>
12267 (1 => True, -- Actions (List1)
12268 2 => False, -- unused
12269 3 => True, -- Expression (Node3)
12270 4 => False, -- unused
12271 5 => False), -- unused
12273 N_Free_Statement =>
12274 (1 => False, -- Storage_Pool (Node1-Sem)
12275 2 => False, -- Procedure_To_Call (Node2-Sem)
12276 3 => True, -- Expression (Node3)
12277 4 => False, -- Actual_Designated_Subtype (Node4-Sem)
12278 5 => False), -- unused
12280 N_Freeze_Entity =>
12281 (1 => True, -- Actions (List1)
12282 2 => False, -- Access_Types_To_Process (Elist2-Sem)
12283 3 => False, -- TSS_Elist (Elist3-Sem)
12284 4 => False, -- Entity (Node4-Sem)
12285 5 => False), -- First_Subtype_Link (Node5-Sem)
12287 N_Freeze_Generic_Entity =>
12288 (1 => False, -- unused
12289 2 => False, -- unused
12290 3 => False, -- unused
12291 4 => False, -- Entity (Node4-Sem)
12292 5 => False), -- unused
12294 N_Implicit_Label_Declaration =>
12295 (1 => True, -- Defining_Identifier (Node1)
12296 2 => False, -- Label_Construct (Node2-Sem)
12297 3 => False, -- unused
12298 4 => False, -- unused
12299 5 => False), -- unused
12301 N_Itype_Reference =>
12302 (1 => False, -- Itype (Node1-Sem)
12303 2 => False, -- unused
12304 3 => False, -- unused
12305 4 => False, -- unused
12306 5 => False), -- unused
12308 N_Raise_Constraint_Error =>
12309 (1 => True, -- Condition (Node1)
12310 2 => False, -- unused
12311 3 => True, -- Reason (Uint3)
12312 4 => False, -- unused
12313 5 => False), -- Etype (Node5-Sem)
12315 N_Raise_Program_Error =>
12316 (1 => True, -- Condition (Node1)
12317 2 => False, -- unused
12318 3 => True, -- Reason (Uint3)
12319 4 => False, -- unused
12320 5 => False), -- Etype (Node5-Sem)
12322 N_Raise_Storage_Error =>
12323 (1 => True, -- Condition (Node1)
12324 2 => False, -- unused
12325 3 => True, -- Reason (Uint3)
12326 4 => False, -- unused
12327 5 => False), -- Etype (Node5-Sem)
12329 N_Push_Constraint_Error_Label =>
12330 (1 => False, -- unused
12331 2 => False, -- unused
12332 3 => False, -- unused
12333 4 => False, -- unused
12334 5 => False), -- unused
12336 N_Push_Program_Error_Label =>
12337 (1 => False, -- Exception_Label
12338 2 => False, -- unused
12339 3 => False, -- unused
12340 4 => False, -- unused
12341 5 => False), -- Exception_Label
12343 N_Push_Storage_Error_Label =>
12344 (1 => False, -- Exception_Label
12345 2 => False, -- unused
12346 3 => False, -- unused
12347 4 => False, -- unused
12348 5 => False), -- Exception_Label
12350 N_Pop_Constraint_Error_Label =>
12351 (1 => False, -- unused
12352 2 => False, -- unused
12353 3 => False, -- unused
12354 4 => False, -- unused
12355 5 => False), -- unused
12357 N_Pop_Program_Error_Label =>
12358 (1 => False, -- unused
12359 2 => False, -- unused
12360 3 => False, -- unused
12361 4 => False, -- unused
12362 5 => False), -- unused
12364 N_Pop_Storage_Error_Label =>
12365 (1 => False, -- unused
12366 2 => False, -- unused
12367 3 => False, -- unused
12368 4 => False, -- unused
12369 5 => False), -- unused
12371 N_Reference =>
12372 (1 => False, -- unused
12373 2 => False, -- unused
12374 3 => True, -- Prefix (Node3)
12375 4 => False, -- unused
12376 5 => False), -- Etype (Node5-Sem)
12378 N_Unchecked_Expression =>
12379 (1 => False, -- unused
12380 2 => False, -- unused
12381 3 => True, -- Expression (Node3)
12382 4 => False, -- unused
12383 5 => False), -- Etype (Node5-Sem)
12385 N_Unchecked_Type_Conversion =>
12386 (1 => False, -- unused
12387 2 => False, -- unused
12388 3 => True, -- Expression (Node3)
12389 4 => True, -- Subtype_Mark (Node4)
12390 5 => False), -- Etype (Node5-Sem)
12392 N_Validate_Unchecked_Conversion =>
12393 (1 => False, -- Source_Type (Node1-Sem)
12394 2 => False, -- Target_Type (Node2-Sem)
12395 3 => False, -- unused
12396 4 => False, -- unused
12397 5 => False), -- unused
12399 -- Entries for SCIL nodes
12401 N_SCIL_Dispatch_Table_Tag_Init =>
12402 (1 => False, -- unused
12403 2 => False, -- unused
12404 3 => False, -- unused
12405 4 => False, -- SCIL_Entity (Node4-Sem)
12406 5 => False), -- unused
12408 N_SCIL_Dispatching_Call =>
12409 (1 => False, -- unused
12410 2 => False, -- SCIL_Target_Prim (Node2-Sem)
12411 3 => False, -- unused
12412 4 => False, -- SCIL_Entity (Node4-Sem)
12413 5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
12415 N_SCIL_Membership_Test =>
12416 (1 => False, -- unused
12417 2 => False, -- unused
12418 3 => False, -- unused
12419 4 => False, -- SCIL_Entity (Node4-Sem)
12420 5 => False), -- SCIL_Tag_Value (Node5-Sem)
12422 -- Entries for Empty, Error and Unused. Even thought these have a Chars
12423 -- field for debugging purposes, they are not really syntactic fields, so
12424 -- we mark all fields as unused.
12426 N_Empty =>
12427 (1 => False, -- unused
12428 2 => False, -- unused
12429 3 => False, -- unused
12430 4 => False, -- unused
12431 5 => False), -- unused
12433 N_Error =>
12434 (1 => False, -- unused
12435 2 => False, -- unused
12436 3 => False, -- unused
12437 4 => False, -- unused
12438 5 => False), -- unused
12440 N_Unused_At_Start =>
12441 (1 => False, -- unused
12442 2 => False, -- unused
12443 3 => False, -- unused
12444 4 => False, -- unused
12445 5 => False), -- unused
12447 N_Unused_At_End =>
12448 (1 => False, -- unused
12449 2 => False, -- unused
12450 3 => False, -- unused
12451 4 => False, -- unused
12452 5 => False)); -- unused
12454 --------------------
12455 -- Inline Pragmas --
12456 --------------------
12458 pragma Inline (ABE_Is_Certain);
12459 pragma Inline (Abort_Present);
12460 pragma Inline (Abortable_Part);
12461 pragma Inline (Abstract_Present);
12462 pragma Inline (Accept_Handler_Records);
12463 pragma Inline (Accept_Statement);
12464 pragma Inline (Access_Definition);
12465 pragma Inline (Access_To_Subprogram_Definition);
12466 pragma Inline (Access_Types_To_Process);
12467 pragma Inline (Actions);
12468 pragma Inline (Activation_Chain_Entity);
12469 pragma Inline (Acts_As_Spec);
12470 pragma Inline (Actual_Designated_Subtype);
12471 pragma Inline (Address_Warning_Posted);
12472 pragma Inline (Aggregate_Bounds);
12473 pragma Inline (Aliased_Present);
12474 pragma Inline (All_Others);
12475 pragma Inline (All_Present);
12476 pragma Inline (Alternatives);
12477 pragma Inline (Ancestor_Part);
12478 pragma Inline (Atomic_Sync_Required);
12479 pragma Inline (Array_Aggregate);
12480 pragma Inline (Aspect_Rep_Item);
12481 pragma Inline (Assignment_OK);
12482 pragma Inline (Associated_Node);
12483 pragma Inline (At_End_Proc);
12484 pragma Inline (Attribute_Name);
12485 pragma Inline (Aux_Decls_Node);
12486 pragma Inline (Backwards_OK);
12487 pragma Inline (Bad_Is_Detected);
12488 pragma Inline (Body_To_Inline);
12489 pragma Inline (Body_Required);
12490 pragma Inline (By_Ref);
12491 pragma Inline (Box_Present);
12492 pragma Inline (Char_Literal_Value);
12493 pragma Inline (Chars);
12494 pragma Inline (Check_Address_Alignment);
12495 pragma Inline (Choice_Parameter);
12496 pragma Inline (Choices);
12497 pragma Inline (Class_Present);
12498 pragma Inline (Classifications);
12499 pragma Inline (Cleanup_Actions);
12500 pragma Inline (Comes_From_Extended_Return_Statement);
12501 pragma Inline (Compile_Time_Known_Aggregate);
12502 pragma Inline (Component_Associations);
12503 pragma Inline (Component_Clauses);
12504 pragma Inline (Component_Definition);
12505 pragma Inline (Component_Items);
12506 pragma Inline (Component_List);
12507 pragma Inline (Component_Name);
12508 pragma Inline (Componentwise_Assignment);
12509 pragma Inline (Condition);
12510 pragma Inline (Condition_Actions);
12511 pragma Inline (Config_Pragmas);
12512 pragma Inline (Constant_Present);
12513 pragma Inline (Constraint);
12514 pragma Inline (Constraints);
12515 pragma Inline (Context_Installed);
12516 pragma Inline (Context_Items);
12517 pragma Inline (Context_Pending);
12518 pragma Inline (Contract_Test_Cases);
12519 pragma Inline (Controlling_Argument);
12520 pragma Inline (Convert_To_Return_False);
12521 pragma Inline (Conversion_OK);
12522 pragma Inline (Corresponding_Aspect);
12523 pragma Inline (Corresponding_Body);
12524 pragma Inline (Corresponding_Formal_Spec);
12525 pragma Inline (Corresponding_Generic_Association);
12526 pragma Inline (Corresponding_Integer_Value);
12527 pragma Inline (Corresponding_Spec);
12528 pragma Inline (Corresponding_Spec_Of_Stub);
12529 pragma Inline (Corresponding_Stub);
12530 pragma Inline (Dcheck_Function);
12531 pragma Inline (Declarations);
12532 pragma Inline (Default_Expression);
12533 pragma Inline (Default_Storage_Pool);
12534 pragma Inline (Default_Name);
12535 pragma Inline (Defining_Identifier);
12536 pragma Inline (Defining_Unit_Name);
12537 pragma Inline (Delay_Alternative);
12538 pragma Inline (Delay_Statement);
12539 pragma Inline (Delta_Expression);
12540 pragma Inline (Digits_Expression);
12541 pragma Inline (Discr_Check_Funcs_Built);
12542 pragma Inline (Discrete_Choices);
12543 pragma Inline (Discrete_Range);
12544 pragma Inline (Discrete_Subtype_Definition);
12545 pragma Inline (Discrete_Subtype_Definitions);
12546 pragma Inline (Discriminant_Specifications);
12547 pragma Inline (Discriminant_Type);
12548 pragma Inline (Do_Accessibility_Check);
12549 pragma Inline (Do_Discriminant_Check);
12550 pragma Inline (Do_Length_Check);
12551 pragma Inline (Do_Division_Check);
12552 pragma Inline (Do_Overflow_Check);
12553 pragma Inline (Do_Range_Check);
12554 pragma Inline (Do_Storage_Check);
12555 pragma Inline (Do_Tag_Check);
12556 pragma Inline (Elaborate_Present);
12557 pragma Inline (Elaborate_All_Desirable);
12558 pragma Inline (Elaborate_All_Present);
12559 pragma Inline (Elaborate_Desirable);
12560 pragma Inline (Else_Actions);
12561 pragma Inline (Else_Statements);
12562 pragma Inline (Elsif_Parts);
12563 pragma Inline (Enclosing_Variant);
12564 pragma Inline (End_Label);
12565 pragma Inline (End_Span);
12566 pragma Inline (Entity);
12567 pragma Inline (Entity_Or_Associated_Node);
12568 pragma Inline (Entry_Body_Formal_Part);
12569 pragma Inline (Entry_Call_Alternative);
12570 pragma Inline (Entry_Call_Statement);
12571 pragma Inline (Entry_Direct_Name);
12572 pragma Inline (Entry_Index);
12573 pragma Inline (Entry_Index_Specification);
12574 pragma Inline (Etype);
12575 pragma Inline (Exception_Choices);
12576 pragma Inline (Exception_Handlers);
12577 pragma Inline (Exception_Junk);
12578 pragma Inline (Exception_Label);
12579 pragma Inline (Expansion_Delayed);
12580 pragma Inline (Explicit_Actual_Parameter);
12581 pragma Inline (Explicit_Generic_Actual_Parameter);
12582 pragma Inline (Expression);
12583 pragma Inline (Expressions);
12584 pragma Inline (First_Bit);
12585 pragma Inline (First_Inlined_Subprogram);
12586 pragma Inline (First_Name);
12587 pragma Inline (First_Named_Actual);
12588 pragma Inline (First_Real_Statement);
12589 pragma Inline (First_Subtype_Link);
12590 pragma Inline (Float_Truncate);
12591 pragma Inline (Formal_Type_Definition);
12592 pragma Inline (Forwards_OK);
12593 pragma Inline (From_Aspect_Specification);
12594 pragma Inline (From_At_End);
12595 pragma Inline (From_At_Mod);
12596 pragma Inline (From_Conditional_Expression);
12597 pragma Inline (From_Default);
12598 pragma Inline (Generalized_Indexing);
12599 pragma Inline (Generic_Associations);
12600 pragma Inline (Generic_Formal_Declarations);
12601 pragma Inline (Generic_Parent);
12602 pragma Inline (Generic_Parent_Type);
12603 pragma Inline (Handled_Statement_Sequence);
12604 pragma Inline (Handler_List_Entry);
12605 pragma Inline (Has_Created_Identifier);
12606 pragma Inline (Has_Dereference_Action);
12607 pragma Inline (Has_Dynamic_Length_Check);
12608 pragma Inline (Has_Dynamic_Range_Check);
12609 pragma Inline (Has_Init_Expression);
12610 pragma Inline (Has_Local_Raise);
12611 pragma Inline (Has_Self_Reference);
12612 pragma Inline (Has_SP_Choice);
12613 pragma Inline (Has_No_Elaboration_Code);
12614 pragma Inline (Has_Pragma_Suppress_All);
12615 pragma Inline (Has_Private_View);
12616 pragma Inline (Has_Relative_Deadline_Pragma);
12617 pragma Inline (Has_Storage_Size_Pragma);
12618 pragma Inline (Has_Wide_Character);
12619 pragma Inline (Has_Wide_Wide_Character);
12620 pragma Inline (Header_Size_Added);
12621 pragma Inline (Hidden_By_Use_Clause);
12622 pragma Inline (High_Bound);
12623 pragma Inline (Identifier);
12624 pragma Inline (Implicit_With);
12625 pragma Inline (Implicit_With_From_Instantiation);
12626 pragma Inline (Interface_List);
12627 pragma Inline (Interface_Present);
12628 pragma Inline (Includes_Infinities);
12629 pragma Inline (Import_Interface_Present);
12630 pragma Inline (In_Present);
12631 pragma Inline (Incomplete_View);
12632 pragma Inline (Inherited_Discriminant);
12633 pragma Inline (Instance_Spec);
12634 pragma Inline (Intval);
12635 pragma Inline (Iterator_Specification);
12636 pragma Inline (Is_Accessibility_Actual);
12637 pragma Inline (Is_Asynchronous_Call_Block);
12638 pragma Inline (Is_Boolean_Aspect);
12639 pragma Inline (Is_Checked);
12640 pragma Inline (Is_Component_Left_Opnd);
12641 pragma Inline (Is_Component_Right_Opnd);
12642 pragma Inline (Is_Controlling_Actual);
12643 pragma Inline (Is_Delayed_Aspect);
12644 pragma Inline (Is_Disabled);
12645 pragma Inline (Is_Dynamic_Coextension);
12646 pragma Inline (Is_Elsif);
12647 pragma Inline (Is_Entry_Barrier_Function);
12648 pragma Inline (Is_Expanded_Build_In_Place_Call);
12649 pragma Inline (Is_Finalization_Wrapper);
12650 pragma Inline (Is_Folded_In_Parser);
12651 pragma Inline (Is_Ignored);
12652 pragma Inline (Is_In_Discriminant_Check);
12653 pragma Inline (Is_Inherited);
12654 pragma Inline (Is_Machine_Number);
12655 pragma Inline (Is_Null_Loop);
12656 pragma Inline (Is_Overloaded);
12657 pragma Inline (Is_Power_Of_2_For_Shift);
12658 pragma Inline (Is_Prefixed_Call);
12659 pragma Inline (Is_Protected_Subprogram_Body);
12660 pragma Inline (Is_Static_Coextension);
12661 pragma Inline (Is_Static_Expression);
12662 pragma Inline (Is_Subprogram_Descriptor);
12663 pragma Inline (Is_Task_Allocation_Block);
12664 pragma Inline (Is_Task_Master);
12665 pragma Inline (Iteration_Scheme);
12666 pragma Inline (Itype);
12667 pragma Inline (Kill_Range_Check);
12668 pragma Inline (Last_Bit);
12669 pragma Inline (Last_Name);
12670 pragma Inline (Library_Unit);
12671 pragma Inline (Label_Construct);
12672 pragma Inline (Left_Opnd);
12673 pragma Inline (Limited_View_Installed);
12674 pragma Inline (Limited_Present);
12675 pragma Inline (Literals);
12676 pragma Inline (Local_Raise_Not_OK);
12677 pragma Inline (Local_Raise_Statements);
12678 pragma Inline (Loop_Actions);
12679 pragma Inline (Loop_Parameter_Specification);
12680 pragma Inline (Low_Bound);
12681 pragma Inline (Mod_Clause);
12682 pragma Inline (More_Ids);
12683 pragma Inline (Must_Be_Byte_Aligned);
12684 pragma Inline (Must_Not_Freeze);
12685 pragma Inline (Must_Not_Override);
12686 pragma Inline (Must_Override);
12687 pragma Inline (Name);
12688 pragma Inline (Names);
12689 pragma Inline (Next_Entity);
12690 pragma Inline (Next_Exit_Statement);
12691 pragma Inline (Next_Implicit_With);
12692 pragma Inline (Next_Named_Actual);
12693 pragma Inline (Next_Pragma);
12694 pragma Inline (Next_Rep_Item);
12695 pragma Inline (Next_Use_Clause);
12696 pragma Inline (No_Ctrl_Actions);
12697 pragma Inline (No_Elaboration_Check);
12698 pragma Inline (No_Entities_Ref_In_Spec);
12699 pragma Inline (No_Initialization);
12700 pragma Inline (No_Minimize_Eliminate);
12701 pragma Inline (No_Truncation);
12702 pragma Inline (Non_Aliased_Prefix);
12703 pragma Inline (Null_Present);
12704 pragma Inline (Null_Excluding_Subtype);
12705 pragma Inline (Null_Exclusion_Present);
12706 pragma Inline (Null_Exclusion_In_Return_Present);
12707 pragma Inline (Null_Record_Present);
12708 pragma Inline (Object_Definition);
12709 pragma Inline (Of_Present);
12710 pragma Inline (Original_Discriminant);
12711 pragma Inline (Original_Entity);
12712 pragma Inline (Others_Discrete_Choices);
12713 pragma Inline (Out_Present);
12714 pragma Inline (Parameter_Associations);
12715 pragma Inline (Parameter_Specifications);
12716 pragma Inline (Parameter_Type);
12717 pragma Inline (Parent_Spec);
12718 pragma Inline (Position);
12719 pragma Inline (Pragma_Argument_Associations);
12720 pragma Inline (Pragma_Identifier);
12721 pragma Inline (Pragmas_After);
12722 pragma Inline (Pragmas_Before);
12723 pragma Inline (Pre_Post_Conditions);
12724 pragma Inline (Prefix);
12725 pragma Inline (Premature_Use);
12726 pragma Inline (Present_Expr);
12727 pragma Inline (Prev_Ids);
12728 pragma Inline (Print_In_Hex);
12729 pragma Inline (Private_Declarations);
12730 pragma Inline (Private_Present);
12731 pragma Inline (Procedure_To_Call);
12732 pragma Inline (Proper_Body);
12733 pragma Inline (Protected_Definition);
12734 pragma Inline (Protected_Present);
12735 pragma Inline (Raises_Constraint_Error);
12736 pragma Inline (Range_Constraint);
12737 pragma Inline (Range_Expression);
12738 pragma Inline (Real_Range_Specification);
12739 pragma Inline (Realval);
12740 pragma Inline (Reason);
12741 pragma Inline (Record_Extension_Part);
12742 pragma Inline (Redundant_Use);
12743 pragma Inline (Renaming_Exception);
12744 pragma Inline (Result_Definition);
12745 pragma Inline (Return_Object_Declarations);
12746 pragma Inline (Return_Statement_Entity);
12747 pragma Inline (Reverse_Present);
12748 pragma Inline (Right_Opnd);
12749 pragma Inline (Rounded_Result);
12750 pragma Inline (SCIL_Controlling_Tag);
12751 pragma Inline (SCIL_Entity);
12752 pragma Inline (SCIL_Tag_Value);
12753 pragma Inline (SCIL_Target_Prim);
12754 pragma Inline (Scope);
12755 pragma Inline (Select_Alternatives);
12756 pragma Inline (Selector_Name);
12757 pragma Inline (Selector_Names);
12758 pragma Inline (Shift_Count_OK);
12759 pragma Inline (Source_Type);
12760 pragma Inline (Specification);
12761 pragma Inline (Split_PPC);
12762 pragma Inline (Statements);
12763 pragma Inline (Storage_Pool);
12764 pragma Inline (Subpool_Handle_Name);
12765 pragma Inline (Strval);
12766 pragma Inline (Subtype_Indication);
12767 pragma Inline (Subtype_Mark);
12768 pragma Inline (Subtype_Marks);
12769 pragma Inline (Suppress_Assignment_Checks);
12770 pragma Inline (Suppress_Loop_Warnings);
12771 pragma Inline (Synchronized_Present);
12772 pragma Inline (Tagged_Present);
12773 pragma Inline (Target_Type);
12774 pragma Inline (Task_Definition);
12775 pragma Inline (Task_Present);
12776 pragma Inline (Then_Actions);
12777 pragma Inline (Then_Statements);
12778 pragma Inline (Triggering_Alternative);
12779 pragma Inline (Triggering_Statement);
12780 pragma Inline (Treat_Fixed_As_Integer);
12781 pragma Inline (TSS_Elist);
12782 pragma Inline (Type_Definition);
12783 pragma Inline (Uneval_Old_Accept);
12784 pragma Inline (Uneval_Old_Warn);
12785 pragma Inline (Unit);
12786 pragma Inline (Uninitialized_Variable);
12787 pragma Inline (Unknown_Discriminants_Present);
12788 pragma Inline (Unreferenced_In_Spec);
12789 pragma Inline (Variant_Part);
12790 pragma Inline (Variants);
12791 pragma Inline (Visible_Declarations);
12792 pragma Inline (Used_Operations);
12793 pragma Inline (Was_Originally_Stub);
12794 pragma Inline (Withed_Body);
12796 pragma Inline (Set_ABE_Is_Certain);
12797 pragma Inline (Set_Abort_Present);
12798 pragma Inline (Set_Abortable_Part);
12799 pragma Inline (Set_Abstract_Present);
12800 pragma Inline (Set_Accept_Handler_Records);
12801 pragma Inline (Set_Accept_Statement);
12802 pragma Inline (Set_Access_Definition);
12803 pragma Inline (Set_Access_To_Subprogram_Definition);
12804 pragma Inline (Set_Access_Types_To_Process);
12805 pragma Inline (Set_Actions);
12806 pragma Inline (Set_Activation_Chain_Entity);
12807 pragma Inline (Set_Acts_As_Spec);
12808 pragma Inline (Set_Actual_Designated_Subtype);
12809 pragma Inline (Set_Address_Warning_Posted);
12810 pragma Inline (Set_Aggregate_Bounds);
12811 pragma Inline (Set_Aliased_Present);
12812 pragma Inline (Set_All_Others);
12813 pragma Inline (Set_All_Present);
12814 pragma Inline (Set_Alternatives);
12815 pragma Inline (Set_Ancestor_Part);
12816 pragma Inline (Set_Array_Aggregate);
12817 pragma Inline (Set_Aspect_Rep_Item);
12818 pragma Inline (Set_Assignment_OK);
12819 pragma Inline (Set_Associated_Node);
12820 pragma Inline (Set_At_End_Proc);
12821 pragma Inline (Set_Atomic_Sync_Required);
12822 pragma Inline (Set_Attribute_Name);
12823 pragma Inline (Set_Aux_Decls_Node);
12824 pragma Inline (Set_Backwards_OK);
12825 pragma Inline (Set_Bad_Is_Detected);
12826 pragma Inline (Set_Body_Required);
12827 pragma Inline (Set_Body_To_Inline);
12828 pragma Inline (Set_Box_Present);
12829 pragma Inline (Set_By_Ref);
12830 pragma Inline (Set_Char_Literal_Value);
12831 pragma Inline (Set_Chars);
12832 pragma Inline (Set_Check_Address_Alignment);
12833 pragma Inline (Set_Choice_Parameter);
12834 pragma Inline (Set_Choices);
12835 pragma Inline (Set_Class_Present);
12836 pragma Inline (Set_Classifications);
12837 pragma Inline (Set_Cleanup_Actions);
12838 pragma Inline (Set_Comes_From_Extended_Return_Statement);
12839 pragma Inline (Set_Compile_Time_Known_Aggregate);
12840 pragma Inline (Set_Component_Associations);
12841 pragma Inline (Set_Component_Clauses);
12842 pragma Inline (Set_Component_Definition);
12843 pragma Inline (Set_Component_Items);
12844 pragma Inline (Set_Component_List);
12845 pragma Inline (Set_Component_Name);
12846 pragma Inline (Set_Componentwise_Assignment);
12847 pragma Inline (Set_Condition);
12848 pragma Inline (Set_Condition_Actions);
12849 pragma Inline (Set_Config_Pragmas);
12850 pragma Inline (Set_Constant_Present);
12851 pragma Inline (Set_Constraint);
12852 pragma Inline (Set_Constraints);
12853 pragma Inline (Set_Context_Installed);
12854 pragma Inline (Set_Context_Items);
12855 pragma Inline (Set_Context_Pending);
12856 pragma Inline (Set_Contract_Test_Cases);
12857 pragma Inline (Set_Controlling_Argument);
12858 pragma Inline (Set_Conversion_OK);
12859 pragma Inline (Set_Convert_To_Return_False);
12860 pragma Inline (Set_Corresponding_Aspect);
12861 pragma Inline (Set_Corresponding_Body);
12862 pragma Inline (Set_Corresponding_Formal_Spec);
12863 pragma Inline (Set_Corresponding_Generic_Association);
12864 pragma Inline (Set_Corresponding_Integer_Value);
12865 pragma Inline (Set_Corresponding_Spec);
12866 pragma Inline (Set_Corresponding_Spec_Of_Stub);
12867 pragma Inline (Set_Corresponding_Stub);
12868 pragma Inline (Set_Dcheck_Function);
12869 pragma Inline (Set_Declarations);
12870 pragma Inline (Set_Default_Expression);
12871 pragma Inline (Set_Default_Name);
12872 pragma Inline (Set_Default_Storage_Pool);
12873 pragma Inline (Set_Defining_Identifier);
12874 pragma Inline (Set_Defining_Unit_Name);
12875 pragma Inline (Set_Delay_Alternative);
12876 pragma Inline (Set_Delay_Statement);
12877 pragma Inline (Set_Delta_Expression);
12878 pragma Inline (Set_Digits_Expression);
12879 pragma Inline (Set_Discr_Check_Funcs_Built);
12880 pragma Inline (Set_Discrete_Choices);
12881 pragma Inline (Set_Discrete_Range);
12882 pragma Inline (Set_Discrete_Subtype_Definition);
12883 pragma Inline (Set_Discrete_Subtype_Definitions);
12884 pragma Inline (Set_Discriminant_Specifications);
12885 pragma Inline (Set_Discriminant_Type);
12886 pragma Inline (Set_Do_Accessibility_Check);
12887 pragma Inline (Set_Do_Discriminant_Check);
12888 pragma Inline (Set_Do_Division_Check);
12889 pragma Inline (Set_Do_Length_Check);
12890 pragma Inline (Set_Do_Overflow_Check);
12891 pragma Inline (Set_Do_Range_Check);
12892 pragma Inline (Set_Do_Storage_Check);
12893 pragma Inline (Set_Do_Tag_Check);
12894 pragma Inline (Set_Elaborate_All_Desirable);
12895 pragma Inline (Set_Elaborate_All_Present);
12896 pragma Inline (Set_Elaborate_Desirable);
12897 pragma Inline (Set_Elaborate_Present);
12898 pragma Inline (Set_Else_Actions);
12899 pragma Inline (Set_Else_Statements);
12900 pragma Inline (Set_Elsif_Parts);
12901 pragma Inline (Set_Enclosing_Variant);
12902 pragma Inline (Set_End_Label);
12903 pragma Inline (Set_End_Span);
12904 pragma Inline (Set_Entity);
12905 pragma Inline (Set_Entry_Body_Formal_Part);
12906 pragma Inline (Set_Entry_Call_Alternative);
12907 pragma Inline (Set_Entry_Call_Statement);
12908 pragma Inline (Set_Entry_Direct_Name);
12909 pragma Inline (Set_Entry_Index);
12910 pragma Inline (Set_Entry_Index_Specification);
12911 pragma Inline (Set_Etype);
12912 pragma Inline (Set_Exception_Choices);
12913 pragma Inline (Set_Exception_Handlers);
12914 pragma Inline (Set_Exception_Junk);
12915 pragma Inline (Set_Exception_Label);
12916 pragma Inline (Set_Expansion_Delayed);
12917 pragma Inline (Set_Explicit_Actual_Parameter);
12918 pragma Inline (Set_Explicit_Generic_Actual_Parameter);
12919 pragma Inline (Set_Expression);
12920 pragma Inline (Set_Expressions);
12921 pragma Inline (Set_First_Bit);
12922 pragma Inline (Set_First_Inlined_Subprogram);
12923 pragma Inline (Set_First_Name);
12924 pragma Inline (Set_First_Named_Actual);
12925 pragma Inline (Set_First_Real_Statement);
12926 pragma Inline (Set_First_Subtype_Link);
12927 pragma Inline (Set_Float_Truncate);
12928 pragma Inline (Set_Formal_Type_Definition);
12929 pragma Inline (Set_Forwards_OK);
12930 pragma Inline (Set_From_Aspect_Specification);
12931 pragma Inline (Set_From_At_End);
12932 pragma Inline (Set_From_At_Mod);
12933 pragma Inline (Set_From_Conditional_Expression);
12934 pragma Inline (Set_From_Default);
12935 pragma Inline (Set_Generalized_Indexing);
12936 pragma Inline (Set_Generic_Associations);
12937 pragma Inline (Set_Generic_Formal_Declarations);
12938 pragma Inline (Set_Generic_Parent);
12939 pragma Inline (Set_Generic_Parent_Type);
12940 pragma Inline (Set_Handled_Statement_Sequence);
12941 pragma Inline (Set_Handler_List_Entry);
12942 pragma Inline (Set_Has_Created_Identifier);
12943 pragma Inline (Set_Has_Dereference_Action);
12944 pragma Inline (Set_Has_Dynamic_Length_Check);
12945 pragma Inline (Set_Has_Dynamic_Range_Check);
12946 pragma Inline (Set_Has_Init_Expression);
12947 pragma Inline (Set_Has_Local_Raise);
12948 pragma Inline (Set_Has_No_Elaboration_Code);
12949 pragma Inline (Set_Has_Pragma_Suppress_All);
12950 pragma Inline (Set_Has_Private_View);
12951 pragma Inline (Set_Has_Relative_Deadline_Pragma);
12952 pragma Inline (Set_Has_Self_Reference);
12953 pragma Inline (Set_Has_SP_Choice);
12954 pragma Inline (Set_Has_Storage_Size_Pragma);
12955 pragma Inline (Set_Has_Wide_Character);
12956 pragma Inline (Set_Has_Wide_Wide_Character);
12957 pragma Inline (Set_Header_Size_Added);
12958 pragma Inline (Set_Hidden_By_Use_Clause);
12959 pragma Inline (Set_High_Bound);
12960 pragma Inline (Set_Identifier);
12961 pragma Inline (Set_Implicit_With);
12962 pragma Inline (Set_Import_Interface_Present);
12963 pragma Inline (Set_In_Present);
12964 pragma Inline (Set_Includes_Infinities);
12965 pragma Inline (Set_Incomplete_View);
12966 pragma Inline (Set_Inherited_Discriminant);
12967 pragma Inline (Set_Instance_Spec);
12968 pragma Inline (Set_Interface_List);
12969 pragma Inline (Set_Interface_Present);
12970 pragma Inline (Set_Intval);
12971 pragma Inline (Set_Is_Accessibility_Actual);
12972 pragma Inline (Set_Is_Asynchronous_Call_Block);
12973 pragma Inline (Set_Is_Boolean_Aspect);
12974 pragma Inline (Set_Is_Checked);
12975 pragma Inline (Set_Is_Component_Left_Opnd);
12976 pragma Inline (Set_Is_Component_Right_Opnd);
12977 pragma Inline (Set_Is_Controlling_Actual);
12978 pragma Inline (Set_Is_Delayed_Aspect);
12979 pragma Inline (Set_Is_Disabled);
12980 pragma Inline (Set_Is_Dynamic_Coextension);
12981 pragma Inline (Set_Is_Elsif);
12982 pragma Inline (Set_Is_Entry_Barrier_Function);
12983 pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
12984 pragma Inline (Set_Is_Finalization_Wrapper);
12985 pragma Inline (Set_Is_Folded_In_Parser);
12986 pragma Inline (Set_Is_Ignored);
12987 pragma Inline (Set_Is_In_Discriminant_Check);
12988 pragma Inline (Set_Is_Inherited);
12989 pragma Inline (Set_Is_Machine_Number);
12990 pragma Inline (Set_Is_Null_Loop);
12991 pragma Inline (Set_Is_Overloaded);
12992 pragma Inline (Set_Is_Power_Of_2_For_Shift);
12993 pragma Inline (Set_Is_Prefixed_Call);
12994 pragma Inline (Set_Is_Protected_Subprogram_Body);
12995 pragma Inline (Set_Is_Static_Coextension);
12996 pragma Inline (Set_Is_Static_Expression);
12997 pragma Inline (Set_Is_Subprogram_Descriptor);
12998 pragma Inline (Set_Is_Task_Allocation_Block);
12999 pragma Inline (Set_Is_Task_Master);
13000 pragma Inline (Set_Iteration_Scheme);
13001 pragma Inline (Set_Iterator_Specification);
13002 pragma Inline (Set_Itype);
13003 pragma Inline (Set_Kill_Range_Check);
13004 pragma Inline (Set_Label_Construct);
13005 pragma Inline (Set_Last_Bit);
13006 pragma Inline (Set_Last_Name);
13007 pragma Inline (Set_Left_Opnd);
13008 pragma Inline (Set_Library_Unit);
13009 pragma Inline (Set_Limited_Present);
13010 pragma Inline (Set_Limited_View_Installed);
13011 pragma Inline (Set_Literals);
13012 pragma Inline (Set_Local_Raise_Not_OK);
13013 pragma Inline (Set_Local_Raise_Statements);
13014 pragma Inline (Set_Loop_Actions);
13015 pragma Inline (Set_Loop_Parameter_Specification);
13016 pragma Inline (Set_Low_Bound);
13017 pragma Inline (Set_Mod_Clause);
13018 pragma Inline (Set_More_Ids);
13019 pragma Inline (Set_Must_Be_Byte_Aligned);
13020 pragma Inline (Set_Must_Not_Freeze);
13021 pragma Inline (Set_Must_Not_Override);
13022 pragma Inline (Set_Must_Override);
13023 pragma Inline (Set_Name);
13024 pragma Inline (Set_Names);
13025 pragma Inline (Set_Next_Entity);
13026 pragma Inline (Set_Next_Exit_Statement);
13027 pragma Inline (Set_Next_Implicit_With);
13028 pragma Inline (Set_Next_Named_Actual);
13029 pragma Inline (Set_Next_Pragma);
13030 pragma Inline (Set_Next_Rep_Item);
13031 pragma Inline (Set_Next_Use_Clause);
13032 pragma Inline (Set_No_Ctrl_Actions);
13033 pragma Inline (Set_No_Elaboration_Check);
13034 pragma Inline (Set_No_Entities_Ref_In_Spec);
13035 pragma Inline (Set_No_Initialization);
13036 pragma Inline (Set_No_Minimize_Eliminate);
13037 pragma Inline (Set_No_Truncation);
13038 pragma Inline (Set_Non_Aliased_Prefix);
13039 pragma Inline (Set_Null_Excluding_Subtype);
13040 pragma Inline (Set_Null_Exclusion_Present);
13041 pragma Inline (Set_Null_Exclusion_In_Return_Present);
13042 pragma Inline (Set_Null_Present);
13043 pragma Inline (Set_Null_Record_Present);
13044 pragma Inline (Set_Object_Definition);
13045 pragma Inline (Set_Of_Present);
13046 pragma Inline (Set_Original_Discriminant);
13047 pragma Inline (Set_Original_Entity);
13048 pragma Inline (Set_Others_Discrete_Choices);
13049 pragma Inline (Set_Out_Present);
13050 pragma Inline (Set_Parameter_Associations);
13051 pragma Inline (Set_Parameter_Specifications);
13052 pragma Inline (Set_Parameter_Type);
13053 pragma Inline (Set_Parent_Spec);
13054 pragma Inline (Set_Position);
13055 pragma Inline (Set_Pragma_Argument_Associations);
13056 pragma Inline (Set_Pragma_Identifier);
13057 pragma Inline (Set_Pragmas_After);
13058 pragma Inline (Set_Pragmas_Before);
13059 pragma Inline (Set_Pre_Post_Conditions);
13060 pragma Inline (Set_Prefix);
13061 pragma Inline (Set_Premature_Use);
13062 pragma Inline (Set_Present_Expr);
13063 pragma Inline (Set_Prev_Ids);
13064 pragma Inline (Set_Print_In_Hex);
13065 pragma Inline (Set_Private_Declarations);
13066 pragma Inline (Set_Private_Present);
13067 pragma Inline (Set_Procedure_To_Call);
13068 pragma Inline (Set_Proper_Body);
13069 pragma Inline (Set_Protected_Definition);
13070 pragma Inline (Set_Protected_Present);
13071 pragma Inline (Set_Raises_Constraint_Error);
13072 pragma Inline (Set_Range_Constraint);
13073 pragma Inline (Set_Range_Expression);
13074 pragma Inline (Set_Real_Range_Specification);
13075 pragma Inline (Set_Realval);
13076 pragma Inline (Set_Reason);
13077 pragma Inline (Set_Record_Extension_Part);
13078 pragma Inline (Set_Redundant_Use);
13079 pragma Inline (Set_Renaming_Exception);
13080 pragma Inline (Set_Result_Definition);
13081 pragma Inline (Set_Return_Object_Declarations);
13082 pragma Inline (Set_Reverse_Present);
13083 pragma Inline (Set_Right_Opnd);
13084 pragma Inline (Set_Rounded_Result);
13085 pragma Inline (Set_SCIL_Controlling_Tag);
13086 pragma Inline (Set_SCIL_Entity);
13087 pragma Inline (Set_SCIL_Tag_Value);
13088 pragma Inline (Set_SCIL_Target_Prim);
13089 pragma Inline (Set_Scope);
13090 pragma Inline (Set_Select_Alternatives);
13091 pragma Inline (Set_Selector_Name);
13092 pragma Inline (Set_Selector_Names);
13093 pragma Inline (Set_Shift_Count_OK);
13094 pragma Inline (Set_Source_Type);
13095 pragma Inline (Set_Split_PPC);
13096 pragma Inline (Set_Statements);
13097 pragma Inline (Set_Storage_Pool);
13098 pragma Inline (Set_Strval);
13099 pragma Inline (Set_Subpool_Handle_Name);
13100 pragma Inline (Set_Subtype_Indication);
13101 pragma Inline (Set_Subtype_Mark);
13102 pragma Inline (Set_Subtype_Marks);
13103 pragma Inline (Set_Suppress_Assignment_Checks);
13104 pragma Inline (Set_Suppress_Loop_Warnings);
13105 pragma Inline (Set_Synchronized_Present);
13106 pragma Inline (Set_TSS_Elist);
13107 pragma Inline (Set_Tagged_Present);
13108 pragma Inline (Set_Target_Type);
13109 pragma Inline (Set_Task_Definition);
13110 pragma Inline (Set_Task_Present);
13111 pragma Inline (Set_Then_Actions);
13112 pragma Inline (Set_Then_Statements);
13113 pragma Inline (Set_Treat_Fixed_As_Integer);
13114 pragma Inline (Set_Triggering_Alternative);
13115 pragma Inline (Set_Triggering_Statement);
13116 pragma Inline (Set_Type_Definition);
13117 pragma Inline (Set_Uneval_Old_Accept);
13118 pragma Inline (Set_Uneval_Old_Warn);
13119 pragma Inline (Set_Unit);
13120 pragma Inline (Set_Uninitialized_Variable);
13121 pragma Inline (Set_Unknown_Discriminants_Present);
13122 pragma Inline (Set_Unreferenced_In_Spec);
13123 pragma Inline (Set_Used_Operations);
13124 pragma Inline (Set_Variant_Part);
13125 pragma Inline (Set_Variants);
13126 pragma Inline (Set_Visible_Declarations);
13127 pragma Inline (Set_Was_Originally_Stub);
13128 pragma Inline (Set_Withed_Body);
13130 end Sinfo;